[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: What do you mean by fixed? After deleting and remaking a pr_16545 branch, I see the same result for clipboard_get. -- ___ Python tracker __

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3142c667b50254daaa28f22c79bdda177136bd03 by Vinay Sajip (Ashley Whetter) in branch 'master': bpo-38235: Correct some arguments names in logging documentation (GH-16571) https://github.com/python/cpython/commit/3142c667b50254daaa28f22c79bdda177136bd

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +16168 pull_request: https://github.com/python/cpython/pull/16576 ___ Python tracker ___ __

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +16169 pull_request: https://github.com/python/cpython/pull/16577 ___ Python tracker ___ __

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the result of new tests? python.bat -m test -v -uall test_tk -m test_clipboard* -- ___ Python tracker ___

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 3af2733a8265a2685b2c0466a58a66e544a81c64 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16576) https://github.com/python/cpython/commit/3af2733a8265a2685b2c046

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 4f82a53c5d34df00bf2d563c2417f5e2638d1004 by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16577) https://github.com/python/cpython/commit/4f82a53c5d34df00bf2d563

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker ___ __

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Doug O'Riordan
New submission from Doug O'Riordan : Ran into Segfaults while trying to use pysnmp with 3.8.0rc1. The code is running fine on 3.8.0b04. $ python3.8 Python 3.8.0rc1 (default, Oct 2 2019, 14:15:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux Type "help", "copyright", "credits" or "license"

[issue38354] Fix for bug 30378 regressed SysLogHandler by making it resolve addresses at initialization instead of in `.emit()`

2019-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: This could perhaps be handled by just swallowing errors in the constructor (as is done for Unix sockets, for example) and trying to connect in emit() if there is no connection. Not sure I want to go down the caching route - it complicates things for what is a

[issue35212] Expressions with format specifiers in f-strings give wrong code position in AST

