[issue42032] Setting PYTHONPYCACHEPREFIX using ~ (tilde) creates a "~" folder

2022-01-07 Thread Petr Viktorin
Petr Viktorin added the comment: > It would perhaps be useful if the os.path.expanduser call was added in the > cache_from_source() function in importlib? No: that would mean Python would be doing work that the shell should do. Possibly it would be duplicating the work. Possibly it would be

[issue46294] Integer overflow & Int values loaded into Bool detected via Libfuzzer & UndefinedBehaviorSanitizer

2022-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: @swirsz: Thanks for the report. Most of these look like false positives: we're intentionally making use of C's unsigned arithmetic behaviour. Note that these are technically *not* overflows. As the C standard itself says, in C99 §6.2.5, paragraph 9: > A

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2022-01-07 Thread Petr Viktorin
Change by Petr Viktorin : -- keywords: +patch nosy: +petr.viktorin nosy_count: 2.0 -> 3.0 pull_requests: +28660 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30456 ___ Python tracker

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: > The problematic change could be (d0d29655ff) affecting import.c This change is part of the 3.10 branch. For 3.9, git bisect tells me that it's the following change: commit 52d9d3b75441ae6038fadead89eac5eecdd34501 Author: Łukasz Langa Date: Tue Oct 5

[issue46281] Python 3.10.1 build errors on Ubuntu 18.04

2022-01-07 Thread Christian Heimes
Christian Heimes added the comment: You seem to have OpenSSL 1.0.2 headers installed somewhere on your computer. Python's configure script and build system uses these headers instead of the system headers from libssl-dev. -- ___ Python tracker

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: ASDL technically allows it to be None though neither compiler nor ast.unparse can work with it at this moment. > FormattedValue(expr value, int? conversion, expr? format_spec)

[issue46264] 'I'.lower() should give non dotted i for LANG=tr_TR

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: I suppose the casefold method does not help? https://docs.python.org/3.10/library/stdtypes.html#str.casefold -- nosy: +eric.araujo ___ Python tracker

[issue46294] Integer overflow & Int values loaded into Bool detected via Libfuzzer & UndefinedBehaviorSanitizer

2022-01-07 Thread Steven Wirsz
New submission from Steven Wirsz : Compiling source from github on January 6, 2022, detected via Libfuzzer & UndefinedBehaviorSanitizer: # ./fuzz_struct_unpack crash-a0d.txt Running: crash-a0d.txt /src/cpython3/Modules/_struct.c:509:28: runtime error: load of value 128, which is not a

[issue46296] Unreachable condition: `if enum_class._member_type_ is object`

2022-01-07 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28661 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30458 ___ Python tracker ___

[issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: The bpo-46295 was marked as a duplicate of this issue. -- ___ Python tracker ___ ___

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Anh71me
New submission from Anh71me : An unexpected behavior lookup: ```python >>> ast.FormattedValue(ast.Str('ss')).conversion >>> ast.unparse(ast.FormattedValue(ast.Str('ss'))) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/ast.py", line 1564, in unparse

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +BTaskaya ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46292] Add microseconds to logging.LogRecord

2022-01-07 Thread James Casbon
Change by James Casbon : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing

[issue46293] Typo in specifying escape sequence

2022-01-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Serhiy is correct. The table is correct, \n can be found further down the table, the first entry is backslash newline, as it says. -- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread Petr Viktorin
Petr Viktorin added the comment: > The problem is that this change fixed another bug, well, see: bpo-44050. > While a revert should fix win_py399_crash_reproducer.py, it will reintroduce > bpo-44050 bug. bpo-44050 is an attempt to fix a regression introduced in bpo-38858, perhaps that

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Lysandros Nikolaou
Lysandros Nikolaou added the comment: I agree that A is probably the way to go. -- ___ Python tracker ___ ___ Python-bugs-list

[issue46291] [doc] First argument to raise can also be BaseException

2022-01-07 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think that this is intentional: tutorial gives some very basic ideas about what can be raised. Giving the whole context (you can `raise` two kinds of errors: `Exception` and `BaseException`, but they are different, should be used in different cases, and

[issue46296] Unreachable condition: `if enum_class._member_type_ is object`

2022-01-07 Thread Nikita Sobolev
New submission from Nikita Sobolev : This condition can never be `True`: https://github.com/python/cpython/blob/b127e70a8a682fe869c22ce04c379bd85a00db67/Lib/enum.py#L222-L223 Why? Because: 1. It is executed only when `if not enum_class._use_args_:`:

[issue41370] PEP 585 and ForwardRef

2022-01-07 Thread Niklas Rosenstein
Niklas Rosenstein added the comment: I'm running into this issue right now. Can anyone provide a rationale as to why you think this is acceptable/expected behaviour? Do we expect developers to semi-rely on get_type_hints(), but than still having to manually resolve forward references in

[issue46294] Integer overflow & Int values loaded into Bool detected via Libfuzzer & UndefinedBehaviorSanitizer

2022-01-07 Thread Steven Wirsz
Steven Wirsz added the comment: Closing this report. I investigated the remaining issue and it looks like a perfectly valid call to PyBool_FromLong: /src/cpython3/Modules/_struct.c:509:28: runtime error: load of value 128, which is not a valid value for type '_Bool' static PyObject *

[issue38735] PYTHONPYCACHEPREFIX fails when importing a module from the root ("/")

2022-01-07 Thread Petr Viktorin
Petr Viktorin added the comment: Here's a patch, but testing it would require putting a file in the root directory. I don't dare do that from the test suite. Is one-time manual testing OK here? -- ___ Python tracker

[issue46292] Add microseconds to logging.LogRecord

2022-01-07 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Eric Snow
Eric Snow added the comment: Is this a duplicate of bpo-15751? (also see bpo-10915) -- ___ Python tracker ___ ___

[issue46292] Add microseconds to logging.LogRecord

2022-01-07 Thread Vinay Sajip
Change by Vinay Sajip : -- versions: +Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yeah, this is indeed related/duplicate of bpo-15751 -- ___ Python tracker ___ ___

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- superseder: -> [subinterpreters] Make the PyGILState API compatible with subinterpreters ___ Python tracker ___

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___

[issue46227] add pathlib.Path.walk method

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: The idea is interesting, and I agree that glob with a maxi wildcard is not a great solution. There is discussion on the PR about adding walk vs extending iterdir; could you post a message on discuss.python.org and sum up the the discussion? (Pull requests on

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Let me be clearer. This bug prevents me from building main (3.11) to test anything with a proper up-to-date 3.11 binary. So to me this is highest priority. Is this just my machine or every Windows system? How are CI and buildbots rebuilding and running?

[issue46279] [docs] Minor information-ordering issue in __main__ doc

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: Do you have a suggestion on how to fix this? -- nosy: +eric.araujo ___ Python tracker ___ ___

[issue24650] Error in yield expression documentation

2022-01-07 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46295] Subinterpreters hang in GIL adquisition if an extension module calls PyGILState_Ensure.

2022-01-07 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : Reproducer: Code for native_ext.cpp: #define PY_SSIZE_T_CLEAN #include #include #include #include #pragma GCC push_options #pragma GCC optimize ("O0") PyObject* run_simple(PyObject*, PyObject*) { PyGILState_STATE gstate;

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think A is the best option -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46290] Parameter names are inaccurate in dataclasses docs

2022-01-07 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: docs@python -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46293] Typo in specifying escape sequence

2022-01-07 Thread Zachary Ware
Zachary Ware added the comment: The table could stand some clarification; `\newline` is the only example that is not showing exactly the characters that one would see when looking at source code and which doesn't have an explanatory note. There's also the additional wrinkle that `\CR`,

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: I reverted manually the commit 52d9d3b75441ae6038fadead89eac5eecdd34501 (in my local Python 3.9 checkout): I confirm that the revert fix the win_py399_crash_reproducer.py crash in Python 3.9. -- ___ Python

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: In the 3.9 branch, the commit 4d2cfd354969590ba8e0af0447fd84f8b5e61952 fixed the _asyncio extension. win_py399_crash_reproducer.py still branch on Windows in the 3.9 branch. The code can be simplified with: code = "import _sre" Moreover, even if I

[issue46216] spurious link to os.system() from os.times() documentation entry

2022-01-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +28662 pull_request: https://github.com/python/cpython/pull/30459 ___ Python tracker ___

[issue46216] spurious link to os.system() from os.times() documentation entry

2022-01-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +28663 pull_request: https://github.com/python/cpython/pull/30460 ___ Python tracker ___

[issue46216] spurious link to os.system() from os.times() documentation entry

2022-01-07 Thread miss-islington
miss-islington added the comment: New changeset 9b7aa6a9d678ba798c57fa5bbc800014dfe4fb91 by Irit Katriel in branch 'main': bpo-46216: remove spurious link to os.system() from os.time() documentation (GH-30326) https://github.com/python/cpython/commit/9b7aa6a9d678ba798c57fa5bbc800014dfe4fb91

[issue24650] Error in yield expression documentation

2022-01-07 Thread Irit Katriel
Irit Katriel added the comment: New changeset 273cb8e7577d143830404f6779946a0bedb58758 by Jacob Walls in branch 'main': bpo-24650: Use full term "generator function" in yield expressions docs (GH-24663) https://github.com/python/cpython/commit/273cb8e7577d143830404f6779946a0bedb58758

[issue46290] Parameter names are inaccurate in dataclasses docs

2022-01-07 Thread Zsolt Dollenstein
New submission from Zsolt Dollenstein : Parameter names for `asdict`, `astuple`, `is_dataclass`, and `replace` are incorrect in the docs. The first parameter for all these is `obj`. -- assignee: docs@python components: Documentation messages: 409957 nosy: docs@python, zsol priority:

[issue46290] Parameter names are inaccurate in dataclasses docs

2022-01-07 Thread Zsolt Dollenstein
Change by Zsolt Dollenstein : -- keywords: +patch pull_requests: +28655 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30450 ___ Python tracker

[issue46291] [doc] First argument to raise can also be BaseException

2022-01-07 Thread Gregor Titze
New submission from Gregor Titze : The Python Tutorial describes the first argument to the raise statement as follows: """ This must be either an exception instance or an exception class (a class that derives from Exception). """

[issue46293] Typo in specifying escape sequence

2022-01-07 Thread Preetham Nanjappa
New submission from Preetham Nanjappa : See section "2.4.1. String and Bytes literals" of 3.10.1 documentation. https://docs.python.org/3.10/reference/lexical_analysis.html#string-and-bytes-literals Escape Sequence table. First line. `\newline` should have been `\n` -- assignee:

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset b127e70a8a682fe869c22ce04c379bd85a00db67 by Erlend Egeberg Aasland in branch 'main': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/b127e70a8a682fe869c22ce04c379bd85a00db67 --

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 12.0 -> 13.0 pull_requests: +28657 pull_request: https://github.com/python/cpython/pull/30453 ___ Python tracker

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +28658 pull_request: https://github.com/python/cpython/pull/30454 ___ Python tracker ___

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
miss-islington added the comment: New changeset 9d18045804f6db8224be14f7a618b77977f90144 by Miss Islington (bot) in branch '3.10': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/9d18045804f6db8224be14f7a618b77977f90144 --

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread miss-islington
miss-islington added the comment: New changeset 4d2cfd354969590ba8e0af0447fd84f8b5e61952 by Miss Islington (bot) in branch '3.9': bpo-46070: Fix asyncio initialisation guard (GH-30423) https://github.com/python/cpython/commit/4d2cfd354969590ba8e0af0447fd84f8b5e61952 --

[issue45661] [meta] Freeze commonly used stdlib modules.

2022-01-07 Thread Christian Heimes
Christian Heimes added the comment: Deep freezing is not a miracle cure for startup performance issues. Every additional frozen module increases the size of the main binary / shared library. This can have negative affects for performance and usability, too. For WASM builds we want to make

[issue46246] importlib.metadata.DeprecatedList appears to be missing __slots__

2022-01-07 Thread Arie Bovenberg
Change by Arie Bovenberg : -- keywords: +patch pull_requests: +28656 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30452 ___ Python tracker ___

[issue45661] [meta] Freeze commonly used stdlib modules.

2022-01-07 Thread Kumar Aditya
Kumar Aditya added the comment: Can you elaborate a bit about "This can have negative affects for performance" as I think freezing modules has only one downside of increasing binary size ? > For WASM builds we want to make the wasm binary as small as possible. If WASM would become an

[issue19073] Inability to specific __qualname__ as a property on a class instance.

2022-01-07 Thread Irit Katriel
Irit Katriel added the comment: This is the check that is preventing qualname being a property: https://github.com/python/cpython/blob/994f90c0772612780361e1dc5fa5223dce22f70a/Objects/typeobject.c#L2853 Note that it is not the same check used for assignment, which is here:

[issue46288] Migrating python 2.7 to 3.6 using 2to3 tool

2022-01-07 Thread Eric V. Smith
Eric V. Smith added the comment: Porting questions don't belong on the bug tracker. And we don't support 2.7 any more, in any event. You'll need to find python 3 versions of all of your packages. Unfortunately we can't help you with that. There used to be a python-porting mailing list, but

[issue46281] Python 3.10.1 build errors on Ubuntu 18.04

2022-01-07 Thread Bob Rivoir
Bob Rivoir added the comment: According to synaptic, I have openssl 1.1.1-1ubuntu2.1~18.04-14 installed. On the openssl.org site they mention that this version doesn't eol till 2023. Shouldn't this still work? Or does python require the 3.0 version? --

[issue46279] [docs] Minor information-ordering issue in __main__ doc

2022-01-07 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46290] Parameter names are inaccurate in dataclasses docs

2022-01-07 Thread Alex Waygood
Change by Alex Waygood : -- nosy: +eric.smith type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46292] Add microseconds to logging.LogRecord

2022-01-07 Thread James Casbon
New submission from James Casbon : LogRecord makes microseconds available via the msecs attribute. This patch adds microseconds via usecs attribute. Some regulators (eg MIFID II) require accuracy greater than 1ms in some industries. This patch calls time_ns rather than time so that the

[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-01-07 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +28659 pull_request: https://github.com/python/cpython/pull/30455 ___ Python tracker ___

[issue46070] [subinterpreters] asyncio crash when importing _asyncio in subinterpreter (Python 3.8 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: Even with PR 30454, I can still reproduce the crash on Python 3.9 (randomly, it takes a few attempts to reproduce the crash): vstinner@DESKTOP-DK7VBIL C:\vstinner\python\3.9>python -X dev win_py399_crash_reproducer.py Running Debug|x64 interpreter... exit

[issue9937] _winreg.EnumValue causes MemoryError

2022-01-07 Thread Eryk Sun
Eryk Sun added the comment: > Did anyone reproduce on python3.X? In principle, winreg should not have a problem in 3.x because it only uses the UTF-16 wide-character API. -- nosy: +eryksun stage: -> resolved status: pending -> closed ___ Python

[issue46293] Typo in specifying escape sequence

2022-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is a backslash following by a newline. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue45723] Improve and simplify configure.ac checks

2022-01-07 Thread Christian Heimes
Christian Heimes added the comment: New changeset 994f90c0772612780361e1dc5fa5223dce22f70a by Christian Heimes in branch 'main': bpo-45723: Fix detection of epoll (#30449) https://github.com/python/cpython/commit/994f90c0772612780361e1dc5fa5223dce22f70a --

[issue45723] Improve and simplify configure.ac checks

2022-01-07 Thread Christian Heimes
Change by Christian Heimes : -- priority: release blocker -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46281] Python 3.10.1 build errors on Ubuntu 18.04

2022-01-07 Thread Christian Heimes
Christian Heimes added the comment: Ubuntu 18.04's OpenSSL is too old and unsupported by 3.10. OpenSSL 1.0.2 is EOL since 2019. You either need to update to a more recent version of Ubuntu or build your own OpenSSL. -- nosy: +christian.heimes resolution: -> wont fix stage: ->

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2022-01-07 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2022-01-07 Thread Steve Dower
Steve Dower added the comment: New changeset d81182b8ec3b1593daf241d44757a9fa68fd14cc by Steve Dower in branch 'main': bpo-46217: Revert use of Windows constant that is newer than what we support (GH-30473) https://github.com/python/cpython/commit/d81182b8ec3b1593daf241d44757a9fa68fd14cc

[issue46006] [subinterpreter] _PyUnicode_EqualToASCIIId() issue with subinterpreters

2022-01-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- priority: release blocker -> ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue46291] [doc] First argument to raise can also be BaseException

2022-01-07 Thread Irit Katriel
Irit Katriel added the comment: Make a PR and we can then tweak it via code reviews, it will be easier. -- ___ Python tracker ___

[issue46300] zlib.compress level and wbits args are shown as keyword-only in the documentation

2022-01-07 Thread Andrei Kulakov
Andrei Kulakov added the comment: I forgot that '/' marks end of positional-only args, not keyword-only. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue46299] Improve several exception handling practices in `test_descr.py`

2022-01-07 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +28678 pull_request: https://github.com/python/cpython/pull/30475 ___ Python tracker ___

[issue46303] _Py_stat using incorrect type for status argument

2022-01-07 Thread Paul Campbell
Change by Paul Campbell : -- keywords: +patch pull_requests: +28681 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30478 ___ Python tracker ___

[issue24650] Error in yield expression documentation

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28664 pull_request: https://github.com/python/cpython/pull/30461 ___ Python tracker

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since #42209 was closed, a new issue seems OK. As a result of the incorrect line number, IDLE highlights one of the opening quotes on line 1. -- nosy: +pablogsal, terry.reedy -eric.smith versions: +Python 3.11

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This also affects 3.9 I imagine, no? -- ___ Python tracker ___ ___ Python-bugs-list

[issue46070] [subinterpreters] crash when importing _sre in subinterpreters in parallel (Python 3.9 regression)

2022-01-07 Thread STINNER Victor
STINNER Victor added the comment: This bug is hard to reproduce for different reasons: * It occurs randomly: I need between 1 and 50 attempts to reproduce the bug using win_py399_crash_reproducer.py * So far, the bug was only reproduced on Windows. * I failed to reproduce the crash on

[issue46297] Python interpreter crashes on bootup with multiple PythonPaths set in registry

2022-01-07 Thread Derzsi Dániel
New submission from Derzsi Dániel : When multiple PythonPaths are set up in the registry, in addition to the default PythonPath, the interpreter crashes immediately on bootup. ```Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\PythonPath\Panda3D]

