Bug 2351032
| Summary: | Review Request: python-tatsu - Python parser generator from grammars in a variation of EBNF | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Davide Cavalca <davide> | ||||
| Component: | Package Review | Assignee: | Ben Beasley <code> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | code, package-review | ||||
| Target Milestone: | --- | Keywords: | AutomationTriaged | ||||
| Target Release: | --- | Flags: | code:
fedora-review+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| URL: | https://tatsu.readthedocs.io | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | --- | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2025-06-02 14:32:01 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 2351033 | ||||||
| Attachments: |
|
||||||
|
Description
Davide Cavalca
2025-03-10 05:13:19 UTC
This package built on koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=130072086 Copr build: https://copr.fedorainfracloud.org/coprs/build/8746843 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2351032-python-tatsu/fedora-rawhide-x86_64/08746843-python-tatsu/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. This fails to build with: + /usr/bin/python3 -m tox --current-env --assert-config -q --recreate -e py313 tatsu/bootstrap.py:12:1: RUF100 [*] Unused `noqa` directive (unused: `C405`) | 10 | # the file is generated. 11 | 12 | # ruff: noqa: C405, COM812, I001, F401, PLR1702, PLC2801, SIM117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUF100 13 | 14 | import sys | = help: Remove unused `noqa` directive tatsu/tool.py:5:1: RUF100 [*] Unused `noqa` directive (unused: `PLR0912`) | 3 | the described language. 4 | """ 5 | # ruff: noqa: PLR0912 | ^^^^^^^^^^^^^^^^^^^^^ RUF100 6 | from __future__ import annotations | = help: Remove unused `noqa` directive test/grammar/semantics_test.py:1:1: RUF100 [*] Unused `noqa` directive (non-enabled: `S102`) | 1 | # ruff: noqa: S102 | ^^^^^^^^^^^^^^^^^^ RUF100 2 | import unittest | = help: Remove unused `noqa` directive test/parser_equivalence_test.py:1:1: RUF100 [*] Unused `noqa` directive (non-enabled: `S102`) | 1 | # ruff: noqa: S102 | ^^^^^^^^^^^^^^^^^^ RUF100 2 | import types | = help: Remove unused `noqa` directive Found 4 errors. [*] 4 fixable with the `--fix` option. py313: exit 1 (0.04 seconds) /builddir/build/BUILD/python-tatsu-5.13.1-build/TatSu-5.13.1> ruff check --preview tatsu test examples pid=817 You should patch out the ruff and mypy invocations from tox.ini as prescribed by https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters, or (easier) bypass tox, drop -t from %pyproject_requires, add a manual BuildRequires on pytest and just run the test suite with %pytest. Spec URL: https://dcavalca.fedorapeople.org/review/python-tatsu/python-tatsu.spec SRPM URL: https://dcavalca.fedorapeople.org/review/python-tatsu/python-tatsu-5.13.1-1.fc43.src.rpm Changelog: - use pytest instead of tox to run tests Created attachment 2092244 [details]
The .spec file difference from Copr build 8746843 to 9105166
Copr build: https://copr.fedorainfracloud.org/coprs/build/9105166 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2351032-python-tatsu/fedora-rawhide-x86_64/09105166-python-tatsu/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. The submission looks mostly correct. I found a misidentified license and a couple of other small issues. Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated ===== Issues ===== - The license is incorrectly identified; LICENSE.txt matches BSD-3-Clause-Attribution rather than BSD-4-Clause. - The file examples/markdown/grammar/markdown_parser.leg is copied from https://github.com/jgm/peg-markdown and is (GPL-2.0-or-later OR MIT). From the header of that file: markdown_parser.leg - markdown parser in C using a PEG grammar. (c) 2008 John MacFarlane (jgm at berkeley dot edu). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License or the MIT license. See LICENSE for details. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Even though this file is not shipped in the binary RPMs, the missing MIT license text should be present in the source RPM. https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/#_license_text I opened a PR upstream to fix this, https://github.com/neogeny/TatSu/pull/367. I think it would be reasonable to apply https://github.com/neogeny/TatSu/pull/367.patch downstream while waiting for upstream review. - Man pages are always desired for command-line tools: python3-tatsu.noarch: W: no-manual-page-for-binary g2e python3-tatsu.noarch: W: no-manual-page-for-binary tatsu https://docs.fedoraproject.org/en-US/packaging-guidelines/#_manpages However, they are not required. - Some non-script sources have useless/bogus shebang lines: python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/bootstrap.py 644 /usr/bin/env python3 python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/g2e/__init__.py 644 /usr/bin/env python3 You can fix this in %prep: sed -r -i '1{/^#!/d}' tatsu/bootstrap.py tatsu/g2e/__init__.py In projects where shebang lines keep reappearing, I sometimes use a construct like this: # Remove shebangs from library sources that will not have the execute bit set. # The find-then-modify pattern preserves mtimes on sources that did not need to # be modified. find 'tatsu' -type f -name '*.py' \ -exec gawk '/^#!/ { print FILENAME }; { nextfile }' '{}' '+' | xargs -r -t sed -r -i '1{/^#!/d}' It also generally makes sense to suggest removing useless shebangs upstream. I did this for tatsu/g2e/__init__.py in https://github.com/neogeny/TatSu/pull/369 (so you could use https://github.com/neogeny/TatSu/pull/369.patch if you want to), but since the comments at the beginning of tatsu/bootstrap.py say it is generated, I did not edit it directly, and a downstream patch will still be required to handle it. Note that *if* these shebangs were actually usable, they would need to be adjusted to avoid /usr/bin/env: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_shebangs ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [!]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Apache License 1.0 and/or BSD 3-Clause License", "Unknown or generated", "BSD 2-Clause License", "BSD 3-Clause License", "MIT License", "GNU General Public License". 135 files have unknown license. Detailed output of licensecheck in /home/ben/fedora/review/2351032-python-tatsu/licensecheck.txt Should be BSD-3-Clause-Attribution. Based on docs/LICENSE.txt, the contents of docs/ are BSD-2-Clause. The discrepancy from the top-level LICENSE.txt is odd, given that BSD-2-Clause isn’t a documentation-specific license, but it is acceptable in Fedora, and it doesn’t need to appear in the License field since no documentation is packaged. Similarly: - examples/g2e/grammar/Python.g is BSD-3-Clause - examples/g2e/grammar/Python3.g4 is MIT Examples aren’t packaged, so these don’t need to appear in License. Finally, examples/markdown/grammar/markdown_parser.leg is (GPL-2.0-or-later OR MIT), but the license text is missing; see Issues. [x]: License file installed when any subpackage combination is installed. $ rpm -qL -p results/python3-tatsu-5.13.1-1.fc43.noarch.rpm /usr/lib/python3.13/site-packages/tatsu-5.13.1.dist-info/licenses/LICENSE.txt The -l option to %pyproject_save_files protects against this license file accidentally disappearing in a future update. [x]: Package must own all directories that it creates. Note: Directories without known owners: /usr/lib/python3.13, /usr/lib/python3.13/site-packages These diagnostics are spurious; python3-libs owns these. [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [ ]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [-]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 11191 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: The License field must be a valid SPDX expression. [x]: Package requires other packages for directories it uses. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [x]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. The “main” license text is present. An ancillary file’s license would be added in https://github.com/neogeny/TatSu/pull/367. [x]: Final provides and requires are sane (see attachments). [-]: Fully versioned dependency in subpackages if applicable. Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in python3-tatsu , python3-tatsu+colorization , python3-tatsu+parproc [x]: Package functions as described. (tests pass) [x]: Latest version is packaged. [-]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [x]: Package should compile and build into binary rpms on all supported architectures. https://koji.fedoraproject.org/koji/taskinfo?taskID=133378976 [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-tatsu-5.13.1-1.fc43.noarch.rpm python3-tatsu+colorization-5.13.1-1.fc43.noarch.rpm python3-tatsu+parproc-5.13.1-1.fc43.noarch.rpm python-tatsu-5.13.1-1.fc43.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmpn9wgsldq')] checks: 32, packages: 4 python-tatsu.src: E: spelling-error ('memoizing', '%description -l en_US memoizing -> memorizing, demonizing, monetizing') python-tatsu.src: E: spelling-error ('parsers', '%description -l en_US parsers -> parser, parses, parers') python3-tatsu.noarch: E: spelling-error ('memoizing', '%description -l en_US memoizing -> memorizing, demonizing, monetizing') python3-tatsu.noarch: E: spelling-error ('parsers', '%description -l en_US parsers -> parser, parses, parers') python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/bootstrap.py 644 /usr/bin/env python3 python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/g2e/__init__.py 644 /usr/bin/env python3 python3-tatsu.noarch: W: no-manual-page-for-binary g2e python3-tatsu.noarch: W: no-manual-page-for-binary tatsu 4 packages and 0 specfiles checked; 6 errors, 2 warnings, 53 filtered, 6 badness; has taken 0.7 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 3 python3-tatsu.noarch: E: spelling-error ('memoizing', '%description -l en_US memoizing -> memorizing, demonizing, monetizing') python3-tatsu.noarch: E: spelling-error ('parsers', '%description -l en_US parsers -> parser, parses, parers') python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/bootstrap.py 644 /usr/bin/env python3 python3-tatsu.noarch: E: non-executable-script /usr/lib/python3.13/site-packages/tatsu/g2e/__init__.py 644 /usr/bin/env python3 python3-tatsu.noarch: W: no-manual-page-for-binary g2e python3-tatsu.noarch: W: no-manual-page-for-binary tatsu 3 packages and 0 specfiles checked; 4 errors, 2 warnings, 49 filtered, 4 badness; has taken 0.2 s Source checksums ---------------- https://github.com/neogeny/TatSu/archive/v5.13.1/TatSu-5.13.1.tar.gz : CHECKSUM(SHA256) this package : 953634c319e62ac49aac2d01138856c09e1e0a9d0f369c541ab6f213659b6a9a CHECKSUM(SHA256) upstream package : 953634c319e62ac49aac2d01138856c09e1e0a9d0f369c541ab6f213659b6a9a Requires -------- python3-tatsu (rpmlib, GLIBC filtered): /usr/bin/python3 python(abi) python3-tatsu+colorization (rpmlib, GLIBC filtered): python(abi) python3-tatsu python3.13dist(colorama) python3-tatsu+parproc (rpmlib, GLIBC filtered): python(abi) python3-tatsu python3.13dist(rich) Provides -------- python3-tatsu: python-tatsu python3-tatsu python3.13-tatsu python3.13dist(tatsu) python3dist(tatsu) python3-tatsu+colorization: python-tatsu+colorization python3-tatsu+colorization python3.13-tatsu+colorization python3.13dist(tatsu[colorization]) python3dist(tatsu[colorization]) python3-tatsu+parproc: python-tatsu+parproc python3-tatsu+parproc python3.13-tatsu+parproc python3.13dist(tatsu[parproc]) python3dist(tatsu[parproc]) Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2351032 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Generic, Python Disabled plugins: PHP, Java, Ocaml, Haskell, fonts, SugarActivity, Perl, R, C/C++ Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH Spec URL: https://dcavalca.fedorapeople.org/review/python-tatsu/python-tatsu.spec SRPM URL: https://dcavalca.fedorapeople.org/review/python-tatsu/python-tatsu-5.13.1-1.fc43.src.rpm Changelog: - update license tag - backport upstream PR to add missing license text - drop unneeded shebangs Looking at the spec-file diff, all requested changes that were required for approval have been correctly implemented, and there is no reason to believe any new problems might have been introduced. The package is therefore APPROVED. --- ../../srpm-unpacked/python-tatsu.spec 2025-05-29 20:00:00.000000000 -0400 +++ srpm-unpacked/python-tatsu.spec 2025-05-30 20:00:00.000000000 -0400 @@ -6,14 +6,17 @@ Release: %autorelease Summary: Python parser generator from grammars in a variation of EBNF -License: BSD-4-Clause +License: BSD-3-Clause-Attribution URL: https://tatsu.readthedocs.io # PyPI tarball doesn't include tests Source: %{forgeurl}/archive/v%{version}/%{srcname}-%{version}.tar.gz +# Add missing license text for markdown_parser.leg +Patch: %{forgeurl}/pull/367.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest +BuildRequires: sed %global _description %{expand: TatSu is a tool that takes grammars in a variation of EBNF as input, and @@ -31,6 +34,9 @@ %prep %autosetup -p1 -n %{srcname}-%{version} +# Drop unneeded shebangs +sed -r -i '1{/^#!/d}' tatsu/bootstrap.py tatsu/g2e/__init__.py + %generate_buildrequires %pyproject_buildrequires -x colorization,parproc The updated rpmlint output is: python3-tatsu.noarch: E: spelling-error ('memoizing', '%description -l en_US memoizing -> memorizing, demonizing, monetizing') python3-tatsu.noarch: E: spelling-error ('parsers', '%description -l en_US parsers -> parser, parses, parers') python3-tatsu.noarch: W: no-manual-page-for-binary g2e python3-tatsu.noarch: W: no-manual-page-for-binary tatsu 3 packages and 0 specfiles checked; 2 errors, 2 warnings, 49 filtered, 2 badness; has taken 0.2 s The Pagure repository was created at https://src.fedoraproject.org/rpms/python-tatsu FEDORA-2025-e185df0b83 (python-tatsu-5.13.1-1.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-e185df0b83 FEDORA-2025-e185df0b83 (python-tatsu-5.13.1-1.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2025-1d630e05cb (python-tatsu-5.13.1-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2025-1d630e05cb FEDORA-2025-56cea4473c (python-tatsu-5.13.1-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-56cea4473c FEDORA-2025-56cea4473c has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-56cea4473c \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-56cea4473c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2025-1d630e05cb has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-1d630e05cb \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-1d630e05cb See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2025-56cea4473c (python-tatsu-5.13.1-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2025-1d630e05cb (python-tatsu-5.13.1-1.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report. |