Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pypa/pipx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.17.0
Choose a base ref
...
head repository: pypa/pipx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.17.1
Choose a head ref
  • 4 commits
  • 7 files changed
  • 7 contributors

Commits on Aug 30, 2026

  1. tests: make utils_temp_dir work without symlink privilege (#2023)

    Closes #2021
    
    The session-scoped `utils_temp_dir` fixture symlinks `git` (and `uv`)
    into a temp directory that is then put on `PATH`. The symlink call was
    guarded only by `suppress(FileExistsError)`, so on Windows without
    elevation or Developer Mode it raises `OSError: [WinError 1314]` and
    errors every test depending on `pipx_temp_env` — effectively the whole
    suite.
    
    CI does not see this because the `windows-2025` runner can create
    symlinks, so the suite is green there and unrunnable on an ordinary
    Windows machine.
    
    This falls back to putting the utility's real directory on `PATH` when
    the symlink cannot be created. Copying or hard linking is not an
    alternative: Windows resolves an executable's DLLs relative to its image
    path, and `git.exe` needs the siblings in its own directory.
    
    ### Testing
    
    `tests/test_uninstall_all.py` on Windows 11, Python 3.13: **5 errors → 5
    passed** (verified both before and after the change).
    
    A `changelog.d` fragment is included.
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
    3 people authored Aug 30, 2026
    Configuration menu
    Copy the full SHA
    277f161 View commit details
    Browse the repository at this point in the history
  2. fix(environment): report PIPX_MAX_LOGS (#2024)

    `pipx environment --value PIPX_MAX_LOGS` exits 2 with `argument
    --value/-V: invalid choice: 'PIPX_MAX_LOGS'`, and a
    plain `pipx environment` never prints the variable, though `main.py`
    reads it to prune the log directory and
    `docs/reference/environment-variables.rst` lists it as settable. Of the
    26 names in that document it is the only one
    `ENVIRONMENT_VARIABLES` omits; the derived table matches 9 for 9.
    
    Why the suite is quiet about it: `test_cli` and `test_cli_global` close
    with
    `for env_var in ENVIRONMENT_VARIABLES: assert env_var in captured.out`,
    so the oracle is the same list the command
    prints from and a missing name cannot fail it. `test_cli_with_args`
    checks a hand-written subset, and its rejection
    case passes `"SSS"`, which is not a pipx variable at all.
    
    The new parity test reads the documentation table as its oracle instead,
    in the shape of `test_docs_urls.py`.
    Reverting the one-line source change fails that test's settable case and
    the new `PIPX_MAX_LOGS` parameter of
    `test_cli_with_user_environment_value`; the derived case passes either
    way and is there as a pin.
    
    `PIPX_MAX_LOGS` stays out of `_get_derived_values()`, so it prints raw
    and empty when unset, like every other
    settable-only variable, matching where the documentation files it.
    
    Same shape as #1493, which added `PIPX_GLOBAL_*` to this list after
    #1492 reported them missing from the documentation
    and from `pipx environment`.
    
    `pre-commit run --all-files` passes; `ty check` matches the clean
    checkout.
    
    ______________________________________________________________________
    
    - [x] ran the linter to address style issues (`pre-commit run
    --all-files`)
    - [x] wrote descriptive pull request text
    - [x] ensured there are test(s) validating the fix
    - [x] added news fragment in `changelog.d/` folder
    - [ ] updated/extended the documentation — no change needed,
    `docs/reference/environment-variables.rst` documents
      `PIPX_MAX_LOGS` today and the code is what disagreed with it.
    
    ---------
    
    Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
    Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
    3 people authored Aug 30, 2026
    Configuration menu
    Copy the full SHA
    9ca67c4 View commit details
    Browse the repository at this point in the history
  3. 👷 test: keep the suite off the real internet (#2025)

    `main` has been red for days, and every open PR inherits it. Three tests
    fail in rotation across runners, and all three trace back to the suite
    reaching the real internet.
    
    `test_install_fetch_missing_python_invalid` asks pipx for a standalone
    Python 3.0 without mocking the release index, and
    `test_run_script_from_internet` fetches a gist from githubusercontent.
    When GitHub answers `403: rate limit exceeded` urllib leaves the
    `SSLSocket` unclosed, and since `filterwarnings = ["error"]` the
    resulting `ResourceWarning` reaches pytest's unraisable collector and
    fails whichever test the collector happens to interrupt. That is why
    `test_install_run_in_separate_directory`, which opens no connection of
    its own, has been failing as often as the two that do.
    
    The fetch test now takes the `mocked_github_api` fixture the interpreter
    tests already use, and the script test now serves its payload over
    loopback so the URL parsing, size cap and decode still run against the
    real code path. On top of that an autouse fixture refuses any connection
    to a non-loopback address, so the next test that reaches out fails on
    its own line with the address it dialled rather than surfacing minutes
    later as somebody else's `ResourceWarning`. `--net-pypiserver` and
    `--all-packages` want real indexes and opt out.
    
    Separately, `test_uninject_running_app` opened three pipes on its
    `Popen` and never closed them, which is the Windows half of the same
    red: the GC finalizes the pipes whenever it gets there and the
    `ResourceWarning` errors out. `Popen` as a context manager closes all
    three.
    
    I ran the full suite with the guard armed, which is how the gist fetch
    surfaced.
    gaborbernat authored Aug 30, 2026
    Configuration menu
    Copy the full SHA
    511c5d4 View commit details
    Browse the repository at this point in the history
  4. Release 1.17.1

    github-actions[bot] committed Aug 30, 2026
    Configuration menu
    Copy the full SHA
    cf985e6 View commit details
    Browse the repository at this point in the history
Loading