Bug 2217491

Summary: Review Request: python-zombie-imp - A copy of the `imp` module that was removed in Python 3.12
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: Package ReviewAssignee: Karolina Surma <ksurma>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ksurma, mhroncok, package-review
Target Milestone: ---Flags: ksurma: fedora-review+
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://github.com/encukou/zombie-imp
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 16:18:00 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:
Attachments:
Description Flags
The .spec file difference from Copr build 6118035 to 6118163
none
The .spec file difference from Copr build 6118163 to 6118322 none

Description Tomáš Hrnčiar 2023-06-26 12:25:43 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06113998-python-zombie-imp/python-zombie-imp.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06113998-python-zombie-imp/python-zombie-imp-0.0.1-1.fc39.src.rpm
Description: A particularly mischevious act of necromancy. That is, A copy of the imp module that was removed in Python 3.12.

Don't use this, it'll probably trick and bite you.
Fedora Account System Username: thrnciar

Comment 1 Karolina Surma 2023-06-26 14:09:23 UTC
fedora-review is broken in Rawhide apparently due to dnf5 issue: https://github.com/rpm-software-management/dnf5/issues/635
I'll inspect the built Rawhide RPMs and use the results from F38 review as a partial workaround.

Specfile:
It looks pretty standard, just one nitpick: Consider adding to the package description a tad more serious explanation why it's actually packaged to Fedora - the current one raises more questions than answers.

RPM:
The tests are not running during the build: build.log contains these lines:

+ /usr/bin/python3 -m tox --current-env -q --recreate -e py311
  py311: OK (0.00 seconds)
  congratulations :) (0.03 seconds)

Comment 2 Karolina Surma 2023-06-26 15:03:45 UTC
Except for the tests, the rest looks good. Please post the updated specfile with running %check.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== FOUND ISSUES =====

[!]: %check is present and all tests pass.
Note: no tests run.

===== 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.
[x]: License field in the package spec file matches the actual license.
[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.
[x]: 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 10240 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: No rpmlint messages.
[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]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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:
[-]: Python eggs must not download any dependencies during the build
     process.
[-]: 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:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: 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.
[!]: %check is present and all tests pass.
[?]: 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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.

Comment 3 Tomáš Hrnčiar 2023-06-27 10:28:41 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118029-python-zombie-imp/python-zombie-imp.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118029-python-zombie-imp/python-zombie-imp-0.0.2-1.fc39.src.rpm
Description: A particularly mischevious act of necromancy. That is, A copy of the imp module that was removed in Python 3.12.

Don't use this, it'll probably trick and bite you.
Fedora Account System Username: thrnciar

Comment 4 Fedora Review Service 2023-06-27 10:34:01 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6118035
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2217491-python-zombie-imp/fedora-rawhide-x86_64/06118035-python-zombie-imp/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 5 Tomáš Hrnčiar 2023-06-27 11:04:13 UTC
Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118097-python-zombie-imp/python-zombie-imp.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118097-python-zombie-imp/python-zombie-imp-0.0.2-1.fc39.src.rpm
Description: A copy of the imp module that was removed in Python 3.12.
This is a compat package to ease transition to Python 3.12.
It shouldn't be used and packages using `imp` module
should use `importlib.metadata` instead.
Fedora Account System Username: thrnciar

Comment 6 Fedora Review Service 2023-06-27 11:09:06 UTC
Created attachment 1972804 [details]
The .spec file difference from Copr build 6118035 to 6118163

Comment 7 Fedora Review Service 2023-06-27 11:09:08 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6118163
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2217491-python-zombie-imp/fedora-rawhide-x86_64/06118163-python-zombie-imp/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 Karolina Surma 2023-06-27 11:23:29 UTC
Shouldn't the line `Provides:       deprecated()` be placed within the python3-zombie-imp instead of python-zombie-imp?

Comment 9 Tomáš Hrnčiar 2023-06-27 12:13:09 UTC
Oh, you are right. 

Spec URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118283-python-zombie-imp/python-zombie-imp.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/thrnciar/python-zombie-imp/fedora-rawhide-x86_64/06118283-python-zombie-imp/python-zombie-imp-0.0.2-1.fc39.src.rpm
Description: A copy of the imp module that was removed in Python 3.12.
This is a compat package to ease transition to Python 3.12.
It shouldn't be used and packages using `imp` module
should use `importlib.metadata` instead.
Fedora Account System Username: thrnciar

Comment 10 Fedora Review Service 2023-06-27 12:20:25 UTC
Created attachment 1972819 [details]
The .spec file difference from Copr build 6118163 to 6118322

Comment 11 Fedora Review Service 2023-06-27 12:20:28 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/6118322
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2217491-python-zombie-imp/fedora-rawhide-x86_64/06118322-python-zombie-imp/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 12 Karolina Surma 2023-06-27 15:32:14 UTC
Deprecated provides is present

$ rpm -qP python3-zombie-imp-0.0.2-1.fc39.noarch.rpm
deprecated()
python-zombie-imp = 0.0.2-1.fc39
python3-zombie-imp = 0.0.2-1.fc39
python3.11-zombie-imp = 0.0.2-1.fc39
python3.11dist(zombie-imp) = 0.0.2
python3dist(zombie-imp) = 0.0.2

Tests run and pass.

Package APPROVED.

Comment 13 Miro Hrončok 2023-06-27 15:54:23 UTC
Why not:

  %pyproject_save_files zombie_imp imp

Instead of:

  %files -n python3-zombie-imp -f %{pyproject_files}
  ...
  %{python3_sitelib}/__pycache__/imp.cpython-*
  %{python3_sitelib}/imp.py

?

Comment 14 Fedora Admin user for bugzilla script actions 2023-06-27 16:06:48 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-zombie-imp