Skip to content

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

Merged
merged 5 commits into from
Mar 12, 2022

Conversation

jakirkham
Copy link
Member

Does some light tidying for earlier Python & OpenSSL versions. Also adds a branch for Python 3.10+ & OpenSSL 1.1.1+


  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2022

Unit Test Results

       12 files  +       1         12 suites  +1   7h 13m 15s ⏱️ + 38m 39s
  2 620 tests ±       0    2 538 ✔️ ±       0    80 💤  -   1  2 +1 
15 644 runs  +1 406  14 761 ✔️ +1 320  881 💤 +85  2 +1 

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.
@jakirkham
Copy link
Member Author

Thoughts @dask/maintenance ? 🙂

Comment on lines +46 to +52
# 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
Copy link
Member

@fjetter fjetter Feb 28, 2022

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?

Copy link
Member Author

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.

@jakirkham
Copy link
Member Author

Any other thoughts @dask/maintenance? 🙂

@jakirkham
Copy link
Member Author

Planning on merging end of day (after the release) if no comments

@jakirkham jakirkham merged commit 925c610 into dask:main Mar 12, 2022
@jakirkham jakirkham deleted the adj_openssl_hdling branch March 12, 2022 00:36
fjetter added a commit to fjetter/distributed that referenced this pull request Feb 15, 2024
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.

2 participants