File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232 python-version : " 3.13"
3333 - name : Check tag / PyPI / mirror are in sync
3434 run : |
35+ # The script lives under the deny-listed scripts/publish/, so it is ABSENT on the OSS mirror;
36+ # the sync check only runs on the private repo (the publish source). Skip where it's absent.
37+ if [ ! -f scripts/publish/check_release_sync.py ]; then
38+ echo "scripts/publish/check_release_sync.py absent (OSS mirror) — skipping the release-sync check."
39+ exit 0
40+ fi
3541 # `packaging` gives canonical version normalization (so a "0.1.0-rc1" tag and PyPI's
3642 # "0.1.0rc1" compare equal); the script falls back to a naive form if it's absent.
3743 python -m pip install --upgrade pip packaging
Original file line number Diff line number Diff line change @@ -202,5 +202,12 @@ jobs:
202202 with :
203203 python-version : " 3.13"
204204 - name : Scan the publishable subset for forbidden content
205- # Stdlib-only scanner (no install). Exits non-zero — failing the build — on any hit.
206- run : python scripts/publish/scan_forbidden.py --published
205+ # Stdlib-only scanner (no install). Exits non-zero — failing the build — on any hit. The scanner
206+ # lives under the deny-listed scripts/publish/, so it is ABSENT on the OSS mirror — there's
207+ # nothing to gate there (everything is already the published subset); skip rather than error.
208+ run : |
209+ if [ -f scripts/publish/scan_forbidden.py ]; then
210+ python scripts/publish/scan_forbidden.py --published
211+ else
212+ echo "scripts/publish/scan_forbidden.py absent (OSS mirror) — skipping the publish leak-gate."
213+ fi
Original file line number Diff line number Diff line change 3838
3939def _load_scan_forbidden () -> object :
4040 path = _ROOT / "scripts" / "publish" / "scan_forbidden.py"
41+ if not path .exists ():
42+ # Private-only (scripts/publish/ is deny-listed in the OSS mirror); skip where it's absent.
43+ pytest .skip (
44+ "scan_forbidden.py is private-only (OSS-mirror deny-list)" , allow_module_level = True
45+ )
4146 spec = importlib .util .spec_from_file_location ("scan_forbidden" , path )
4247 assert spec is not None and spec .loader is not None
4348 mod = importlib .util .module_from_spec (spec )
Original file line number Diff line number Diff line change @@ -138,6 +138,13 @@ def test_invalid_transform_mode_fails_loud(monkeypatch: pytest.MonkeyPatch) -> N
138138# by path — mirroring tests/test_scan_forbidden.py.
139139def _load_scan_forbidden () -> object :
140140 path = Path (__file__ ).resolve ().parents [1 ] / "scripts" / "publish" / "scan_forbidden.py"
141+ if not path .exists ():
142+ # Private-only: scripts/publish/ is deny-listed in the OSS mirror, so the estate-token
143+ # assertions this module feeds don't apply there. Skip the whole module rather than error at
144+ # collection (the scanner is the single source of truth only where it exists).
145+ pytest .skip (
146+ "scan_forbidden.py is private-only (OSS-mirror deny-list)" , allow_module_level = True
147+ )
141148 spec = importlib .util .spec_from_file_location ("scan_forbidden" , path )
142149 assert spec is not None and spec .loader is not None
143150 mod = importlib .util .module_from_spec (spec )
You can’t perform that action at this time.
0 commit comments