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: python-poetry/poetry
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.4.1
Choose a base ref
...
head repository: python-poetry/poetry
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.4.2
Choose a head ref
  • 5 commits
  • 10 files changed
  • 2 contributors

Commits on Aug 29, 2026

  1. fix: refuse to write files outside the target directory during sdist …

    …extraction (#11027)
    
    (cherry picked from commit 812a816)
    radoering committed Aug 29, 2026
    Configuration menu
    Copy the full SHA
    22173fd View commit details
    Browse the repository at this point in the history
  2. fix: reject invalid link filenames when downloading files (#11029)

    (cherry picked from commit 5970f67)
    radoering committed Aug 29, 2026
    Configuration menu
    Copy the full SHA
    3a194dd View commit details
    Browse the repository at this point in the history
  3. Fail closed when a locked hash cannot be checked

    Two layers bind an installed artifact to the hashes in poetry.lock, and an
    index could skip both.
    
    The chooser accepted any link that advertised no hash at all, without
    comparing anything to the locked hashes, so 'no hash offered' was treated as
    'accept' rather than 'compute and compare'. Removing that early accept lets
    the link fall through to the existing calculate_sha256 path, which is what
    the surrounding code already does for links advertising a different hash
    type. A link whose computed hash matches the lock is still chosen.
    
    The executor's post-download check only ran when the downloaded archive's
    filename appeared in the lock's files list, so an artifact served under an
    unlisted filename was never validated and its hash was never recorded. The
    filename condition is gone; if the lock pins hashes, the archive is checked.
    An archive the lock does not list now raises with that stated plainly, rather
    than falling through the empty-known-hashes case into the less specific
    'no usable hash type' message.
    
    Both new tests fail without the corresponding change.
    
    Signed-off-by: Arpit Jain <[email protected]>
    (cherry picked from commit a165d51)
    arpitjain099 authored and radoering committed Aug 29, 2026
    Configuration menu
    Copy the full SHA
    c2f9af2 View commit details
    Browse the repository at this point in the history
  4. perf: avoid unnecessary downloads when the index does not provide hashes

    Try links best-first, and stop as soon as one has a verified hash matching the lock. Verifying a hash requires a full download when the index does not provide hashes, so this avoids downloading every candidate when the first (best) one already matches.
    
    (cherry picked from commit 1c9cd2f)
    radoering committed Aug 29, 2026
    Configuration menu
    Copy the full SHA
    3dd0f2d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    15ce1fc View commit details
    Browse the repository at this point in the history
Loading