This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2018-07-03.15:46:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-07-03 15:46:25vstinnersetrecipients: + vstinner
2018-07-03 15:46:25vstinnersetmessageid: <1530632785.81.0.56676864532.issue34033@psf.upfronthosting.co.za>
2018-07-03 15:46:25vstinnerlinkissue34033 messages
2018-07-03 15:46:25vstinnercreate