Message320988
Follow up of bpo-29708: OpenSUSE uses a downstream patch for distutils to fix https://bugzilla.opensuse.org/show_bug.cgi?id=1049186: distutils-reproducible-compile.patch. I converted the patch as a PR: PR 8057.
Naoki INADA wrote:
"""
Currently, marshal uses refcnt to determine using w_ref or not. Some immutable objects (especially, long and str) can be cached and reused. It may affects refcnt when byte compiling.
I think we should use more deterministic way instead of refcnt. Maybe, count all constants in the module before marshal, like we did in compiling function for co_consts and co_names.
As a bonus, it may reduce resource usage too by merging constants over functions.
(e.g. ('self',) co_varnames and (None,) co_consts)
"""
https://github.com/python/cpython/pull/8057#issuecomment-402065657
Serhiy Storchaka added:
"""
I think we need to understand the issue better before committing changes. When found the source of unstability of file names, we can find other similar sources and make them stable too. For example if the source is listdir() or glob(), we can consider sorting results of all listdir() or glob() in distutils and related methods.
On other side, if the problem is with reference counters in marshal, we can change the marshal module instead.
"""
https://github.com/python/cpython/pull/8057#issuecomment-402198390 |
|
Date |
User |
Action |
Args |
2018-07-03 15:46:25 | vstinner | set | recipients:
+ vstinner |
2018-07-03 15:46:25 | vstinner | set | messageid: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za> |
2018-07-03 15:46:25 | vstinner | link | issue34033 messages |
2018-07-03 15:46:25 | vstinner | create | |
|