New submission from STINNER Victor <vstin...@redhat.com>:

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

----------
components: Library (Lib)
messages: 320988
nosy: vstinner
priority: normal
severity: normal
status: open
title: distutils is not reproducible
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34033>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to