Skip to content

TST: UnicodeDecodeError in local_repos.py when opening binary SVN dump #13669

@pareshjoshij

Description

@pareshjoshij

Description

In tests/lib/local_repos.py, the function _create_svn_initools_repo downloads a binary SVN dump file but opens it using the default text mode (open(filename)).

On Windows, this causes a UnicodeDecodeError when Python attempts to decode the raw binary bytes using the default encoding. It also corrupts the data sent to svnadmin due to automatic newline translation. The file should be opened in binary mode ('rb').

Expected behavior

No response

pip version

pip version* 26.0.dev0

Python version

Python version* 3.13.5

OS

Windows

How to Reproduce

Ensure Subversion (svnadmin) is installed and in the system PATH on Windows.

Run the INITools test case:

pytest -v -k "INITools"

The test crashes with UnicodeDecodeError (or svnadmin failure) inside _create_svn_initools_repo.

Output

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: testsTesting and related thingstype: bugA confirmed bug or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions