Skip to content

ci(conda): report a package pinned differently under one marker (#1852) - #1865

Merged
JarryShaw merged 1 commit into
mainfrom
ci/1852-conda-vendor-duplicates
Oct 17, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/1852-conda-vendor-duplicates

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

Please follow the guide below

What is the purpose of your pull request?

Tick the commit type your subject line carries.

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else

  • util/conda_vendor.py: parse() kept only the last line per package and
    marker, so a conflicting duplicate pin passed --check while pip download
    -r rejected the file. It now raises Conflicting naming each such pair,
    and compare() reports each as a conflict: problem, so --check exits 1.
  • An identical duplicate line is accepted, since pip resolves it.
  • tests/project/test_conda_vendor_1814.py: a conflicting aenum pin appended
    to the committed file is reported through parse() and compare(), the
    committed file and an identical duplicate are not, markers are compared
    once normalised, and --check exits 1 on a conflict in its own output.

Closes #1852

- util/conda_vendor.py: parse() kept only the last line per package and
  marker, so a conflicting duplicate pin passed --check while pip download
  -r rejected the file. It now raises Conflicting naming each such pair,
  and compare() reports each as a conflict: problem, so --check exits 1.
- An identical duplicate line is accepted, since pip resolves it.
- tests/project/test_conda_vendor_1814.py: a conflicting aenum pin appended
  to the committed file is reported through parse() and compare(), the
  committed file and an identical duplicate are not, markers are compared
  once normalised, and --check exits 1 on a conflict in its own output.

Closes #1852
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Verdict: GOOD TO GO at 72a388a38. A Sonnet cross-review (author: Opus) confirmed:

  • --check exits 0 on the committed file and 1 on a conflicting duplicate, with a conflict: line. main exits 0 on the same input, which is the bug.
  • An identical duplicate is accepted, and markers are compared after normalisation.
  • The writer path (cron-conda.yml:177) never calls parse, so it cannot raise. Running it on a scratch copy gives output that --check passes.
  • --check runs with sockets patched to fail, so it stays offline.
  • The new tests fail on main. Mutating the fix (no raise, no normalisation, no marker in the key, compare dropping conflicts) is caught.

Non-blocking nits:

  • No test pins that the first line's pin is kept.
  • The parse docstring calls conflicts pins that "cannot both hold", then says it flags them whether or not they could.
  • Specifiers are compared as strings, so ==1.0 against ==1.0.0 is flagged.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 16, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 17, 2026
@JarryShaw
JarryShaw merged commit 27fa51e into main Oct 17, 2026
56 checks passed
@JarryShaw
JarryShaw deleted the ci/1852-conda-vendor-duplicates branch October 17, 2026 01:58
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 17, 2026
@JarryShaw JarryShaw moved this from In review to Done in PyPCAPKit Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci(conda): parse() collapses a conflicting duplicate pin, so --check and its test pass a file pip rejects

1 participant