thrift icon indicating copy to clipboard operation
thrift copied to clipboard

fix: make timeouterror more compatible with future versions of Python

Open bwangelme opened this issue 7 months ago • 0 comments

see reason in https://github.com/apache/thrift/pull/2961

starting from python 3.10, this is a deprecated alias to TimeoutError: https://docs.python.org/3.12/library/socket.html#socket.timeout while TimeoutError also exists in 3.8 (the earliest version of python still supported): https://docs.python.org/3.8/library/exceptions.html#TimeoutError so I wonder if we should be more future proof and handle both socket.timeout and TimeoutError here, and then we can drop socket.timeout when 3.10 becomes the earliest version of python supported.

  • [ ] Did you create an Apache Jira ticket? (Request account here, not required for trivial changes)
  • [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • [x] Did you squash your changes to a single commit? (not required, but preferred)
  • [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • [x] If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

bwangelme avatar Jul 02 '24 02:07 bwangelme