2019-10-04 Thread Arminius
Arminius added the comment: There is another instance of incorrectly reported offsets in f-strings, in this case affecting multi-line strings. Example: ( f'aaa{foo}bbb' f'ccc{bar}ddd' f'eee{baz}fff' ) Relevant part of the syntax tree: JoinedStr( lineno=2, col_offset=4,

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am adding 3.8 regression since the report says 3.8.0b4 works and segfaults with 3.8.0RC1. -- keywords: +3.8regression nosy: +lukasz.langa, xtreak ___ Python tracker

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: After remembering to recompile (sorry), the test passes and clipgoard_get returns the rocket. Very nice, thank you. -- ___ Python tracker _

[issue38369] Python 3.7.4 venv command does not install pip

2019-10-04 Thread Paul Moore
New submission from Paul Moore : The venv module with Python 3.4 on Windows doesn't install pip - even though the --without-pip flag is not specified. This appears to be a regression since pip is installed when using 3.7: >C:\Utils\PythonVersions\Python-3.7.3\python.exe -m venv ve-373 >dir .\

[issue38369] Python 3.7.4 venv command does not install pip

2019-10-04 Thread Paul Moore
Paul Moore added the comment: This appears to be somehow caused by running Python 3.7.4 from an active virtualenv (which I'd forgotten I had active when I did the test). Regardless, I'd have expected that the command would either correctly create a venv containing pip, or fail to create the

[issue38369] Python 3.7.4 venv command does not install pip

2019-10-04 Thread Paul Moore
Paul Moore added the comment: Further update - this appears to also happen on Ubuntu (at least the version available through the Windows Linux subsystem), so it's not a Windows-specific issue. -- assignee: steve.dower -> ___ Python tracker

[issue37025] Misleading error message "Python failed to load the default activation context"

2019-10-04 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +16170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16579 ___ Python tracker ___ __

[issue37025] Misleading error message "Python failed to load the default activation context"

2019-10-04 Thread Zackery Spytz
Zackery Spytz added the comment: Thank you for the report. I've created a pull request to fix this issue. -- nosy: +ZackerySpytz versions: +Python 2.7, Python 3.8, Python 3.9 ___ Python tracker _

[issue38369] Python 3.7.4 venv command does not install pip

2019-10-04 Thread Paul Moore
Paul Moore added the comment: Sigh. Never mind, this appears to be because virtualenv uses its own hacked copy of site.py which is missing a lot of the venv support code. I'll report this over on virtualenv. -- resolution: -> third party stage: -> resolved status: open -> closed _

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06cb94bc8419b9a24df6b0d724fcd8e40c6971d6 by Serhiy Storchaka in branch 'master': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/06cb94bc8419b9a24df6b0d724fcd8e40c69

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +16172 pull_request: https://github.com/python/cpython/pull/16581 ___ Python tracker ___ __

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread miss-islington
Change by miss-islington : -- pull_requests: +16171 pull_request: https://github.com/python/cpython/pull/16580 ___ Python tracker ___ __

[issue38352] In typing docs, note explicit import needed for IO and Pattern/Match

2019-10-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > So, my request is: In the sections for the IO/TextIO/BinaryIO and > Pattern/Match classes, include text warning the user that these types are not > imported when you do `from typing import *`. I don't think this should really be a warning, probably just a

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread miss-islington
miss-islington added the comment: New changeset dc191245d8f63f5ab41afff0468b7463a07e7b00 by Miss Islington (bot) in branch '3.8': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/dc191245d8f63f5ab41afff0468b7463a07e7

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread miss-islington
miss-islington added the comment: New changeset 6c3fbbc177f5e1867ab09a315dbf58554a80accd by Miss Islington (bot) in branch '3.7': bpo-13153: Use OS native encoding for converting between Python and Tcl. (GH-16545) https://github.com/python/cpython/commit/6c3fbbc177f5e1867ab09a315dbf58554a80a

[issue38366] dataclasses: generate the _hash_action table from the if-else tree

2019-10-04 Thread Eric V. Smith
Eric V. Smith added the comment: Thank you for your contribution, @iomintz, but I'm not going to accept this change. I don't think it improves the clarity of the code. And I realize this is wholly a subjective decision, and others may disagree. But to me, looking at the table it's clear that

[issue36632] test_multiprocessing_forkserver: test_rapid_restart() leaked a dangling process on AMD64 FreeBSD 10-STABLE Non-Debug 3.x

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: Warning on AMD64 Debian root 3.x: https://buildbot.python.org/all/#/builders/27/builds/3853 test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8855e47d09d4db1206c65b24efc8ad0df585ac46 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558) https://github.com/python/cpython/commit/8855e47d09d4db1206c65

[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset 8855e47d09d4db1206c65b24efc8ad0df585ac46 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal (GH-16558) https://github.com/python/cpython/commit/8855e47d09d4db1206c65

[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > Since this sounds like a regression being introduced by 3.8.0, should the > reversion be included in 3.8.0 final or can it wait for 3.8.1? Oh, in fact, the change was only made in the master branch: after the 3.8 branch was created. The 3.8 branch still co

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > bpo-38266: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal > (GH-16558) Oh, I didn't notice something in the review: the revert moved PyThreadState_DeleteCurrent() definition from Include/pystate.h to Include/cpython/pystate.h. Previously, i

[issue22742] IDLE shows traceback when printing non-BMP character

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed by PR 16545 (see issue13153). -- nosy: +serhiy.storchaka resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker _

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: To be clear: this issue only impacts Python 3.8. The function was only removed from the master branch. It was still in the 3.8 branch. -- ___ Python tracker ___

[issue38370] An array as attribute of an object is shared between instances

2019-10-04 Thread plugin nieulq
New submission from plugin nieulq : I am using this version on Windows : Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]. When an attribute of an object is an array, the array is shared between instances as shown in my example. When executed, the output

[issue38370] An array as attribute of an object is shared between instances

2019-10-04 Thread plugin nieulq
plugin nieulq added the comment: I am using this version on Windows : Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]. When an attribute of an object is an array, the array is shared between instances as shown in my example. class AClass(object):

[issue38370] An array as attribute of an object is shared between instances

2019-10-04 Thread Mark Dickinson
Mark Dickinson added the comment: This is a common gotcha. Take a look at: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects -- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue36698] Shell restart when error message contains non-BMP characters

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mostly fixed by PR 16545 (see issue13153). The original example is now passed. >>> raise Exception('\U0001f603') Traceback (most recent call last): File "", line 1, in raise Exception('\U0001f603') Exception: 😃 >>> But you can still cause a restart o

[issue22742] IDLE shows traceback when printing non-BMP character

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed for all valid Unicode characters, you can still get an error when print a surrogate character to the stderr on Linux: >>> import sys >>> print('\ud800', file=sys.stderr) Traceback (most recent call last): File "", line 1, in print('\ud80

[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed by PR 16545 (see issue13153). -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ _

[issue30019] IDLE freezes when opening a file with astral characters

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue21084. Fixed by PR 16545 (see issue13153). It is virtually Eryk's workaround, but at the Tkinter level. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _

[issue38370] An array as attribute of an object is shared between instances

2019-10-04 Thread plugin nieulq
plugin nieulq added the comment: Ah ... Ok. My bad. Thank you for pointing this out to me, Mark. This is definitely a strange behavior. -- nosy: -mark.dickinson resolution: not a bug -> ___ Python tracker

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: > Oh, I didn't notice something in the review: the revert moved > >PyThreadState_DeleteCurrent() definition from Include/pystate.h to > >Include/cpython/pystate.h. Previously, it was defined in > > Include/pystate.h, see the commit removing it: I made thi

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > bpo-13153: Use OS native encoding for converting between Python and Tcl. > (GH-16545) WOW. That's huge. The issue with non-BMP characters has been fixed? Finally? The issue was haunting the bug tracker for at least 8 years!!! -- nosy: +vstinner _

[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16173 pull_request: https://github.com/python/cpython/pull/16582 ___ Python tracker ___ __

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Several things here: - you can perform critical cleanup with the atexit module; using a signal handler for that is extremely low-level and error-prone - you can also try to switch to the "forkserver" method of multiprocessing, perhaps that will fix your iss

[issue38284] signal.sigwait* do not intercept certain signals

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Python just exposes thin wrappers around the underlying libc calls, so you have to understand how those work. On Linux, the sigwaitinfo() man page says: NOTES In normal usage, the calling program blocks the signals in set via a prior call to si

[issue38284] signal.sigwait* do not intercept certain signals

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Closing as not a Python bug. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Serhiy. If you hit a rare situation that you don't want to handle, use Py_FatalError(), not Py_UNREACHABLE(). Py_UNREACHABLE() is for situations which are *logically* impossible, not just uncommon. -- nosy: +pitrou ___

[issue38167] O_DIRECT read fails with 4K mmap buffer

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Josh. If you want to use O_DIRECT, use an unbuffered file object and be sure to issue reads of the right size. -- nosy: +pitrou ___ Python tracker

[issue38167] O_DIRECT read fails with 4K mmap buffer

2019-10-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also I'm curious: why are you using O_DIRECT, and furthermore, why are you using it to read into mmap'ed memory? -- ___ Python tracker ___ _

[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-04 Thread Ned Deily
Change by Ned Deily : -- keywords: -3.8regression versions: -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue38346] Wrong behavior when using `assert_called_with` with mutable object

2019-10-04 Thread Vedran Čačić
Vedran Čačić added the comment: > when `b` has same values of `a` before it is mutated. There might be no such object. Or it might exist, but you still wouldn't want it. Consider the case when a is a coroutine that has just started (a=coro()). You call f with a, and then advance a to the nex

[issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode

2019-10-04 Thread Tal Einat
Tal Einat added the comment: Indeed, Serhiy, you've done an amazing job with this change and it will greatly benefit many people. -- ___ Python tracker ___ __

[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset abd7cd856ba326bd7574135c7d034e98492ab695 by Victor Stinner in branch 'master': bpo-38353: getpath.c uses dynamically allocated strings (GH-16582) https://github.com/python/cpython/commit/abd7cd856ba326bd7574135c7d034e98492ab695 -- ___

[issue38227] Setting a signal handler gets multiprocessing.Pool stuck

2019-10-04 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: atexit proved time and time again to be unreliable, not really an option. Not all programs shutdown nicely enough for atexit. Should I tell users "use forkserver on 3.8 because broken stuff"? -- ___ Python

[issue36698] Shell restart when error message contains non-BMP characters

2019-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16174 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16583 ___ Python tracker ___

[issue38371] Tkinter: deprecate the split() method

2019-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tkapp.split() method has weird behavior. It splits a string recursively, so the type of items and the depth of nesting depends on spaces in string values. For example: >>> import tkinter >>> root = tkinter.Tcl() >>> root.tk.split('Hi') 'Hi' >>> root.

[issue38371] Tkinter: deprecate the split() method

2019-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +16175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16584 ___ Python tracker ___

[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-04 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +16176 pull_request: https://github.com/python/cpython/pull/16585 ___ Python tracker ___ __

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > Py_UNREACHABLE() is for situations which are *logically* impossible, not just > uncommon. I suggest to clarify/enhance Py_UNREACHABLE() documentation to make it more explicit in that case. -- ___ Python tracker

[issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent()

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: > "when we un-revert we should be sure to move PyThreadState_DeleteCurrent() > from Include/pystate.h to Include/cpython/pystate.h." Ah, I didn't see this comment. If Eric endorses this change, I'm fine with it :-) I close the issue. If someone wants to mo

[issue38235] Docs of logging module says argument is named "lvl". TypeError.

2019-10-04 Thread AWhetter
Change by AWhetter : -- pull_requests: +16177 pull_request: https://github.com/python/cpython/pull/16586 ___ Python tracker ___ ___

[issue38167] O_DIRECT read fails with 4K mmap buffer

2019-10-04 Thread Paul
Paul added the comment: > I agree with Josh. If you want to use O_DIRECT, use an unbuffered file object > and be sure to issue reads of the right size. I do not believe an unbuffered file uses O_DIRECT. This is why I use os.open(fpath, os.O_DIRECT). > Also I'm curious: why are you using O_

[issue37025] Misleading error message "Python failed to load the default activation context"

2019-10-04 Thread Steve Dower
Steve Dower added the comment: This doesn't apply since Python 3.5, as the HAVE_SXS preprocessor variable is not defined. We should just delete this code entirely in 3.9, and patch the message in 2.7. -- versions: -Python 3.7, Python 3.8, Python 3.9

[issue38249] Optimize out Py_UNREACHABLE in the release mode

2019-10-04 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: +1 Serhiy. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Steve Dower
Steve Dower added the comment: Also crashes on Windows (x64 and x86), and on 3.7.5rc1, so this is likely in our code. -- nosy: +ned.deily, steve.dower priority: normal -> release blocker stage: -> test needed versions: +Python 3.7 ___ Python track

[issue38372] Undefined behavior when changing dict while iterating it

2019-10-04 Thread Беатрис Бонева
New submission from Беатрис Бонева : When changing a dict while iterating through it by removing one key and inserting other which is calculated based on the old one, the dict is changed unexpectedly. The following function: ``` def test(d: dict): for i in d: d[i+1] = d.pop(i)

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Steve Dower
Steve Dower added the comment: I get this assertion in a debug build: Assertion failed: actual_type_index <= MAX_ELEMENTS, file c:\projects\cpython\modules\_ctypes\stgdict.c, line 718 -- ___ Python tracker ___

[issue16974] when "python -c command" does a traceback, it open the file ""

2019-10-04 Thread AWhetter
AWhetter added the comment: If we were to add a new attribute to indicate whether a file is real or not, there would need to be a way for users to indicate whether a file is real or not to functions such as `compile()` (there's lots more!) that take a filename. Without enforcing this being s

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Steve Dower
Steve Dower added the comment: Increasing MAX_ELEMENTS fixes it, but I'm not sure what other impacts there are from doing that. +Vinay who added the array handling that's hitting the limit. -- nosy: +vinay.sajip versions: +Python 3.9 ___ Python tr

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Steve Dower
Steve Dower added the comment: Given this limit can easily be hit by user code, I'd like to see it turned into a proper check with an exception (or a dynamic array) rather than just an assertion. We should not segfault here. while (length > 0) { actual_types[actual_type_index++] = &edict

[issue38372] Undefined behavior when changing dict while iterating it

2019-10-04 Thread Beatris Boneva
Beatris Boneva added the comment: Now I see it is duplicate of https://bugs.python.org/issue19332. Closing it. -- stage: -> resolved status: open -> closed ___ Python tracker ___

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

2019-10-04 Thread Tim Peters
Tim Peters added the comment: BTW, the phrase "missing tp_traverse" is misleading. If an object with a NULL tp_traverse appears in a gc generation, gc will blow up the next time that generation is collected. That's always been so - gc doesn't check whether tp_traverse is NULL, it just call

[issue38353] Cleanup the path configuration implementation code (getpath.c)

2019-10-04 Thread STINNER Victor
STINNER Victor added the comment: New changeset c02b41b1fb115c87693530ea6a480b2e15460424 by Victor Stinner in branch 'master': bpo-38353: getpath.c: allocates strings on the heap (GH-16585) https://github.com/python/cpython/commit/c02b41b1fb115c87693530ea6a480b2e15460424 -- ___

[issue22742] IDLE shows traceback when printing non-BMP character

2019-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Printing the unquoted escape representation rather than a replacement char is a bit strange and not what I expect from the python docs. I could see it as a bug. In any case, on Windows, it is the Python REPL that raises, but only for sys.stdout. >>> import

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Great! I withdrew the original proposition in issue33325 because the part of the optimization was not so good as I expected. But this part is good. $ ./python -m timeit "[$(seq -s, 10)]" 500 loops, best of 5: 75.5 nsec per loop $ ./python -m timeit "[*(

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: Yes, I was thinking about that (and BUILD_CONST_KEY_MAP as well). I'll open another PR with those as soon as this one is in. -- ___ Python tracker __

[issue34938] Fix mimetype.init() to account for from import

2019-10-04 Thread Steve Dower
Steve Dower added the comment: Adding email team here, since you were pinged on the PR. PR 16567 doesn't fix the `inited` member, which is considerably more difficult to do, unfortunately, but it does mean that it's out of sync with the values you hold. Arguably this is a better state to be

[issue34938] Fix mimetype.init() to account for from import

2019-10-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Vinay Sajip
Vinay Sajip added the comment: > We should not segfault here. Agreed, MAX_ELEMENTS was set to be an upper bound which shouldn't be hit. I'll investigate with OP's example data and see where the bug is. -- ___ Python tracker

[issue36698] Shell restart when error message contains non-BMP characters

2019-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: As with #22742, the problem, without PR 16583, only occurs with *nix. On Windows, the traceback ends with "Exception: �" and a prompt is printed. -- versions: +Python 3.9 ___ Python tracker

[issue38348] Make python -m ast more configurable

2019-10-04 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF)

2019-10-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: As noted on #13153, files with astral chars can now be read without an exception, but the presence of astral chars messes up editing text that follows at least on the same line by misplacing the cursor. I will open a new issue about replacing such with \U e

[issue35173] Re-use already existing functionality to allow Python 2.7.x (both embedded and standalone) to locate the module path according to the shared library

2019-10-04 Thread Ali Rizvi-Santiago
Ali Rizvi-Santiago added the comment: Sure. It was for Python2 anyways. -Ali On Wed, Sep 25, 2019 at 8:00 PM STINNER Victor wrote: > > STINNER Victor added the comment: > > Modules/getpath.c and PC/getpathp.c have been deeply reworked with the > implementation of the PEP 587 in Python 3.8.

[issue33714] module can set an exception in tp_clear

2019-10-04 Thread Ashley Whetter
Ashley Whetter added the comment: I've attached a reproduction case. Here's the setup.py that I used: ``` from distutils.core import Extension, setup extension = Extension("breaky", ["breaky.c"]) setup( name="tp_clear", version="0.1.0", ext_modules=[extension], ) ``` which I bui

[issue38348] Make python -m ast more configurable

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, I do not understand you. typed_ast does not have such features as multiline dump() and CLI. What relation is this have with the --type-comments flag? As for fitting tree into the terminal width, the current indentation is 3 spaces. Changing it to 2

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Brandt Bucher
Brandt Bucher added the comment: ...unless you'd prefer that I add them to this PR. But I think it's a better idea to add and review them separately. -- ___ Python tracker __

[issue26510] [argparse] Add required argument to add_subparsers

2019-10-04 Thread Adam Stewart
Change by Adam Stewart : -- pull_requests: +16178 pull_request: https://github.com/python/cpython/pull/16588 ___ Python tracker ___

[issue38328] Speed up the creation time of constant list literals.

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay, but first I want to solve an issue with list overallocation. -- ___ Python tracker ___ __

[issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal

2019-10-04 Thread Wenzel Jakob
Wenzel Jakob added the comment: This is great -- thank you for handling this so quickly. -- ___ Python tracker ___ ___ Python-bugs-

[issue38373] List overallocation strategy

2019-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently list uses the following formula for allocating an array for items (if size != 0): allocated = size + (size >> 3) + (3 if size < 9 else 6) If add items by 1 the growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88, ... I think this stra

[issue38373] List overallocation strategy

2019-10-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue38374] Remove weakref.ReferenceError entry from documentation

2019-10-04 Thread Martijn Pieters
New submission from Martijn Pieters : The weakref documentation still mentions weakref.ReferenceError: https://docs.python.org/3/library/weakref.html#weakref.ReferenceError But this alias for the built-in ReferenceError exception was removed in the 3.0 development cycle (https://github.com/p

[issue38373] List overallocation strategy

2019-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: We should definitely revisit the over-allocation strategy. I last worked on the existing strategy back in 2004. Since then, the weighting of the speed/space trade-off considerations have changed. We need to keep the amortized O(1) append() behavior,

[issue38373] List overallocation strategy

2019-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is some data. step is the number of items added at a time, the first row is the size, the second row is the currently allocated size, the third row is the proposed allocated size. for step in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10): sizes0 = range(step, s

[issue38368] Crash when subclassing ctypes.Union

2019-10-04 Thread Vinay Sajip
Change by Vinay Sajip : -- keywords: +patch pull_requests: +16179 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/16589 ___ Python tracker _

[issue33714] module can set an exception in tp_clear

2019-10-04 Thread Ashley Whetter
Ashley Whetter added the comment: I've just realised that this issue was specific to tp_clear on a module and not on objects. tp_clear on modules has already been fixed in https://bugs.python.org/issue33622. I think this is closable. -- ___ Python

[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-04 Thread Abhilash Raj
Abhilash Raj added the comment: It seems that SMTPNotSupportedError is publicly documented, it should be a part of __all__. -- nosy: +maxking ___ Python tracker ___ _

[issue38341] Add SMTPNotSupportedError in the exports of smtplib

2019-10-04 Thread Abhilash Raj
Abhilash Raj added the comment: New changeset 3faf826e5879536d2272f1a51c58965a16827f81 by Abhilash Raj (nde) in branch 'master': bpo-38341: Add SMTPNotSupportedError in the exports of smtplib (#16525) https://github.com/python/cpython/commit/3faf826e5879536d2272f1a51c58965a16827f81

  1   2   >