[issue38004] Duplicated sections in changelog

2019-09-02 Thread Inada Naoki
New submission from Inada Naoki : See TOC in https://docs.python.org/3.7/whatsnew/changelog.html Some releases (*) have multiple "Library" and "Security" sections. (*) e.g. 3.6.0a3, 3.6.0a2, 3.6.0a1, 3.5.3rc1, 3.5.2rc1 -- assignee: docs@python components: Documentation messages: 35097

[issue38004] Duplicated sections in changelog

2019-09-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue36946] Possible signed integer overflow in slice handling

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

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

2019-09-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Is it correct that strings, bytes objects, bytearrays, floats, fractions, decimals can be coerced to an interpreter ID? >>> import _xxsubinterpreters as interpreters >>> id = interpreters.InterpreterID('10', force=True) >>> id == 10 True >>> id == 10.1 Tr

[issue37948] get_type_hints fails if there are un-annotated fields in a dataclass

2019-09-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It looks like https://github.com/python/cpython/pull/9518 will fix also this one. -- nosy: +levkivskyi ___ Python tracker ___ _

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

2019-09-02 Thread Christian Heimes
New submission from Christian Heimes : I have a case of a segfault on Fedora 32 (currently rawhide) with Python 3.8b4 and FreeIPA. The ipactl Python helper crashes with a segfault when the Python process exits. The segfault occurs in _PyFunction_Vectorcall() with a weakref related local scope

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

2019-09-02 Thread Petr Viktorin
Petr Viktorin added the comment: I don't understand how the function ended up with func_code=NULL. That shouldn't be a valid function to call, IMO. Do you have any info on how the function ended up in that state? -- ___ Python tracker

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

2019-09-02 Thread Christian Heimes
Christian Heimes added the comment: Not yet. My current hypothesis is the function code object is already cleaned up *somehow*. -- ___ Python tracker ___ ___

[issue36309] Remove tempfile.mktemp()

2019-09-02 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +15306 pull_request: https://github.com/python/cpython/pull/15640 ___ Python tracker ___ ___

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

2019-09-02 Thread Leslie
New submission from Leslie : In Feb 20, 2006, in commit https://github.com/python/cpython/commit/c255c7bef7621596869f56d887ac3ccd5b536708 the bug https://bugs.python.org/issue1086854 had been fixed. In Dec 3, 2010, in commit https://github.com/python/cpython/commit/4d0d471a8031de90a2b1ce99c4

[issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin)

2019-09-02 Thread Alexandru Ardelean
Alexandru Ardelean added the comment: ping here :) any thoughts/feedback? the fix looks interesting, and I'm also interested in seeing a resolution for this -- nosy: +Alexandru Ardelean ___ Python tracker

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

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: > By contrast, returning a plain tuple from `isocalendar()` is the easier *and* > more performant thing to do, and given that any benefits seem marginal I'm > against the switch. Does someone have benchmark numbers? If we go with structseq, creating a new i

[issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class

2019-09-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Maybe any upcoming python version could store this information in __local__ ? > So maybe we could clone this ticket to the python core in order to address > this? I would say it is a too big change, and it is unlikely to happen only for the reason like t

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: > I don't understand how the function ended up with func_code=NULL. That > shouldn't be a valid function to call, IMO. Do you have any info on how the > function ended up in that state? It doesn't seem possible to create a function with func_code=NULL, nor t

[issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class

2019-09-02 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- Removed message: https://bugs.python.org/msg350980 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class

2019-09-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: (Sorry for typos, fixed now.) > Maybe any upcoming python version could store this information in __local__ ? > So maybe we could clone this ticket to the python core in order to address > this? I would say it is a too big change, and it is unlikely to hap

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

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

[issue38006] _PyFunction_Vectorcall() can segfault on process exit

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: Using gdb, I checked if func_clear() can be cleared outside func_dealloc(): yes, delete_garbage() (gcmodule.c) calls type->clear(). But I'm surprised that the function would be seen as "unreachable" if it's reference counter was equal to 135: (gdb) print fu

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

2019-09-02 Thread STINNER Victor
Change by STINNER Victor : -- title: _PyFunction_Vectorcall() can segfault on process exit -> Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit ___ Python tracker __

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

2019-09-02 Thread Mark Dickinson
Mark Dickinson added the comment: Urk! Having `10 == id == 10.1` should imply `10 == 10.1`, by transitivity. Are interpreter.InterpreterID objects hashable? If so, we've got a violation of the rule that `x == y` implies `hash(x) == hash(y)`. -- nosy: +mark.dickinson

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2019-09-02 Thread Orivej Desh
Change by Orivej Desh : -- nosy: +orivej ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

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

2019-09-02 Thread STINNER Victor
STINNER Victor added the comment: (gdb) print ((PyFunctionObject*)func).func_qualname $29 = 'WeakValueDictionary.__init__..remove' This is a temporary remove() function declared in weakref.WeakValueDictionary constructor: class WeakKeyDictionary(_collections_abc.MutableMapping): def __i

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

2019-09-02 Thread Dong-hee Na
Dong-hee Na added the comment: @vstinner == baseline == ./python.exe -m timeit -r11 -s 'import datetime' -s 'a = datetime.datetime.now().isocalendar()' 5000 loops, best of 11: 8.73 nsec per loop == proposed == ./python.exe -m timeit -r11 -s 'import datetime' -s 'a = datetime.datetime.no

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

2019-09-02 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +15307 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15641 ___ Python tracker __

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

2019-09-02 Thread Divij Rajkumar
Change by Divij Rajkumar : -- nosy: divijrajkumar priority: normal severity: normal status: open title: ContextManager and AsyncContextManager protocols can't be subclassed type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _

[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 don't understand why/how remove() gets a closure. Ok, I found the reason and I wrote PR 15641 to fix it. Previous fix of WeakValueDictionary remove() function: commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6 Author: Łukasz Langa Date: Fri Feb 10 00:14

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

2019-09-02 Thread Divij Rajkumar
New submission from Divij Rajkumar : Reported this initially on github - https://github.com/python/typing/pull/650 The problem is in the typing code that checks if any of the parent classes for a Protocol are builtin protocols. The code today maintains a whitelist of builtin protocols that ar

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

2019-09-02 Thread Divij Rajkumar
Divij Rajkumar added the comment: I'd like to take a stab at putting up a patch for this but I've never contributed anything to Python before, so I'll have a read through the contribution docs and put up a PR. -- ___ 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: Your workaround solves the segfault issue for me. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue37969] urllib.parse functions reporting false equivalent URIs

2019-09-02 Thread Géry
Change by Géry : -- keywords: +patch pull_requests: +15308 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15642 ___ Python tracker ___

[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 : -- nosy: +pablogsal, pitrou ___ 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 Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think the real problem is in vectorcall. tp_clear will make sure all internal pointers are either NULL or valid (by using Py_CLEAR, which also protects against re-entrancy) and it the responsibility of the object or its users to check that the fields

[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 particular, this was not happening before because the function type did not implement tp_clear: https://github.com/python/cpython/blob/3.7/Objects/funcobject.c#L615 The new implementation of tp_clear without checks is allowing this to happen.

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailin

[issue33418] Memory leaks in functions

2019-09-02 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This change introduced the possibility to have function objects in an inconsistent state. For example, when calling tp_clear on the function some code must be invoked that tries to ca the function but some fields are NULL causing a crash. I think we

[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 ___ __

[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 c

[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 particula

[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: ht

[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 (GH-805

[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

[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 ___ __

[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 ___ _

[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 isolate

[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
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: 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 prop

[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

[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
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +15312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15646 ___ 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) alr

[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 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 *

[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 -

[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 ___ __

[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 ___

[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 ___

[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 ___

[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 ___ ___

[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 act

[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

[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 co

[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 possib

[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) https://github.com/python/cpython/commit/e1786b54162e2bfb01ca5aafa19d596c

[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, https://bitbucket.org/cffi/cffi/src/bf80

[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 ___ _

[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) https://github.com/python/cpython/commit/bf69e160c431dc40

[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) https://github.com/python/cpython/commit/b365cfae4675ae90

[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 GC

[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 node

[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 PyObject_

[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 ___ _

[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

[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: https://mail.pyth

[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

[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 Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[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: https://mail

[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 _

[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
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 : -- components: +Interpreter Core type: -> behavior versions: +Python 3.8, Python 3.9 ___ Python tracker ___ __

[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 ___ _

[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 s

[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: norma

[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 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 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 report.

[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 action_tuples.append((act

[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: >

[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 t

[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: https://mail.py

[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'

[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 _

[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) https://github.com/python/cpython/commit/ebe709dc1d7c1f9f07dc7d77e

[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

[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 h

[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 (func=0x7f

  1   2   >