GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-136929: ensure that `hashlib.<name>` does not raise `AttributeError` by picnixz · Pull Request #136933 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Jul 21, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Ensure that hashlib.<name> does not raise AttributeError #136929

📚 Documentation preview 📚: https://cpython-previews--136933.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

edgarrmondragon reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@picnixz
picnixz requested review from gpshead and tiran as code owners July 21, 2025 14:16
@bedevere-app bedevere-app Bot added the awaiting core review label Jul 21, 2025
@picnixz picnixz changed the title gh-136929: ensure that hashlib.<name> does not raise AttributeError` gh-136929: ensure that hashlib.<name> does not raise AttributeError Jul 21, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Jul 21, 2025
Ensure that hashlib.<name> does not raise AttributeError #136929
Closed
@picnixz
ensure that hashlib.<name> does not raise AttributeError
49ac4af
@picnixz
picnixz force-pushed the feat/hashlib/do-no-raise-on-import-136929 branch from a32da4b to 49ac4af Compare July 21, 2025 14:17
picnixz added 2 commits July 25, 2025 16:05
@picnixz
reduce diff
2720b6b
@picnixz
keep logging verbosity
c51d22f
@picnixz
picnixz enabled auto-merge (squash) July 25, 2025 14:24
@picnixz
picnixz merged commit 7ce2f10 into python:main Jul 25, 2025
@bedevere-app bedevere-app Bot removed the awaiting core review label Jul 25, 2025
@picnixz
picnixz deleted the feat/hashlib/do-no-raise-on-import-136929 branch July 25, 2025 15:06
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@picnixz @taegyunkim
pythongh-136929: ensure that hashlib.<name> does not raise `Attribu…
cfe1d16
…teError` (python#136933)

Previously, if OpenSSL was not present and built-in cryptographic extension modules
were disabled, requesting `hashlib.<name>` raised `AttributeError` and an ERROR log
message with the exception traceback is emitted when importing `hashlib`. 

Now, the named constructor function will always be available but raises a `ValueError`
at runtime indicating that the algorithm is not supported. The log message has also
been reworded to be less verbose.
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@picnixz @Agent-Hellboy
pythongh-136929: ensure that hashlib.<name> does not raise `Attribu…
08f5eb1
…teError` (python#136933)

Previously, if OpenSSL was not present and built-in cryptographic extension modules
were disabled, requesting `hashlib.<name>` raised `AttributeError` and an ERROR log
message with the exception traceback is emitted when importing `hashlib`. 

Now, the named constructor function will always be available but raises a `ValueError`
at runtime indicating that the algorithm is not supported. The log message has also
been reworded to be less verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner
@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.