Re: [Python-Dev] Deterministic builds of the interpreter
Hi, Are there anymore suggestions how to improve the determinism of the Python 3 interpreter? As I mentioned, it seems only sets cause unreproducible bytecode. Sets have no order. But when generating the bytecode, I would expect there would still be an order since the code isn't actually executed, 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 `PYTHONHASHSEED=1 $out/bin/python -m compileall -f > $out` > > where $out is the path where I installed Python. > > > > Do you have an idea why in [3], this is Python 2.7, the timestamps are > still > > incorrect? I think they're all required for `compileall` and somehow it > > doesn't seem capable of taking into account DETERMINISTIC_BUILD. > Explicitly > > removing those pyc and pyo files and recompiling them to bytecode still > > results in timestamp issues for these 4 files. > > Sorry, I have no motivation about Python 2 anymore. > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Is this a bug or a feature?
I'm brand new to python and was trying to install the newest version (3.6.0) on my ubuntu 16.04.1 but couldn't get it to build error free. I tried searching the bugs but didn't see a match for what I am seeing. Thanks for any help, Patrick Here is the report: patrick@ubuntu-MacBook:~/Programs/Python-3.6.0$ ./python -m test -v test_venv == CPython 3.6.0 (default, Feb 16 2017, 13:20:29) [GCC 5.4.0 20160609] == Linux-4.4.0-62-generic-x86_64-with-debian-stretch-sid little-endian == hash algorithm: siphash24 64bit == cwd: /home/patrick/Programs/Python-3.6.0/build/test_python_20536 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) Run tests sequentially 0:00:00 [1/1] test_venv test_defaults (test.test_venv.BasicTest) ... ok test_executable (test.test_venv.BasicTest) ... ok test_executable_symlinks (test.test_venv.BasicTest) ... ok test_isolation (test.test_venv.BasicTest) ... ok test_overwrite_existing (test.test_venv.BasicTest) ... ok test_prefixes (test.test_venv.BasicTest) ... ok test_prompt (test.test_venv.BasicTest) ... ok test_symlinking (test.test_venv.BasicTest) ... ok test_unoverwritable_fails (test.test_venv.BasicTest) ... ok test_upgrade (test.test_venv.BasicTest) ... ok test_devnull (test.test_venv.EnsurePipTest) ... ok test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok test_with_pip (test.test_venv.EnsurePipTest) ... FAIL == FAIL: test_with_pip (test.test_venv.EnsurePipTest) -- Traceback (most recent call last): File "/home/patrick/Programs/Python-3.6.0/Lib/test/test_venv.py", line 372, in test_with_pip with_pip=True) subprocess.CalledProcessError: Command '['/tmp/tmp51me85og/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/patrick/Programs/Python-3.6.0/Lib/test/test_venv.py", line 378, in test_with_pip self.fail(msg.format(exc, details)) AssertionError: Command '['/tmp/tmp51me85og/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. **Subprocess Output** Traceback (most recent call last): File "/home/patrick/Programs/Python-3.6.0/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/patrick/Programs/Python-3.6.0/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/patrick/Programs/Python-3.6.0/Lib/ensurepip/__main__.py", line 4, in ensurepip._main() File "/home/patrick/Programs/Python-3.6.0/Lib/ensurepip/__init__.py", line 189, in _main default_pip=args.default_pip, File "/home/patrick/Programs/Python-3.6.0/Lib/ensurepip/__init__.py", line 102, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/patrick/Programs/Python-3.6.0/Lib/ensurepip/__init__.py", line 27, in _run_pip import pip zipimport.ZipImportError: can't decompress data; zlib not available -- Ran 14 tests in 1.278s FAILED (failures=1) test test_venv failed test_venv failed 1 test failed: test_venv Total duration: 1 sec Tests result: FAILURE ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is this a bug or a feature?
On Fri, Feb 17, 2017 at 7:33 AM, Patrick Wallinger wrote: > zipimport.ZipImportError: can't decompress data; zlib not available > There may very well be a bug here of the form of "zlib dependency is considered soft, but then something else breaks". However, in your current situation, my recommendation would be to install the zlib development libraries and retry the build. You may be able to get that with: $ sudo apt-get build-dep python3 or possibly search your package manager for "zlib*-dev" (on my Debian, it's zlib1g-dev). That should give you the full de/compression suite, which will in turn make ensurepip work. ChrisA ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is this a bug or a feature?
Hello. We are sorry but we cannot help you. This mailing list is to work on developing Python (adding new features to Python itself and fixing bugs); if you're having problems learning, understanding or using Python, please find another forum. Probably python-list/comp.lang.python mailing list/news group is the best place; there are Python developers who participate in it; you may get a faster, and probably more complete, answer there. See http://www.python.org/community/ for other lists/news groups/fora. Thank you for understanding. On Thu, Feb 16, 2017 at 02:33:19PM -0600, Patrick Wallinger wrote: > I'm brand new to python and was trying to install the newest version > (3.6.0) on my ubuntu 16.04.1 but couldn't get it to build error free. I > tried searching the bugs but didn't see a match for what I am seeing. > > Thanks for any help, > Patrick > > Here is the report: > patrick@ubuntu-MacBook:~/Programs/Python-3.6.0$ ./python -m test -v > test_venv [skip] > zipimport.ZipImportError: can't decompress data; zlib not available Seems yoy don't have zlib or haven't had zlib headers when you compiled python. Install zlib and zlib-dev packages and recompile python. Oleg. -- Oleg Broytmanhttp://phdru.name/p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Is this a bug or a feature?
Oleg, After installing a fresh zlib package from here: http://packages.ubuntu.com/xenial/zlib1g I was able to build and install Python-3.6.0 seems to me if the zlib module sent out with the 3.6.0 release package doesn't build (which it doesn't) then that's a bug. thanks for your time, Patrick On Thu, Feb 16, 2017 at 3:46 PM, Oleg Broytman wrote: > Hello. > >We are sorry but we cannot help you. This mailing list is to work on > developing Python (adding new features to Python itself and fixing bugs); > if you're having problems learning, understanding or using Python, please > find another forum. Probably python-list/comp.lang.python mailing list/news > group is the best place; there are Python developers who participate in it; > you may get a faster, and probably more complete, answer there. See > http://www.python.org/community/ for other lists/news groups/fora. Thank > you for understanding. > > > On Thu, Feb 16, 2017 at 02:33:19PM -0600, Patrick Wallinger < > the.hi...@gmail.com> wrote: > > I'm brand new to python and was trying to install the newest version > > (3.6.0) on my ubuntu 16.04.1 but couldn't get it to build error free. I > > tried searching the bugs but didn't see a match for what I am seeing. > > > > Thanks for any help, > > Patrick > > > > Here is the report: > > patrick@ubuntu-MacBook:~/Programs/Python-3.6.0$ ./python -m test -v > > test_venv > [skip] > > zipimport.ZipImportError: can't decompress data; zlib not available > >Seems yoy don't have zlib or haven't had zlib headers when you > compiled python. Install zlib and zlib-dev packages and recompile > python. > > Oleg. > -- > Oleg Broytmanhttp://phdru.name/p...@phdru.name >Programmers don't die, they just GOSUB without RETURN. > ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com