[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37768] IDLE: Show help(object) output in a text viewer

2019-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I should have said, 'who disable autosqueeze'. Anyway, an option to disable help autoview will make me more comfortable adding it. A similar change would be to add 'Squeeze & View' to the context menu. -- ___

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread miss-islington
miss-islington added the comment: New changeset 1c18aec3bb7d59061742854d3204439a5274e201 by Miss Islington (bot) in branch '3.8': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/1c18aec3bb7d59061742854d3204439a5274e201 --

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread miss-islington
miss-islington added the comment: New changeset 48058050cee5f6600150392100c162f223b4317f by Miss Islington (bot) in branch '3.7': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/48058050cee5f6600150392100c162f223b4317f --

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: To decide whether I agree that a live delay test is needed would take time and energy currently better applied to other issues. Since the 2nd PR reduces net test time, and should be at least as good in avoiding spurious failures, I am merging it now. If I

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: oh, sorry, pls ignore it. I misunderstand your opinion. -- type: crash -> behavior ___ Python tracker ___

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +15325 pull_request: https://github.com/python/cpython/pull/15658 ___ Python tracker ___

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 132acaba5a7f01373ca624b1a5975b190fe866f5 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/132acaba5a7f01373ca624b1a5975b190fe866f5

[issue35771] IDLE: Fix tooltip Hovertiptest failure

2019-09-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +15324 pull_request: https://github.com/python/cpython/pull/15657 ___ Python tracker ___

[issue37768] IDLE: Show help(object) output in a text viewer

2019-09-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: For myself, I only want this for 'large' outputs. I prefer something like the following left alone. >>> help('continue') The "continue" statement continue_stmt ::= "continue" "continue" may only occur syntactically nested in a

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
Change by hai shi : -- pull_requests: +15323 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15656 ___ Python tracker ___

[issue38004] Duplicated sections in changelog

2019-09-02 Thread Ned Deily
Ned Deily added the comment: Ah, some further insight: I realized that the original docset for 3.5.2 is available in the documentation archive. Comparing the (pre-blurb) changelog from the original release to its current state:

[issue38004] Duplicated sections in changelog

2019-09-02 Thread Ned Deily
Ned Deily added the comment: I'm not sure what happened here or why we haven't noticed it before. For example, it appears that the consolidated blurb file for the earliest example, 3.5.2rc1.rst, has not been modified since its original blurbification (in

[issue37980] regression when passing numpy bools to sorted(..., reverse=r)

2019-09-02 Thread Ralf Gommers
Change by Ralf Gommers : -- nosy: +ralf.gommers ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37934] Docs: Clarify NotImplemented use cases

2019-09-02 Thread Vedran Čačić
Vedran Čačić added the comment: Of course, languages evolve. Annotations were introduced just for function arguments, now we use them almost everywhere. Generators were simply loop managers, now they've blown up to complete asynchronous programming beasts. Ellipsis was introduced for easier

[issue21315] email._header_value_parser does not recognise in-line encoding changes

2019-09-02 Thread Ashwin Ramaswami
Change by Ashwin Ramaswami : -- pull_requests: +15322 pull_request: https://github.com/python/cpython/pull/15655 ___ Python tracker ___

[issue37934] Docs: Clarify NotImplemented use cases

2019-09-02 Thread Kyle Stanley
Kyle Stanley added the comment: Thanks for the explanation. > Of course, you might argue that _once Python has NotImplemented_, it can be > used elsewhere - but as I said, I don't think it should be encouraged. Hmm, okay. My understanding of Raymond's explanation was more so "let's not

[issue38015] inline function generates slightly inefficient machine code

2019-09-02 Thread Ma Lin
Ma Lin added the comment: There will always be a new commit, replacing with a macro version also looks good. I have no opinion, both are fine. -- ___ Python tracker ___

[issue37764] email.Message.as_string infinite loop

2019-09-02 Thread Ashwin Ramaswami
Change by Ashwin Ramaswami : -- pull_requests: +15321 pull_request: https://github.com/python/cpython/pull/15654 ___ Python tracker ___

[issue38015] inline function generates slightly inefficient machine code

2019-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do you see a way to salvage the commit? If not, I'm fine with reverting it. Its benefit was only aesthetic. -- assignee: -> rhettinger ___ Python tracker

[issue38014] Python 3.7 does not compile

2019-09-02 Thread Ned Deily
Ned Deily added the comment: When building a default 64-bit-only Python on current MacOS systems, don't use the --enable-universalsdk (and --with-universal-arch) options to ./configure since system header files are no longer installed in /usr/include. Be aware that you may have to supply

[issue38015] inline function generates slightly inefficient machine code

2019-09-02 Thread Ma Lin
New submission from Ma Lin : Commit 5e63ab0 replaces macro with this inline function: static inline int is_small_int(long long ival) { return -NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS; } (by default, NSMALLNEGINTS is 5, NSMALLPOSINTS is 257) However, when

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Why did you switch back to "crash"? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue38014] Python 3.7 does not compile

2019-09-02 Thread Daniel
New submission from Daniel : Hi, I use macOS Catalina 10.15. I use Xcode 10 and Xcode 11, but with that configuration, compiling Python 3.7.14 does not work for me. Any idea whats causing this issue? user@Users-MacBook-Pro Python-3.7.4 % ./configure --with-framework-name=python36

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: Thanks, Raymond. This patch not a formal patch, just show what i want to do. if everything agree this behavior, I would add a normal PR. -- type: behavior -> crash ___ Python tracker

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, raising an uncaught exception isn't what we normally consider a "crash". We typically save that designation for segfaults. Ideally, a good patch/pr will also have tests. Also, given the rarity of the exception, I would be reserved about

[issue24416] Have date.isocalendar() return a structseq instance

2019-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: What IS unprecedented is having a C function bend over backwards to return an instance of collections.namedtuple(). The only case I know of is with functools.lru_cache() and it was done there because we didn't really have a choice -- there was a

[issue24416] Have date.isocalendar() return a structseq instance

2019-09-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, most things in Python that return a structseq previously returned a tuple (for example, time.localtime() and sys.version_info). This is not an unprecedented upgrade to improve the repr and provide access by field name in addition to positional

[issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine")

2019-09-02 Thread Michael Yoo
New submission from Michael Yoo : Version: Python 3.7.3 When I run this code: import asyncio class TestAsyncGenerator: def __init__(self): pass async def aiter(self): yield 1 yield 2 async def main(): gen = TestAsyncGenerator() async for number in

[issue37969] urllib.parse functions reporting false equivalent URIs

2019-09-02 Thread Géry
Géry added the comment: @nicktimko Thanks for the historical track. Here is a patch that solves this issue by updating the `urlsplit` and `urlunsplit` functions of the `urllib.parse` module to keep the '?' and '#' delimiters in URIs if present, even if their associated component is empty, as

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Christian Heimes
Change by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: > * A and CB are seen as unreachable by the GC Oh, that's not correct: * Only CB is seen as unreachable by the GC * The GC "clears" CB which makes CB inconsistent (tp_clear) * A is deleted indirectly * Deleting A calls CB through the weak reference to A The

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: This bug is quite complex. Let me try to explain it more simply. * Create an object A * Create a weak reference to A with a callback CB * A and CB are part of a reference cycle * Removing the last references to A and CB are not enough to destroy them *

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: > Another issue is that the GC doesn't prevent the crash. Would it be possible > to prevent the crash without changing the behavior (ex: still call weakref > callbacks)? I discussed with Pablo and it doesn't seem possible to prevent to clear a function if

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: > Another issue is that the GC doesn't prevent the crash. Would it be possible > to prevent the crash without changing the behavior (ex: still call weakref > callbacks)? Pablo opened bpo-38009 with a PR. I'm not sure if his PR is correct or not yet.

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: For the record, here is an annotated traceback of a FreeIPA crash. PyGC_list_contains() is a hack that I wrote to check if an object was in the unreachable argument of delete_garbage(). (gdb) where #0 0x00434b78 in _PyFunction_Vectorcall

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: I investigated the FreeIPA crash. * Python 3.8 behaves differently because func_clear() has been implemented (bpo-33418, commit 3c452404ae178b742967589a0bb4a5ec768d76e0) * The bug is a crash on a function call (_PyFunction_Vectorcall) because the function

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg351022 ___ Python tracker ___ ___ Python-bugs-list

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset ebe709dc1d7c1f9f07dc7d77e53674d2500b223e by Jason R. Coombs (Anthony Sottile) in branch '3.7': bpo-36853: Fix suspicious.py to actually print the unused rules (#13579) (#15653)

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: Adding a judgment of explicit_args in judgment statement in the patch. -- keywords: +patch Added file: https://bugs.python.org/file48582/parse_v1.patch ___ Python tracker

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Tim Peters
Tim Peters added the comment: > Also, THE min("Infinity") is priniting "I". Practically, > the minimum value is "e" right ? Sorry, I have no idea what "practically" means to you. It's just a fact that all uppercase ASCII letters compare less than all lowercase ASCII letters: >>> 'I' < 'e'

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Pavan Kumar Uppalanchu
Pavan Kumar Uppalanchu added the comment: Hello Karthikeyan, Thank you very much for your valuable explanation. Regards, Pavan Uppalanchu On Mon, Sep 2, 2019 at 11:28 PM Karthikeyan Singaravelan wrote: > > > Karthikeyan Singaravelan added the comment: > > Here min uses the ASCII value of

[issue28747] Expose SSL_CTX_set_cert_verify_callback

2019-09-02 Thread David Peall
Change by David Peall : -- nosy: +David Peall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Pavan Kumar Uppalanchu
Pavan Kumar Uppalanchu added the comment: Hello Tim, Thanks for your quick response. Also, THE min("Infinity") is priniting "I". Practically, the minimum value is "e" right ? Regards, Pavan Uppalanchu On Mon, Sep 2, 2019 at 11:31 PM Tim Peters wrote: > > > Tim Peters added the comment:

[issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action

2019-09-02 Thread hai shi
hai shi added the comment: I do something such as: p = argparse.ArgumentParser() p.add_argument('-a', action='store_true') p.add_argument('-b', action='store_true') p.parse_args('-ab='.split()) thos code code jump in 1903, and the explicit_arg's value is: 'b=' 1901

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Tim Peters
Tim Peters added the comment: This has nothing in particular do with `min()`. As strings, 'I' < 'i', and 'F' < 'I'. For example, >>> 'I' < 'i' True >>> sorted("InFinity") ['F', 'I', 'i', 'i', 'n', 'n', 't', 'y'] That's all working as intended and as documented, so I'm closing this

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Here min uses the ASCII value of the letters for comparison. So for 'Infinity' 'I' (73) has the lowest value and for 'inFinity' 'F' (70) has the lowest value as seen below. >>> list(map(lambda c: (c, ord(c)), 'Infinity')) [('I', 73), ('n', 110),

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Pavan Kumar Uppalanchu
Pavan Kumar Uppalanchu added the comment: when I try to print min('Infinity') and min (InFinity). In first case, it's printing 'I' and in second case it's printing 'F'. Is this issue or working as Is ? -- ___ Python tracker

[issue38012] Python Fuction min is case sentive ?

2019-09-02 Thread Pavan Kumar Uppalanchu
New submission from Pavan Kumar Uppalanchu : I have printed min('Infinity') and min('infinity') . Both are printing different characters. In first case , It's printing 'I' and in second case, it's printing 'F' -- messages: 351027 nosy: uppalanchupavankuma...@gmail.com priority:

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Stefan Behnel
Stefan Behnel added the comment: I don't see anything inherently wrong with having multiple text nodes. In fact, input with very large text content can be considered a security threat (c.f. compression bombs), so a tool like pulldom (which is designed for incremental processing) should not

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +15320 pull_request: https://github.com/python/cpython/pull/15653 ___ Python tracker ___

[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core type: -> behavior versions: +Python 3.8, Python 3.9 ___ Python tracker ___

[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 15652 fixes some bugs. But I am not sure that floats and strings (and bytearrays, and fractions) should be accepted in constructors and several other functions. Although there was a test for strings. What is a use case? Should not an ID be an integer?

[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +15319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15652 ___ Python tracker

[issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID

2019-09-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Coercing strings and non-integer numbers to interpreter ID -> Coercing strings and non-integer numbers to interpreter ID and channel ID ___ Python tracker

[issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value

2019-09-02 Thread Dong-hee Na
Change by Dong-hee Na : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value

2019-09-02 Thread Dong-hee Na
Change by Dong-hee Na : -- keywords: +patch pull_requests: +15318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15651 ___ Python tracker ___

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Noam Sturmwind
Noam Sturmwind added the comment: I believe this is working as intended, but is potentially surprising behavior. If so, perhaps a note could be added to the xml.dom documentation mentioning that this needs to be accounted for. Per https://stackoverflow.com/a/317494 a correct way to read the

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Noam Sturmwind
Noam Sturmwind added the comment: Note that the parser handles it correctly if the buffer boundary lies in the middle of a tag name; only if it lies in the middle of text data does it result in this behavior. -- ___ Python tracker

[issue37953] Fix ForwardRef equality checks

2019-09-02 Thread hongweipeng
Change by hongweipeng : -- pull_requests: +15317 pull_request: https://github.com/python/cpython/pull/15650 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Wait, I just checked and the call is done manually: static void ctypedescr_dealloc(CTypeDescrObject *ct) { PyObject_GC_UnTrack(ct); if (ct->ct_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) ct); I am not sure call to

[issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file

2019-09-02 Thread Noam Sturmwind
New submission from Noam Sturmwind : Python 3.7.4 When parsing a file using xml.dom.pulldom.parse(), if the parser is in the middle of text data when default_bufsize is reached it will split the text into multiple DOM Text nodes. This breaks code expecting that reads the text data using

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: For the weakref to be handled correctly the ctypedescr needs to be identified correctly as part of the isolated cycle. If is not in the isolated cycle something may be missing tp_traverse or the GC flags. Can you check if the ctypedescr is part of

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset b365cfae4675ae90df329cb1179a5664e8283c13 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-36853: Fix suspicious.py to actually print the unused rules (GH-13579) (GH-15649)

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset bf69e160c431dc40d6530d427cec71c6a97522f5 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) (GH-15648)

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Christian Heimes
Christian Heimes added the comment: The biggest CFFI based dependency of FreeIPA is cryptography, but cryptography does not use weakref in its sources. CFFI on the other hand has a WeakValueDictionary object attached to its internal typecache backend,

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +15316 pull_request: https://github.com/python/cpython/pull/15649 ___ Python tracker ___

[issue36853] inconsistencies in docs builds (Sphinx 2)

2019-09-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset e1786b54162e2bfb01ca5aafa19d596c4af5a803 by Jason R. Coombs (Anthony Sottile) in branch 'master': bpo-36853: Fix suspicious.py to actually print the unused rules (#13579)

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Unless we are missing something I think this may be caused by something in cffi that is not implementing gc-related functions correctly, as PyObject_ClearWeakRefs should not be called from a gc run. Given how complicated this is and even if the

[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2019-09-02 Thread Xiang Zhang
Xiang Zhang added the comment: >It may be better to apply it even to the developed version. There is nothing >wrong with creating the tee iterator in one thread and using it the other >thread. Or using the tee iterators with external locking. I afraid that PR >15567 can break a legitimate

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am going to re-close this until we understand exactly how this is interacting with https://bugs.python.org/issue38006 as this seems more complicated than our first hypothesis. -- resolution: -> fixed status: open -> closed

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think the problem is that whatever is weak-referenced by the weak ref (CField_Type or similar) is not on the gc list. Because is not on the gc list, handle_weakrefs (https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L1090) is not

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think I am going to close this until we understand https://bugs.python.org/issue38006 better -- ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Petr Viktorin
Petr Viktorin added the comment: The traceback does have some ctypedescr_dealloc and cfield_dealloc from _cffi. Could you check what those are? -- ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Christian Heimes
Christian Heimes added the comment: It's going to be hard to figure that out. FreeIPA uses a ton of C extensions. Some are hand-written, some uses Cython, ctypes, and cffi. -- ___ Python tracker

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +15315 pull_request: https://github.com/python/cpython/pull/15648 ___ Python tracker ___

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset 102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5 by Jason R. Coombs in branch 'master': bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) https://github.com/python/cpython/commit/102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: The more I think about this the more I think there is something else at play. If the GC is able to follow the dependency chain, all weakrefs should have been already managed correctly and PyObject_ClearWeakRefs should have never be invoked. I think

[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Divij Rajkumar
Change by Divij Rajkumar : -- keywords: +patch pull_requests: +15313 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15647 ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Petr Viktorin
Petr Viktorin added the comment: > What downsides do we see raising an exception? Yeah, on second thought, that would probably be best. We still want PR #15641 as well, so the exception doesn't actually happen in practice. Note that _PyEval_EvalCodeWithName (the main use of func_globals)

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +15312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15646 ___ Python tracker ___

[issue37934] Docs: Clarify NotImplemented use cases

2019-09-02 Thread Vedran Čačić
Vedran Čačić added the comment: Sorry, I think you still don't understand. The emulation of double dispatch by single dispatch, with all complications it brings, is the only reason NotImplemented exists. If Python didn't have binary operators (or inheritance), I'm quite sure it wouldn't have

[issue38010] Synchronize importlib.metadata with importlib_metadata 0.20

2019-09-02 Thread Jason R. Coombs
New submission from Jason R. Coombs : Importlib_metadata 0.20 addresses two issues (https://importlib-metadata.readthedocs.io/en/latest/changelog%20(links).html#id1). Sync those changes here. -- components: Library (Lib) messages: 351004 nosy: jaraco priority: normal severity: normal

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Check https://bugs.python.org/issue38006 for reference on this situation. I have the suspicion that something in this argument is wrong and the problem of arriving in this situation may be elsewhere, but I wanted to create this issue and show the

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +15310 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15645 ___ Python tracker

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Antoine, could you check that I am not missing something in this logic? -- ___ Python tracker ___

[issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection

2019-09-02 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : A weak reference may try to invoke a callback object that is being cleaned (tp_clear) by the garbage collector and it may be in an inconsistent state. As the garbage collector explicitly does not invoke callbacks that are part of the same cycle

[issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro

2019-09-02 Thread Leslie
Change by Leslie : -- keywords: +patch pull_requests: +15309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15644 ___ Python tracker ___

[issue38008] ContextManager and AsyncContextManager protocols can't be subclassed

2019-09-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > I'd like to take a stab at putting up a patch for this Great, thanks! Go ahead and try it. -- nosy: +levkivskyi ___ Python tracker ___

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: In https://bugs.python.org/issue33418 I proposed reverting tp_clear on function objects. >What should be done when a function with func_code=NULL is called? We can set the error indicator at least. Although I agree that it seems suboptimal. At least

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: PyFunction_Type.tp_clear changed in bpo-33418 (previously, it was equal to 0: no clear method): commit 3c452404ae178b742967589a0bb4a5ec768d76e0 Author: INADA Naoki Date: Wed Jul 4 11:15:50 2018 +0900 bpo-33418: Add tp_clear for function object

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: I'm now able to reproduce the FreeIPA crash. In short: * Get a Fedora Rawhide VM (to get Python 3.8 as "python3", it's more convenient) * Install FreeIPA (dnf install freeipa-server) * Run: ipa-server-install --help * Python does crash at exit > In

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Petr Viktorin
Petr Viktorin added the comment: I'm not sure adding a check would solve this. What should be done when a function with func_code=NULL is called? "Silently do nothing" is not really an option; raising an exception wouldn't help much in this case. I wonder if a function's tp_clear we should

[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue33418 as the potential source of the problem. -- ___ Python tracker ___

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue38006 -- resolution: -> fixed ___ Python tracker ___

  1   2   >