[issue45064] Raising AttributeError in descriptor decorator causing searching attribute in __mro__

2021-08-31 Thread Mateusz
New submission from Mateusz : A descriptor that is raising AttributeError in __get__() causes that the Python's interpreter continues searching for attributes in __mro__ calling __getattr__() function in inherited classes. Let's take a look for example script with this bug. class A1: de

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-08-31 Thread Łukasz Langa
Change by Łukasz Langa : -- pull_requests: +26537 pull_request: https://github.com/python/cpython/pull/28094 ___ Python tracker ___ _

[issue36560] test_functools leaks randomly 1 memory block

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: I can see the test_typing issue with this patch: diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index b94826a5da..49e5f03414 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -124,7 +124,7 @@

[issue44895] refleak test failure in test_exceptions

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: A variant of this problem: bpo-36560 with a leak 1 memory block per iteration. -- ___ Python tracker ___

[issue32835] Add documention mentioning that Cygwin isn't fully compatible

2021-08-31 Thread Diana
Diana added the comment: Hi, I've created a pull request for pep 11. https://github.com/python/peps/pull/2065 -- nosy: +DonnaDia ___ Python tracker ___ ___

[issue36560] test_functools leaks randomly 1 memory block

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: Recent failure on AMD64 Fedora Rawhide Refleaks 3.x: https://buildbot.python.org/all/#/builders/565/builds/131 test_typing leaked [1, 1, 1] memory blocks, sum=3 (...) 0:46:40 load avg: 0.00 Re-running test_typing in verbose mode test_typing leaked [1, 1, 1] me

[issue45063] PEP 657 Fine Grained Error Locations: make the traceback less verbose when possible

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: I looked at the implementation. It's more complex than what I expected. tb_displayline(): _Py_DisplaySourceLine() returns the source line with the indentation, but then it truncates the indentation. extract_anchors_from_line() includes the indentation if I

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-08-31 Thread miss-islington
miss-islington added the comment: New changeset ab8fed88fc602282167f6459b43f2cf0c771f60a by Miss Islington (bot) in branch '3.10': bpo-44135: Refine explanation of how passing tuples to issubclass() behaves (GH-26193) https://github.com/python/cpython/commit/ab8fed88fc602282167f6459b43f2cf0c

[issue45060] Do not use the equality operators with None

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26536 pull_request: https://github.com/python/cpython/pull/28093 ___ Python tracker ___

[issue45019] Freezing modules has manual steps but could be automated.

2021-08-31 Thread Eric Snow
Change by Eric Snow : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue45063] PEP 657 Fine Grained Error Locations: make the traceback less verbose when possible

2021-08-31 Thread STINNER Victor
New submission from STINNER Victor : The PEP 657 introduced ^^^ in tracebacks. It is useful when the error happens on an sub-expression in a long line. Example: File "/home/vstinner/python/main/Lib/ftplib.py", line 462, in retrlines with self.transfercmd(cmd) as conn, \

[issue45060] Do not use the equality operators with None

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26535 pull_request: https://github.com/python/cpython/pull/28092 ___ Python tracker ___

[issue44359] test_ftplib fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: aarch64 Fedora Stable Clang 3.10: https://buildbot.python.org/all/#/builders/635/builds/253 0:00:23 load avg: 12.40 [404/427/1] test_ftplib failed (env changed) Warning -- Uncaught thread exception: Exception Exception in thread Thread-34: Traceback (most rece

[issue45060] Do not use the equality operators with None

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3c65457156d87e55010507d616b4eecb7a02883d by Serhiy Storchaka in branch 'main': bpo-45060: Get rid of few uses of the equality operators with None (GH-28087) https://github.com/python/cpython/commit/3c65457156d87e55010507d616b4eecb7a02883d --

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: > Would it be sufficient to hold a reference to the connection object? Yes. -- ___ Python tracker ___ ___

[issue45062] test_asyncio: test_huge_content_recvinto() failed on PPC64LE RHEL8 Refleaks 3.9

2021-08-31 Thread STINNER Victor
Change by STINNER Victor : -- title: test_asyncio: test_huge_content_recvinto() failed -> test_asyncio: test_huge_content_recvinto() failed on PPC64LE RHEL8 Refleaks 3.9 ___ Python tracker __

[issue45062] test_asyncio: test_huge_content_recvinto() failed

2021-08-31 Thread STINNER Victor
New submission from STINNER Victor : PPC64LE RHEL8 Refleaks 3.9: https://buildbot.python.org/all/#/builders/482/builds/128 test test_asyncio failed -- Traceback (most recent call last): File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-ppc64le.refleak/build/Lib/test/test_asyncio/test_sock_lo

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-08-31 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 08767c73b5bf1f28792d5fef7f41d52822a4989f by Zack Kneupper in branch 'main': bpo-44135: Refine explanation of how passing tuples to issubclass() behaves (GH-26193) https://github.com/python/cpython/commit/08767c73b5bf1f28792d5fef7f41d52822a4989f

[issue44135] issubclass documentation doesn't explain tuple semantic

2021-08-31 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +26534 pull_request: https://github.com/python/cpython/pull/28091 ___ Python tracker _

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-08-31 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26533 pull_request: https://github.com/python/cpython/pull/28090 ___ Python tracker ___ __

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: There was such bug in CPython stdlib, in the _testcapi module, see commit 310e2d25170a88ef03f6fd31efcc899fe062da2c of bpo-36854: commit 310e2d25170a88ef03f6fd31efcc899fe062da2c Author: Victor Stinner Date: Fri Nov 22 10:58:00 2019 +0100 bpo-36854: Fix

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-08-31 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26532 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28089 ___ Python tracker ___ __

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-08-31 Thread STINNER Victor
STINNER Victor added the comment: To reproduce the bug, apply attached os_uname_refcount_bug.patch and call os.uname(): --- $ ./python -c 'import os; os.uname()' (...) Fatal Python error: _PyMem_DebugRawFree: bad ID: Allocated using API '', verified using API 'o' (...) --- -- keyword

[issue45061] [C API] Detect refcount bugs on True/False in C extensions

2021-08-31 Thread STINNER Victor
New submission from STINNER Victor : Writing C extensions using directly the C API is error prone. It's easy to add or forget a Py_INCREF or Py_DECREF. Adding Py_DECREF(Py_True) or Py_DECREF(Py_False) by mistake causes a surprising crash at Python exit: --- Debug memory block at address p=0x8a

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-08-31 Thread Eryk Sun
Eryk Sun added the comment: I can't directly reproduce the problem. Does it reproduce reliably for you? My guess would be that there's a file open in "cpython-source-deps-zlib-1.2.11" when get_external.py tries to rename it to "zlib-1.2.11". Maybe an anti-malware scanner or content indexer h

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-08-31 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26531 pull_request: https://github.com/python/cpython/pull/28088 ___ Python tracker ___ ___

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > The state doesn't have a refcount, but it is owned by a module object, so > callback_context should own a reference to the module object. Would it be sufficient to hold a reference to the connection object? The connection holds a reference to the connec

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: New changeset 01dea5f12b31862999217c091399a318f23b460a by Petr Viktorin in branch 'main': bpo-42064: Offset arguments for PyObject_Vectorcall in the _sqlite module (GH-27931) https://github.com/python/cpython/commit/01dea5f12b31862999217c091399a318f23b460a

[issue45021] Race condition in thread.py

2021-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: As the multiprocessing doc says (https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods): """Note that safely forking a multithreaded process is problematic.""" The reproducer is trivially fixed by adding a call to `multiprocessing

[issue45021] Race condition in thread.py

2021-08-31 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.10, Python 3.11 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter

2021-08-31 Thread kftse
kftse added the comment: Tested 3.9.6 to have same behavior as 3.8.0. to clarify, I suppose legal merely means syntactically correct, not effect of "except AError or BError:" === "except (AError, BError)" right? -- ___ Python tracker

[issue44991] [sqlite3] cleanup callbacks (GIL handling, naming, ...)

2021-08-31 Thread miss-islington
miss-islington added the comment: New changeset 001ef4600f5ab2e1d7825ddbc0f253377c234d7e by Erlend Egeberg Aasland in branch 'main': bpo-44991: Make GIL handling more explicit in `sqlite3` callbacks (GH-27934) https://github.com/python/cpython/commit/001ef4600f5ab2e1d7825ddbc0f253377c234d7e

[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou
Change by Antoine Pitrou : -- type: behavior -> enhancement versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bug

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Thanks, good catch! I'll add that after PR 27934 is merged. -- ___ Python tracker ___ ___ Pyth

[issue27175] Unpickling Path objects

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Pickling Patch can be useful in multiprocessing, you can pass the Patch argument to function executed in other process. It can also be useful if you save the state of your program and restore it at the next start. In both cases you pickle and unpickle on t

[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I understand. Unpickling to PurePath might make enough sense indeed... -- ___ Python tracker ___ ___

[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I get the correct result (a ValueError traceback) in 3.9.6, I get a crash in 3.9.0. It was a bug in 3.9.0 which is now fixed. The syntax is legal. -- nosy: +serhiy.storchaka ___ Python tracker

[issue45021] Race condition in thread.py

2021-08-31 Thread 0x0L
0x0L added the comment: In the last reproducing example, one can drop the .result() and just submit the task: we're not waiting on any result explicitly. It's the shutdown of the ProcessPoolExecutor that waits forever for the children to exit. Generally speaking it's probably a bad idea to m

[issue27175] Unpickling Path objects

2021-08-31 Thread Antony Lee
Antony Lee added the comment: Despite the now well-known security limitations of pickle, it is still used as a simple way (from the user PoV) to exchange arbitrary Python objects (see e.g. https://joblib.readthedocs.io/en/latest/persistence.html). Such objects can sometimes include Paths as

[issue45060] Do not use the equality operators with None

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26530 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28087 ___ Python tracker ___

[issue45060] Do not use the equality operators with None

2021-08-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are few uses of operators "==" and "!=" with None in the stdlib (against more than 8000 uses of "is" and "is not"). It is very uncommon writing, contradicts PEP 8, and is not safe in general. One bug was found -- using "==" instead of assignment (i

[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: I guess the question is: why do people expect Paths to be picklable accross platforms? Is there a particular use case? -- ___ Python tracker ___

[issue45059] Typo: using "==" instead of "="

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26529 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28086 ___ Python tracker ___

[issue45059] Typo: using "==" instead of "="

2021-08-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : While searching for use the equality operator with None I found the possible use of "==" instead of "=" (assignment) in Lib/idlelib/idle_test/test_macosx.py. for platform, types in ('darwin', alltypes), ('other', nontypes): with self.s

[issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489)

2021-08-31 Thread Petr Viktorin
Petr Viktorin added the comment: Here's a gotcha you might not be aware of: `create_callback_context` stashes away a pointer to `state`. I don't think we can prove that the `state` will always outlive the callback_context after it'll become possible to deallocate the module The state doesn't

[issue27175] Unpickling Path objects

2021-08-31 Thread Antony Lee
Antony Lee added the comment: You are correct as to the meaning of "convert". The alternative approach you suggest would also work, but that seems to go much more against the design of pathlib to me. OTOH I guess it is up to Antoine to rule on that. -- _

[issue45058] Undefined behavior for syntax "except AError or BError:" accepted by interpreter

2021-08-31 Thread kftse
New submission from kftse : Test case: try: raise TypeError() except TypeError or ValueError: print("OK") try: raise ValueError() except TypeError or ValueError: print("OK") Output: (Python 3.9.0) OK OK # seem to eventually lead to segmentation fault elsewhere (Python 3.8.0) OK

[issue45012] DirEntry.stat method should release GIL

2021-08-31 Thread uosiu
Change by uosiu : -- keywords: +patch pull_requests: +26528 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28085 ___ Python tracker ___ __

[issue27175] Unpickling Path objects

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that you mean that PosixPath will be converted to PurePosixPath on Windows, and WindowsPath will be converted to PureWindowsPath on Posix. In can be easily achieved by making alias PosixPath=PurePosixPath on Windows and WindowsPath=PureWindowsPath

[issue34135] The results of time.tzname print broken.

2021-08-31 Thread Irit Katriel
Irit Katriel added the comment: issue16322 was closed as a duplicate of issue36779 which was fixed. Does that resolve this problem as well? -- nosy: +iritkatriel ___ Python tracker _

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docs lie)

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyNumber_Index() now always returns an instance of int. - If the argument is a direct int then return it. - If it is a subclass of int then return a direct int copy. - Otherwise call type(obj).__index__(obj) - If a direct int, return it - If a subclass of in

[issue27175] Unpickling Path objects

2021-08-31 Thread Antony Lee
Antony Lee added the comment: It means the Path/PurePath that would be constructed with the same single str parameter, or equivalently that has the same os.fspath(). -- ___ Python tracker __

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-31 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks for the report, Jesse, and Diana for the fix! ✨ 🍰 ✨ -- nosy: +lukasz.langa resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-31 Thread miss-islington
miss-islington added the comment: New changeset 1d0c5596142eeb35fea172c3642e23aeca128f5d by Miss Islington (bot) in branch '3.10': bpo-44925: [docs] Fix confusing deprecation notice for typing.IO (GH-28004) https://github.com/python/cpython/commit/1d0c5596142eeb35fea172c3642e23aeca128f5d --

[issue27175] Unpickling Path objects

2021-08-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: What does "converting" mean in this context? -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-31 Thread Ken Jin
Ken Jin added the comment: New changeset edae42f99f8153b92ccf365dbd1c2fa954f913b4 by DonnaDia in branch 'main': bpo-44925: [docs] Fix confusing deprecation notice for typing.IO (GH-28004) https://github.com/python/cpython/commit/edae42f99f8153b92ccf365dbd1c2fa954f913b4 -- _

[issue44925] [docs] Confusing deprecation notice for typing.IO

2021-08-31 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +26527 pull_request: https://github.com/python/cpython/pull/28084 ___ Python tracker _

[issue27175] Unpickling Path objects

2021-08-31 Thread Antony Lee
Change by Antony Lee : -- keywords: +patch pull_requests: +26526 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28083 ___ Python tracker ___ _

[issue45055] Fresh build on Windows fails the first time for zlib.c

2021-08-31 Thread Steve Dower
Steve Dower added the comment: This looks like a typical "lingering open handle" issue, though I can't tell whether it's in the destination or the source. Probably just needs a bit of retry logic (personally I'd be fine putting in CPython itself, though that doesn't help this build which is

[issue37719] addSubtest not calling addFailure and addError

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> unittest subTest does not call addFailure ___ Python tracker __

[issue25894] unittest subTest failure causes result to be omitted from listing

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 28082 is a draft that implements this idea. Skipped and failed (but not successfully passed) subtests are now reported separately, as a character (sFE) or a line ("skipped", "FAIL", "ERROR"). The description of the subtest is included in the line. For e

[issue45036] turtle.onrelease() event doesn't get triggered sometimes

2021-08-31 Thread Techn010 Je11y
Techn010 Je11y added the comment: I tried EP's fix. Sometimes it doesn't pendown when I drag, and only does when I stop moving my mouse for a moment(or just release). -- ___ Python tracker _

[issue25894] unittest subTest failure causes result to be omitted from listing

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26525 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/28082 ___ Python tracker

[issue45057] Simplify RegressionTestResult

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45057] Simplify RegressionTestResult

2021-08-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: RegressionTestResult was introduced in issue34582. -- nosy: +ezio.melotti, michael.foord, rbcollins, steve.dower, vstinner ___ Python tracker _

[issue45057] Simplify RegressionTestResult

2021-08-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28081 ___ Python tracker ___

[issue45057] Simplify RegressionTestResult

2021-08-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : RegressionTestResult is a subclass of TextTestResult, but it completely ignores the TextTestResult function of outputting results and re-implements it. The problem of this is not only duplicating the code, but that if TextTestResult is changed (for examp

[issue45054] json module should issue warning about duplicate keys

2021-08-31 Thread Kevin Mills
Kevin Mills added the comment: Sorry to the people I'm pinging, but I just noticed the initial dictionary in my example code is wrong. I figured I should fix it before anybody tested it and got confused about it not matching up with my description of the results. It should've been: import j

[issue44394] [security] CVE-2013-0340 "Billion Laughs" fixed in Expat >=2.4.0: Update vendored copy to expat 2.4.1

2021-08-31 Thread Ned Deily
Ned Deily added the comment: PRs merged in 3.7 branch for release in 3.7.12 and in 3.6 branch for release in 3.6.15. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

<    1   2