Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2219556
Summary: | python-inotify doesn't work: imports asyncore removed in Python 3.12 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Karolina Surma <ksurma> |
Component: | python-inotify | Assignee: | Terje Røsten <terje.rosten> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 39 | CC: | amoralej, apevec, epel-packagers-sig, jcapitao, karlthered, mhroncok, openstack-sig, steve.traylen, terje.rosten, troy |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | python-inotify-0.9.6-32.fc40, python-inotify-0.9.6-32.fc39 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-08-14 13:28:43 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: | 2223081, 2241084 | ||
Bug Blocks: | 2220387, 2226270, 2229354 |
This breaks python-oslo-log, so I'll reassign there and back to get the solo folks CCed. (In reply to Miro Hrončok from comment #1) > ...to get the solo folks CCed. s/solo/oslo/ Thank you for the heads-up I was about to look into the oslo-log FTBFS FYI: https://github.com/simonrob/pyasyncore This package contains the asyncore module as found in Python versions prior to 3.12. It is provided so that existing code relying on import asyncore is able to continue being used without significant refactoring. If porting is difficult this might be an option? New package request: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2223081 It looks like "porting" isn't necessary, as there is already [asyncio support](https://github.com/seb-m/pyinotify/blob/master/python3/pyinotify.py#L1568). asyncore is only used to provide one particular [asyncore utility](https://github.com/seb-m/pyinotify/blob/0f3f8950d12e4a6534320153eed1a90a778da4ae/python3/pyinotify.py#L1497). So really all that needs to happen is to make asyncore import optional, and not create this class if it doesn't exist. Of course, if the user of pyinotify uses this class they will need to port over to one of the other options. However, they likely want to use that implementation because they are using elsewhere, and thus they'd already be broken under 3.12 anyway. from oslo-log user, it is not using any AsyncNotifier, however fails to import inotify as it imports asyncio unconditionally. If at least we could mak it optional import, that would unblock it I just posted a PR to fix the issue by making the import of asyncore optional: https://src.fedoraproject.org/rpms/python-inotify/pull-request/4 https://koji.fedoraproject.org/koji/buildinfo?buildID=2273341 * Thu Aug 10 2023 Troy Curtis, Jr <troycurtisjr> - 0.9.6-32 - Fixes build for Python 3.12 (#2219556) Note that this needs to be backported to f39 Building python-inotify-0.9.6-32.fc39 for f39-candidate Created task: 104828199 Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=104828199 Successfully waited 0:00 for python-inotify-0.9.6-32.fc39 to appear in the f39-build repo |
Module asyncore has been deleted from Python 3.12 with a recommendation to use asyncio instead. This hasn't been caught during the Python 3.12 mass-rebuild because the package runs no tests. Python 3.12.0b3 (main, Jun 21 2023, 00:00:00) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)] on linux >>> import pyinotify Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.12/site-packages/pyinotify.py", line 71, in <module> import asyncore ModuleNotFoundError: No module named 'asyncore' Reproducible: Always