Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to select UNCHECKED_HASH or CHECKED_HASH for bytecode_hashed_invalidation option #212

Closed
wimglenn opened this issue Dec 12, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@wimglenn
Copy link
Contributor

wimglenn commented Dec 12, 2023

distlib.wheel.Wheel.install() currently allows specifying bytecode_hashed_invalidation but it's only a True/False option, passed to byte_compile to access py_compile.PycInvalidationMode.CHECKED_HASH mode.

I want to use UNCHECKED_HASH mode, because my .py/.pyc code live on a read-only filesystem and they've already been validated once at build-time.

Can the public API expose a way to specify UNCHECKED_HASH mode for the .pyc creation, to avoid wasteful/redundant hash checking at runtime?

@vsajip
Copy link
Collaborator

vsajip commented Dec 13, 2023

Would you like to propose a way to do this?

@wimglenn
Copy link
Contributor Author

Added a proposal in #213

@vsajip vsajip added the enhancement New feature or request label Dec 13, 2023
@vsajip vsajip closed this as completed in 573f741 Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants