Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3{5,6}: Reintroduce bytecode determinism #59796

Merged
merged 1 commit into from
Apr 18, 2019

Conversation

bb010g
Copy link
Contributor

@bb010g bb010g commented Apr 17, 2019

Motivation for this change

Originally introduced in #22585, patches to lock down CPython bytecode mtime timestamps were lost in #53123 when the CPython version files were merged, likely due to CPython 3.7 not needing them anymore. These patches should remain in-tree until CPython 3.5 and 3.6 support is dropped completely.

Found with the diffoscope.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Due to the scope of this change, I've only tested it on my NUR Python packages / applications, but tests passed and the nix-build --check came up clean on python3-3.6.8, python3.6-setuptools-40.8.0, python3.6-dnspython-1.16.0, python3.6-namedlist-1.7, python3.6-certifi-2018.11.29, python3.6-six-1.12.0, python3.6-webencodings-0.5.1, python3.6-html5lib-1.0.1, python3.6-SQLAlchemy-1.2.14, python3.6-Yapsy-1.12.0, python3.6-singledispatch-3.4.0.3, python3.6-backports_abc-0.5, python3.6-tornado-4.5.3, python3.6-chardet-3.0.4, and python3.6-wpull-2.0.3.

It's the same patch as before; I'm not sure how much more testing it needs. Applied to staging because I think that's where large rebuild PRs go?

Originally introduced in 8970a9c and 1531b5e, these patches were lost in
efbe87f when the CPython version files were merged, likely due to
CPython 3.7 not needing them anymore. These patches should remain
in-tree until CPython 3.5 and 3.6 support is dropped completely.

Found with the diffoscope ( https://diffoscope.org/ ).
@bb010g bb010g requested a review from FRidh as a code owner April 17, 2019 21:07
@FRidh
Copy link
Member

FRidh commented Apr 17, 2019

@GrahamcOfBorg build python36.pkgs.pytest python35.pkgs.pytest

@FRidh
Copy link
Member

FRidh commented Apr 17, 2019

Good catch, thanks!

@bb010g
Copy link
Contributor Author

bb010g commented Apr 18, 2019

Actually, given the small list of affected derivations for staging, I've gone ahead and moved the PR target to master, as well as ran nix-review locally, which came up clean, save for one package.

Turns out pyflame was already broken (#52827, patched-ish at #52828), but I patched and cleaned that up before running into that PR, so I submitted it over at #59814. nix-review is fully clean with that commit on top of this.

@bb010g bb010g changed the base branch from staging to master April 18, 2019 04:56
@FRidh FRidh merged commit 28ac309 into NixOS:master Apr 18, 2019
@bb010g bb010g deleted the python-redeterministic branch April 19, 2019 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants