Skip to content

gh-134978: deprecate string keyword parameter for hash function constructors #134979

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

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented May 31, 2025

@picnixz
Copy link
Member Author

picnixz commented May 31, 2025

Oh I forgot to update hashlib.rst

@picnixz picnixz force-pushed the feat/hashlib/deprecate-string-parameter-134978 branch from 005a637 to 996992d Compare May 31, 2025 14:09
@picnixz picnixz force-pushed the feat/hashlib/deprecate-string-parameter-134978 branch from 996992d to 26f01fa Compare May 31, 2025 14:09
Copy link
Member

@gpshead gpshead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets extend the timeline longer than our minimal 2 years. how about 3.19?

@@ -94,6 +94,13 @@ accessible by name via :func:`new`. See :data:`algorithms_available`.
OpenSSL does not provide we fall back to a verified implementation from
the `HACL\* project`_.

.. deprecated-removed:: 3.15 3.19
The undocumented ``string`` keyword parameter in :func:`!_hashlib.new`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deprecation note is about the private interface (except for the public hashlib.sha3_*, 'string' was only present in private functions), so I still mentioned this here. There were too many situations where people complained that a deprecation note was only in present in the What's New or changelog, but not in the page documenting the functions (though in this case, the only documented functions being affected are sha3_* or hashlib.new + sha3 + HACL*)

@picnixz picnixz requested a review from gpshead June 1, 2025 08:40
@picnixz picnixz merged commit ee65ebd into python:main Jun 2, 2025
43 checks passed
@picnixz picnixz deleted the feat/hashlib/deprecate-string-parameter-134978 branch June 2, 2025 08:25
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 MacOS M1 Refleaks NoGIL 3.x (tier-2) has failed when building commit ee65ebd.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1368/builds/3296) and take a look at the build logs.
  4. Check if the failure is related to this commit (ee65ebd) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1368/builds/3296

Failed tests:

  • test.test_concurrent_futures.test_interpreter_pool

Failed subtests:

  • test_free_reference - test.test_concurrent_futures.test_interpreter_pool.InterpreterPoolExecutorTest.test_free_reference

Test leaking resources:

  • test_interpreter_pool: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/test_concurrent_futures/executor.py", line 220, in test_free_reference
    for _ in support.sleeping_retry(support.SHORT_TIMEOUT):
             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/support/__init__.py", line 2590, in sleeping_retry
    for _ in busy_retry(timeout, err_msg, error=error):
             ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ec2-user/buildbot/buildarea/3.x.itamaro-macos-arm64-aws.macos-with-brew.refleak.nogil/build/Lib/test/support/__init__.py", line 2560, in busy_retry
    raise AssertionError(msg)
AssertionError: timeout (67.9 seconds)

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.

3 participants