Bug 1913291 - python-eventlet fails to build with Python 3.10: TypeError: can't set attributes of built-in/extension type 'TimeoutError'
Summary: python-eventlet fails to build with Python 3.10: TypeError: can't set attribu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-eventlet
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact:
URL:
Whiteboard:
: 1968968 (view as bug list)
Depends On:
Blocks: F35FTBFS F35FailsToInstall PYTHON3.10 1914840 1968806 1968867 1968966 1968970 1968996 1969073 1969077 1969121
TreeView+ depends on / blocked
 
Reported: 2021-01-06 13:09 UTC by Miro Hrončok
Modified: 2021-06-16 23:10 UTC (History)
10 users (show)

Fixed In Version: python-eventlet-0.31.0-3.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-16 23:10:03 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github eventlet eventlet issues 687 0 None open Compatibility with Python 3.10: TypeError: can't set attributes of built-in/extension type 'TimeoutError' 2021-02-22 08:56:08 UTC
Github eventlet eventlet pull 715 0 None open Add rudimentary support for Python 3.10 2021-06-16 09:49:10 UTC
Python 43908 0 None None None 2021-06-09 16:20:00 UTC

Description Miro Hrončok 2021-01-06 13:09:49 UTC
python-eventlet fails to build with Python 3.10.0a4.

+ sphinx-build-3.10 -b html -d doctrees doc html-3
Running Sphinx v3.3.1

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/lib/python3.10/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
    exec(code, _globals)
  File "/builddir/build/BUILD/eventlet-0.30.0/doc/conf.py", line 52, in <module>
    import eventlet
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/_socket_nodns.py", line 11, in <module>
    from eventlet import greenio
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/greenio/__init__.py", line 3, in <module>
    from eventlet.greenio.base import *  # noqa
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/greenio/base.py", line 32, in <module>
    socket_timeout = eventlet.timeout.wrap_is_timeout(socket.timeout)
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/timeout.py", line 166, in wrap_is_timeout
    base.is_timeout = property(lambda _: True)
TypeError: can't set attributes of built-in/extension type 'TimeoutError'

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

For all our attempts to build python-eventlet with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/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.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
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 Miro Hrončok 2021-01-06 13:14:09 UTC
Disabling the docs gets us no further:

+ nosetests-3.10 -v
Failure: TypeError (can't set attributes of built-in/extension type 'TimeoutError') ... ERROR
Failure: AttributeError (partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import)) ... ERROR
Failure: AttributeError (partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import)) ... ERROR

