portable-python 2.0.2__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {portable_python-2.0.2 → portable_python-2.1.0}/.github/workflows/release.yml +4 -4
- {portable_python-2.0.2 → portable_python-2.1.0}/.github/workflows/tests.yml +7 -7
- portable_python-2.1.0/CHANGELOG.md +25 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/CLAUDE.md +1 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/MANIFEST.in +1 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/PKG-INFO +3 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/README.rst +2 -2
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/build-setup.md +3 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/telltale-detection.md +3 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/configuration/portable-python-yml.md +1 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/ci-cd.md +2 -2
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/local-development.md +5 -4
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/index.md +2 -2
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/log.md +17 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/release.md +1 -1
- portable_python-2.1.0/docs/typecheck-findings.md +111 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/pyproject.toml +12 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/requirements.txt +14 -16
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/__init__.py +96 -88
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/cli.py +7 -11
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/config.py +22 -36
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/cpython.py +8 -10
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/external/__init__.py +2 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/external/xcpython.py +32 -27
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/external/xtkinter.py +3 -5
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/inspector.py +51 -62
- portable_python-2.1.0/src/portable_python/tracking.py +77 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/versions.py +70 -61
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/PKG-INFO +3 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/SOURCES.txt +2 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/scm_file_list.json +2 -3
- portable_python-2.1.0/src/portable_python.egg-info/scm_version.json +8 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/conftest.py +0 -6
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_build.py +31 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_cleanup.py +21 -5
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_failed.py +1 -1
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_inspector.py +34 -3
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_list.py +10 -2
- portable_python-2.1.0/tests/test_report.py +22 -0
- portable_python-2.1.0/tests/test_setup.py +128 -0
- portable_python-2.1.0/tox.ini +65 -0
- portable_python-2.0.2/.claude/settings.json +0 -10
- portable_python-2.0.2/SECURITY.md +0 -11
- portable_python-2.0.2/docs/changelog.md +0 -13
- portable_python-2.0.2/src/portable_python/tracking.py +0 -75
- portable_python-2.0.2/src/portable_python.egg-info/scm_version.json +0 -8
- portable_python-2.0.2/tests/test_report.py +0 -12
- portable_python-2.0.2/tests/test_setup.py +0 -78
- portable_python-2.0.2/tox.ini +0 -31
- {portable_python-2.0.2 → portable_python-2.1.0}/.dockerignore +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/.gitignore +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/Dockerfile +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/LICENSE +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/config.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/cpython.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/module-builder.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/ppg.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/python-builder.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/architecture/python-inspector.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/build-report.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/build.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/diagnostics.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/inspect.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/lib-auto-correct.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/list.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/cli/recompress.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/build-layout.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/folder-masking.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/portability.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/ppp-marker.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/concepts/static-linking.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/configuration/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/add-a-config-option.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/add-an-external-module.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/build-a-portable-python.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/bump-components.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/bump-python-support.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/fix-a-portability-issue.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/guides/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/modules/external-modules.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/modules/index.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/docs/overview.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/lock-deps.sh +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/portable-python.yml +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/retired/README.md +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/retired/toolchain.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/scripts/bashrc.sh +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/scripts/check_okf.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/scripts/portable-python.sh +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/setup.cfg +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/__main__.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python/external/_inspect.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/dependency_links.txt +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/entry_points.txt +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/requires.txt +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/src/portable_python.egg-info/top_level.txt +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/__init__.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/sample-config1.yml +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/sample-config2.yml +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/sample-incomplete.yml +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_invoker.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_prefix.py +0 -0
- {portable_python-2.0.2 → portable_python-2.1.0}/tests/test_recompress.py +0 -0
|
@@ -14,13 +14,13 @@ jobs:
|
|
|
14
14
|
id-token: write # mandatory for trusted publishing
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
18
|
-
- uses: actions/setup-python@
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: actions/setup-python@v7
|
|
19
19
|
with:
|
|
20
20
|
python-version: "3.14"
|
|
21
21
|
|
|
22
|
-
- uses: astral-sh/setup-uv@
|
|
23
|
-
- run: uvx --with tox-uv tox -e py,style
|
|
22
|
+
- uses: astral-sh/setup-uv@v10.3.0
|
|
23
|
+
- run: uvx --with tox-uv tox -e py,style,ty,pyrefly,pyright,mypy,zuban
|
|
24
24
|
- run: uv build
|
|
25
25
|
- name: Publish to PyPI
|
|
26
26
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -21,12 +21,12 @@ jobs:
|
|
|
21
21
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
22
22
|
|
|
23
23
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
25
|
-
- uses: actions/setup-python@
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
- uses: actions/setup-python@v7
|
|
26
26
|
with:
|
|
27
27
|
python-version: ${{ matrix.python-version }}
|
|
28
28
|
|
|
29
|
-
- uses: astral-sh/setup-uv@
|
|
29
|
+
- uses: astral-sh/setup-uv@v10.3.0
|
|
30
30
|
- run: uvx --with tox-uv tox -e py
|
|
31
31
|
|
|
32
32
|
- uses: coverallsapp/github-action@v2
|
|
@@ -50,10 +50,10 @@ jobs:
|
|
|
50
50
|
runs-on: ubuntu-latest
|
|
51
51
|
|
|
52
52
|
steps:
|
|
53
|
-
- uses: actions/checkout@
|
|
54
|
-
- uses: actions/setup-python@
|
|
53
|
+
- uses: actions/checkout@v7
|
|
54
|
+
- uses: actions/setup-python@v7
|
|
55
55
|
with:
|
|
56
56
|
python-version: "3.14"
|
|
57
57
|
|
|
58
|
-
- uses: astral-sh/setup-uv@
|
|
59
|
-
- run: uvx --with tox-uv tox -e style
|
|
58
|
+
- uses: astral-sh/setup-uv@v10.3.0
|
|
59
|
+
- run: uvx --with tox-uv tox -e style,ty,pyrefly,pyright,mypy,zuban
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v2.1.0
|
|
4
|
+
|
|
5
|
+
- portable-python's code is now checked by multiple type checkers on every change
|
|
6
|
+
- Bumped OpenSSL to 3.5.9, SQLite to 3.53.4, xz to 5.8.4, libffi to 3.8.0 and gettext-tiny to 0.3.3; re-checked every other component against upstream (all already current, or deliberately held back — see the `version` property comments).
|
|
7
|
+
- Bug fixes:
|
|
8
|
+
- Python 3.15 builds silently lacked `_decimal` (cpython no longer falls back to its bundled libmpdec), `mpdec` is now auto-selected for 3.14+ (3.14 otherwise uses its deprecated bundled libmpdec 2.5.1)
|
|
9
|
+
- With `cpython-use-github: true`, a failed GitHub API call (e.g. rate limiting) crashed with a stack trace
|
|
10
|
+
- A build where `bin/python` could not be found crashed (instead of reporting it) when `cpython-validate-script` or `cpython-additional-packages` was configured
|
|
11
|
+
- Clearer error messages when the latest python version can't be determined, or a python family isn't supported
|
|
12
|
+
- A `{module}-configure` setting with several options was passed to `./configure` as one single argument
|
|
13
|
+
- Dry-run (`-n`) could modify files of an existing build (source patches, shebangs, permissions), a configured patch on a missing file is now reported
|
|
14
|
+
- Library use: `BuildSetup()` now takes a `PythonSpec`, get one via `required_python_spec("cpython:3.13.2")` (which validates it, `None` means latest)
|
|
15
|
+
- Tests cover more edge cases
|
|
16
|
+
|
|
17
|
+
## v2.0.2
|
|
18
|
+
|
|
19
|
+
- Corrected `readline` static linking
|
|
20
|
+
|
|
21
|
+
## v2.0.1
|
|
22
|
+
|
|
23
|
+
- Bumped the bundled components (OpenSSL, SQLite, Tcl/Tk, …) to current versions.
|
|
24
|
+
- Refreshed dependencies and modernized CI (now on uv / tox-uv, with updated GitHub Actions).
|
|
25
|
+
- Added an OKF documentation bundle under `docs/` (the old top-level docs folded into it).
|
|
@@ -22,4 +22,4 @@ The authoritative, self-contained documentation is the OKF knowledge bundle unde
|
|
|
22
22
|
|
|
23
23
|
- Check **runez** before reimplementing file / system / CLI / logging / version helpers — see [`docs/guides/local-development.md`](docs/guides/local-development.md).
|
|
24
24
|
- The docs use the OKF format; keep the bundle conformant (`scripts/check_okf.py docs`) when you edit it.
|
|
25
|
-
- As changes land, keep a top section in [`
|
|
25
|
+
- As changes land, keep a top section in [`CHANGELOG.md`](CHANGELOG.md) for the upcoming release — `## Unreleased`, or the next version directly once it's known. Maintain it as PRs come in; it's double-checked at release. Don't fuss over marking released-vs-unreleased (small audience, `git tag` says what's out).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: portable-python
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.1.0
|
|
4
4
|
Summary: Portable python binaries
|
|
5
5
|
Author-email: Zoran Simic <zoran@simicweb.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -229,9 +229,9 @@ Portable Python can be used as a python library to invoke builds, or inspect an
|
|
|
229
229
|
|
|
230
230
|
Invoke a build from python code::
|
|
231
231
|
|
|
232
|
-
from portable_python import BuildSetup
|
|
232
|
+
from portable_python import BuildSetup, required_python_spec
|
|
233
233
|
|
|
234
|
-
setup = BuildSetup("cpython:3.9.7")
|
|
234
|
+
setup = BuildSetup(required_python_spec("cpython:3.9.7"))
|
|
235
235
|
setup.compile()
|
|
236
236
|
|
|
237
237
|
|
|
@@ -193,9 +193,9 @@ Portable Python can be used as a python library to invoke builds, or inspect an
|
|
|
193
193
|
|
|
194
194
|
Invoke a build from python code::
|
|
195
195
|
|
|
196
|
-
from portable_python import BuildSetup
|
|
196
|
+
from portable_python import BuildSetup, required_python_spec
|
|
197
197
|
|
|
198
|
-
setup = BuildSetup("cpython:3.9.7")
|
|
198
|
+
setup = BuildSetup(required_python_spec("cpython:3.9.7"))
|
|
199
199
|
setup.compile()
|
|
200
200
|
|
|
201
201
|
|
|
@@ -11,9 +11,9 @@ timestamp: 2026-06-23T00:00:00Z
|
|
|
11
11
|
The build orchestrator (`__init__.py`). The [`build`](/cli/build.md) command — and library users — construct one from a python spec and call `compile()`:
|
|
12
12
|
|
|
13
13
|
```python
|
|
14
|
-
from portable_python import BuildSetup
|
|
14
|
+
from portable_python import BuildSetup, required_python_spec
|
|
15
15
|
|
|
16
|
-
BuildSetup("cpython:3.13.2").compile()
|
|
16
|
+
BuildSetup(required_python_spec("cpython:3.13.2")).compile()
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Mental model
|
|
@@ -26,4 +26,4 @@ It owns the [`Folders`](/architecture/config.md) (resolved paths) and the python
|
|
|
26
26
|
|
|
27
27
|
- **Start reading at `compile()`** — it calls everything else in order.
|
|
28
28
|
- A `--prefix` makes the build **non-portable**; without it the result is relocatable (see [ppp-marker](/concepts/ppp-marker.md) and [portability](/concepts/portability.md)).
|
|
29
|
-
- It
|
|
29
|
+
- It takes a `PythonSpec` with a full `X.Y.Z` version: `required_python_spec()` validates that (a bare `3.13` is rejected) and resolves `"latest"` (or empty) to the newest known version.
|
|
@@ -12,15 +12,15 @@ Before compiling, the tool must decide, for each candidate [external module](/mo
|
|
|
12
12
|
|
|
13
13
|
## The `m_telltale` attribute
|
|
14
14
|
|
|
15
|
-
Each [`ModuleBuilder`](/architecture/module-builder.md) subclass declares `m_telltale`, a path (or
|
|
15
|
+
Each [`ModuleBuilder`](/architecture/module-builder.md) subclass declares `m_telltale`, a path (or several, space-separated) using an `{include}` placeholder that is expanded against the target's system include directories:
|
|
16
16
|
|
|
17
17
|
```python
|
|
18
18
|
class Openssl(ModuleBuilder):
|
|
19
19
|
m_telltale = "{include}/openssl/ssl.h"
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
class
|
|
23
|
-
m_telltale =
|
|
22
|
+
class LibFFI(ModuleBuilder):
|
|
23
|
+
m_telltale = "{include}/ffi.h {include}/ffi/ffi.h"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
`PPG.find_telltale()` expands the placeholder against each `target.sys_include` directory and returns the first existing path, or `None`.
|
|
@@ -51,7 +51,7 @@ Replace `{module}` with the lowercased module name (e.g. `openssl`):
|
|
|
51
51
|
| `{module}-version` | Version to build. |
|
|
52
52
|
| `{module}-url` | Source URL (`$version` is substituted; may carry a `#sha256=…` fragment, verified on download). |
|
|
53
53
|
| `{module}-src-suffix` | Archive extension when the URL lacks one. |
|
|
54
|
-
| `{module}-configure` | **Replace** the default configure args (`$
|
|
54
|
+
| `{module}-configure` | **Replace** the default configure args (space-separated, shell-style quoting; `$lib_dir` and `$lib64_dir` substituted). |
|
|
55
55
|
| `{module}-http-headers` | Headers for the download (env vars expanded). |
|
|
56
56
|
| `{module}-patches` | Source patches to apply before compiling. |
|
|
57
57
|
| `{module}-debian` | Debian package name for dependency detection. |
|
|
@@ -18,13 +18,13 @@ Runs on every push to `main` and every pull request targeting `main`, with `canc
|
|
|
18
18
|
|-----|--------------|
|
|
19
19
|
| `test` | Matrix over Python `3.10`–`3.14` on `ubuntu-latest` (`fail-fast: false`). Runs `uvx --with tox-uv tox -e py`, then uploads coverage to Coveralls as a **parallel** build, flagged per version. |
|
|
20
20
|
| `coveralls-finish` | After all `test` jobs finish, signals Coveralls that the parallel build is complete. |
|
|
21
|
-
| `linters` | On Python `3.14`, runs `uvx --with tox-uv tox -e style
|
|
21
|
+
| `linters` | On Python `3.14`, runs `uvx --with tox-uv tox -e style,<typecheckers>` (ruff check + format diff, then the type checkers, see [type checker findings](/typecheck-findings.md)). |
|
|
22
22
|
|
|
23
23
|
## Release (`release.yml`)
|
|
24
24
|
|
|
25
25
|
Triggers on pushing a tag matching `v[0-9]*`. The single `publish` job (Python `3.14`, GitHub environment `release`):
|
|
26
26
|
|
|
27
|
-
1. `uvx --with tox-uv tox -e py,style
|
|
27
|
+
1. `uvx --with tox-uv tox -e py,style,<typecheckers>` — full test + lint + type check gate.
|
|
28
28
|
2. `uv build` — build the sdist + wheel.
|
|
29
29
|
3. `pypa/gh-action-pypi-publish` — publish to PyPI via **trusted publishing** (OIDC, `id-token: write` — no API token is stored).
|
|
30
30
|
|
|
@@ -21,10 +21,11 @@ uv sync
|
|
|
21
21
|
The suite mocks `runez.run()` and builds in `--dryrun` mode, so it asserts the *planned* commands without actually compiling. Target is 100% coverage.
|
|
22
22
|
|
|
23
23
|
```shell
|
|
24
|
-
tox
|
|
25
|
-
tox -e py313
|
|
26
|
-
tox -e style
|
|
27
|
-
tox -e reformat
|
|
24
|
+
tox # all envs (py310-314, coverage, style)
|
|
25
|
+
tox -e py313 # one python version
|
|
26
|
+
tox -e style # lint check (ruff)
|
|
27
|
+
tox -e reformat # auto-fix formatting
|
|
28
|
+
tox -e <typechecker> # one tox env per type checker, see tox.ini
|
|
28
29
|
|
|
29
30
|
.venv/bin/pytest tests/ # directly
|
|
30
31
|
.venv/bin/pytest tests/test_build.py::test_build_rc -vv # a single test
|
|
@@ -19,7 +19,7 @@ Start with the [Overview](/overview.md), then drill into the area you need.
|
|
|
19
19
|
* [Configuration](/configuration/index.md) - The `portable-python.yml` file, its sections and overrides.
|
|
20
20
|
* [Guides](/guides/index.md) - Playbooks for common tasks: building, extending, local development.
|
|
21
21
|
* [Release process](/release.md) - How to cut a release: changelog highlights, then a version tag.
|
|
22
|
-
* [
|
|
22
|
+
* [Type checker findings](/typecheck-findings.md) - What introducing the type checkers found and fixed.
|
|
23
23
|
|
|
24
24
|
## Conventions
|
|
25
25
|
|
|
@@ -29,4 +29,4 @@ Start with the [Overview](/overview.md), then drill into the area you need.
|
|
|
29
29
|
## Authority
|
|
30
30
|
|
|
31
31
|
This bundle is the **authoritative** documentation for portable-python's internals, configuration, CLI, and development workflows.
|
|
32
|
-
The repository's `README.rst` remains the project's landing page (install, quick start, motivation).
|
|
32
|
+
The repository's `README.rst` remains the project's landing page (install, quick start, motivation), and its `CHANGELOG.md` has the high-level release highlights, newest first.
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
# Knowledge Bundle Update Log
|
|
2
2
|
|
|
3
|
+
## 2026-10-09
|
|
4
|
+
|
|
5
|
+
* **Update**: [Configuration](/configuration/portable-python-yml.md): `{module}-configure` substitutes `$lib_dir` and `$lib64_dir` (not `$deps_lib`), and its value is split into separate args.
|
|
6
|
+
* **Creation**: Added the [type checker findings](/typecheck-findings.md) report.
|
|
7
|
+
* **Update**: The changelog moved out of the bundle, to `CHANGELOG.md` at the repo root (shipped in the sdist, like `README.rst`); [release process](/release.md) and the index point there.
|
|
8
|
+
* **Update**: [CI/CD](/guides/ci-cd.md): the `linters` job and the release gate run the type checkers.
|
|
9
|
+
* **Update**: `BuildSetup` takes a `PythonSpec` (via `required_python_spec()`) in [BuildSetup](/architecture/build-setup.md), and `m_telltale` is a space-separated `str` in [telltale detection](/concepts/telltale-detection.md).
|
|
10
|
+
|
|
11
|
+
## 2026-10-08
|
|
12
|
+
|
|
13
|
+
* **Update**: Listed the type checker tox envs (`tox -e <typechecker>`) in [local development](/guides/local-development.md).
|
|
14
|
+
|
|
15
|
+
## 2026-08-20
|
|
16
|
+
|
|
17
|
+
* **Update**: Bumped SQLite to 3.53.4 and gettext-tiny to 0.3.3, and recorded the stay-put rationale for LibFFI, OpenSSL and Readline in their `version` property comments (per the [bump components playbook](/guides/bump-components.md)).
|
|
18
|
+
|
|
3
19
|
## 2026-06-23
|
|
4
20
|
|
|
5
|
-
* **Creation**: Added the [release process](/release.md) playbook and the
|
|
21
|
+
* **Creation**: Added the [release process](/release.md) playbook and the changelog.
|
|
6
22
|
* **Creation**: Added the [bump component versions](/guides/bump-components.md) guide.
|
|
7
23
|
* **Update**: Pulled two verified facts in from the project wiki — the relativization tools (`patchelf` / `install_name_tool`) and `--prefix` / `--enable-shared` support ([PythonInspector](/architecture/python-inspector.md)), and the `#sha256=` download-checksum URL fragment ([configuration](/configuration/portable-python-yml.md)). Skipped the wiki's `sources:` download-url design — it's an unimplemented draft.
|
|
8
24
|
* **Update**: Trimmed the CLI pages — dropped the per-command option tables (which mirror `--help`) for purpose + non-obvious gotchas + examples, pointing at `--help` for the full flag list.
|
|
@@ -22,7 +22,7 @@ Review what changed since the last release:
|
|
|
22
22
|
git diff <last-tag>..main # e.g. git diff v2.0.0..main
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Summarize the **highlights** in
|
|
25
|
+
Summarize the **highlights** in `CHANGELOG.md` (at the repo root) — short and high-level. It should
|
|
26
26
|
give a reader a rough idea of the main changes since the last release, not a blow-by-blow; skip the
|
|
27
27
|
details.
|
|
28
28
|
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: Report
|
|
3
|
+
title: Type checker findings
|
|
4
|
+
description: What introducing multiple type checkers found in v2.0.2, and what v2.1 changed in response (bugs, design, minor).
|
|
5
|
+
tags: [report, type-checking, ci, quality]
|
|
6
|
+
timestamp: 2026-10-09T00:00:00Z
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Type checking: v2.0.2 → v2.1
|
|
10
|
+
|
|
11
|
+
What v2.1 changed in response to type checker findings on v2.0.2.
|
|
12
|
+
|
|
13
|
+
| Checker | Version | v2.0.2 | v2.1 | Actionable | Bugs | Design | Minor |
|
|
14
|
+
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
15
|
+
| ty | 0.0.85 | 51 | 0 | 51 | 0 | 5 | 6 |
|
|
16
|
+
| pyrefly | 1.3.2 | 96 | 0 | 96 | 1 | 6 | 7 |
|
|
17
|
+
| pyright | 1.1.414 | 93 | 0 | 93 | 1 | 6 | 8 |
|
|
18
|
+
| mypy | 2.4.0 | 32 | 0 | 32 | 0 | 3 | 4 |
|
|
19
|
+
| basedpyright | 1.40.2 | 2,979 | 2,576 | 646 | 1 | 6 | 8 |
|
|
20
|
+
| zuban | 0.10.0 | 38 | 0 | 38 | 2 | 4 | 5 |
|
|
21
|
+
|
|
22
|
+
- **v2.0.2**, **v2.1**: findings on that release's `src/` and `tests/`, both checked with v2.1's
|
|
23
|
+
settings (`tox.ini`, `pyproject.toml`). "v2.0.2" is commit `c298694`: v2.0.2 plus the component
|
|
24
|
+
bumps that preceded this work.
|
|
25
|
+
- **Actionable**: v2.0.2 findings resolved by a change in v2.1.
|
|
26
|
+
- **Bugs**, **Design**, **Minor**: how many of the changes listed under [Bug fixes](#bug-fixes),
|
|
27
|
+
[Design](#design) and [Minor](#minor) the checker spotted.
|
|
28
|
+
- basedpyright counts include its warnings: 110 errors + 2,869 warnings on v2.0.2, 5 + 2,571 on
|
|
29
|
+
v2.1. Its 5 remaining errors are import cycles (`__init__` ↔ `versions` ↔ `cpython` ↔
|
|
30
|
+
`inspector`). basedpyright is available locally (`tox -e basedpyright`), see [CI/CD](/guides/ci-cd.md)
|
|
31
|
+
for which checkers gate CI.
|
|
32
|
+
- v2.1's zeros need runez 5.10.1, which fixed an annotation portable-python tripped on (see
|
|
33
|
+
[Fixed in runez](#fixed-in-runez)).
|
|
34
|
+
- v2.0.2 had 3 `# type:` comments, v2.1 has none.
|
|
35
|
+
|
|
36
|
+
## Bug fixes
|
|
37
|
+
|
|
38
|
+
A checker pointed at code that misbehaved.
|
|
39
|
+
|
|
40
|
+
- With `cpython-use-github: true`, a failed GitHub API call (rate limiting, network error) crashed
|
|
41
|
+
with a `TypeError`: `RestClient.get()` returns `None` on failure, and the response was iterated
|
|
42
|
+
as-is [zuban, once `get_available_versions()` had a return annotation: mypy-style checkers skip
|
|
43
|
+
the body of unannotated functions]
|
|
44
|
+
- When `bin/python` couldn't be found after `make install`, a configured `cpython-validate-script`
|
|
45
|
+
or `cpython-additional-packages` ran `None` as the python executable before the "Can't find
|
|
46
|
+
bin/python" check happened: `bin_python` is now always a `Path`, and aborts with that message on
|
|
47
|
+
first use [pyrefly, pyright, basedpyright, zuban]
|
|
48
|
+
|
|
49
|
+
## Design
|
|
50
|
+
|
|
51
|
+
portable-python's invariants are now stated in its types, and enforced where they used to be
|
|
52
|
+
assumed.
|
|
53
|
+
|
|
54
|
+
- `BuildSetup` takes a `PythonSpec`, the new `required_python_spec()` turns CLI text (or
|
|
55
|
+
`None`/`"latest"`) into one, with a clear error when it isn't a full `X.Y.Z`
|
|
56
|
+
version [ty, pyrefly, pyright, basedpyright]
|
|
57
|
+
- `VersionFamily` is an ABC (`get_available_versions()` and `get_builder()` are abstract): `latest`
|
|
58
|
+
is always a `Version`, aborting with "Could not determine latest cpython version" instead of the
|
|
59
|
+
puzzling "Invalid python spec: None", and `available_versions` is always a dict [all six]
|
|
60
|
+
- `Folders`: `build`, `destdir`, `sources` and `ppp-marker` are required (clear error when not
|
|
61
|
+
configured), only `dist` and `logs` are optional, and folders are `Path`s [pyrefly, pyright,
|
|
62
|
+
basedpyright, zuban]
|
|
63
|
+
- `PPG.family()` always aborts for an unknown family (its `fatal=` parameter is gone) [all six]
|
|
64
|
+
- `m_telltale` is a plain `str` (several files are space-separated), instead of a mix of `str` and
|
|
65
|
+
`ClassVar[list]` [all six]
|
|
66
|
+
- Library tracking: `Trackable` is an ABC declaring `relative_path` and `tracked_category`,
|
|
67
|
+
`LibType` moved to `tracking.py` (the only enum `Tracker` was ever used with), and
|
|
68
|
+
`Tracker.report()` no longer overrides `represented()` with a different return type [ty, pyrefly,
|
|
69
|
+
pyright, basedpyright]
|
|
70
|
+
|
|
71
|
+
## Fixed in runez
|
|
72
|
+
|
|
73
|
+
portable-python tripped on this runez annotation, fixed in runez 5.10.1 rather than worked around.
|
|
74
|
+
|
|
75
|
+
- `to_path(None)` returns `None`: it always did at runtime, but runez 5.10.0's annotation only
|
|
76
|
+
allowed `str | Path` [all six]
|
|
77
|
+
|
|
78
|
+
## Removed
|
|
79
|
+
|
|
80
|
+
A checker flagged code that turned out not to be needed.
|
|
81
|
+
|
|
82
|
+
- The `__main__` block of `cli.py` re-imported `main` from its own module [ty, pyrefly, zuban]
|
|
83
|
+
|
|
84
|
+
## Minor
|
|
85
|
+
|
|
86
|
+
The checker was right, the fix changes little in practice.
|
|
87
|
+
|
|
88
|
+
- Attributes say what they hold, including `None` (`ModuleBuilder.m_*`, `parent_module`,
|
|
89
|
+
`ModuleCollection`, `_bin_python`, `BuildSetup.build_context`, ...) [all six]
|
|
90
|
+
- Base class methods declare their return type, so overrides agree (`url`, `auto_select_reason()`,
|
|
91
|
+
`candidate_modules()`, `get_problem()`, `xenv_LDFLAGS()`) [all six]
|
|
92
|
+
- `config.py`: `ConfigSource.get_value()` walks the key in a loop, `SingleFileMatch` sets its
|
|
93
|
+
attributes in `__init__`, and `is_match()` returns a `bool` [all six]
|
|
94
|
+
- `# type:` comments became annotations [pyrefly, pyright, basedpyright, zuban]
|
|
95
|
+
- Inspector: report lists hold strings, `relative_path()` returns a `str`, no `x and x.y`
|
|
96
|
+
chains [pyrefly, mypy, zuban]
|
|
97
|
+
- Version listing checks `v.patch` truthiness instead of `v.patch > 0` [ty, pyrefly, pyright,
|
|
98
|
+
basedpyright]
|
|
99
|
+
- Tests: no poking at `Config._sources`, the mock's patcher is created in `__init__` [ty, pyrefly,
|
|
100
|
+
pyright, basedpyright]
|
|
101
|
+
- `runez.ActivateColors` instead of `runez.colors.ActivateColors` [pyright, basedpyright]
|
|
102
|
+
- `recompress` takes family and version from a spec only when the path names one [pyright,
|
|
103
|
+
basedpyright]
|
|
104
|
+
- `run_make(cpu_count=...)` is annotated [ty]
|
|
105
|
+
|
|
106
|
+
## Not from a type checker
|
|
107
|
+
|
|
108
|
+
- Folder paths containing a space are refused by portable-python itself, with the reason spelled
|
|
109
|
+
out ("escapes too complex with makefiles, shell scripts etc"), instead of relying on a niche
|
|
110
|
+
runez helper
|
|
111
|
+
- New tests: missing `bin/python`, python.org listing no versions, folder path with a space
|
|
@@ -76,6 +76,18 @@ directory = ".tox/test-reports/htmlcov"
|
|
|
76
76
|
[tool.pytest.ini_options]
|
|
77
77
|
cache_dir = ".tox/.cache"
|
|
78
78
|
|
|
79
|
+
[tool.pyright] # also read by basedpyright (it refuses a pyproject that has both sections)
|
|
80
|
+
pythonVersion = "3.10"
|
|
81
|
+
include = ["src", "tests"]
|
|
82
|
+
|
|
83
|
+
[tool.mypy] # also read by zuban
|
|
84
|
+
python_version = "3.10"
|
|
85
|
+
files = ["src", "tests"]
|
|
86
|
+
|
|
87
|
+
[tool.pyrefly] # without this section, pyrefly adopts [tool.pyright] (or [tool.mypy])
|
|
88
|
+
python-version = "3.10"
|
|
89
|
+
project-includes = ["src", "tests"]
|
|
90
|
+
|
|
79
91
|
[tool.ruff]
|
|
80
92
|
cache-dir = ".tox/.ruff_cache"
|
|
81
93
|
line-length = 140
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
# This file was autogenerated by uv via the following command:
|
|
2
2
|
# uv pip compile pyproject.toml --universal -o requirements.txt --python-version 3.10 --group dev
|
|
3
|
-
certifi==2026.
|
|
3
|
+
certifi==2026.10.19
|
|
4
4
|
# via requests
|
|
5
|
-
charset-normalizer==3.
|
|
5
|
+
charset-normalizer==3.5.2
|
|
6
6
|
# via requests
|
|
7
|
-
click==8.
|
|
7
|
+
click==8.5.0
|
|
8
8
|
# via portable-python (pyproject.toml)
|
|
9
9
|
colorama==0.4.6 ; sys_platform == 'win32'
|
|
10
|
-
# via
|
|
11
|
-
|
|
12
|
-
# pytest
|
|
13
|
-
coverage==7.14.2
|
|
10
|
+
# via pytest
|
|
11
|
+
coverage==7.16.2
|
|
14
12
|
# via pytest-cov
|
|
15
13
|
exceptiongroup==1.3.1 ; python_full_version < '3.11'
|
|
16
14
|
# via pytest
|
|
17
|
-
idna==3.
|
|
15
|
+
idna==3.20
|
|
18
16
|
# via requests
|
|
19
|
-
iniconfig==2.3.
|
|
17
|
+
iniconfig==2.3.1
|
|
20
18
|
# via pytest
|
|
21
|
-
packaging==26.
|
|
19
|
+
packaging==26.3
|
|
22
20
|
# via pytest
|
|
23
|
-
pluggy==1.
|
|
21
|
+
pluggy==1.7.0
|
|
24
22
|
# via
|
|
25
23
|
# pytest
|
|
26
24
|
# pytest-cov
|
|
27
|
-
pygments==2.
|
|
25
|
+
pygments==2.21.0
|
|
28
26
|
# via pytest
|
|
29
27
|
pytest==9.1.1
|
|
30
28
|
# via pytest-cov
|
|
@@ -34,15 +32,15 @@ pyyaml==6.0.3
|
|
|
34
32
|
# via portable-python (pyproject.toml)
|
|
35
33
|
requests==2.34.2
|
|
36
34
|
# via portable-python (pyproject.toml)
|
|
37
|
-
runez==5.
|
|
35
|
+
runez==5.11.1
|
|
38
36
|
# via portable-python (pyproject.toml)
|
|
39
|
-
tomli==2.
|
|
37
|
+
tomli==2.5.0 ; python_full_version <= '3.11'
|
|
40
38
|
# via
|
|
41
39
|
# coverage
|
|
42
40
|
# pytest
|
|
43
|
-
typing-extensions==4.
|
|
41
|
+
typing-extensions==4.16.0 ; python_full_version < '3.11'
|
|
44
42
|
# via exceptiongroup
|
|
45
|
-
urllib3==2.
|
|
43
|
+
urllib3==2.8.0
|
|
46
44
|
# via
|
|
47
45
|
# portable-python (pyproject.toml)
|
|
48
46
|
# requests
|