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
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