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

Add rudimentary support for Python 3.10 #715

Merged
merged 5 commits into from
Oct 8, 2021
Merged

Commits on Oct 8, 2021

  1. Only wrap socket.timeout on Python < 3.10

    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 authored and temoto committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    3fde87d View commit details
    Browse the repository at this point in the history
  2. Get a working greenio._open on py310

    _pyio.open is now a staticmethod, so we've got to go down to
    _pyio.open.__wrapped__ to get to the python function object.
    tipabu authored and temoto committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    ccf6db2 View commit details
    Browse the repository at this point in the history
  3. Test using eventlet.is_timeout

    ...rather than requiring an is_timeout attribute on errors.
    
    TimeoutErrors (which are covered by is_timeout) can't necessarily have
    attributes added to them.
    tipabu authored and temoto committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    5641a81 View commit details
    Browse the repository at this point in the history
  4. Fix backdoor tests on py310

    Python 3.10 started including build info on the version line, so the
    expectation in tests had to change. Also, start printing the banner as
    we read it to aid in future debugging.
    tipabu authored and temoto committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    2ea6991 View commit details
    Browse the repository at this point in the history
  5. Tolerate __builtins__ being a dict (rather than module) in is_timeout

    I'm still not sure how this happens, but somehow it does in
    socket_test.test_error_is_timeout. As a result, is_timeout wouldn't get
    a reference to TimeoutError, so the socket error would not be correctly
    identified as a timeout.
    tipabu authored and temoto committed Oct 8, 2021
    Configuration menu
    Copy the full SHA
    bad82b6 View commit details
    Browse the repository at this point in the history