Skip to content

test_hashlib fails with SSLlibrary having only SHA3 algo but no SHAKE #141907

Description

@Ansuel

Bug report

Bug description:

If Python3 use an OpenSSL like SSL library that only expose SHA3 algo and no SHAKE algo, the test_hashlib test wrongly detect the algo presence and fails to execute on the SHA3 test.

This has been identified in a wrong logic for the try-except block for HASH, HASHXOF detection.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Nov 24, 2025
  2. self-assigned this
    on Nov 24, 2025
  3. gpshead commented on Nov 24, 2025

    @gpshead
    Member

    thanks, PR set to automerge.

  4. Ansuel commented on Nov 24, 2025

    @Ansuel
    ContributorAuthor

    @gpshead thanks for the fast review!

  5. changed the title [-]test_haslib fails with SSLlibrary having only SHA3 algo but no SHAKE[/-] [+]test_hashlib fails with SSLlibrary having only SHA3 algo but no SHAKE[/+] on Nov 24, 2025
  6. added a commit that references this issue on Nov 24, 2025
  7. added 2 commits that reference this issue on Nov 24, 2025
  8. added 2 commits that reference this issue on Nov 25, 2025
  9. picnixz commented on Nov 25, 2025

    @picnixz
    Member

    Thanks for the report & fix!

  10. added a commit that references this issue on Dec 6, 2025
  11. added a commit that references this issue on Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions