[Python-Dev] Re: RFC: PEP 608: Coordinated Python release

2019-10-25 Thread Freddy Rietdijk
I think it is more important to have CI that clearly shows the impact of dev versions of the interpreter and core packages. Some of us in the Nixpkgs community had this idea for Python core packages as well (and potentially scientific computing packages, but that's out of scope here). This would ne

Re: [Python-Dev] PEP 552: deterministic pycs

2017-09-07 Thread Freddy Rietdijk
> The main objection to that model is that it requires modifying source timestamps, which isn't possible for builds on read-only source trees. Why not set the source timestamps of the source trees to say 1 first? That's what is done with the Nix package manager. The Python interpreter is patched (

Re: [Python-Dev] Snap Python for simple distribution across multiple Linux distros

2017-05-23 Thread Freddy Rietdijk
In my opinion the trend of creating these standalone packages is pretty bad. Developers that choose to support these kind of packages become responsible not only for the code they distribute, but also for whether the dependencies that are bundled in such a standalone package are up to date and secu

Re: [Python-Dev] Hash randomization and deterministic bytecode

2017-05-15 Thread Freddy Rietdijk
if it sometimes differs in > trivial ways) is usable with all hash seed settings. > > --Guido > > On Fri, May 12, 2017 at 6:06 AM, Freddy Rietdijk > wrote: > >> Hi, >> >> On Nix we set PYTHONHASHSEED to 0 when building packages, disabling hash >> randomiza

[Python-Dev] Hash randomization and deterministic bytecode

2017-05-12 Thread Freddy Rietdijk
Hi, On Nix we set PYTHONHASHSEED to 0 when building packages, disabling hash randomization. We do this to improve determinism of the builds because we store the bytecode next to the code. When one runs Python directly or via a script PYTHONHASHSEED is not set thus enabling hash randomization. Am

[Python-Dev] Set program name through exec -a or environment variable

2017-03-18 Thread Freddy Rietdijk
Hi, I would like to know if you're open to supporting `exec -a` or an environment variable for setting `argv[0]`, and have some pointers as to where that should be implemented. On Nixpkgs we typically use wrappers to set environment variables like PATH or PYTHONPATH for individual programs. Consi

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-19 Thread Freddy Rietdijk
Hi Armin, Thank you for your explanation. I've now managed to build 2.7 and 3.5 deterministic by recompiling the bytecode at the end of the build (and excluding 2to3). Freddy On Sun, Feb 19, 2017 at 9:30 AM, Armin Rigo wrote: > Hi Freddy, > > On 16 February 2017 at 18:03, F

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-16 Thread Freddy Rietdijk
cuted, right? On Fri, Feb 10, 2017 at 12:03 PM, INADA Naoki wrote: > On Fri, Feb 10, 2017 at 7:58 PM, Freddy Rietdijk > wrote: > > For Python 3.5 PYTHONHASHSEED doesn't seem to be sufficient, these items > > still seem indeterministic. > > To be sure, I ran `P

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-10 Thread Freddy Rietdijk
That should have been `PYTHONHASHSEED=0 $out/bin/python -m compileall -f $out`. On Fri, Feb 10, 2017 at 11:58 AM, Freddy Rietdijk wrote: > For Python 3.5 PYTHONHASHSEED doesn't seem to be sufficient, these items > still seem indeterministic. > To be sure, I ran `PYTHONHASHSEED=1 $

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-10 Thread Freddy Rietdijk
9, 2017 at 6:51 PM, INADA Naoki wrote: > On Fri, Feb 10, 2017 at 2:45 AM, Freddy Rietdijk > wrote: > > Correct, that was an older version from before I patched > > `_bootstrap_external.py`. A more recent diff can be found at > > > > https://gist.github.c

Re: [Python-Dev] Deterministic builds of the interpreter

2017-02-09 Thread Freddy Rietdijk
c58 6c21 e300 k..Xl!.. > │ │ │ │ +: 160d 0d0a e631 9c58 6c21 e300 .1.Xl!.. > > mtime is 6b2e9c58 vs e6319c53 (little endian) > > maybe, you failed to use customized py_compile when building? > > > On Thu, Feb 9, 2017 at 6:27 PM, Freddy Rietdijk &

[Python-Dev] Deterministic builds of the interpreter

2017-02-09 Thread Freddy Rietdijk
Hi, I'm attempting to make the builds of the Python interpreters for Nixpkgs [1] deterministic. In the case of Python 2.7 we have a patch [2] that fixes the timestamp used in .pyc files in case the env var `DETERMINISTIC_BUILD` is set. We also remove `wininst*.exe`. This works fine, although ther