[issue46296] Unreachable condition: `if enum_class._member_type_ is object`

2022-01-07 Thread Ethan Furman
Ethan Furman added the comment: (2) is false. >>> from enum import Enum >>> >>> class MyEnum(Enum): ... def __new__(cls, value): ... member = object.__new__(cls) ... return member ... ONE = 1 ... >>> MyEnum.ONE MyEnum.ONE >>> MyEnum._use_args_ True >>>

[issue46289] AST: FomattedValue conversion's default value should be -1

2022-01-07 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +28670 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30467 ___ Python tracker ___

[issue46296] Unreachable condition: `if enum_class._member_type_ is object`

2022-01-07 Thread Ethan Furman
Ethan Furman added the comment: Looking through some of my code that prompted that branch, the issue is caused when `_generate_next_value_` modifies the given args -- when `__set_name__` runs it has no way of getting the same results to automatically create the `_value_` attribute.

[issue46291] [doc] First argument to raise can also be BaseException

2022-01-07 Thread Andre Roberge
Andre Roberge added the comment: Irit: In all the books and tutorials I have seen, the advice is to try to catch specific exceptions whenever possible or, *at most*, to catch Exception (and not BaseException). This is to allow, for example, a program to be interrupted by a

[issue42378] logging reopens file with same mode, possibly truncating

