-
-
Notifications
You must be signed in to change notification settings - Fork 733
Tidying of OpenSSL 1.0.2/Python 3.9 (and earlier) handling #5854
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
Conversation
Unit Test Results 12 files + 1 12 suites +1 7h 13m 15s ⏱️ + 38m 39s For more details on these failures, see this check. Results for commit 3b0622d. ± Comparison against base commit 5553177. ♻️ This comment has been updated with latest results. |
This is simply the largest chunk size that OpenSSL can handle reading and writing before 1.1.1. So clarify the variable name accordingly.
93db882
to
2f7eb2f
Compare
Thoughts @dask/maintenance ? 🙂 |
# Workaround for OpenSSL 1.0.2. | ||
# Can drop with OpenSSL 1.1.1 used by Python 3.10+. | ||
# ref: https://bugs.python.org/issue42853 | ||
if sys.version_info < (3, 10): | ||
OPENSSL_MAX_CHUNKSIZE = 256 ** ctypes.sizeof(ctypes.c_int) // 2 - 1 | ||
else: | ||
OPENSSL_MAX_CHUNKSIZE = 256 ** ctypes.sizeof(ctypes.c_size_t) - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the comment about dropping this with py3.10 still true or why do we need another constant? Or is the py3.10 constant simply max integer and therefore a noop or smth like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah exactly in the Python 3.10 case OPENSSL_MAX_CHUNKSIZE
is the maximum value size_t
can contain. IOW the largest integer. So is effectively a no-op.
Any other thoughts @dask/maintenance? 🙂 |
Planning on merging end of day (after the release) if no comments |
Does some light tidying for earlier Python & OpenSSL versions. Also adds a branch for Python 3.10+ & OpenSSL 1.1.1+
pre-commit run --all-files