Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664774 - python-utils-r1.eclass python_optimize and distutils - consider using unchecked hash-based cache generation
Summary: python-utils-r1.eclass python_optimize and distutils - consider using uncheck...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: https://docs.python.org/3.7/whatsnew/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-28 17:32 UTC by Mart Raudsepp
Modified: 2024-06-01 09:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2018-08-28 17:32:15 UTC
python3.7+ supports hash-based cache generation for build reproducibility. Additionally there is a choice to use unchecked hash-based cache or whatnot:

"Hash-based .pyc files come in two variants: checked and unchecked. Python validates checked hash-based .pyc files against the corresponding source files at runtime but doesn’t do so for unchecked hash-based pycs. Unchecked hash-based .pyc files are a useful performance optimization for environments where a system external to Python (e.g., the build system) is responsible for keeping .pyc files up-to-date."

This seems relevant to us for use from python_optimize, distutils and elsewhere for python3.7 and newer package owned cache files.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-04-12 04:31:04 UTC
I see https://github.com/gentoo/gentoo/commit/7a9b4f552e4c93525ab8d3a353bf8c4c1aee5537 but not the same thing, I think?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-07-27 05:27:36 UTC
To be honest, I don't think this is a good idea for Gentoo.  At least some of Gentoo users are used to being able to edit .py files in site-packages to test something, and making that suddenly (partially) ineffective would be confusing.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-06-01 09:37:42 UTC
Given no further arguments, I still think this is not a good idea.