Tests fail when OpenSSL FIPS is enabled

Open
#240 0 comments 0 reactions 0 assignees View on GitHub

@grahamc is already working on this.

Since Jan 15, 2026.

  • #242 by @grahamc — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with the Path.chunks doctest in path/init.py around line 809 and reproduce the failure with OpenSSL FIPS enabled. Determine the expected behavior for the hashlib.md5 example under that configuration; done means the relevant test suite passes without the FIPS-related exception.

Written by the indexing model from the issue text.

Description

       path/__init__.py .....F................                                  [ 15%]
      path/masks.py .....                                                      [ 19%]
      tests/test_path.py ...................................................s. [ 56%]
      ..............................................sssssss.........           [100%]
      
      =================================== FAILURES ===================================
      __________________________ [doctest] path.Path.chunks __________________________
      802 Returns a generator yielding chunks of the file, so it can
      803  be read piece by piece with a simple for loop.
      804 
      805 Any argument you pass after `size` will be passed to :meth:`open`.
      806 
      807 :example:
      808 
      809     >>> hash = hashlib.md5()
      UNEXPECTED EXCEPTION: UnsupportedDigestmodError('[digital envelope routines] unsupported')
      Traceback (most recent call last):
        File "/nix/store/rk8pycgcvbid0asn2zdb4jl8ri92nz0d-python3-3.13.6/lib/python3.13/doctest.py", line 1395, in __run
          exec(compile(example.source, filename, "single",
          ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                       compileflags, True), test.globs)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<doctest path.Path.chunks[0]>", line 1, in <module>
      _hashlib.UnsupportedDigestmodError: [digital envelope routines] unsupported
      /build/path-17.1.1/path/__init__.py:809: UnexpectedException
      =========================== short test summary info ============================
      FAILED path/__init__.py::path.Path.chunks
      ============ 1 failed, 133 passed, 8 skipped, 1 deselected in 5.78s ============
Dominant language
Python
Stars
1.1k
Forks
172
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jaraco/path

All issues in jaraco/path

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.