[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-27 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: > specified_attributes = True is also set in xml.dom.expatbuilder. That's good to know and should perhaps be addressed as well. > Should not it be set to true in the C implementation of ElementTree? That would break existing code. Including mi

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-25 Thread Felix C. Stegerman
New submission from Felix C. Stegerman : I originally reported this as a bug in PyPy, but it turns out that CPython's C implementation (_elementtree) behaves differently than the pure Python version (b/c it sets specified_attributes = 1). PyPy issue with example code: https

[issue42151] Pure Python xml.etree.ElementTree is missing default attribute values

2020-10-26 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- keywords: +patch pull_requests: +21901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22987 ___ Python tracker <https://bugs.python.org/issu

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-06-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: https://github.com/obfusk/apksigcopier currently produces reproducible ZIP files identical to those produced by apksigner using this code: DATETIMEZERO = (1980, 0, 0, 0, 0, 0) class ReproducibleZipInfo(zipfile.ZipInfo): """Repro

[issue29708] support reproducible Python builds

2021-04-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: Hi! I've been working on reproducible builds for python-for-android [1,2,3]. Current issues with .pyc files are: * .pyc files differ depending on whether Python was compiled w/ liblzma-dev installed or not; * many .pyc files include build paths; * some

[issue29708] support reproducible Python builds

2021-04-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- nosy: +obfusk ___ Python tracker <https://bugs.python.org/issue29708> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: I've closed the PR for now. Using a carefully crafted ZipInfo object doesn't work because ZipFile modifies its .external_attr when set to 0. Using something like this quickly hacked together ZipInfo subclass does work: class ZeroedZipInfo

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: > external_attr == 0 may cause issues with permissions. That may be true in some scenarios, but not being able to set it to 0 means you can't create identical files to those produced by other tools -- like those used to generate APKs -- which do in f

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- keywords: +patch pull_requests: +23737 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24979 ___ Python tracker <https://bugs.python.org/issu

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: I've created a draft PR; RFC :) Also: * setting the date to (1980,0,0,0,0,0) already works; * the main issue seems to be that external_attr cannot be 0 atm. -- ___ Python tracker <https://bugs.python.

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue43547> ___ ___ Python-bugs-list mailing list Unsub

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- components: -IO, Library (Lib) versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue43

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-22 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- type: -> enhancement ___ Python tracker <https://bugs.python.org/issue43547> ___ ___ Python-bugs-list mailing list Un

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-23 Thread Felix C. Stegerman
Felix C. Stegerman added the comment: > The __getattr__ hack is not needed. You can reset the flags in a different, > more straight forward way As mentioned, ZipFile._open_to_write() will modify the ZipInfo's .external_attr when it is set to 0. > I just found another specifi

[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-20 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- nosy: +obfusk ___ Python tracker <https://bugs.python.org/issue43547> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2824] zipfile to handle duplicate files in archive

2021-04-13 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- nosy: +obfusk ___ Python tracker <https://bugs.python.org/issue2824> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37596] Reproducible pyc: frozenset is not serialized in a deterministic order

2021-07-30 Thread Felix C. Stegerman
Change by Felix C. Stegerman : -- nosy: +obfusk ___ Python tracker <https://bugs.python.org/issue37596> ___ ___ Python-bugs-list mailing list Unsubscribe: