Python install manager 26.3

We’ve just released a beta of the next Python install manager: Python Release Python install manager 26.3 beta 1 | Python.org

The main addition is user configuration for handling custom shebang commands. For context, we allow the py script.py command to interpret Unix-like shebangs to try and choose a more specific runtime - for example, #! /usr/bin/python3.14 is the equivalent of launching with py -V:3.14 script.py.

We also allow fall-throughs for Windows paths in the shebang, primarily because the previous launcher did it and, while we think it’s a security risk, it’s not severe enough to break compatibility (there’s an option to disallow it, and specifying a -V: option will then ignore the shebang).

With this update, we allow users to add a shebang_templates section to their configuration file to map additional shebangs to either a py -V:... command or a new command, which will either be interpreted by one of our standard templates or fall through to the PATH search or arbitrary-executable cases. In this way, a non-standard shebang (including Windows-style paths) can be mapped to a known runtime.

(We continue to resist making py.exe a universal launcher for all kinds of apps; it’s meant for launching Python.)

Also fixed in this update is URL escaping should now work properly in embedded credentials, entrypoints potentially being created outside of the intended directory, a bug that breaks uninstalling, and some minor py install --update issues.

Please post feedback at Issues · python/pymanager · GitHub. I’m particularly interested in how we should tweak the shebang templates feature.

3 Likes

The final release has now been made: Python Release Python install manager 26.3 | Python.org

Only minor changes from the beta, most notably removing the default install tag (3) setting so that it matches the default launch tag setting. This way, users who set PYMANAGER_DEFAULT_TAG to something more specific than 3 before installing the runtime will get the one they expect, rather than installing (currently) 3.14 and then failing to launch their desired default.

Full changelog: https://github.com/python/pymanager/releases/tag/26.3