Bug 2308406 - Review Request: python-pymdown-extensions - Extension pack for Python Markdown
Summary: Review Request: python-pymdown-extensions - Extension pack for Python Markdown
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL: https://facelessuser.github.io/pymdow...
Whiteboard:
Depends On:
Blocks: 2308408
TreeView+ depends on / blocked
 
Reported: 2024-08-28 20:32 UTC by Davide Cavalca
Modified: 2024-08-29 20:20 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-08-29 20:19:24 UTC
Type: ---
Embargoed:
michel: fedora-review+


Attachments (Terms of Use)

Description Davide Cavalca 2024-08-28 20:32:10 UTC
Spec URL: https://dcavalca.fedorapeople.org/review/python-pymdown-extensions/python-pymdown-extensions.spec
SRPM URL: https://dcavalca.fedorapeople.org/review/python-pymdown-extensions/python-pymdown-extensions-10.9-1.fc42.src.rpm

Description:
PyMdown Extensions (pymdownx) is a collection of extensions for Python
Markdown.

Fedora Account System Username: dcavalca

Comment 1 Davide Cavalca 2024-08-28 20:32:12 UTC
This package built on koji:  https://koji.fedoraproject.org/koji/taskinfo?taskID=122621294

Comment 2 Fedora Review Service 2024-08-28 20:34:39 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7951066
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2308406-python-pymdown-extensions/fedora-rawhide-x86_64/07951066-python-pymdown-extensions/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 3 Davide Cavalca 2024-08-28 20:48:21 UTC
This package will need to be unretired: https://src.fedoraproject.org/rpms/python-pymdown-extensions

Comment 4 Michel Lind 2024-08-29 02:04:41 UTC
This part:

# Needed for the tests to pass
BuildRequires:  python3-pygments >= 2.18.0

and

# Drop invalid entry that breaks the pyproject macros
sed -i '/\.\[extra\]/d' pyproject.toml

That's only needed on epel9 right?

Relevant part of pyproject.toml

This package

[project.optional-dependencies]
extra = [
    "Pygments>=2.12"
]

readme-renderer:

[project.optional-dependencies]
md = ["cmarkgfm>=0.8.0"]

and in the spec

https://src.fedoraproject.org/rpms/python-readme-renderer/blob/f16ef838aba0746508fc0d11879b7b267b722e39/f/python-readme-renderer.spec#_40

%pyproject_buildrequires -t -x md
                            -----
(readme-renderer did not have the EPEL9 issue you have here because on EPEL9 some of its dependencies are old enough that even on an older version that still has setup.py, tests are already failing, so there's no point rebasing to a newer version)

not sure it's worth conditionalizing the whole spec but maybe add a note that those two sections are only needed because setuptools is too old in EL9 - the entries themselves are not actually invalid

Comment 5 Michel Lind 2024-08-29 02:09:26 UTC
Apart from that, this looks fine

Package was unretired and the diff from the previous spec (F35) is reasonable, simplifying the review.

- package builds and installs without errors on rawhide
- test suite is run and all unit tests pass
- latest version of the software is packaged
- license matches upstream specification (MIT AND BSD-2-Clause) and is acceptable for Fedora
- license file is included with %license in %files
- package complies with the Python Packaging Guidelines

Package APPROVED.

===

Recommended post-import python-packagers-sig tasks (use `fedora-sig-onboard onboard pkgname`:

- add @python-packagers-sig with "commit" access as package co-maintainer

- track package in koschei for all built branches

Comment 6 Davide Cavalca 2024-08-29 16:23:57 UTC
I'm dropping extra because it breaks like this:

Requirement satisfied: tox
   (installed: tox 4.16.0)
Handling .[extra] from tox --print-deps-only: py313
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/packaging/requirements.py", line 36, in __init__
    parsed = _parse_requirement(requirement_string)
  File "/usr/lib/python3.13/site-packages/packaging/_parser.py", line 62, in parse_requirement
    return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
  File "/usr/lib/python3.13/site-packages/packaging/_parser.py", line 71, in _parse_requirement
    name_token = tokenizer.expect(
        "IDENTIFIER", expected="package name at the start of dependency specifier"
    )
  File "/usr/lib/python3.13/site-packages/packaging/_tokenizer.py", line 142, in expect
    raise self.raise_syntax_error(f"Expected {expected}")
          ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/packaging/_tokenizer.py", line 167, in raise_syntax_error
    raise ParserSyntaxError(
    ...<3 lines>...
    )
packaging._tokenizer.ParserSyntaxError: Expected package name at the start of dependency specifier
    .[extra]
    ^

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 107, in add
    requirement = Requirement(requirement_str)
  File "/usr/lib/python3.13/site-packages/packaging/requirements.py", line 38, in __init__
    raise InvalidRequirement(str(e)) from e
packaging.requirements.InvalidRequirement: Expected package name at the start of dependency specifier
    .[extra]
    ^

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 568, in main
    generate_requires(
    ~~~~~~~~~~~~~~~~~^
        include_runtime=args.runtime,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<9 lines>...
        config_settings=parse_config_settings_args(args.config_settings),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 467, in generate_requires
    generate_tox_requirements(toxenv, requirements)
    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 418, in generate_tox_requirements
    requirements.extend(packages,
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
                        source=f'tox --print-deps-only: {toxenv}')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 195, in extend
    self.add(req_str, **kwargs)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 113, in add
    raise ValueError(message)
ValueError: Requirement '.[extra]' from tox --print-deps-only: py313 is invalid.

Comment 7 Davide Cavalca 2024-08-29 16:28:52 UTC
So yeah we still need to sed the broken entry out and the explicit BR, but you're right that we should also use the macros for the extra content.

Comment 8 Fedora Update System 2024-08-29 20:19:14 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-28665d7cbb

Comment 9 Fedora Update System 2024-08-29 20:19:24 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2024-08-29 20:19:28 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-08-29 20:19:31 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2024-08-29 20:19:34 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2024-08-29 20:19:36 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2024-08-29 20:19:39 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2024-08-29 20:19:41 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2024-08-29 20:19:44 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2024-08-29 20:19:46 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2024-08-29 20:19:49 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2024-08-29 20:19:52 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 20 Fedora Update System 2024-08-29 20:19:54 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 21 Fedora Update System 2024-08-29 20:19:56 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 22 Fedora Update System 2024-08-29 20:19:59 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 23 Fedora Update System 2024-08-29 20:20:02 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 24 Fedora Update System 2024-08-29 20:20:04 UTC
FEDORA-2024-28665d7cbb (python-pymdown-extensions-10.9-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.