======================================================================
ERROR: Failure: TypeError (can't set attributes of built-in/extension type 'TimeoutError')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.10/site-packages/nose/loader.py", line 416, in loadTestsFromName
    module = self.importer.importFromPath(
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.10/imp.py", line 244, in load_module
    return load_package(name, filename)
  File "/usr/lib64/python3.10/imp.py", line 216, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 729, in _load
  File "<frozen importlib._bootstrap>", line 698, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 833, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/eventlet-0.30.0/benchmarks/__init__.py", line 12, in <module>
    import eventlet
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/_socket_nodns.py", line 11, in <module>
    from eventlet import greenio
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/greenio/__init__.py", line 3, in <module>
    from eventlet.greenio.base import *  # noqa
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/greenio/base.py", line 32, in <module>
    socket_timeout = eventlet.timeout.wrap_is_timeout(socket.timeout)
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/timeout.py", line 166, in wrap_is_timeout
    base.is_timeout = property(lambda _: True)
TypeError: can't set attributes of built-in/extension type 'TimeoutError'

======================================================================
ERROR: Failure: AttributeError (partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.10/site-packages/nose/loader.py", line 416, in loadTestsFromName
    module = self.importer.importFromPath(
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.10/imp.py", line 244, in load_module
    return load_package(name, filename)
  File "/usr/lib64/python3.10/imp.py", line 216, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 729, in _load
  File "<frozen importlib._bootstrap>", line 698, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 833, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/_socket_nodns.py", line 7, in <module>
    eventlet.patcher.slurp_properties(__socket, globals(), ignore=__patched__, srckeys=dir(__socket))
AttributeError: partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import)

======================================================================
ERROR: Failure: AttributeError (partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/usr/lib/python3.10/site-packages/nose/loader.py", line 416, in loadTestsFromName
    module = self.importer.importFromPath(
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python3.10/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/usr/lib64/python3.10/imp.py", line 244, in load_module
    return load_package(name, filename)
  File "/usr/lib64/python3.10/imp.py", line 216, in load_package
    return _load(spec)
  File "<frozen importlib._bootstrap>", line 729, in _load
  File "<frozen importlib._bootstrap>", line 698, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 833, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/eventlet-0.30.0/tests/__init__.py", line 25, in <module>
    import eventlet
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/builddir/build/BUILD/eventlet-0.30.0/eventlet/green/_socket_nodns.py", line 7, in <module>
    eventlet.patcher.slurp_properties(__socket, globals(), ignore=__patched__, srckeys=dir(__socket))
AttributeError: partially initialized module 'eventlet' has no attribute 'patcher' (most likely due to a circular import)

----------------------------------------------------------------------
Ran 3 tests in 0.043s

FAILED (errors=3)

Comment 2 Tomáš Hrnčiar 2021-01-26 08:35:28 UTC
Hello, is there any update on this?

Comment 3 Kevin Fenzi 2021-01-26 18:51:54 UTC
I have not had a chance to look into this, so no, no update.

Comment 4 Miro Hrončok 2021-01-26 19:22:54 UTC
Tomáš, let'' report this upstream please: https://github.com/eventlet/eventlet/issues

I imagine Kevin is swamped with infra things.

Comment 5 Ben Cotton 2021-02-09 15:37:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 6 Tomáš Hrnčiar 2021-02-22 08:56:09 UTC
Upstream issue: https://github.com/eventlet/eventlet/issues/687

Comment 7 Tomáš Hrnčiar 2021-03-30 10:41:08 UTC
Setting priority on high because there is a plenty of packages depending on eventlet which we cannot test with Python 3.10 without it. 

├── python-eventlet
│   ├── pykka
│   │   └── mopidy
│   ├── python-engineio
│   │   └── python-socketio
│   ├── python-f5-sdk
│   ├── python-httpretty
│   └── python-oslo-utils
│   │   ├── python-keystoneauth1
│   │   │	├── python-keystoneclient
│   │   │       │   └── python-openstackclient
│   │   │	│   ├── python-manilaclient
│   │   │	│   └── python-tackerclient
│   │   │	│   ├── python-aodhclient
│   │   │	│   ├── python-neutronclient
│   │   │	│   ├── python-cinderclient
│   │   │	│   ├── python-glanceclient
│   │   │	│   │   └── python-os-client-config
│   │   │	│   ├── python-novaclient
│   │   │	│   │   ├── python-novaclient-os-networks
│   │   │	│   │   └── python-novaclient-os-virtual-interfaces
│   │   │	│   └── python-oslo-concurrency
│   │   │	├── python-osc-lib
│   │   │	│   ├── python-designateclient
│   │   │	│   └── python-saharaclient
│   │   │	├── python-openstacksdk
│   │   ├── python-mistralclient
│   │   ├── python-oslo-db
│   │   ├── python-oslo-log
│   │   ├── python-oslo-serialization
│   │   └── python-taskflow

Comment 8 Miro Hrončok 2021-06-04 20:14:08 UTC
This is a mass-posted update. Sorry if it is not 100% accurate to this bugzilla.


The Python 3.10 rebuild is in progress in a Koji side tag. If you manage to fix the problem, please commit the fix in the rawhide branch, but don't build the package in regular rawhide.

You can either build the package in the side tag, with:

    $ fedpkg build --target=f35-python

Or you can the build and we will eventually build it for you.

Note that the rebuild is still in progress, so not all (build) dependencies of this package might be available right away.

Thanks.

See also https://fedoraproject.org/wiki/Changes/Python3.10

If you have general questions about the rebuild, please use this mailing list thread: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/G47SGOYIQLRDTWGOSLSWERZSSHXDEDH5/

Comment 9 Miro Hrončok 2021-06-07 22:58:48 UTC
The f35-python side tag has been merged to Rawhide. From now on, build as you would normally build.

Comment 10 Miro Hrončok 2021-06-08 11:25:01 UTC
*** Bug 1968968 has been marked as a duplicate of this bug. ***

Comment 11 Alan Pevec 2021-06-09 16:24:20 UTC
Hi Victor, upstream Eventlet issue links to Python issue 43908 which you are assigned to, please help us understand what should be done in Eventlet to make it compatible with Python 3.10 making builtins immutable?

Comment 12 Victor Stinner 2021-06-11 09:26:56 UTC
I replaced upstream: https://github.com/eventlet/eventlet/issues/687#issuecomment-859396475

Comment 13 Miro Hrončok 2021-06-15 20:23:51 UTC
Hello,

This is the second reminder (step 4 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).

If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.

Comment 14 Tomáš Hrnčiar 2021-06-16 09:49:11 UTC
I've opened PR[0] to backport upstream PR[1]. With this patch, eventlet builds in our Python 3.10 COPR. 

[0] https://src.fedoraproject.org/rpms/python-eventlet/pull-request/7
[1] https://github.com/eventlet/eventlet/pull/715

Comment 15 Fedora Update System 2021-06-16 23:08:34 UTC
FEDORA-2021-cc9ec96470 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-cc9ec96470

Comment 16 Fedora Update System 2021-06-16 23:10:03 UTC
FEDORA-2021-cc9ec96470 has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.