2022-01-07 Thread Ned Deily
Change by Ned Deily : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46297] Python interpreter crashes on bootup with multiple PythonPaths set in registry

2022-01-07 Thread Eryk Sun
Change by Eryk Sun : -- type: behavior -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46142] python --help output is too long

2022-01-07 Thread Éric Araujo
Éric Araujo added the comment: I hard forgotten this bit in the email thread: Serhiy: What do you think about -hh (and maybe —help-full) printing full help? Guidp: Is there enough of a use case for this to bother? Barry: Maybe not. I’d say if it was easy to implement, why not, but if it’s a

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28677 pull_request: https://github.com/python/cpython/pull/30474 ___ Python tracker

[issue46237] Incorrect line reported in syntax error

2022-01-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 6fa8b2ceee38187b0ae96aee12fe4f0a5c8a2ce7 by Pablo Galindo Salgado in branch 'main': bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463)

[issue46302] IndexError inside list comprehension + workaround

2022-01-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: > it returns IndexError (instead of "u") if used in a list comprehension Works as expected inside a list comprehension: >>> var = "u2" >>> [var.strip()[0] for i in range(2)] ['u', 'u'] >>> ["ok" for i in range(2) if var.strip()[0] == "u"] ['ok', 'ok'] I

[issue46217] 3.11 build failure on Win10: new _freeze_module changes?

