[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

[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

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

[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

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

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

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

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

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

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

[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

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

2019-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Eric. The original code is preferable. -- nosy: +rhettinger ___ Python tracker ___

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

2019-10-04 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: rhettinger -> vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list

[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

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

[issue38337] inspect: getmembers calls properties

2019-10-04 Thread Jonas Drotleff
Jonas Drotleff added the comment: Oh, yes I see what you mean. That's my fault, it seems like I copied the wrong line. Sorry. But the important piece is the 'var' attribute. Sorry for the confusion. -- ___ 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: 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 3af2733a8265a2685b2c0466a58a66e544a81c64 by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-38235: Correct some arguments names in logging documentation (GH-16571) (GH-16576)

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

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

[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 3142c667b50254daaa28f22c79bdda177136bd03 by Vinay Sajip (Ashley Whetter) in branch 'master': bpo-38235: Correct some arguments names in logging documentation (GH-16571)

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

[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 Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 ___ Python tracker ___

[issue38341] Add SMTPNotSupportedError in the exports of smtplib

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

[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

[issue22240] argparse support for "python -m module" in help

2019-10-04 Thread Samuel Marks
Samuel Marks added the comment: Until this is accepted, I've modified my codebase: ``` from argparse import ArgumentParser ArgumentParser( prog=None if globals().get('__spec__') is None else 'python -m {}'.format(__spec__.name.partition('.')[0]) ) ``` -- nosy: +samuelmarks

[issue38373] List overallocation strategy

2019-10-04 Thread Tim Peters
Tim Peters added the comment: Don't know. Define "the problem" ;-) As soon as the allocation is over 512 bytes (64 pointers), it's punted to the system malloc family. Before then, do a relative handful of relatively small memcpy's really matter? pymalloc is faster than system mallocs,

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

[issue38232] empty local-part in addr_spec displayed incorrectly

2019-10-04 Thread Abhilash Raj
Abhilash Raj added the comment: It is actually parsed correctly and serialized back when you try to convert it to a string representation: from email.parser import BytesFeedParser import email.policy def main(): eml_string = 'From: Nobody <""@example.org>' parser =

[issue22240] argparse support for "python -m module" in help

2019-10-04 Thread Samuel Marks
Samuel Marks added the comment: See https://bugs.python.org/msg353987 for manual test -- Added file: https://bugs.python.org/file48643/prog-module-name-handler.patch ___ Python tracker

[issue38348] Make python -m ast more configurable

2019-10-04 Thread Batuhan
Batuhan added the comment: > I do not want to complicate this tiny feature. Making more configurable isn't making it complicated. It is just improving users control over it by indentation and parsing option. -- ___ Python tracker

[issue38373] List overallocation strategy

2019-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > WRT pymalloc, it will always copy on growing resize in this context That sounds like an excellent reason NOT to use pymalloc ;-) -- ___ Python tracker

[issue38308] Add optional weighting to statistics.harmonic_mean()

2019-10-04 Thread Dong-hee Na
Dong-hee Na added the comment: @rhettinger If you are okay, Can I process with this issue with your guide? -- ___ Python tracker ___

[issue38373] List overallocation strategy

2019-10-04 Thread Tim Peters
Tim Peters added the comment: WRT pymalloc, it will always copy on growing resize in this context. A pymalloc pool is dedicated to blocks of the same size class, so if the size class increases (they're 16 bytes apart now), the data must be copied to a different pool (dedicated to blocks of

[issue38167] O_DIRECT read fails with 4K mmap buffer

2019-10-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: > I do not believe an unbuffered file uses O_DIRECT. This is why I use > os.open(fpath, os.O_DIRECT). Problem is you follow it with: fo = os.fdopen(fd, 'rb+') which introduces a Python level of buffering around the kernel unbuffered file descriptor.

[issue38167] O_DIRECT read fails with 4K mmap buffer

2019-10-04 Thread Paul
Paul added the comment: > Problem is you follow it with: > > fo = os.fdopen(fd, 'rb+') > which introduces a Python level of buffering around the kernel unbuffered > file descriptor. You'd need to pass buffering=0 to make os.fdopen avoid > returning a buffered file object, making it: > fo =

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

[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

[issue38373] List overallocation strategy

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

[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

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

[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

[issue38308] Add optional weighting to statistics.harmonic_mean()

2019-10-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Can I process with this issue with your guide? Thank you, but this is one I would like to do myself. I've already done work on it and would like to wrap it up (also, it's more complicated than it seems because the supporting functions are a bit

[issue38316] docs: Code object's "co_stacksize" field is described with mistake

2019-10-04 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: -Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list

[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

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

[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

[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

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

[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

[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

[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

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

[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

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

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

[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

[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

[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

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

[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

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

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

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

[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

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

[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

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

[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

[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

[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

[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

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

[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

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

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

[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

[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

[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

[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

[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

[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

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

[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

[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

[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

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

[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

[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

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

[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

  1   2   >