[issue46114] OpenSSL 3.0 uses different version scheme
Miro Hrončok added the comment: Ack, will do it downstream-only. -- ___ Python tracker <https://bugs.python.org/issue46114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46114] OpenSSL 3.0 uses different version scheme
Miro Hrončok added the comment: 3.8 is security only, so I suppose there is no chance of getting the test fixed as well? -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue46114> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment
Change by Miro Hrončok : -- nosy: +hroncok nosy_count: 8.0 -> 9.0 pull_requests: +29780 pull_request: https://github.com/python/cpython/pull/31034 ___ Python tracker <https://bugs.python.org/issue43312> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46835] ImportError: bad magic number in ... does not indicate where is that file located
Change by Miro Hrončok : -- keywords: +patch pull_requests: +29658 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31534 ___ Python tracker <https://bugs.python.org/issue46835> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46835] ImportError: bad magic number in ... does not indicate where is that file located
Miro Hrončok added the comment: Apparently, the exception already contains a path attribute with exactly the kind of information I'd like to see. What if the message was: ImportError: bad magic number in '/usr/bin/six.pyc': b'\x03\xf3\r\n' Would that be accepted as a PR? Should I discuss this on the mailing list? -- ___ Python tracker <https://bugs.python.org/issue46835> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46835] ImportError: bad magic number in ... does not indicate where is that file located
New submission from Miro Hrončok : Recently I've been debugging a very nasty bug report that looked like this: Traceback (most recent call last): File "/usr/bin/jupyter-notebook", line 5, in from notebook.notebookapp import main File "/usr/lib/python3.10/site-packages/notebook/notebookapp.py", line 78, in from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager File "/usr/lib/python3.10/site-packages/notebook/services/kernels/kernelmanager.py", line 18, in from jupyter_client.session import Session File "/usr/lib/python3.10/site-packages/jupyter_client/session.py", line 41, in from jupyter_client.jsonutil import extract_dates, squash_dates, date_default File "/usr/lib/python3.10/site-packages/jupyter_client/jsonutil.py", line 10, in from dateutil.parser import parse as _dateutil_parse File "/usr/lib/python3.10/site-packages/dateutil/parser/__init__.py", line 2, in from ._parser import parse, parser, parserinfo, ParserError File "/usr/lib/python3.10/site-packages/dateutil/parser/_parser.py", line 42, in import six ImportError: bad magic number in 'six': b'\x03\xf3\r\n' For details, see https://bugzilla.redhat.com/2057340 and https://github.com/benjaminp/six/issues/359 What would really make things much easier to understand would be if the exception mentioned what is the path of 'six'. Consider this example: A rogue .py file in /usr/bin: $ sudo touch /usr/bin/copy.py Programs fail with: Traceback (most recent call last): File "/usr/bin/...", line ..., in ... ImportError: cannot import name 'deepcopy' from 'copy' (/usr/bin/copy.py) Immediately I can see there is /usr/bin/copy.py which is probably not supposed to be there. However, when it is a pyc instead: $ sudo touch /usr/bin/copy.pyc Programs fail with: Traceback (most recent call last): File "/usr/bin/...", line ..., in ... ImportError: bad magic number in 'copy': b'' Now I have no idea where "copy" is. The is a request for that exception to give that infomartion. -- components: Interpreter Core messages: 413788 nosy: hroncok, petr.viktorin priority: normal severity: normal status: open title: ImportError: bad magic number in ... does not indicate where is that file located type: enhancement versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46835> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Miro Hrončok added the comment: I've adapted the PR. See the latest commit (Instead of *venv* scheme, have *posix_venv* and *nt_venv*). -- ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46624] random.randrange removed support for non-integer types after just one release of deprecation
Miro Hrončok added the comment: Proposed the revert at https://github.com/python/cpython/pull/31098 -- ___ Python tracker <https://bugs.python.org/issue46624> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46624] random.randrange removed support for non-integer types after just one release of deprecation
Change by Miro Hrončok : -- keywords: +patch pull_requests: +29283 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31098 ___ Python tracker <https://bugs.python.org/issue46624> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46624] random.randrange removed support for non-integer types after just one release of deprecation
New submission from Miro Hrončok : In https://github.com/python/cpython/commit/5afa0a411243210a30526c7459a0ccff5cb88494 the support for non-integer types was removed from random.randrange(). This change is not backward-compatible and it breaks 3rd party code, for example: simplewrap: https://bugzilla.redhat.com/show_bug.cgi?id=2050093 numpy-stl: https://bugzilla.redhat.com/show_bug.cgi?id=2050092 == https://github.com/WoLpH/numpy-stl/issues/188 That support was only deprecated in Python 3.10 and it needs to remain deprecated for at least two Python releases. Please revert this change from Python 3.11 and wait for at least Python 3.12. See https://www.python.org/dev/peps/pep-0387/#making-incompatible-changes When you do remove this from Python 3.12, please make sure to document it in the What's new document. Thank you. -- components: Library (Lib) messages: 412436 nosy: hroncok, pablogsal, rhettinger priority: normal severity: normal status: open title: random.randrange removed support for non-integer types after just one release of deprecation versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue46624> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Miro Hrončok added the comment: The PR is now ready for review. -- ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Miro Hrončok added the comment: I've created a draft PR in https://github.com/python/cpython/pull/31034 It is still missing tests and I have not checked it on Windows, hence still a draft. -- ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Change by Miro Hrončok : -- keywords: +patch pull_requests: +29217 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31034 ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Miro Hrončok added the comment: I'll try to draft this change for Python 3.11. -- ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__
New submission from Miro Hrončok : As described at https://mail.python.org/archives/list/python-...@python.org/thread/MPHZ3TGSHMSF7C4P7JEP2ZCYLRA3ERC5/ the AC_C_CHAR_UNSIGNED macro from configure.ac confuses GCC 12+ as it exports a reserved symbol __CHAR_UNSIGNED__ through pyconfig.h. My assumption was that AC_C_CHAR_UNSIGNED can be dropped entirely and the PR in https://github.com/python/cpython/pull/30851 confirmed that all the buildbots are happy with such change. Hence, I open this issue to actually do it. Thanks -- components: Build messages: 411575 nosy: christian.heimes, hroncok, petr.viktorin, vstinner priority: normal severity: normal status: open title: AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__ type: compile error versions: Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46513> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43976] Allow Python distributors to add custom site install schemes
Miro Hrončok added the comment: In Fedora 36+ / Python 3.10+ we now use an install_scheme that looks like this: 'purelib': '{base}/local/lib/python{py_version_short}/site-packages', 'platlib': '{platbase}/local/{platlibdir}/python{py_version_short}/site-packages', 'scripts': '{base}/local/bin', 'data': '{base}/local', ... We got a user report [1] saying that `pip install --root ... --prefix /usr` the prefix is not respected at all. That is, users expect that /usr/local is the prefix, and when they explicitly set it to /usr, the /local/ bit will not be there, while in reality, /local/ is not a part of the prefix, but it is a part of the installation scheme. I can somehow relate to that assumption. Now I wonder whether we should have adapted prefix instead of the installation scheme :/ Any ideas on how to approach this problem? I am quite clueless. [1] https://bugzilla.redhat.com/show_bug.cgi?id=2026979 -- ___ Python tracker <https://bugs.python.org/issue43976> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46070] _PyImport_FixupExtensionObject() regression causing a crash in subintepreters
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue46070> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue46006> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter
Miro Hrončok added the comment: git bisect gives: https://github.com/python/cpython/commit/ea251806b8d11b30d2182af1e589caf88acf -- ___ Python tracker <https://bugs.python.org/issue46034> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46034] Patch-adding __init__ in a class takes no effect when called from a subinterpreter
New submission from Miro Hrončok : Hello, based on some bug reports reported in: - https://github.com/GrahamDumpleton/mod_wsgi/issues/729 - https://github.com/poljar/weechat-matrix/issues/293 - https://bugzilla.redhat.com/show_bug.cgi?id=2030621 I have isolated the following reproducer that shows a regression in Python 3.10+. It happens at least with 3.10.0, 3.10.1 and 3.11.0a2. It works as expected in Python 3.9. The following code is valid and works on 3.9, 3.10, 3.11: = class Greeting(): pass def new_init(inst, name): inst.text = f"Hello, {name}\n" Greeting.__init__ = new_init Greeting("Miro") = But if we run it via a subinterpreter, it breaks on 3.10+: = import _testcapi code = r"""class Greeting(): pass def new_init(inst, name): inst.text = f"Hello, {name}\n" Greeting.__init__ = new_init Greeting("Miro")""" _testcapi.run_in_subinterp(code) = $ python3.9 reproducer.py (exits cleanly) $ python3.10 reproducer.py Traceback (most recent call last): File "", line 9, in TypeError: Greeting() takes no arguments $ python3.11 reproducer.py Traceback (most recent call last): File "", line 9, in TypeError: Greeting() takes no arguments My observation also shows that if the Greeting class already had (any) __init__: = class Greeting(): __init__ = ... = It works as expected on 3.9, 3.10, 3.11. In reality, this is most likely to affect classes with decorators, like: = import attr @attr.s class TestClass: foo = attr.ib() TestClass("Miro") = This works standalone, but fails in a subinterpreter: $ python3.10 reproducer.py Traceback (most recent call last): File "", line 7, in TypeError: TestClass() takes no arguments -- components: Subinterpreters messages: 408196 nosy: eric.snow, hroncok, vstinner priority: normal severity: normal status: open title: Patch-adding __init__ in a class takes no effect when called from a subinterpreter type: behavior versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue46034> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
Miro Hrončok added the comment: I consider it a bugfix. I don't expect users to rely on the previous behavior and be surprised by the new, but yet I know https://xkcd.com/1172/ very well. -- ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen
Miro Hrončok added the comment: It also seems that it is *not* necessary to use Python 3.11 for regen-frozen to get the failure: $ make regen-frozen PYTHON_FOR_REGEN=python3.10 python3.10 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 $ make regen-frozen PYTHON_FOR_REGEN=python3.9 python3.9 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 My guess is that the fix for test_tools.test_sundry() actually broke the real usage. It has: # When building out of the source tree, get the tool from directory # of the Python executable TOOL = os.path.dirname(sys.executable) TOOL = os.path.join(TOOL, 'Programs', '_freeze_module') But sys.executable is *not* the Python we have built, but the Python we use for regen. E.g. when Python for regen is /usr/bin/python3.X, it tries to use /usr/bin/Programs/_freeze_module which obviously is not there. The assumption that sys.executable is the freshly built Python is only correct in the tests, but not in reality. -- ___ Python tracker <https://bugs.python.org/issue45866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module
Miro Hrončok added the comment: There seem to be a regression in this fix, see https://bugs.python.org/issue45866 -- ___ Python tracker <https://bugs.python.org/issue45402> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen
Miro Hrončok added the comment: git bisect says: ff8859d965815e8b5af346bd90299cfa5568c855 is the first new commit commit ff8859d965815e8b5af346bd90299cfa5568c855 Author: Victor Stinner Date: Thu Oct 7 21:19:13 2021 +0200 bpo-45402: Fix test_tools.test_sundry() (GH-28786) Fix test_tools.test_sundry() when Python is built out of tree: fix how the freeze_modules.py tool locates the _freeze_module program. Misc/NEWS.d/next/Tests/2021-10-07-13-43-01.bpo-45402.jlQvep.rst | 3 +++ Tools/scripts/freeze_modules.py | 7 --- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-10-07-13-43-01.bpo-45402.jlQvep.rst It seems the fix for an out-of-tree build bug introduced another one. -- ___ Python tracker <https://bugs.python.org/issue45866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen
New submission from Miro Hrončok : In Fedora, when building Python 3.11.0a2 with Python 3.11.0a2 for regen, we found that regen-frozen fails. It can be reproduced either on the v3.11.0a2 tag or on the main branch. On tag v3.11.0a2 with 3.11.0a2 installed in $PATH: # in root of cpython local clone: $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make regen-all PYTHON_FOR_REGEN=python3.11 ... ERROR: missing _freeze_module On the main branch: # in root of cpython local clone: $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make $ make regen-all PYTHON_FOR_REGEN=./python (success) However, the working tree is dirty: $ git diff diff --git a/Parser/parser.c b/Parser/parser.c index b3aa35989ed..c26cd6eeb05 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -1,4 +1,4 @@ -// @generated by pegen from ./Grammar/python.gram +// @generated by pegen from ../../Grammar/python.gram #include "pegen.h" #if defined(Py_DEBUG) && defined(Py_BUILD_CORE) diff --git a/Tools/peg_generator/pegen/grammar_parser.py b/Tools/peg_generator/pegen/grammar_parser.py index 6e9f7d3d11d..fbbbfad76b0 100644 --- a/Tools/peg_generator/pegen/grammar_parser.py +++ b/Tools/peg_generator/pegen/grammar_parser.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3.8 -# @generated by pegen from ./Tools/peg_generator/pegen/metagrammar.gram +# @generated by pegen from ../../Tools/peg_generator/pegen/metagrammar.gram import ast import sys And if we install Python somewhere: $ make $ make install DESTDIR=/tmp/python And use that one again for regen: $ cd ../.. $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make regen-all PYTHON_FOR_REGEN=/tmp/python/usr/local/bin/python3.11 ... # Regenerate Lib/keyword.py from Grammar/python.gram and Grammar/Tokens # using Tools/peg_generator/pegen PYTHONPATH=../../Tools/peg_generator /tmp/python/usr/local/bin/python3.11 -m pegen.keywordgen \ ../../Grammar/python.gram \ ../../Grammar/Tokens \ ../../Lib/keyword.py.new /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/update_file.py ../../Lib/keyword.py ../../Lib/keyword.py.new /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 It fails. I've isolated the failure to: $ make regen-frozen PYTHON_FOR_REGEN=/tmp/python/usr/local/bin/python3.11 /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 -- components: Build messages: 406764 nosy: eric.snow, hroncok, petr.viktorin, vstinner priority: normal severity: normal status: open title: Out of tree build of Python 3.11.0a2+ breaks regen-frozen type: compile error versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45866> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45783] test_freeze fails if a file is removed
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue45783> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)
Change by Miro Hrončok : -- versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue45778> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s)
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue45778> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
Change by Miro Hrončok : -- components: +Library (Lib) ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
Miro Hrončok added the comment: The PR is now ready for review. -- ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
Change by Miro Hrončok : -- keywords: +patch pull_requests: +27642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29384 ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
Miro Hrončok added the comment: I have a fix in mind, will submit a draft pull request without tests shortly, continue with the tests later. -- ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache
New submission from Miro Hrončok : Recently, when debugging a weird problem (see https://bugzilla.redhat.com/show_bug.cgi?id=2018551 for details if interested, but not important for this issue), I've realized that the _NamespacePath class (from importlib/_bootstrap_external.py) has a cache that (in some cases) uses tuple(sys.path) as the key. I was expecting importlib.invalidate_caches() to invalidate this cache, but it doesn't. Consider the following directory structure: . ├── PATH1 │ └── namespace │ └── sub1 │ └── __init__.py └── PATH2 └── namespace └── sub2 └── __init__.py Here is a helper to create it (on Linux-ish): $ mkdir -p PATH1/namespace/sub1 $ mkdir -p PATH2/namespace/sub2 $ touch PATH1/namespace/sub1/__init__.py $ touch PATH2/namespace/sub2/__init__.py Run Python with PYTHONPATH=PATH1:PATH2 (output slightly formatted for readability): $ PYTHONPATH=PATH1:PATH2 python3.11 >>> import namespace >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace', '.../namespace_path_cache/PATH2/namespace']) >>> import namespace.sub1 # works >>> import namespace.sub2 # works >>> exit() The namespace packages seem to work as expected. Now move PATH2/namespace out of the way: $ mv PATH2/namespace PATH2/cant-import-this Run Python again: $ PYTHONPATH=PATH1:PATH2 python3.11 >>> import namespace >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> ... While this interpreter still runs, move the PATH2/namespace module back in: $ mv PATH2/cant-import-this PATH2/namespace >>> ... >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'namespace.sub2' >>> import importlib >>> importlib.invalidate_caches() # invalidate the cache, not helpful >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'namespace.sub2' >>> import sys >>> sys.path.remove('') # changing sys.path solves this >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace', '.../namespace_path_cache/PATH2/namespace']) importlib.invalidate_caches() documentation says: > This function should be called if any modules are created/installed while > your program is running to guarantee all finders will notice the new module’s > existence. That makes me think calling importlib.invalidate_caches() should also invalidate the cache of _NamespacePaths. (This also affects older Pythons, but since it is a behavior change, I've only marked 3.11). -- messages: 405606 nosy: hroncok, petr.viktorin priority: normal severity: normal status: open title: importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache type: behavior versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45703> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45460] distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes
Miro Hrončok added the comment: > so distributors could patch the install schemes in there and distutils > (whether the one in the standard library or a third party fork). Somehow, this sentence is not finished properly. ...so distributors could patch the install schemes in there and distutils (whether the one in the standard library or a third party fork) would respect it. -- ___ Python tracker <https://bugs.python.org/issue45460> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41282] Deprecate and remove distutils
Miro Hrončok added the comment: Related: https://bugs.python.org/issue45460 -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue41282> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45460] distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes
New submission from Miro Hrončok : In https://github.com/python/cpython/pull/24549 (Load install schemes from sysconfig) we have assumed that distutils will simply read all information from sysconfig, so distributors could patch the install schemes in there and distutils (whether the one in the standard library or a third party fork). However, in https://github.com/pypa/pip/issues/10151#issuecomment-942162384 we have figured out that distutils.sysconfig.get_python_lib() does not respect the schemes from sysconfig at all, instead, it creates the paths from scratch. This might be too late for Python 3.10, but in Python 3.11 I'd like distutils.sysconfig.get_python_lib() to return paths defined by sysconfig install schemes. That way, we can more easily move that from the standard library to a third-party project with an independent delivery mechanism. -- components: Distutils messages: 403834 nosy: FFY00, dstufft, eric.araujo, frenzy, hroncok, jaraco, petr.viktorin, vstinner priority: normal severity: normal status: open title: distutils.sysconfig.get_python_lib() does not respect sysconfig/distutils install schemes versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45460> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45413] Add install scheme for virtual environments
Miro Hrončok added the comment: The existing install schemes contain values for all different kinds of OSes, somehow named according to them. If we introduce a single "virtual"/"venv" scheme, it would need to have different contents on different OSes (e.g. Windows vs POSIX). I don't think that would cause any actual trouble, but it would be somewhat different than all the other schemes. If we introduce multiple ones (e.g. "posix_venv" and "nt_venv") we would need an additional layer to get the one appropriate for the current platform. Hence, I think having a single one is more pragmatic. -- ___ Python tracker <https://bugs.python.org/issue45413> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
Change by Miro Hrončok : -- pull_requests: +27119 pull_request: https://github.com/python/cpython/pull/28784 ___ Python tracker <https://bugs.python.org/issue45400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
Miro Hrončok added the comment: I am working on a fix -- ___ Python tracker <https://bugs.python.org/issue45400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module
Miro Hrončok added the comment: I can also reproduce this without the additional configure flags: [cpython]$ git clean -fdx [cpython]$ mkdir -p build/debug [cpython]$ cd build/debug [debug]$ ../../configure --with-pydebug [debug]$ make [debug]$ cd ../.. [cpython]$ build/debug/python -m test -v test_tools ... SystemExit: ERROR: missing _freeze_module As well as from the build dir: [cpython]$ cd build/debug [debug]$ ./python -m test -v test_tools ... SystemExit: ERROR: missing _freeze_module But when I build from the source directory directly: [cpython]$ git clean -fdx [cpython]$ ./configure --with-pydebug [cpython]$ make [cpython]$ ./python -m test -v test_tools ... Tests result: SUCCESS Hence, I assume the culprit is in building from a subdirectory. -- ___ Python tracker <https://bugs.python.org/issue45402> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module
Miro Hrončok added the comment: I can reproduce this from git main branch: $ git clean -fdx $ mkdir -p build/debug $ cd build/debug $ ../../configure --with-platlibdir=lib64 --enable-shared --without-ensurepip --with-pydebug $ make $ cd ../.. $ LD_LIBRARY_PATH=$PWD/build/debug build/debug/python -m test -v test_tools -- ___ Python tracker <https://bugs.python.org/issue45402> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module
New submission from Miro Hrončok : When we build Python 3.10.0a1 (from the git tag) in Fedora, we see: == ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts) -- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/test_sundry.py", line 43, in test_sundry import_tool(name) ^ File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/__init__.py", line 35, in import_tool return importlib.import_module(toolname) ^ File "/builddir/build/BUILD/Python-3.11.0a1/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1072, in _gcd_import File "", line 1044, in _find_and_load File "", line 1015, in _find_and_load_unlocked File "", line 689, in _load_unlocked File "", line 894, in exec_module File "", line 241, in _call_with_frames_removed File "/builddir/build/BUILD/Python-3.11.0a1/Tools/scripts/freeze_modules.py", line 37, in sys.exit("ERROR: missing _freeze_module") ^ SystemExit: ERROR: missing _freeze_module -- Ran 3 tests in 0.209s I see in the build log we use Programs/_freeze_module regularly in the build process, so no idea why this fails. I'll try to come up with a reporducer. -- components: Tests messages: 403377 nosy: hroncok, pablogsal, vstinner priority: normal severity: normal status: open title: ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45402> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
Change by Miro Hrončok : -- components: +Tests ___ Python tracker <https://bugs.python.org/issue45400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
Miro Hrončok added the comment: I see this was previously added to 3.10 beta, so this never triggered. The test only fails when building from a directory that contains the full Python version. -- ___ Python tracker <https://bugs.python.org/issue45400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback
New submission from Miro Hrončok : The test_name_error_suggestions_do_not_trigger_for_too_many_locals test fails with the to-be-released 3.11.0a1: == FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals (test.test_exceptions.NameErrorTests) -- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals self.assertNotIn("a1", err.getvalue()) ^^ AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call last):\n File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, in test_name_error_suggestions_do_not_trigger_for_too_many_locals\nf()\n ^^^\n File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, in f\nprint(a0)\n ^^\nNameError: name \'a0\' is not defined\n' -- Ran 1 test in 0.016s I believe it is the version string that triggers this failure. -- messages: 403370 nosy: hroncok, pablogsal, vstinner priority: normal severity: normal status: open title: test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue45400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)
Miro Hrončok added the comment: > It would mean that extensions compiled against the release candidates may not > be binary compatible with the final release If that's true, I definitively argue not to do that. We've told everybody it won't happen. -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)
Miro Hrončok added the comment: Also Numba is broken: https://bugzilla.redhat.com/show_bug.cgi?id=2005686 -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'
Miro Hrončok added the comment: The 3.10 backport is in https://github.com/python/cpython/pull/28251 -- ___ Python tracker <https://bugs.python.org/issue45136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x: Linux kernel 5.15 regression
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue45119> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'
Miro Hrončok added the comment: Fix was proposed in https://github.com/python/cpython/pull/28235 but references the original bpi number. -- ___ Python tracker <https://bugs.python.org/issue45136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user
Miro Hrončok added the comment: There seem to be a regression in test_user_similar: https://bugs.python.org/issue45136 -- ___ Python tracker <https://bugs.python.org/issue44860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45136] test_sysconfig: test_user_similar() fails if sys.platlibdir is 'lib64'
Miro Hrončok added the comment: This was introduced in issue44860. -- nosy: +dstufft, eric.araujo, frenzy, hroncok, lukasz.langa, miss-islington, pablogsal, petr.viktorin, uranusjr ___ Python tracker <https://bugs.python.org/issue45136> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home
Miro Hrončok added the comment: > I don't think we need to match the `/usr/` scheme here. For Python software > that's not part of a distro, I think just `lib/` is fine. I agree. -- ___ Python tracker <https://bugs.python.org/issue45035> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user
Miro Hrončok added the comment: Installing to ~/.local/lib works, installing to ~/.local/lib64 breaks things, as it is not on sys.path. I agree that restoring the pre-3.9 behavior in sysconfig to use lib instead of depending on sys.platlibdir is a better fix, at least for 3.9 and 3.10. We can redesign things in 3.11 (but I wouldn't). -- ___ Python tracker <https://bugs.python.org/issue44860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44860] sysconfig's posix_user scheme has different platlib value to distutils's unix_user
Change by Miro Hrončok : -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue44860> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44824] The 3.10.0rc1 source tarballs contain the Docs/venv directory populated with pablogsal's venv
Miro Hrončok added the comment: This is the same as https://bugs.python.org/issue44823, sorry about that. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue44824> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44756] In ./Doc, "make html" and "make build" should depend on "make venv"
Miro Hrončok added the comment: The 3.10.0rc1 source tarballs contain the Docs/venv directory populated with pablogsal's venv: issue44824 -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue44756> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44824] The 3.10.0rc1 source tarballs contain the Docs/venv directory populated with pablogsal's venv
Change by Miro Hrončok : -- title: The 3.10.0rv1 source tarballs contain the Docs/venv directory populated with pablogsal's venv -> The 3.10.0rc1 source tarballs contain the Docs/venv directory populated with pablogsal's venv ___ Python tracker <https://bugs.python.org/issue44824> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44824] The 3.10.0rv1 source tarballs contain the Docs/venv directory populated with pablogsal's venv
New submission from Miro Hrončok : When we download the signed Python-3.10.0rc1.tgz or Python-3.10.0rc1.tar.xz source tarball, we see that the Docs/venv directory contains teh actual virtual environment with #!/home/pablogsal/github/python/3.10/3.10.0rc1/Python-3.10.0rc1/Doc/venv/bin/python3 shebangs. That means, an attempt to build the documentation (e.g. with make html) will fail with: PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -W . build/html /bin/sh: ./venv/bin/sphinx-build: /home/pablogsal/github/python/3.10/3.10.0rc1/Python-3.10.0rc1/Doc/venv/bin/python3: bad interpreter: No such file or directory make: Leaving directory '/builddir/build/BUILD/Python-3.10.0rc1/Doc' make: *** [Makefile:51: build] Error 126 I believe the venv directory should not be part of the release tarball, especially since it is unusbale from different paths than pablogsal's github/python/3.10/3.10.0rc1/Python-3.10.0rc1 directory. Also, technically the entire effective license of the tarball is now hard to determine, since it contains many different packages. -- assignee: docs@python components: Documentation messages: 398867 nosy: docs@python, hroncok, pablogsal priority: normal severity: normal status: open title: The 3.10.0rv1 source tarballs contain the Docs/venv directory populated with pablogsal's venv versions: Python 3.11 ___ Python tracker <https://bugs.python.org/issue44824> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: Submitted to both. https://github.com/python/cpython/pull/26784 https://github.com/python/importlib_metadata/pull/325 -- components: +Tests -Library (Lib) ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Change by Miro Hrončok : -- keywords: +patch pull_requests: +25369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26784 ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Change by Miro Hrončok : -- components: +Tests -Library (Lib) ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: Adding the reset to the context manager: with warnings.catch_warnings(record=True) as caught: warnings.resetwarnings() eps[0] Or even better explicitly: with warnings.catch_warnings(record=True) as caught: warnings.filterwarnings("default", category=DeprecationWarning) eps[0] Makes it pass and makes the tests framework happy. I still don't understand why it is filtered, but other tests in the file (e.g. test_entry_points_dict_construction) already o this, so I will submit a pull request. -- ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: I've added warnings.resetwarnings() to the test. it makes it pass. It says: Warning -- warnings.filters was modified by test_importlib Before: (140568295281984, [('default', None, , '__main__', 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0)], [('default', None, , '__main__', 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0)]) After: (140568295281984, [('default', None, , '__main__', 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0)], []) test_importlib failed (env changed) -- ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: I get the DeprecationWarning the tests assumes when not running via the test: $ cat distinfo_pkg-1.0.0.dist-info/entry_points.txt [entries] main = mod:main ns:sub = mod:main $ ./python Python 3.11.0a0 (heads/main:0982ded179, Jun 18 2021, 14:14:16) [GCC 10.3.1 20210422 (Red Hat 10.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> sys.path.insert(0, os.path.abspath('.')) >>> from importlib.metadata import distribution >>> distribution('distinfo-pkg') >>> eps = distribution('distinfo-pkg').entry_points >>> eps[0] :1: DeprecationWarning: Accessing entry points by index is deprecated. Cast to tuple if needed. EntryPoint(name='main', value='mod:main', group='entries') Not sure why I don't get it in the test yet. -- ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points
Miro Hrončok added the comment: The test_entry_points_by_index test also fails on Fedora. See issue44451. -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue44246> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: Also reproducible without --enable-shared. [cpython (main)]$ ./configure && make [cpython (main)]$ ./python --version Python 3.11.0a0 [cpython (main)]$ ./python -m test test_importlib 0:00:00 load avg: 5.40 Run tests sequentially 0:00:00 load avg: 5.40 [1/1] test_importlib test test_importlib failed -- Traceback (most recent call last): File "/home/churchyard/Dokumenty/RedHat/cpython/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index expected = next(iter(caught)) StopIteration test_importlib failed == Tests result: FAILURE == 1 test failed: test_importlib Total duration: 3.5 sec Tests result: FAILURE -- ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
Miro Hrončok added the comment: Also reproduced on the main branch. -- versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34
New submission from Miro Hrončok : Hello. When we attempted to upgrade to Python 3.10.0b3 on Fedora 33 and 34, we see the following test failure: == ERROR: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) Prior versions of Distribution.entry_points would return a -- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.10.0b3/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index expected = next(iter(caught)) StopIteration -- Ran 1402 tests in 2.125s FAILED (errors=1, skipped=18, expected failures=1) I've reproduced it without any Fedora's patches: $ cd cpython $ git switch -d v3.10.0b3 # or the tip of 3.10 today, 77eaf14d27 $ ./configure --enable-shared && make $ LD_LIBRARY_PATH=. ./python -m test test_importlib 0:00:00 load avg: 13.59 Run tests sequentially 0:00:00 load avg: 13.59 [1/1] test_importlib test test_importlib failed -- Traceback (most recent call last): File "/home/churchyard/Dokumenty/RedHat/cpython/Lib/test/test_importlib/test_metadata_api.py", line 145, in test_entry_points_by_index expected = next(iter(caught)) StopIteration test_importlib failed == Tests result: FAILURE == 1 test failed: test_importlib Total duration: 11.0 sec Tests result: FAILURE -- components: Library (Lib) messages: 396051 nosy: hroncok, jaraco priority: normal severity: normal status: open title: test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34 type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue44451> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation
Miro Hrončok added the comment: Updating the doctest is certainly a good solution for this particular project. However I still think this regression deserves to be resolved. This was part of the API, whether intended or not. -- ___ Python tracker <https://bugs.python.org/issue44418> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation
Miro Hrončok added the comment: > Does it mean that rust-cpython was broken in Python 3.10 even if a change was > prepared with a deprecation period if Python 3.9? Does it mean that the > deprecation period was inefficient on this project? I don't see any deprecation warning when running the test suite with Python 3.9 and I am unsure what exactly changed there. My assumption is that it might be related to PyNumber_Long not taking floats any more and I am unsure that this particular thing omitted deprecation warnings. Still investigating. -- ___ Python tracker <https://bugs.python.org/issue44418> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation
Miro Hrončok added the comment: All details I have about rust-cpython are that it fails tests with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' See the test failures in https://koschei.fedoraproject.org/package/rust-cpython e.g.: src/objects/capsule.rs - objects::capsule::PyCapsule (line 34) stdout Test executable failed (exit code 101). stderr: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PyErr { ptype: , pvalue: Some(AttributeError("module 'unicodedata' has no attribute 'ucnhash_CAPI'")), ptraceback: None }', src/objects/capsule.rs:77:2 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace src/objects/capsule.rs - py_capsule (line 232) stdout Test executable failed (exit code 101). stderr: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: PyErr { ptype: , pvalue: Some(AttributeError("module 'unicodedata' has no attribute 'ucnhash_CAPI'")), ptraceback: None }', src/objects/capsule.rs:73:47 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failures: src/objects/capsule.rs - objects::capsule::PyCapsule (line 34) src/objects/capsule.rs - py_capsule (line 232) (Note that there are also other failures regarding an implicit float->int conversion, but they seem to be caused by a change that followed the deprecation period.) -- ___ Python tracker <https://bugs.python.org/issue44418> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation
Miro Hrončok added the comment: Right. Nevertheless, the reaming has effectively removed the old name. -- ___ Python tracker <https://bugs.python.org/issue44418> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44418] unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation
New submission from Miro Hrončok : In bpo-42157, the unicodedata.ucnhash_CAPI attribute was removed without deprecation. This breaks at least https://github.com/dgrunwald/rust-cpython with: AttributeError: module 'unicodedata' has no attribute 'ucnhash_CAPI' Please revert the removal and deprecate the attribute for 2 Python releases if you want to remove it. Thanks -- components: Library (Lib) messages: 395792 nosy: hroncok, vstinner priority: normal severity: normal status: open title: unicodedata.ucnhash_CAPI removed from Python 3.10 without deprecation type: behavior versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44418> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10
Miro Hrončok added the comment: Yes, for the purposes of this bug, bringing TextFile-powered parse_makefile() back to distutils (and distutils only) is the right thing to do. Whether or not Python needs a public standard library function to parse makefiles and whether that function in sysconfig is imperfect and needs improvements, that is an entirely different discussion. -- ___ Python tracker <https://bugs.python.org/issue44351> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44351] distutils.sysconfig.parse_makefile() regression in Python 3.10
New submission from Miro Hrončok : Hello. I think https://github.com/python/cpython/pull/23142 changed the behavior of distutils.sysconfig.parse_makefile(). A downstream Fedora report with an affected petsc package: https://bugzilla.redhat.com/show_bug.cgi?id=1959088 Reproducers (DeprecationWarnings removed for readability): $ cat makefile ALL: lib DIRS = ssls asls # isls rscs LOCDIR = src/tao/complementarity/impls/ include ${PETSC_DIR}/lib/petsc/conf/variables include ${PETSC_DIR}/lib/petsc/conf/rules include ${PETSC_DIR}/lib/petsc/conf/test $ python3.9 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['ssls', 'asls'] $ python3.10 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['ssls', 'asls', '#', 'isls', 'rscs'] And: $ cat makefile -include ../../../../petscdir.mk ALL: lib LIBBASE = libpetscksp DIRS = cr bcgs bcgsl cg cgs gmres cheby rich lsqr preonly tcqmr tfqmr \ qcg bicg minres symmlq lcd ibcgs python gcr fcg tsirm fetidp hpddm LOCDIR = src/ksp/ksp/impls/ include ${PETSC_DIR}/lib/petsc/conf/variables include ${PETSC_DIR}/lib/petsc/conf/rules include ${PETSC_DIR}/lib/petsc/conf/test $ python3.9 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['cr', 'bcgs', 'bcgsl', 'cg', 'cgs', 'gmres', 'cheby', 'rich', 'lsqr', 'preonly', 'tcqmr', 'tfqmr', 'qcg', 'bicg', 'minres', 'symmlq', 'lcd', 'ibcgs', 'python', 'gcr', 'fcg', 'tsirm', 'fetidp', 'hpddm'] $ python3.10 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['cr', 'bcgs', 'bcgsl', 'cg', 'cgs', 'gmres', 'cheby', 'rich', 'lsqr', 'preonly', 'tcqmr', 'tfqmr', '\\'] And: $ cat makefile -include ../../../../petscdir.mk ALL: lib LIBBASE = libpetscksp DIRS = jacobi none sor shell bjacobi mg eisens asm ksp composite redundant spai is pbjacobi vpbjacobi ml\ mat hypre tfs fieldsplit factor galerkin cp wb python \ chowiluviennacl chowiluviennaclcuda rowscalingviennacl rowscalingviennaclcuda saviennacl saviennaclcuda\ lsc redistribute gasm svd gamg parms bddc kaczmarz telescope patch lmvm hmg deflation hpddm hara LOCDIR = src/ksp/pc/impls/ include ${PETSC_DIR}/lib/petsc/conf/variables include ${PETSC_DIR}/lib/petsc/conf/rules include ${PETSC_DIR}/lib/petsc/conf/test $ python3.9 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['jacobi', 'none', 'sor', 'shell', 'bjacobi', 'mg', 'eisens', 'asm', 'ksp', 'composite', 'redundant', 'spai', 'is', 'pbjacobi', 'vpbjacobi', 'ml', 'mat', 'hypre', 'tfs', 'fieldsplit', 'factor', 'galerkin', 'cp', 'wb', 'python', 'chowiluviennacl', 'chowiluviennaclcuda', 'rowscalingviennacl', 'rowscalingviennaclcuda', 'saviennacl', 'saviennaclcuda', 'lsc', 'redistribute', 'gasm', 'svd', 'gamg', 'parms', 'bddc', 'kaczmarz', 'telescope', 'patch', 'lmvm', 'hmg', 'deflation', 'hpddm', 'hara'] $ python3.10 >>> from distutils.sysconfig import parse_makefile >>> makevars = parse_makefile('makefile') >>> makevars.get('DIRS','').split() ['jacobi', 'none', 'sor', 'shell', 'bjacobi', 'mg', 'eisens', 'asm', 'ksp', 'composite', 'redundant', 'spai', 'is', 'pbjacobi', 'vpbjacobi', 'ml\\'] -- components: Library (Lib) messages: 395352 nosy: frenzy, hroncok, petr.viktorin priority: normal severity: normal status: open title: distutils.sysconfig.parse_makefile() regression in Python 3.10 type: behavior versions: Python 3.10, Python 3.11 ___ Python tracker <https://bugs.python.org/issue44351> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38250] enum.Flag should be more set-like
Miro Hrončok added the comment: I've reported https://bugs.python.org/issue44242 because I believe there is a regression in this change. -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue38250> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44242] enum.IntFlag regression: missing values cause TypeError
New submission from Miro Hrončok : With the change introduced in https://bugs.python.org/issue38250 https://github.com/python/cpython/commit/7aaeb2a3d682ecba125c33511e4b4796021d2f82 I observe a regression in behavior of enum.IntFlag with missing values. Consider this code (from pyproj): from enum import IntFlag class GeodIntermediateFlag(IntFlag): DEFAULT = 0x0 NPTS_MASK = 0xF NPTS_ROUND = 0x0 NPTS_CEIL = 0x1 NPTS_TRUNC = 0x2 DEL_S_MASK = 0xF0 DEL_S_RECALC = 0x00 DEL_S_NO_RECALC = 0x10 AZIS_MASK = 0xF00 AZIS_DISCARD = 0x000 AZIS_KEEP = 0x100 This is a valid code in Python 3.9, however produces a TypeError in Python 3.10.0b1: Traceback (most recent call last): File "intflag.py", line 3, in class GeodIntermediateFlag(IntFlag): File "/usr/lib64/python3.10/enum.py", line 544, in __new__ raise TypeError( TypeError: invalid Flag 'GeodIntermediateFlag' -- missing values: 4, 8, 32, 64, 128, 512, 1024, 2048 Since I don't see this behavior mentioned in https://docs.python.org/3.10/library/enum.html or https://docs.python.org/3.10/whatsnew/3.10.html or https://docs.python.org/3.10/whatsnew/changelog.html I believe this is a regression. -- components: Library (Lib) messages: 394457 nosy: John Belmonte, Manjusaka, ethan.furman, hauntsaninja, hroncok, jbelmonte, veky priority: normal severity: normal status: open title: enum.IntFlag regression: missing values cause TypeError type: behavior versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue44242> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing)
Miro Hrončok added the comment: A Cython issue report: https://github.com/cython/cython/issues/4153 -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be.
Miro Hrončok added the comment: scikit-learn: https://bugzilla.redhat.com/show_bug.cgi?id=1958976 gcc: sklearn/cluster/_k_means_fast.c In file included from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944, from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12, from /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:4, from sklearn/cluster/_k_means_fast.c:635: /usr/lib64/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp] 17 | #warning "Using deprecated NumPy API, disable it with " \ | ^~~ sklearn/cluster/_k_means_fast.c: In function ‘__Pyx_call_return_trace_func’: sklearn/cluster/_k_means_fast.c:1596:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’? 1596 | tstate->use_tracing = 0; | ^~~ | tracing sklearn/cluster/_k_means_fast.c:1602:15: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’? 1602 | tstate->use_tracing = 1; | ^~~ | tracing The usage comes from https://github.com/cython/cython/blob/master/Cython/Utility/Profile.c -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be.
Miro Hrončok added the comment: Disclaimer: I have not written the code nor do I understand what is trying to achieve. I merely collect the data and report the problems to the package maintainers. It just seems to me that a non-underscored (and hence public) member variable on a non-underscored (and hence public) structure should not suddenly go missing. Although, I am not familiar with the rules that define what part of the API falls under https://www.python.org/dev/peps/pep-0497/ -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be.
Miro Hrončok added the comment: Fedora packages affected (that we know of now): greenlet: https://bugzilla.redhat.com/show_bug.cgi?id=1957784 dipy: https://bugzilla.redhat.com/show_bug.cgi?id=1958203 yappi: https://bugzilla.redhat.com/show_bug.cgi?id=1958896 smartcols: https://bugzilla.redhat.com/show_bug.cgi?id=1958938 -- ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43760] The DISPATCH() macro is not as efficient as it could be.
Miro Hrončok added the comment: I am afraid the "Speed up check for tracing in interpreter dispatch" brought some backwards incompatible changes: yappi/_yappi.c:1261:9: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’? 1261 | ts->use_tracing = 1; | ^~~ | tracing This is not mentioned in https://docs.python.org/3.10/whatsnew/3.10.html and I haven't noticed the use_tracing member being deprecated. I am confused. Should this happened? -- nosy: +hroncok, petr.viktorin, vstinner ___ Python tracker <https://bugs.python.org/issue43760> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue44043] 3.10 b1 armhf Bus Error in hashlib test: test_gil
Miro Hrončok added the comment: In Fedora, our build passed on Fedoras 32, 33, 34, 35. We have: F32: gcc 10.2.1, openssl 1.1.1k F33: gcc 10.3.1, openssl 1.1.1k F34: gcc 11.1.1, openssl 1.1.1k F35: gcc 11.1.1, openssl 1.1.1k Let me know how can I help to debug the difference in environment more. -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue44043> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43976] Introduce mechanism to allow Python distributors to add custom site install schemes
Miro Hrončok added the comment: Cross referencing the discussion: https://discuss.python.org/t/mechanism-for-distributors-to-add-site-install-schemes-to-python-installations/8467 -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue43976> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.
Change by Miro Hrončok : -- nosy: -hroncok ___ Python tracker <https://bugs.python.org/issue37751> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42134] Raise ImportWarning when falling back to find_module()
Miro Hrončok added the comment: Brett, would you accept a PR that changes the changelog entry to contain the ".find_spec() not found; falling back to find_module()" message, for better search-ability? I needed to use grep + git blame to be able to find out what's going on. Also, could you please explain how to migrate to find_spec() in https://docs.python.org/3.10/whatsnew/3.10.html#porting-to-python-3-10 ? I'd do that, but I don't know yet what is the proper way. -- nosy: +hroncok, vstinner ___ Python tracker <https://bugs.python.org/issue42134> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue38820] Make Python compatible with OpenSSL 3.0.0
Miro Hrončok added the comment: Python 3.10.0a7 with OpenSSL 3.0 from https://copr.fedorainfracloud.org/coprs/saprasad/openssl-3.0/ in https://copr.fedorainfracloud.org/coprs/g/python/openssl-3.0/package/python3.10/ (full logs available there). 3 tests failed: test_imaplib test_ssl test_urllib2_localnet Many: ssl.SSLError: [SSL: KRB5_S_TKT_NYV] unexpected eof while reading (_ssl.c:2628) Also: Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.10.0a7/Lib/test/test_ssl.py", line 1413, in test_load_cert_chain ctx.load_cert_chain(CERTFILE_PROTECTED, password=getpass_huge) SystemError: _PyEval_EvalFrameDefault returned a result with an exception set And: ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1122) ssl.SSLError: [SSL: SSLV3_ALERT_BAD_CERTIFICATE] sslv3 alert bad certificate (_ssl.c:1122) ssl.SSLError: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:1122) -- nosy: +hroncok versions: +Python 3.10 ___ Python tracker <https://bugs.python.org/issue38820> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37741] importlib.metadata docs not showing up in the module index
Miro Hrončok added the comment: The docs at https://docs.python.org/3/library/importlib.metadata.html also don't list the API at all, it is just a tutorial, not a reference. I see the code has docstrings, but they are missing from the docs. E.g. PackageNotFoundError is not documented at all. -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue37741> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37820] Unnecessary URL scheme exists to allow 'URL: reading file in urllib
Change by Miro Hrončok : -- nosy: +hroncok nosy_count: 3.0 -> 4.0 pull_requests: +23632 pull_request: https://github.com/python/cpython/pull/24870 ___ Python tracker <https://bugs.python.org/issue37820> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42988] [security] CVE-2021-3426: Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem
Miro Hrončok added the comment: This is now CVE-2021-3426. -- title: [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem -> [security] CVE-2021-3426: Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem ___ Python tracker <https://bugs.python.org/issue42988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42988] [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem
Miro Hrončok added the comment: Todd Cullum from Red Hat Security team: "I don't have an account on Python's tracker, would you mind forwarding to upstream on my behalf that this is not only locally exploitable, but it can be exploited by actors on the adjacent network as well because https://github.com/python/cpython/commit/6a396c9807b1674a24e240731f18e20de97117a5 was introduced in Python 3.7.0 alpha 1. I just used the -n option and got to read some of my own files using my cell phone on the WiFi. It does require the port to be unblocked by firewall though." -- ___ Python tracker <https://bugs.python.org/issue42988> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43372] ctypes: test_frozentable fails when make regen-frozen
Miro Hrončok added the comment: Thanks for the fixer! -- ___ Python tracker <https://bugs.python.org/issue43372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43162] Enum regression: AttributeError when accessing class variables on instances
Miro Hrončok added the comment: Thank you, Ethan. -- ___ Python tracker <https://bugs.python.org/issue43162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43372] ctypes: test_frozentable fails when make regen-frozen
Miro Hrončok added the comment: When I run `PYTHON_FOR_REGEN=python3.10 make regen-frozen` with Python 3.10.0a5, I get the same diff and the same problem. When I run `PYTHON_FOR_REGEN=python3.9 make regen-frozen` with Python 3.9.2, I get no diff and no problem (similarly with Python 3.8.8). -- ___ Python tracker <https://bugs.python.org/issue43372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43372] ctypes: test_frozentable fails when make regen-frozen
Change by Miro Hrončok : -- nosy: +nascheme ___ Python tracker <https://bugs.python.org/issue43372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43372] ctypes: test_frozentable fails when make regen-frozen
New submission from Miro Hrončok : The following test failure happens on Python 3.10.0a6+ when we make regen-frozen with the same Python version we test: == FAIL: test_frozentable (ctypes.test.test_values.PythonValuesTestCase) -- Traceback (most recent call last): File "/home/churchyard/Dokumenty/RedHat/cpython/Lib/ctypes/test/test_values.py", line 87, in test_frozentable self.assertEqual(items, expected, "PyImport_FrozenModules example " AssertionError: Lists differ: [('__hello__', 129), ('__phello__', -129), ('__phello__.spam', 129)] != [('__hello__', 125), ('__phello__', -125), ('__phello__.spam', 125)] First differing element 0: ('__hello__', 129) ('__hello__', 125) - [('__hello__', 129), ('__phello__', -129), ('__phello__.spam', 129)] ? ^ ^ ^ + [('__hello__', 125), ('__phello__', -125), ('__phello__.spam', 125)] ? ^ ^ ^ : PyImport_FrozenModules example in Doc/library/ctypes.rst may be out of date -- Ran 494 tests in 0.466s FAILED (failures=1, skipped=87) Reproducer: 1. Build Python from source: $ ./configure && make -j... 2. Run ctypes tests: $ ./python -m ctypes.test 3. Regenerate frozen: $ PYTHON_FOR_REGEN=./python make regen-frozen 4. Build Python from source again: $ ./configure && make -j... 5. Run ctypes tests: $ ./python -m ctypes.test Actual result: Tests in (2) pass, tests in (5) fail. The difference after (3) is: diff --git a/Python/frozen_hello.h b/Python/frozen_hello.h index 9c566cc81e..d58b726aa8 100644 --- a/Python/frozen_hello.h +++ b/Python/frozen_hello.h @@ -9,5 +9,5 @@ static unsigned char M___hello__[] = { 100,218,5,112,114,105,110,116,169,0,114,2,0, 0,0,114,2,0,0,0,218,4,110,111,110,101, 218,8,60,109,111,100,117,108,101,62,1,0,0, -0,115,2,0,0,0,4,1, +0,115,6,0,0,0,4,0,12,1,255,128, }; Expected results: Tests pass, no diff. -- components: Tests, ctypes messages: 387933 nosy: hrnciar, hroncok priority: normal severity: normal status: open title: ctypes: test_frozentable fails when make regen-frozen type: compile error versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39448] Add regen-frozen makefile target
Miro Hrončok added the comment: I think something is broken with this, full report in: https://bugs.python.org/issue43372 -- nosy: +hroncok ___ Python tracker <https://bugs.python.org/issue39448> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42819] readline 8.1 bracketed paste
Miro Hrončok added the comment: https://lists.gnu.org/archive/html/bug-readline/2020-11/msg00010.html https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00048.html https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00087.html -- ___ Python tracker <https://bugs.python.org/issue42819> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42819] readline 8.1 bracketed paste
Miro Hrončok added the comment: This also affects Fedora 34+ -- nosy: +hroncok, petr.viktorin, vstinner ___ Python tracker <https://bugs.python.org/issue42819> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com