2022-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you. Compiles without even any warnings. Tests also all pass. -- ___ Python tracker ___

[issue46302] IndexError inside list comprehension + workaround

2022-01-07 Thread Steven D'Aprano
Steven D'Aprano added the comment: Your functions test1 and test2 are irrelevant to the bug report. The driver code using eval() to pick which function to call is unneeded. The business of simulating a file is complexity for no purpose. Those ignore, count, unique functions are also

[issue46302] IndexError inside list comprehension + workaround

2022-01-07 Thread Stefan Pochmann
Stefan Pochmann added the comment: The error occurs when you do code.strip()[0] when code is " ", not "u2". -- nosy: +Stefan Pochmann ___ Python tracker ___

[issue46226] User specific paths added to System PATH environment variable

2022-01-07 Thread Eryk Sun
Eryk Sun added the comment: Were you upgrading an existing installation of Python 3.10? Did it actually install in "C:\Program Files\Python310"? Is Python currently installed in per-user "%LocalAppData%\Programs\Python\Python310"? Was it ever installed there? -- nosy: +eryksun

[issue46303] _Py_stat using incorrect type for status argument

2022-01-07 Thread Paul Campbell
Change by Paul Campbell : -- components: +Build, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> compile error ___ Python tracker ___

[issue46299] Improve several exception handling practices in `test_descr.py`

