Bug 1794283

Summary: python-eventlet fails to build with Python 3.9: module 'eventlet.green.thread' has no attribute '_is_main_interpreter'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-eventletAssignee: Kevin Fenzi <kevin>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, cstratak, igor.raits, kevin, mhroncok, shamardin, tir.karthi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-25 18:27:17 UTC Type: Bug
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: 1785415    

Description Miro Hrončok 2020-01-23 08:03:01 UTC
python-eventlet fails to build with Python 3.9.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/eventlet-0.25.1/tests/isolated/patcher_existing_locks_early.py", line 21, in <module>
    eventlet.monkey_patch()
  File "/builddir/build/BUILD/eventlet-0.25.1/eventlet/patcher.py", line 285, in monkey_patch
    modules_to_patch += modules_function()
  File "/builddir/build/BUILD/eventlet-0.25.1/eventlet/patcher.py", line 435, in _green_thread_modules
    from eventlet.green import threading
  File "/builddir/build/BUILD/eventlet-0.25.1/eventlet/green/threading.py", line 22, in <module>
    eventlet.patcher.inject(
  File "/builddir/build/BUILD/eventlet-0.25.1/eventlet/patcher.py", line 100, in inject
    module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
  File "/usr/lib64/python3.9/threading.py", line 37, in <module>
    _is_main_interpreter = _thread._is_main_interpreter
AttributeError: module 'eventlet.green.thread' has no attribute '_is_main_interpreter'


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01176457-python-eventlet/

For all our attempts to build python-eventlet with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-eventlet/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Karthikeyan Singaravelan 2020-01-23 08:19:04 UTC
Related CPython issue where this new attribute was added : https://bugs.python.org/issue37266

Comment 2 Ben Cotton 2020-02-11 17:27:49 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Miro Hrončok 2020-03-16 13:41:56 UTC
Kevin, could you please have look and report this upstream if needed? Thanks.

Comment 4 Kevin Fenzi 2020-03-16 21:54:03 UTC
Odd. I can't seem to find the build logs? The link is 404 and I can't see any directory for it?

Comment 5 Miro Hrončok 2020-03-16 21:59:47 UTC
Copr garbage collects old logs.

I've scheduled a new build, it should show up in a few seconds/minutes in:

https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-eventlet/

Comment 7 Kevin Fenzi 2020-03-19 23:16:29 UTC
Filed https://github.com/eventlet/eventlet/issues/604 upstream for this issue.

Comment 8 Miro Hrončok 2020-05-25 13:01:42 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/