[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30438 pull_request: https://github.com/python/cpython/pull/32412 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: In GH-32352 I changed only tests that I was able to execute under wasm32-emscripten. As far as I know TK does not build for WASM. Somebody would have to port TCL/TK to WebGL or SDL2 to make it work in the browser. -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 2b16a08bc77475917dd5c96417aef4c5210b45ac by Christian Heimes in branch 'main': bpo-40280: Detect missing threading on WASM platforms (GH-32352) https://github.com/python/cpython/commit/2b16a08bc77475917dd5c96417aef4c5210b45ac -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 765f6dee0fcf55c6ea258c2be4cc9dfb1b014f60 by Christian Heimes in branch 'main': bpo-40280: WASM defaults to no dynamic linking (GH-32360) https://github.com/python/cpython/commit/765f6dee0fcf55c6ea258c2be4cc9dfb1b014f60 -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30409 pull_request: https://github.com/python/cpython/pull/32360 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30404 pull_request: https://github.com/python/cpython/pull/32352 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47232] Difficulties building tip of tree Python for emscripten
Christian Heimes added the comment: You are building a cross-build with "--with-build-python=/usr/local/bin/python3.11". Is the interpreter up to date? During alpha and beta phase, the build Python interpreter should be built from the exact same git commit as the sources in "../..". If the interpreter deviates from the sources in your srcdir, then Python byte code (.pyc), frozen byte code, and re engine can have mismatching magic. I recommend that you build inside an environment that does not have Python 3.11 installed. Instead build a build Python interpreter from the same checkout that you later use for cross-compilation. "./configure && make" is sufficient. You don't have to install the build interpreter. "--with-build-python=$(pwd)/../build/python" works fine. We use this approach in python-wasm: mkdir -p cpython/builddir/build pushd cpython/builddir/build ../../configure -C make -j$(nproc) popd mkdir -p cpython/builddir/emscripten-browser pushd cpython/builddir/emscripten-browser CONFIG_SITE=../../Tools/wasm/config.site-wasm32-emscripten \ emconfigure ../../configure -C \ --host=wasm32-unknown-emscripten \ --build=$(../../config.guess) \ --with-build-python=$(pwd)/../build/python emmake make -j$(nproc) It's going to get easier and less painful as soon as we reach beta phase. During beta the byte code will only change when it is required for a bug fix. -- ___ Python tracker <https://bugs.python.org/issue47232> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47232] Difficulties building tip of tree Python for emscripten
Christian Heimes added the comment: Please attach config.log and Makefile from the builddir. -- ___ Python tracker <https://bugs.python.org/issue47232> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17004] Expand zipimport to include other compression methods
Change by Christian Heimes : -- versions: +Python 3.11 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue17004> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47009] Streamline list.append for the common case
Christian Heimes added the comment: New changeset 9e88b572fb904b172f9e344069fb7118f1cee517 by Christian Heimes in branch 'main': bpo-47009: Fix assert on big endian (GH-32332) https://github.com/python/cpython/commit/9e88b572fb904b172f9e344069fb7118f1cee517 -- ___ Python tracker <https://bugs.python.org/issue47009> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45774] Detect SQLite in configure.ac
Christian Heimes added the comment: New changeset f1606a5ba50bdc4e7d335d62297b4b4043a25e6e by Erlend Egeberg Aasland in branch 'main': bpo-45774: Harden SQLite detection (GH-30016) https://github.com/python/cpython/commit/f1606a5ba50bdc4e7d335d62297b4b4043a25e6e -- ___ Python tracker <https://bugs.python.org/issue45774> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47009] Streamline list.append for the common case
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 3.0 -> 4.0 pull_requests: +30389 pull_request: https://github.com/python/cpython/pull/32332 ___ Python tracker <https://bugs.python.org/issue47009> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 96e09837fb8031aebe8d823dd19ef664a34bcfad by Christian Heimes in branch 'main': bpo-40280: Add limited Emscripten REPL (GH-32284) https://github.com/python/cpython/commit/96e09837fb8031aebe8d823dd19ef664a34bcfad -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset c9844cb8aa9615cdc8770d1e43ce6e2ac3efd836 by Christian Heimes in branch 'main': bpo-40280: Add --enable-wasm-dynamic-linking (GH-32253) https://github.com/python/cpython/commit/c9844cb8aa9615cdc8770d1e43ce6e2ac3efd836 -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments
Change by Christian Heimes : -- components: +Tests type: -> behavior versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue47208> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments
Christian Heimes added the comment: GH-32297 adds #ifndef CTYPES_MAX_ARGCOUNT and exposes the constant in the _ctypes extension module, so the test case can use the constant. It allows you to override CTYPES_MAX_ARGCOUNT until libffi upstream agrees on FFI_MAX_CLOSURE_ARGS. -- ___ Python tracker <https://bugs.python.org/issue47208> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments
Christian Heimes added the comment: New changeset d1b1c885d8f276a0b1ff2e327270916396a8b842 by Christian Heimes in branch 'main': bpo-47208: Allow vendors to override CTYPES_MAX_ARGCOUNT (GH-32297) https://github.com/python/cpython/commit/d1b1c885d8f276a0b1ff2e327270916396a8b842 -- ___ Python tracker <https://bugs.python.org/issue47208> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments
Change by Christian Heimes : -- keywords: +patch pull_requests: +30356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32297 ___ Python tracker <https://bugs.python.org/issue47208> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads
Christian Heimes added the comment: Thanks for your patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47176> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47197] ctypes mishandles `void` return type
Change by Christian Heimes : -- components: +Tests type: -> behavior versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue47197> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47196] Function pointer cast in test_imp
Change by Christian Heimes : -- components: +Tests resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue47196> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- dependencies: +Function pointer cast in test_imp, ctypes mishandles `void` return type ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads
Christian Heimes added the comment: New changeset 087d0fa5b97796560c0d8ceab4f0360fd54baf4f by Hood Chatham in branch 'main': bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209) https://github.com/python/cpython/commit/087d0fa5b97796560c0d8ceab4f0360fd54baf4f -- ___ Python tracker <https://bugs.python.org/issue47176> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
Christian Heimes added the comment: New changeset b82cdd1dac9a9be52051abd90a1ce69236ac41f4 by Christian Heimes in branch 'main': bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285) https://github.com/python/cpython/commit/b82cdd1dac9a9be52051abd90a1ce69236ac41f4 -- ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
Christian Heimes added the comment: Koob's build bot is a FreeBSD 14 host. FreeBSD 14 is under development and has not reached stable yet. I bet that the issue was caused by a recent system and Kernel upgrade. -- ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
Change by Christian Heimes : -- components: +FreeBSD ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
Christian Heimes added the comment: Koobs, please take a look. -- nosy: +koobs ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
Change by Christian Heimes : -- keywords: +patch pull_requests: +30346 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32285 ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit
New submission from Christian Heimes : Two test cases have been failing on FreeBSD buildbot for a while. Let's skip the error check on FreeBSD for now. 0:27:24 load avg: 1.97 Re-running test_posix in verbose mode (matching: test_sched_getaffinity, test_sched_setaffinity) test_sched_getaffinity (test.test_posix.PosixTester.test_sched_getaffinity) ... FAIL test_sched_setaffinity (test.test_posix.PosixTester.test_sched_setaffinity) ... FAIL == FAIL: test_sched_getaffinity (test.test_posix.PosixTester.test_sched_getaffinity) -- Traceback (most recent call last): File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1197, in test_sched_getaffinity self.assertRaises(OSError, posix.sched_getaffinity, -1) ^^^ AssertionError: OSError not raised by sched_getaffinity == FAIL: test_sched_setaffinity (test.test_posix.PosixTester.test_sched_setaffinity) -- Traceback (most recent call last): File "/usr/home/buildbot/python/pull_request.koobs-freebsd-564d/build/Lib/test/test_posix.py", line 1215, in test_sched_setaffinity self.assertRaises(OSError, posix.sched_setaffinity, -1, mask) ^ AssertionError: OSError not raised by sched_setaffinity -- Ran 2 tests in 0.015s -- components: Tests messages: 416616 nosy: christian.heimes priority: normal severity: normal status: open title: test_sched_getaffinity and setaffinity fail on FreeBSD buildbit versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue47205> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30345 pull_request: https://github.com/python/cpython/pull/32284 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)
Christian Heimes added the comment: New changeset 3df0e63aabef905b72fad78256f24b9270c63172 by Christian Heimes in branch 'main': bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266) https://github.com/python/cpython/commit/3df0e63aabef905b72fad78256f24b9270c63172 -- ___ Python tracker <https://bugs.python.org/issue46315> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)
Change by Christian Heimes : -- pull_requests: +30332 pull_request: https://github.com/python/cpython/pull/32266 ___ Python tracker <https://bugs.python.org/issue46315> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30331 pull_request: https://github.com/python/cpython/pull/32266 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47201] pip3.10.4 is configured with locations that require TLS/SSL, however the ssl module in Python is not available
Christian Heimes added the comment: CentOS 7 has an unsupported OpenSSL version. You need to build your own OpenSSL or use my work from https://github.com/tiran/cpython_builddep/#note sudo yum install -y epel sudo yum install -y openssl11-devel sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue47201> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: pmp-p wrote on GH-32253: when using --enable-wasm-dynamic-linking i think --enable-shared should set -fPIC and -s SIDE_MODULE=1 for libpython.so I have not tried --enable-shared with Emscripten yet. So far I have assumed that the result is a fat Python binary that can load additional shared libraries. -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()
Christian Heimes added the comment: PS: Check out ./configure --help -- ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()
Christian Heimes added the comment: As I said already, we require a pkg-config file for TCL/TK detection. It turned out to be too painful and too complicated to implement manual TCL/TK detection in configure.ac. Erlend and I tried and eventually gave up. If your platform does not provide the pkg-config files, then you need to work around the problem or contribute a patch. -- ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()
Christian Heimes added the comment: Could you please open a distro bug with Ubuntu and report the issue? We require a pkg-config file for TCL/TK. -- ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()
Christian Heimes added the comment: Please attach your config.log file. Did configure tell you that you are missing pkg-config? -- ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30324 pull_request: https://github.com/python/cpython/pull/32253 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 4ed8a9a589d2eee7442e0c9417515a707e504faa by Christian Heimes in branch 'main': bpo-40280: Enable most file-at() and nanosleep APIs again (GH-32238) https://github.com/python/cpython/commit/4ed8a9a589d2eee7442e0c9417515a707e504faa -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47162] Add call trampoline to work around bad fpcasts on Emscripten
Christian Heimes added the comment: Interesting, can you pin point the buggy function pointer? If you link with -gsource-map and deploy the map file, your browser should give you a decent stack trace. -- ___ Python tracker <https://bugs.python.org/issue47162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30314 pull_request: https://github.com/python/cpython/pull/32243 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46023] Modules/makesetup generated rules ignore *disabled*
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https://bugs.python.org/issue46023> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 082d3495d0c820972f09f6109a98ed7eb5a7b79f by Christian Heimes in branch 'main': bpo-40280: Emscripten fork_exec now fails early (GH-32224) https://github.com/python/cpython/commit/082d3495d0c820972f09f6109a98ed7eb5a7b79f -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30309 pull_request: https://github.com/python/cpython/pull/32238 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Christian Heimes added the comment: New changeset 17245c815e44e79d4dad6a99b54000956a4a7229 by Christian Heimes in branch 'main': bpo-40280: Add debug Emscripten flavors (GH-32233) https://github.com/python/cpython/commit/17245c815e44e79d4dad6a99b54000956a4a7229 -- ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46023] Modules/makesetup generated rules ignore *disabled*
Christian Heimes added the comment: New changeset abdd69c95c1711c2dc75be4e784c6d6c80a409b9 by Christian Heimes in branch 'main': bpo-46023: makesetup: skip all duplicate modules (GH-32234) https://github.com/python/cpython/commit/abdd69c95c1711c2dc75be4e784c6d6c80a409b9 -- ___ Python tracker <https://bugs.python.org/issue46023> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46023] Modules/makesetup generated rules ignore *disabled*
Change by Christian Heimes : -- pull_requests: +30306 pull_request: https://github.com/python/cpython/pull/32234 ___ Python tracker <https://bugs.python.org/issue46023> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30305 pull_request: https://github.com/python/cpython/pull/32233 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()
Change by Christian Heimes : -- pull_requests: +30301 pull_request: https://github.com/python/cpython/pull/32229 ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
Christian Heimes added the comment: New changeset 55d5c96c57738766eb6f3b5ccfa6599d5f094c18 by Christian Heimes in branch '3.10': [3.10] bpo-47182: Fix crash by named unicode characters after interpreter reinitialization (GH-32212) (GH-32216) https://github.com/python/cpython/commit/55d5c96c57738766eb6f3b5ccfa6599d5f094c18 -- ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30299 pull_request: https://github.com/python/cpython/pull/32224 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
Change by Christian Heimes : -- versions: -Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
Change by Christian Heimes : -- pull_requests: +30293 pull_request: https://github.com/python/cpython/pull/32217 ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
Change by Christian Heimes : -- pull_requests: +30292 pull_request: https://github.com/python/cpython/pull/32216 ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
Change by Christian Heimes : -- keywords: +patch pull_requests: +30288 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32212 ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47182] _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer
New submission from Christian Heimes : unicodeobject.c has a static pointer to a unicode name CAPI capsule: static _PyUnicode_Name_CAPI *ucnhash_capi = NULL; The capsule is initialized on demand when the parser encounters a named unicode representation like "\N{digit nine}". Once the capsule pointer ucnhash_capi has been initialized, it is never reset. Not even a full interpreter shutdown invalidates the pointer. A shutdown of the main interpreter with Py_Finalize() renders the pointer invalid. If the interpreter is re-initialized again, the invalid pointer causes a segfault. The problem was first discovered by Trey Hunner in https://github.com/ethanhs/python-wasm/issues/69 python.js:219 Uncaught RuntimeError: null function or function signature mismatch at _PyUnicode_DecodeUnicodeEscapeInternal (unicodeobject.c:6493:25) at decode_unicode_with_escapes (string_parser.c:121:13) at _PyPegen_parsestr (string_parser.c:273:1) at strings_rule (action_helpers.c:901:20) at atom_rule (parser.c:14293:27) at primary_rule (parser.c:13916:17) at await_primary_rule (parser.c:13666:17) at factor_rule (parser.c:13542:29) at term_rule (parser.c:13330:17) at sum_rule (parser.c:13044:17) I can reproduce the issue with pure C code: $ gcc -Xlinker -export-dynamic -g -IInclude/ -I. -o ucnbug ucnbug.c libpython3.11.a -lm -ldl $ gdb ucnbug (gdb) run 0 9 Done 1 Program received signal SIGSEGV, Segmentation fault. 0x in ?? () (gdb) bt #0 0x in ?? () #1 0x005729a8 in _PyUnicode_DecodeUnicodeEscapeInternal (s=, s@entry=0x7fffea53b6d0 "\\N{digit nine}", size=, errors=errors@entry=0x0, consumed=consumed@entry=0x0, first_invalid_escape=first_invalid_escape@entry=0x7fffc748) at Objects/unicodeobject.c:6490 #2 0x00644fe3 in decode_unicode_with_escapes (parser=parser@entry=0x7fffea5e45d0, s=0x7fffea53b6d0 "\\N{digit nine}", s@entry=0x7fffea6af1d1 "\\N{digit nine}'", len=, len@entry=14, t=t@entry=0x7fffea606910) at Parser/string_parser.c:118 #3 0x00645675 in _PyPegen_parsestr (p=p@entry=0x7fffea5e45d0, bytesmode=bytesmode@entry=0x7fffc838, rawmode=rawmode@entry=0x7fffc83c, result=result@entry=0x7fffc848, fstr=fstr@entry=0x7fffc850, fstrlen=fstrlen@entry=0x7fffc858, t=0x7fffea606910) at Parser/string_parser.c:269 #4 0x00644163 in _PyPegen_concatenate_strings (p=p@entry=0x7fffea5e45d0, strings=strings@entry=0x94e310) at Parser/action_helpers.c:896 #5 0x004791e6 in strings_rule (p=p@entry=0x7fffea5e45d0) at Parser/parser.c:15463 #6 0x0047c498 in atom_rule (p=p@entry=0x7fffea5e45d0) at Parser/parser.c:14274 #7 0x0047e159 in primary_raw (p=0x7fffea5e45d0) at Parser/parser.c:13908 #8 primary_rule (p=p@entry=0x7fffea5e45d0) at Parser/parser.c:13706 -- components: Interpreter Core files: ucnbug.c messages: 416432 nosy: christian.heimes, lukasz.langa, pablogsal, vstinner priority: high severity: normal status: open title: _PyUnicode_Fini should invalidate ucnhash_capi capsule pointer type: crash versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50708/ucnbug.c ___ Python tracker <https://bugs.python.org/issue47182> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47181] error: impossible constraint in ‘asm’
Christian Heimes added the comment: Could you please attach your config.log file? -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue47181> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- dependencies: +Interrupt handling for wasm32-emscripten builds without pthreads ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads
Change by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue47176> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47146] PR check "Check if generated files are up to date" failing intermittently
Christian Heimes added the comment: The problem is likely a recursive make call "$(MAKE)" in combination with parallel execution. As far as I understand it, GNU make cannot track dependencies properly, which can lead to partial or invalid dependency graphs. One make process can modify a file while another uses the file. The permission error or ETXTBSY error are manifestation of one process creating an executable while another process is attempting to execve() it. The paper https://accu.org/journals/overload/14/71/miller_2004/ explains the issues with recursion in great detail. -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue47146> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47162] Add call trampoline to work around bad fpcasts on Emscripten
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47162] Add call trampoline to work around bad fpcasts on Emscripten
Change by Christian Heimes : -- keywords: +patch pull_requests: +30267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32189 ___ Python tracker <https://bugs.python.org/issue47162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- dependencies: +Add call trampoline to work around bad fpcasts on Emscripten ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47162] Add call trampoline to work around bad fpcasts on Emscripten
New submission from Christian Heimes : WASM cannot handle function calls with bad function pointer casts yet. Hood Chatham explained the issue in Pyodide patch https://github.com/pyodide/pyodide/blob/0.19.1/cpython/patches/0001-call-trampolines-to-handle-fpcast-troubles.patch --- The wasm call_indirect instruction takes a function signature as an immediate argument (an immediate argument is one which is determined statically at compile time). The web assembly runtime checks at runtime that the function pointer we are attempting to call has a signature which matches the asserted function signature, if they don't match, the runtime traps with "indirect call signature mismatch". The codegen provided by default by the emscripten toolchain produces an ABI that also has this constraint. By contrast, typical native ABIs handle function pointer casts very gracefully: extra arguments are ignored, missing arguments are filled in as 0, even wrong return values are completely fine. The Python ecosystem is full of code which contain function pointer casts. Emscripten offers a second "EMULATE_FPCASTS" ABI that fixes many of these issues, but it shims in the function pointer cast support in a binaryen pass that happens on the fully linked wasm module. At this point, lots of information has been destroyed and as a result the only possible solutions are extremely costly in run time, stack space, and code size. We wish to avoid these costs. Patching the packages is prohibitively time consuming and boring, especially given our limited developer effort. I have explored making automated detection tools, and these work. However, getting these tools included into the CI of Python ecosystem packages would be prohibitively time consuming. There is a best of both worlds solution. It is possible to define an ABI which allows for specific types of function pointer casts with neglible costs. I hope to do this in future work. However, this will require custom llvm passes. Because llvm is implemented in C++ which has very poor ABI compatibility, this means our whole toolchain needs to be built against the same version of llvm, from llvm all the way down to binaryen and the wasm binary toolkit. In the meantime, most bad function pointer calls happen in a small number of locations. Calling a function pointer from Javascript has no restrictions on arguments. Extra arguments can be provided, arguments can be left off, etc with no issue (this mimics Javascript's typical function call semantics). So at the locations where the bad calls occur, we patch in a trampoline which calls out to Javascript to make the call for us. Like magic, the problem is gone. Research shows that the performance cost of this is surprisingly low too. --- Bad function pointer casts lead to fatal runtime errors like this: worker.js onmessage() captured an uncaught exception: RuntimeError: function signature mismatch RuntimeError: function signature mismatch at create_builtin (:wasm-function[3512]:0x14f6df) at _imp_create_builtin (:wasm-function[3520]:0x14fe1d) at cfunction_vectorcall_O (:wasm-function[1871]:0x91e84) at _PyVectorcall_Call (:wasm-function[839]:0x4e220) at _PyObject_Call (:wasm-function[842]:0x4e4f5) at PyObject_Call (:wasm-function[843]:0x4e595) at _PyEval_EvalFrameDefault (:wasm-function[3114]:0x120541) at _PyEval_Vector (:wasm-function[3115]:0x1229ab) at _PyFunction_Vectorcall (:wasm-function[845]:0x4e6ca) at object_vacall (:wasm-function[859]:0x4f3d0) worker sent an error! undefined:undefined: function signature mismatch I propose to include the downstream patch from Pyodide but make the call trampoline feature opt-in. An opt-in allows Pyodide to use the trampolines in production while we can test core and 3rd party modules without the trampoline easily. -- components: Interpreter Core messages: 416339 nosy: christian.heimes priority: normal severity: normal status: open title: Add call trampoline to work around bad fpcasts on Emscripten type: compile error versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue47162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46864] Deprecate ob_shash in BytesObject
Christian Heimes added the comment: New changeset d8f530fe329c6bd9ad6e1a9db9aa32b465c2d67f by Christian Heimes in branch 'main': bpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176) https://github.com/python/cpython/commit/d8f530fe329c6bd9ad6e1a9db9aa32b465c2d67f -- ___ Python tracker <https://bugs.python.org/issue46864> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46864] Deprecate ob_shash in BytesObject
Change by Christian Heimes : -- pull_requests: +30254 pull_request: https://github.com/python/cpython/pull/32176 ___ Python tracker <https://bugs.python.org/issue46864> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Change by Christian Heimes : -- pull_requests: +30253 pull_request: https://github.com/python/cpython/pull/32176 ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Christian Heimes added the comment: I figured out how to implement copy(). dup() does not work as expected, but accept() on an AF_ALG client socket creates an independent copy. -- ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Change by Christian Heimes : -- keywords: +patch pull_requests: +30251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32173 ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47098] sha3: Replace Keccak Code Package with tiny_sha3
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47098> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47098] sha3: Replace Keccak Code Package with tiny_sha3
Christian Heimes added the comment: New changeset 5fd8c574e016aec85725ddc5ced8742267b0e1b3 by Christian Heimes in branch 'main': bpo-47098: Replace Keccak Code Package with tiny_sha3 (GH-32060) https://github.com/python/cpython/commit/5fd8c574e016aec85725ddc5ced8742267b0e1b3 -- ___ Python tracker <https://bugs.python.org/issue47098> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47095] Prefer libb2 over vendored copy of blake2
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47095> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47095] Prefer libb2 over vendored copy of blake2
Christian Heimes added the comment: New changeset b16b6bb8dacc41e9e569783890b0c88fcd3b24e8 by Christian Heimes in branch 'main': bpo-47095: Use libb2 to provide blake2 implementation (GH-32059) https://github.com/python/cpython/commit/b16b6bb8dacc41e9e569783890b0c88fcd3b24e8 -- ___ Python tracker <https://bugs.python.org/issue47095> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47113] PermissionError on pip uninstall
Christian Heimes added the comment: pip is maintained by a different group. Please report pip issues at https://github.com/pypa/pip . -- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue47113> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44493] Missing terminated NUL in the length of sockaddr_un
Christian Heimes added the comment: We have a dedicated team of volunteers that triage incoming tickets. They assign tickets and ping experts. It looks like nobody triaged your submissions because nobody understood it. Your ticket did not contain an explanation and the link now goes to an unrelated line in the code. That is the reason I asked you to provide detailed information on the ticket. We have over 7,000 open tickets and over 1,600 open PRs. Your issue got lost in the noise. -- ___ Python tracker <https://bugs.python.org/issue44493> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39298] add BLAKE3 to hashlib
Christian Heimes added the comment: sha1 should be considered broken anyway and sha256 does not perform well on 64bit systems. Truncated sha512 (sha512-256) typically performs 40% faster than sha256 on X86_64. It should get you close to the performance of BLAKE3 SSE4.1 on your system. -- ___ Python tracker <https://bugs.python.org/issue39298> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44493] Missing terminated NUL in the length of sockaddr_un
Christian Heimes added the comment: Antoine, Serhiy, please take a look. You are the last developers that touched the AF_UNIX socket path code. Ty, why are you pinging me on this issue or on the PR? I'm neither familiar with that code nor responsible for it. -- components: +Extension Modules -Library (Lib) nosy: +pitrou, serhiy.storchaka type: behavior -> resource usage versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue44493> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40280] Consider supporting emscripten/webassembly as a build target
Change by Christian Heimes : -- pull_requests: +30179 pull_request: https://github.com/python/cpython/pull/32095 ___ Python tracker <https://bugs.python.org/issue40280> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
Christian Heimes added the comment: New changeset 1b6acaad9a18b2498386c60f24351ab749061e3a by Christian Heimes in branch '3.10': [3.10] bpo-47101: list only activated algorithms in hashlib.algorithms_available (GH-32076) (GH-32085) https://github.com/python/cpython/commit/1b6acaad9a18b2498386c60f24351ab749061e3a -- ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
Change by Christian Heimes : -- pull_requests: +30172 pull_request: https://github.com/python/cpython/pull/32085 ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Christian Heimes added the comment: And sendfile() is zero-copy. Data does not have to leave Kernel space. -- ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Christian Heimes added the comment: test_socket has examples for HMAC, AES-CBC, and AES-GCM. with self.create_alg('hash', 'hmac(sha1)') as algo: algo.setsockopt(socket.SOL_ALG, socket.ALG_SET_KEY, b"Jefe") op, _ = algo.accept() with op: op.sendall(b"what do ya want for nothing?") self.assertEqual(op.recv(512), expected) -- ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47102] explore hashlib use of the Linux Kernel CryptoAPI
Christian Heimes added the comment: We don't need libkcapi. I added AF_ALG support a while ago: import binascii import os import socket with socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0) as cfgsock: cfgsock.bind(("hash", "sha256")) opsock, _ = cfgsock.accept() with opsock: with open("/etc/os-release") as f: st = os.fstat(f.fileno()) # blindly assumes that sendfile() exhausts the fd. os.sendfile( opsock.fileno(), f.fileno(), offset=0, count=st.st_size ) res = opsock.recv(512) print(binascii.hexlify(res)) -- ___ Python tracker <https://bugs.python.org/issue47102> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
Christian Heimes added the comment: $ ./python Tools/ssl/multissltests.py --openssl 3.0.2 --steps modules $ ./python -c "import hashlib; print(hashlib.algorithms_available)" {'blake2b', 'sha512', 'sm3', 'shake_128', 'md5', 'sha3_256', 'sha224', 'sha512_224', 'sha3_384', 'sha384', 'md5-sha1', 'sha3_224', 'shake_256', 'sha3_512', 'sha512_256', 'sha1', 'sha256', 'blake2s'} -- ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
Christian Heimes added the comment: Hubert's suggested solution EVP_MD_do_all_provided() worked almost straight forward. The function signature is a bit different and I got "undefined" in the result set. Filtering out NID_undef got right of it. -- ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
Change by Christian Heimes : -- keywords: +patch pull_requests: +30164 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32076 ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47101] hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider
New submission from Christian Heimes : Hubert Kario wrote in https://bugzilla.redhat.com/show_bug.cgi?id=2054702 Description of problem: The hashlib.algorithms_available set includes algorithms like ripemd160 and whirlpool, those algorithms are not usable unless openssl legacy provider is loaded. Since it's not loaded, and the hashlib module won't load it, any attempt to use them fails. Version-Release number of selected component (if applicable): python3-3.9.10-1.el9.x86_64 openssl-3.0.1-5.el9.x86_64 How reproducible: always Steps to Reproduce: 0. start python3 1. from hashlib import algorithms_available 2. algorithms_available 3. import hashlib 4. a = {(name, hashlib.new(name).digest_size) for name in algorithms_available} Actual results: {'sha3_384', 'blake2s', 'sha384', 'sha512_224', 'md5', 'sha3_512', 'md5-sha1', 'sha3_256', 'shake_128', 'sm3', 'sha256', 'sha512', 'sha1', 'shake_256', 'blake2b', 'whirlpool', 'sha512_256', 'sha3_224', 'sha224', 'ripemd160', 'md4'} Traceback (most recent call last): File "/usr/lib64/python3.9/hashlib.py", line 164, in __hash_new return _hashlib.new(name, data, **kwargs) ValueError: [digital envelope routines] unsupported During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "", line 1, in File "/usr/lib64/python3.9/hashlib.py", line 170, in __hash_new return __get_builtin_constructor(name)(data) File "/usr/lib64/python3.9/hashlib.py", line 127, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type whirlpool Expected results: {'sha3_384', 'blake2s', 'sha384', 'sha512_224', 'md5', 'sha3_512', 'md5-sha1', 'sha3_256', 'shake_128', 'sm3', 'sha256', 'sha512', 'sha1', 'shake_256', 'blake2b', 'sha512_256', 'sha3_224', 'sha224'} {('blake2b', 64), ('sha512', 64), ('md5-sha1', 36), ('sha3_512', 64), ('md5', 16), ('sha224', 28), ('shake_128', 0), ('sm3', 32), ('blake2s', 32), ('sha1', 20), ('shake_256', 0), ('sha512_256', 32), ('sha3_224', 28), ('sha3_256', 32), ('sha3_384', 48), ('sha384', 48), ('sha256', 32), ('sha512_224', 28)} Additional info: If the legacy provider is loaded, then the algorithms should be listed and should work. It may be caused by Python using the deprecated EVP_MD_do_all() method instead of the EVP_MD_do_all_provided() method -- components: Extension Modules, Library (Lib) messages: 415877 nosy: christian.heimes priority: normal severity: normal status: open title: hashlib.algorithms_available lists algorithms that are not available in OpenSSL 3.0 default provider type: behavior versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue47101> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47095] Prefer libb2 over vendored copy of blake2
Change by Christian Heimes : -- title: Deprecate blake2's tree hashing feature -> Prefer libb2 over vendored copy of blake2 ___ Python tracker <https://bugs.python.org/issue47095> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47098] sha3: Replace Keccak Code Package with tiny_sha3
Change by Christian Heimes : -- keywords: +patch pull_requests: +30161 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32060 ___ Python tracker <https://bugs.python.org/issue47098> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47098] sha3: Replace Keccak Code Package with tiny_sha3
New submission from Christian Heimes : The Keccak Code Package (kcp) provides the reference implementation for SHA3 and SHAKE hashing algorithms. CPython has vendored a copy of KCP since I added SHA3 in 3.6. CPython 3.10 and newer require OpenSSL >= 1.1.1, which provide an optimized implementation of SHA3 and SHAKE on all platforms. The vast majority of users now use SHA3 from OpenSSL instead our _sha3 module with KCP. Both the KCP and _sha3 module are large. The KCP has 230kB of code. The _sha3 shared library is 390kB on Linux X86_64, stripped 90kB. I would like to reduce the size of our bundled code. Since SHA3 and SHAKE are listed in hashlib.algorithms_guaranteed and OpenSSL is optional, we cannot just drop the _sha3 module. Instead I propose to replace the implementation with tiny_sha3 https://github.com/mjosaarinen/tiny_sha3 . The tiny implementation is 13 kB of code. The resulting _sha3 shared library is 69 kB (stripped 25 kB). A Python build without OpenSSL bindings will have a working but slower SHA3 implementation. -- assignee: christian.heimes components: Extension Modules messages: 415861 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: sha3: Replace Keccak Code Package with tiny_sha3 type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue47098> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47095] Deprecate blake2's tree hashing feature
Change by Christian Heimes : -- keywords: +patch pull_requests: +30153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32059 ___ Python tracker <https://bugs.python.org/issue47095> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47095] Deprecate blake2's tree hashing feature
New submission from Christian Heimes : Python's blake2 implementation provides hashing, MAC (key, salt, personalization), variable length output, and tree hashing [1]. All features except for tree hashing are provided by OpenSSL 3.0.0 and newer [2]. It is unlikely that OpenSSL will get tree hashing any time soon, if all. [3] I would like to remove our vendored copy of blake2 eventually and just rely on OpenSSL. Therefore I propose to deprecate tree hashing feature so we can drop it in Python 3.13. The tree hashing parameters are: fanout, depth, leaf_size, node_offset, node_depth, inner_size, last_node Note: OpenSSL 3.0 might impose additional restrictions on the parameter. It might be possible that OpenSSL does not support salt and personalization (OSSL_MAC_PARAM_CUSTOM) without a MAC key. Alternatively we could replace our copy of blake2 and depend on libb2 from https://blake2.net/. libb2 is available in Fedora. [1] https://docs.python.org/3/library/hashlib.html#hashlib.blake2b [2] https://www.openssl.org/docs/manmaster/man7/EVP_MAC-BLAKE2.html [3] https://github.com/openssl/openssl/issues/980 -- components: Extension Modules messages: 415807 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: Deprecate blake2's tree hashing feature type: behavior versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue47095> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32033] The pwd module implementation incorrectly sets some attributes to None
Christian Heimes added the comment: New changeset 4aea656d62860e78cd8384f2de375f0d4f1db579 by Christian Heimes in branch 'main': bpo-32033: Finalize WASI configure options (GH-32053) https://github.com/python/cpython/commit/4aea656d62860e78cd8384f2de375f0d4f1db579 -- ___ Python tracker <https://bugs.python.org/issue32033> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32033] The pwd module implementation incorrectly sets some attributes to None
Change by Christian Heimes : -- nosy: +christian.heimes nosy_count: 5.0 -> 6.0 pull_requests: +30143 pull_request: https://github.com/python/cpython/pull/32053 ___ Python tracker <https://bugs.python.org/issue32033> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45150] Add a file_digest() function in hashlib
Christian Heimes added the comment: New changeset e03db6d5be7cf2e6b7b55284985c404de98a9420 by Christian Heimes in branch 'main': bpo-45150: Fix testing under FIPS mode (GH-32046) https://github.com/python/cpython/commit/e03db6d5be7cf2e6b7b55284985c404de98a9420 -- ___ Python tracker <https://bugs.python.org/issue45150> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45150] Add a file_digest() function in hashlib
Change by Christian Heimes : -- pull_requests: +30136 pull_request: https://github.com/python/cpython/pull/32046 ___ Python tracker <https://bugs.python.org/issue45150> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue47082] No protection: `import numpy` in two different threads can lead to race-condition
Christian Heimes added the comment: Python used to have a global import lock. The global import lock prevented recursive imports from other threads while the current thread was importing. The import lock was source of issues and dead locks. Antoine replaced it with a fine grained import lock in bpo-9260. -- nosy: +christian.heimes ___ Python tracker <https://bugs.python.org/issue47082> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)
Change by Christian Heimes : -- pull_requests: +30124 pull_request: https://github.com/python/cpython/pull/32033 ___ Python tracker <https://bugs.python.org/issue46315> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com