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
python37: init at 3.7.0b1 #34231
python37: init at 3.7.0b1 #34231
Conversation
Finally we can remove many encoding work-arounds in Also great for my own projects and sanity. |
|
||
postPatch = '' | ||
# Determinism | ||
substituteInPlace "Lib/py_compile.py" --replace "source_stats['mtime']" "(1 if 'DETERMINISTIC_BUILD' in os.environ else source_stats['mtime'])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not go through pep-0552 intensively, but could not use the fact that it offers the possibility to have timestamp-less .pyc files and replace this hack?
something like:
substituteInPlace "Lib/py_compile.py" --replace "invalidation_mode=PycInvalidationMode.TIMESTAMP):" "invalidation_mode=PycInvalidationMode.CHECKED_HASH):"
and remove DETERMINISTIC_BUILD
env var ? (this wold require some testing…)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, that's on the todo list. We will need to modify some of this patching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substituteInPlace "Lib/py_compile.py" --replace "invalidation_mode=PycInvalidationMode.TIMESTAMP):" "invalidation_mode=(PycInvalidationMode.CHECKED_HASH if 'DETERMINISTIC_BUILD' in os.environ else PycInvalidationMode.TIMESTAMP)):"
would probably be better
Success on x86_64-linux (full log) Attempted: python37 Partial log (click to expand)
|
Failure on x86_64-darwin (full log) Attempted: python37 Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python37 Partial log (click to expand)
|
Would not this still need |
https://docs.python.org/3.7/whatsnew/3.7.html#pep-540-forced-utf-8-runtime-mode
So, yes. While your workstation typically has a UTF locale configured, this is or may not be the case on say servers or inside services (using |
Beta version of Python 3.7.
Failure on x86_64-darwin (full log) Attempted: python37 Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: python37 Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: python37 Partial log (click to expand)
|
Yep, closing. |
Beta version of Python 3.7.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)The current version builds and works. Even though, we should: