Skip to content

GH-145278: freeze encodings (partially) and linecache#145279

Open
FFY00 wants to merge 2 commits intopython:mainfrom
FFY00:gh-145278
Open

GH-145278: freeze encodings (partially) and linecache#145279
FFY00 wants to merge 2 commits intopython:mainfrom
FFY00:gh-145278

Conversation

@FFY00
Copy link
Member

@FFY00 FFY00 commented Feb 26, 2026

Signed-off-by: Filipe Laíns <lains@riseup.net>
@FFY00
Copy link
Member Author

FFY00 commented Feb 26, 2026

This makes it so that we don't fail at startup if the stdlib isn't in sys.path.

$ PYTHONHOME=nonsense PYTHON_FROZEN_MODULES=on ./python -c 'print("foo!")'
foo!

Which while is good, doesn't make it obvious there's an issue. GH-145274 adds a nice warning,

$ PYTHONHOME=nonsense PYTHON_FROZEN_MODULES=on ./python -c 'print("foo!")'
WARN: Could not find the standard library directory! The Python 'home' directory was set to 'nonsense', is this correct?
foo!

Signed-off-by: Filipe Laíns <lains@riseup.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant