Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only wrap socket.timeout on Python < 3.10 #714

Closed
wants to merge 1 commit into from

Conversation

tipabu
Copy link
Contributor

@tipabu tipabu commented Jun 9, 2021

On py310, socket.timeout is TimeoutError, which our is_timeout() helper func already knows is a timeout.

Closes #687

Note that this doesn't get us to py310 support (not by a long shot), but it's a step along the way. In particular, you'll get

AttributeError: 'staticmethod' object has no attribute '__code__'

trying to call six.get_function_code(_original_pyio.open) in eventlet/greenio/py3.py

This seems to be because of the resolution to https://bugs.python.org/issue43680

On py310, socket.timeout is TimeoutError, which our is_timeout() helper
func already knows is a timeout.

Note that this doesn't get us to py310 support (not by a long shot), but
it's a step along the way.

Closes eventlet#687
@tipabu
Copy link
Contributor Author

tipabu commented Jun 11, 2021

Abandoning in favor of #715 -- may as well take more than one step at a time. 😃

@tipabu tipabu closed this Jun 11, 2021
@tipabu tipabu deleted the py310-socket.timeout branch June 11, 2021 21:42
@temoto temoto mentioned this pull request Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatibility with Python 3.10: TypeError: can't set attributes of built-in/extension type 'TimeoutError'
1 participant