Bug 2497706 - Review Request: python-pytokens - A fast, spec compliant Python 3.14+ tokenizer
Summary: Review Request: python-pytokens - A fast, spec compliant Python 3.14+ tokenizer
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/tusharsadhwani/pyt...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-07 13:04 UTC by Simone Tollardo
Modified: 2026-07-08 11:08 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-07-08 10:54:37 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 10695283 to 10695305 (1.62 KB, patch)
2026-07-08 02:09 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 10695305 to 10695971 (761 bytes, patch)
2026-07-08 07:40 UTC, Fedora Review Service
no flags Details | Diff

Description Simone Tollardo 2026-07-07 13:04:47 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/tollsimy/pytokens/srpm-builds/10692297/python-pytokens.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/tollsimy/pytokens/srpm-builds/10692297/python-pytokens-0.4.1-1.fc45.src.rpm
Description: A Fast, spec compliant Python 3.14+ tokenizer that runs on older Pythons.
Fedora Account System Username: tollsimy

Comment 1 Simone Tollardo 2026-07-07 13:07:22 UTC
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=147515190

Comment 2 Simone Tollardo 2026-07-07 13:10:18 UTC
As suggested by package maintainer docs, I want to point out that this would be my first Fedora package and I would need the sponsorship.

Comment 3 Miro Hrončok 2026-07-07 13:20:11 UTC
I am willing to work with Simone and eventually get them sponsored.


spec sanity:

The linked spec file is rpmautospec-processed. it is better to link ot a spec file that hasn't been processed by rpmautospec (e.g. it has plain %autochangelog and no ## START: Set by rpmautospec section).


> %pytest --override-ini addopts=

Perhaps document in a comment why those options are used. I suppose it is to drop:

  [tool.pytest.ini_options]
  addopts = "--cov --cov-report=term-missing"

But it is not obvious without looking at the config.

> %license LICENSE

Upstream has: license = { file = "LICENSE" }

So this should not be needed. Instead, pass -l (--assert-license) to %pyproject_save_files.

Comment 4 Simone Tollardo 2026-07-07 15:20:54 UTC
Thank you Miro for the feedback!

I believe I wrongly linked an older iteration of the spec file as removed the `override-ini addopts=`. Copr "directory" link Lighttpd seems to be listing only the first submitted build.

Anyway, I'll remove the unnecessary license macro and I'll link the original SPEC file wothout the rpmautospec lines.

Here is the updated one:

- spec: https://download.copr.fedorainfracloud.org/results/tollsimy/pytokens/srpm-builds/10693859/python-pytokens.spec
- srcrpm: https://download.copr.fedorainfracloud.org/results/tollsimy/pytokens/srpm-builds/10693859/python-pytokens-0.4.1-1.src.rpm

Thank you in advance!

Comment 6 Miro Hrončok 2026-07-07 15:57:08 UTC
The spec uses %pyproject_buildrequires -x dev, which pulls in the entire [dev] extra: black, build, mypy, pytest, pytest-cov, setuptools, tox, twine, wheel.
Per the Python packaging guidelines, linters like black and mypy SHOULD NOT be run in %check, and tools like build, twine, and tox are not needed.
Since the spec uses %pytest (not %tox), only pytest is actually needed.
The spec should ideally use just BuildRequires: python3-pytest (or upstream could be asked for a less "general purpose" dev extra, e.g. a test extra).

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters

Also, removal of pytest-cov likely means going back to %pytest --override-ini addopts=.

Side note: mypy is listed in build-system.requires in pyproject.toml (for mypyc support),
but since PYTOKENS_USE_MYPYC=0 is set, it's a wasted build dependency.
Probably not worth addressing, but good to document in a comment.

Comment 7 Fedora Review Service 2026-07-08 02:05:53 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10695283
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2497706-python-pytokens/fedora-rawhide-x86_64/10695283-python-pytokens/fedora-review/review.txt

Please take a look if any issues were found.


---
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 8 Fedora Review Service 2026-07-08 02:09:10 UTC
Created attachment 2148001 [details]
The .spec file difference from Copr build 10695283 to 10695305

Comment 9 Fedora Review Service 2026-07-08 02:09:13 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10695305
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2497706-python-pytokens/fedora-rawhide-x86_64/10695305-python-pytokens/fedora-review/review.txt

Please take a look if any issues were found.


---
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 11 Fedora Review Service 2026-07-08 07:40:37 UTC
Created attachment 2148008 [details]
The .spec file difference from Copr build 10695305 to 10695971

Comment 12 Fedora Review Service 2026-07-08 07:40:40 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/10695971
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2497706-python-pytokens/fedora-rawhide-x86_64/10695971-python-pytokens/fedora-review/review.txt

Please take a look if any issues were found.


---
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 13 Miro Hrončok 2026-07-08 09:56:50 UTC
  1. Naming (MUST): Source python-pytokens, binary python3-pytokens -- correct per Python naming guidelines.
  2. License (MUST): MIT. LICENSE file contains standard MIT text (copyright Tushar Sadhwani). License: MIT SPDX
  identifier is correct. License included via %pyproject_save_files -l (verified in .dist-info/licenses/LICENSE).
  3. Source URL (MUST): %{pypi_source pytokens} -- SHA256 checksums match upstream.
  4. Build success (MUST): Build succeeded on all architectures. All 4 tests pass.
  5. BuildRequires (MUST): python3-devel present. python3-pytest for tests.
  6. Spec legibility (MUST): Clean, legible, American English.
  7. Macros (MUST): Consistent usage (%autosetup, %pyproject_wheel, %pyproject_install, %pyproject_save_files,
  %pytest, %autorelease, %autochangelog).
  8. No bundled libraries (MUST): Pure Python, no bundled code.
  9. Directory ownership (MUST): Correct. /usr/lib/python3.15/site-packages owned by python3 -- known
  fedora-review false positive.
  10. File permissions (MUST): Correct.
  11. No duplicate files (MUST): Confirmed.
  12. UTF-8 filenames (MUST): Confirmed.
  13. Dist-info metadata (MUST per Python guidelines): Present.
  14. Provides/Requires: Correct (python3dist(pytokens), python3.15dist(pytokens), etc.). Only runtime require is
  python(abi) = 3.15 (package has no runtime deps).
  15. Tests (SHOULD/MUST): %check runs %pytest, 4/4 pass. Coverage skipped cleanly via --override-ini.
  16. No deprecated packages (MUST): Confirmed.
  17. PyPI parity (SHOULD): Package exists on PyPI.
  18. BuildArch: noarch: Correct -- mypyc disabled via PYTOKENS_USE_MYPYC=0.

  rpmlint

  - zero-length _mypyc_dummy.py -- Not an issue. Intentional upstream file, a mypyc compilation stub that is
  empty by design.
  - spelling-error ('tokenizer') -- Not an issue. "Tokenizer" is a valid English word.

Package APPROVED.

I'll sponsor you and work with you on python-black update.

Comment 14 Fedora Admin user for bugzilla script actions 2026-07-08 10:22:31 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pytokens
Monitoring:
Wasn't able to create project in Anitya. You can create it manually on: `https://release-monitoring.org`

Comment 15 Fedora Update System 2026-07-08 10:50:00 UTC
FEDORA-2026-87830a8e74 (python-pytokens-0.4.1-1.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-87830a8e74

Comment 16 Fedora Update System 2026-07-08 10:54:37 UTC
FEDORA-2026-87830a8e74 (python-pytokens-0.4.1-1.fc45) has been pushed to the Fedora 45 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.