Bug 1213698 - We have .cpython-311.pyc in non-311 packages
Summary: We have .cpython-311.pyc in non-311 packages
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Python (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Daniel Garcia
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-26 22:45 UTC by Matej Cepl
Modified: 2023-09-08 13:03 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matej Cepl 2023-07-26 22:45:46 UTC
I have been reminded about this:

-/usr/lib/python3.9/site-packages/blinker/__pycache__/base.cpython-311.pyc 6e33550a94efe8668e6b60422f1a674c9844fd6c44e92c0afcc5d98e71cf51cb 0
+/usr/lib/python3.9/site-packages/blinker/__pycache__/base.cpython-311.pyc 0b7e8cb203ad88028706b7204f007bb66a860cf3cfd6ebde4964a4caf6c248ef 0

why are 311.pyc files in the 3.9 path?

We run make html without specifying Python used. It runs the Sphinx builder with /usr/bin/python3 which is now Python 3.11 and it loads (and generates *.pyc) when collecting information on the installed libraries.

Suggested solution is https://stackoverflow.com/q/34025113/164233 and I have tried it in https://build.opensuse.org/request/show/1100942

However, it seems like too complicated problem (patching every package). Any other ideas?
Comment 1 Steve Kowalik 2023-07-27 05:25:44 UTC
An rpmlint check. Then we can catch them as they appear. If anyone has shell access to a mirror (or we do), a grep should find the victims quickly enough
Comment 3 Daniel Garcia 2023-07-31 12:06:45 UTC
Another option could be to call the sphinx module using "python -m" instead of calling "make html".

In this case I think this could also solve the problem, without a patch:

$python -m sphinx -M html . _build

Take a look to the following request:

https://build.opensuse.org/request/show/1101522
Comment 4 Daniel Garcia 2023-08-01 10:13:59 UTC
I've created a new check in rpmlint for this: https://github.com/rpm-software-management/rpmlint/pull/1095
Comment 5 OBSbugzilla Bot 2023-08-04 12:25:03 UTC
This is an autogenerated message for OBS integration:
This bug (1213698) was mentioned in
https://build.opensuse.org/request/show/1102380 Factory / python-blinker
Comment 6 Daniel Garcia 2023-08-07 07:20:05 UTC
The new check is now in rpmlint upstream. Now if different *.pyc versions are detected the warning 'python-pyc-multiple-versions' will be shown.