2022-01-07 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +28679 pull_request: https://github.com/python/cpython/pull/30476 ___ Python tracker

[issue46299] Improve several exception handling practices in `test_descr.py`

2022-01-07 Thread miss-islington
Change by miss-islington : -- pull_requests: +28680 pull_request: https://github.com/python/cpython/pull/30477 ___ Python tracker ___

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

2022-01-07 Thread Paul Campbell
Change by Paul Campbell : -- title: _Py_stat using incorrect type for status argument -> _Py_stat and _Py_wstat using incorrect type for status argument ___ Python tracker

[issue46291] [doc] First argument to raise can also be BaseException

2022-01-07 Thread Gregor Titze
Gregor Titze added the comment: Andre: You mention that user-defined exceptions should inherit from Exception. This is totally right and explicitly stated just a bit later in 8.6 on the same page of the tutorial. I think this perfectly covers this concern . However, the paragraph I refer

[issue46226] User specific paths added to System PATH environment variable

2022-01-07 Thread Aleksandr Krymskiy
Aleksandr Krymskiy added the comment: I did not find install logs in my user %TEMP% or C:\Windows\Temp. I did select "install for all users" during setup just like I always do, but I did not override the default location of "C:\Program Files\Python310". I attached screenshots of the options

[issue46287] UNC path normalisation issues on Windows

2022-01-07 Thread Eryk Sun
Eryk Sun added the comment: > _Py_abspath/_getfullpathname does not always call GetFullPathNameW on 3.11. Also, PathCchSkipRoot() doesn't recognize forward slash as a path separator, so _Py_isabs() is wrong in many cases compared to the same path that uses backslash as the path separator.

  1   2   >