[issue39075] types.SimpleNamespace should preserve attribute ordering (?)

2019-12-21 Thread hai shi
hai shi added the comment: IMHO, dropping the sort should be a default behavior. If some user need this feature, maybe we could supply a param to open the sort function or not? -- nosy: +shihai1991 ___ Python tracker

[issue39071] email.parser.BytesParser - parse and parsebytes work not equivalent

2019-12-21 Thread Abhilash Raj
Change by Abhilash Raj : -- nosy: +maxking ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-12-21 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-21 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: If there is a large chunk (e.g. several MBs), dropping the GIL during the memcpy of that chunk may be beneficial. This kind of optimization may be applicable in other similar cases (such as extending a bytearray or a BytesIO object). -- nosy: +pitr

[issue36051] Drop the GIL during large bytes.join operations?

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you show evidences that dropping the GIL can help you? bytes.join() needs to perform operations which needs to hold the GIL (allocating the memory, iterating the list, getting the data of bytes-like objects). I afraid that the cost of memcpy() is a m

[issue36476] Runtime finalization assumes all other threads have exited.

2019-12-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 1. Python daemon threads I think the answer is to document a bit more clearly that they can pose all kinds of problems. Perhaps we could even display a visible warning when people create daemon threads. > 2. Python threads created in atexit handlers We

[issue39117] Performance regression for making bound methods

2019-12-21 Thread Raymond Hettinger
New submission from Raymond Hettinger : $ python3.9 -m timeit -r 11 -s 'class A: pass' -s 'A.m = lambda s: None' -s 'a = A()' 'a.m; a.m; a.m; a.m; a.m' 100 loops, best of 11: 230 nsec per loop $ python3.8 -m timeit -r 11 -s 'class A: pass' -s 'A.m = lambda s: None' -s 'a = A()' 'a.m; a.m;

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue36788] Add clamp() function to builtins

2019-12-21 Thread Batuhan
Batuhan added the comment: Should this issue stay? Maybe port this discussion over python-ideas and after the resolution open it again? -- nosy: +BTaskaya ___ Python tracker

[issue29732] Heap out of bounds read in tok_nextc()

2019-12-21 Thread Batuhan
Batuhan added the comment: (.venv) [ 10:04ÖS ] [ isidentical@x200:~/Downloads ] $ python -V Python 3.9.0a1+ (.venv) [ 10:04ÖS ] [ isidentical@x200:~/Downloads ] $ python python_hoobr_tok_nextc.py File "/home/isidentical/Downloads/python_hoobr_tok_nextc.py", line 5 ^ SyntaxError: E

[issue39087] [C API] No efficient C API to get UTF-8 string from unicode object.

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I like this idea, but I think that we should at least notify Python-Dev about all additions to the public C API. If somebody have objections or better idea, it is better to know earlier. -- ___ Python tracker <

[issue34444] Module's __file__ should be absolute always ("." in sys.path)

2019-12-21 Thread Batuhan
Batuhan added the comment: I am not sure about computing absolute path every time when `__file__` called. I guess it is a static thing, that get setted on the import time and never changes. What you are proposing is to compute it dynamically which IMHO isn't the best way. -- nosy: +

[issue32599] Add dtrace hook for PyCFunction_Call

2019-12-21 Thread Batuhan
Batuhan added the comment: If there are no objections, I can work on a patch. -- nosy: +BTaskaya, christian.heimes, vstinner ___ Python tracker ___ ___

[issue34850] Emit a syntax warning for "is" with a literal

2019-12-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It cannot be suppressed by the code in the module caused a warning, because the warning is emitted at compile time. You need to silence it before compiling that module. Once you have compiled it, warning will no longer be emitted. -- _

[issue39113] PyUnicode_AsUTF8AndSize Sometimes Segfaults With Incomplete Surrogate Pair

2019-12-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33772] Fix few dead code paths

2019-12-21 Thread Benjamin Peterson
Change by Benjamin Peterson : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue39116] StreamReader.readexactly() raises GeneratorExit on ProactorEventLoop

2019-12-21 Thread twisteroid ambassador
New submission from twisteroid ambassador : I have been getting these strange exception since Python 3.8 on my Windows 10 machine. The external symptoms are many errors like "RuntimeError: aclose(): asynchronous generator is already running" and "Task was destroyed but it is pending!". By ad

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Zachary Ware
Change by Zachary Ware : -- keywords: +3.9regression ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Looking at changes to alpha2 I think it bisects to https://github.com/python/cpython/pull/6641 ➜ cpython git:(5dcc06f6e0) git checkout fee552669f21ca294f57fe0df826945edc779090 && make -s -j4 > /dev/null Previous HEAD position was 5dcc06f6e0... bp

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue39115] Clarify Python MIME type

2019-12-21 Thread Josh de Kock
New submission from Josh de Kock : I'd like to add Python's MIME types to a database so that they can be properly used by other services. However, apart from the source code[1][2], I can't find any documentation from Python which highlights this. Is the source code correct here, and can it be

[issue39114] Python 3.9.0a2 changed how finally/return is traced

2019-12-21 Thread Ned Batchelder
New submission from Ned Batchelder : The way trace function reports return-finally has changed in Python 3.9.0a2. I don't know if this change is intentional or not. (BTW: I want to put a 3.9regression keyword on this, but it doesn't exist.) Consider this code: --- 8<

[issue39052] import error when in python -m pdb debug mode

2019-12-21 Thread Xavier de Gaye
Xavier de Gaye added the comment: As a workaround insert the following hard-coded breakpoint before the import statement and run your script with python, i.e. 'python myhome.py' instead of 'python -m pdb myhome.p'. from pdb import Pdb; Pdb(skip=['importlib*']).set_trace() -- nosy: +

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-21 Thread Tarn Yeong Ching
Tarn Yeong Ching added the comment: GOD... I see. Thank you very much! -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39110] UserList-subclass Tree slicing changes the original list unexpectedly

2019-12-21 Thread Mark Dickinson
Mark Dickinson added the comment: [ctarn] > it works as expected with Python 3.6 (the owner of each of them is d), and > Python 3.8 and Python 3.7 work differently The change in behaviour is the result of a bug fix that was applied in 3.7 and upwards: see GH-13169 and #27639. As Eric says,

[issue33961] Inconsistency in exceptions for dataclasses.dataclass documentation

2019-12-21 Thread Fabio Sangiovanni
Change by Fabio Sangiovanni : -- pull_requests: +17137 pull_request: https://github.com/python/cpython/pull/17677 ___ Python tracker ___ ___

[issue36000] __debug__ is a keyword but not a keyword

2019-12-21 Thread Batuhan
Batuhan added the comment: import builtins builtins.__dict__['__debug__'] = 'Surprise!' builtins.__dict__['None'] = 'Surprise!' print(__debug__) print(None) $ ./python ../t.py True None I guess this is related to Python/ast_opt.c transformation case Name_kind: if (_PyUnicode_Eq

[issue30905] Embedding should have public API for interactive mode

2019-12-21 Thread Batuhan
Batuhan added the comment: > (1) BUT: The value of 'a' is not printed Isn't this the expected behavior for file input? You need to call print() in order to get 'a' printed. > (2) This is OK! We run one statement at a time As it should be for "single input". > (3) This is NOT OK! Python th