Restore stubtest and release-tag wheel publishing - #237
Conversation
|
Thank you. Can you explain why this is marked as |
| # | ||
|
|
||
| import typing as t | ||
| from typing_extensions import disjoint_base # type: ignore[attr-defined] |
There was a problem hiding this comment.
I assume this requires adding typing-extensions to the requirements.txt, right?
There was a problem hiding this comment.
Yes, good catch. CI was receiving it transitively through mypy, which is why the exact-head run passed, but the stub now imports disjoint_base directly and needs an explicit typing-extensions dependency. I added typing-extensions==4.16.0 to requirements-test.txt (requirements.txt includes that file) in 98dd717. Local verification: stubtest found no issues in 1 module; pytest reported 929 passed, 17 skipped, and 2 xfailed; pip check is clean. The new exact-head CI is starting now.
|
I used the draft state only as a temporary review-readiness marker while the exact-head CI completed and I rechecked the release trigger. There is no known unfinished work in the PR; the checks are green, and I have now marked it ready for review. On the predicate: for a
This PR adds The other release-path change is that |
|
Great, TIL! 😉 |
Summary
Restore the two failing parts of the current
masterworkflow:v*tags and publish wheels only after the test, debug,and wheel jobs have succeeded.
Addresses #157.
Why
The latest exact-
masterworkflow, run28846305296
at
00e9a146e958d42f84c81dcfdf39572280ecf01f, failed in two independentplaces:
stubtest rapidjsonreported 19 errors after the test requirements moved tomypy 2.1. The C extension constructors are implemented in
tp_new, whilethe stubs described them as
__init__;DecoderandEncoderare alsoruntime disjoint bases.
masterpush while the package versionwas still 1.23, so PyPI rejected the first wheel with
400 File already exists.The old upload condition also used
github.event.ref, and the workflow onlyselected branch pushes, so a release tag could not reach the job even if the
condition were re-enabled.
Changes
Typing stubs
Decoder,Encoder,RawJSON, andValidatorconstruction with__new__, matching their Ctp_newimplementations.DecoderandEncoderwith@disjoint_base. This preserves validsingle inheritance while rejecting the same incompatible-layout multiple
inheritance that fails at runtime.
attr-definedcompatibility ignore on the new typing extension import.Release workflow
v*tag pushes as well asmasterbranch pushes.github.reffor the release-tag predicate.tests,debug-tests, and the complete wheel matrix to succeedbefore publishing.
PR #235 contains a related upload guard on the
free-threadedbranch. Thischange targets the currently failing
masterrelease path and additionallyrestores the missing tag trigger and validation dependencies.
Verification
Based on
00e9a146e958d42f84c81dcfdf39572280ecf01f, candidate heade5663ec092e79cbbb4e00937de6d71b3fa35c7c1:stubtest: 19 baseline errors ->Success: no issues found;stubtest: pass;Decoder/Encodersingle inheritance accepted; incompatiblecombined inheritance rejected;
pytest -q tests: 929 passed, 17 skipped, 2 xfailed;actionlint -ignore SC2046: pass (SC2046is the pre-existing$(which python3)warning);masterpush do not publish;v1.24does;other branches and non-
v*tags do not trigger;git diff --check: pass.One local macOS/Python 3.13.12 doctest has a pre-existing final-digit float
representation difference. It reproduced identically on unmodified
master;the exact Linux workflow above passed all 274 doctests. No documentation or
runtime source is changed here.
No tag or real PyPI publication has been attempted from this branch.
(Developed with AI assistance; the log analysis, runtime checks, and test runs
were executed and verified by me.)