[issue45261] Unreliable (?) results from timeit (cache issue?)

2021-09-26 Thread Tim Holy
Change by Tim Holy : -- resolution: not a bug -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: In #45297, Steven D'Aprano suggests deleting code immediately followed by traceback. (SyntaxErrors should not be there at all -- another issue.) But should NameError, for instance, be ignore, just because user printed something? Or block removed just beca

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Tal Einat
Tal Einat added the comment: How about "Control-D (end-of-file, a.k.a. EOF)" or even just "Control-D"? -- ___ Python tracker ___ __

[issue21140] Idle: saving Shell or an OutputWindow should default to .txt

2021-09-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: >From #45297, closed as duplicate. https://discuss.python.org/t/what-is-this-syntax-i-dont-know-how-to-fix-it/10844 -- ___ Python tracker ___

[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue11838] IDLE: make interactive code savable as a runnable script

2021-09-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: This should be easier to do with the new shell with indents fixed. -- nosy: -roger.serwy, tlesher versions: +Python 3.11 -Python 3.6, Python 3.7 ___ Python tracker

[issue41271] Add support for io_uring to cpython

2021-09-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +26960 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28577 ___ Python tracker ___ _

[issue45299] SMTP.send_message() does from mangling when it should not

2021-09-26 Thread Grant Edwards
New submission from Grant Edwards : SMTP.send_message() does from mangling even when the message's policy has that disabled. The problem is in the send_messsage() function shown below: 912 def send_message(self, msg, from_addr=None, to_addrs=None, 913 mail_opti

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tal, Paine: should be use exactly the raw REPL message or something that might be clearer to beginners, like 'Ctrl-D (end-of-file)'? -- nosy: +epaine, taleinat ___ Python tracker

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy components: +IDLE type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___

[issue41994] Refcount issues in import

2021-09-26 Thread Gregory Szorc
Gregory Szorc added the comment: While testing 3.10.0rc2, I noticed that commit 4db8988420e0a122d617df741381b0c385af032c removed _PyImport_FindExtensionObject() from libpython. This breaks both PyOxidizer and py2exe, which rely on this function for a custom implementation of Loader.create_m

[issue45069] python 3.9.2 contains libcrypto-1_1.dll and libssl-1_1.dll associates CVE-2021-23840\CVE-2021-3450\CVE-2021-3711\CVE-2021-3712\CVE-2021-23841\CVE-2021-3449 of openssl-1.1.1i

2021-09-26 Thread Ned Deily
Change by Ned Deily : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue45298] SIGSEGV when access a fork Event in a spawn Process

2021-09-26 Thread Keming
New submission from Keming : Code to trigger this problem: ```python import multiprocessing as mp from time import sleep def wait_for_event(event): while not event.is_set(): sleep(0.1) def trigger_segment_fault(): event = mp.get_context("fork").Event() p = mp.get_context

[issue45297] Improve the IDLE shell save command

2021-09-26 Thread Steven D'Aprano
New submission from Steven D'Aprano : See this question on Discuss: https://discuss.python.org/t/what-is-this-syntax-i-dont-know-how-to-fix-it/10844 It seems that IDLE allows you to save the shell output, complete with welcome message and prompts, as a .py file, and then reopen it and attempt

[issue43914] Highlight invalid ranges in SyntaxErrors

2021-09-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26959 pull_request: https://github.com/python/cpython/pull/28576 ___ Python tracker ___ ___

[issue45069] python 3.9.2 contains libcrypto-1_1.dll and libssl-1_1.dll associates CVE-2021-23840\CVE-2021-3450\CVE-2021-3711\CVE-2021-3712\CVE-2021-23841\CVE-2021-3449 of openssl-1.1.1i

2021-09-26 Thread Ned Deily
Change by Ned Deily : -- stage: -> resolved status: pending -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue45249] Update doctect SyntaxErrors for location range

2021-09-26 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +26958 pull_request: https://github.com/python/cpython/pull/28575 ___ Python tracker ___ ___

[issue44933] python3.9-intel64 hardened runtime not enabled

2021-09-26 Thread Ned Deily
Ned Deily added the comment: > the "reliable way to run under rosetta" is using "arch -x86_64 python3". I > don't particularly like having another executable to accomplish the same goal. Unfortunately, using "arch" is *not* a reliable way in general. It works fine for the initial invocation

[issue44493] Missing terminated NUL in the length of sockaddr_un

2021-09-26 Thread Ned Deily
Change by Ned Deily : -- resolution: fixed -> versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful

2021-09-26 Thread Jeremy Maitin-Shepard
Jeremy Maitin-Shepard added the comment: Yes, I would agree that the new APIs are a useful addition regardless of the PyThread_exit_thread change. As far as the proposed `Py_SetThreadExitCallback` that seems like a fine thing for applications to use, as long as it doesn't impact how extensio

[issue44958] [sqlite3] only reset statements when needed

2021-09-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 7b88f63e1dd4006b1a08b9c9f087dd13449ecc76 by Erlend Egeberg Aasland in branch 'main': bpo-44958: Revert GH-27844 (GH-28574) https://github.com/python/cpython/commit/7b88f63e1dd4006b1a08b9c9f087dd13449ecc76 -- ___

[issue36717] Allow retrieval of return value from the target of a threading.Thread

2021-09-26 Thread STINNER Victor
STINNER Victor added the comment: Storing the result of Thread.run() can keep Python objects alive longer than expected and it may require a lock on it. I don't think that the additional complexity is worth it. I suggest to reorganize your code to pass the result differently to the caller th

[issue27978] concurrent.futures.threading: Add a timeout to Executor shutdown() method

2021-09-26 Thread STINNER Victor
Change by STINNER Victor : -- title: [threading] Executor#shutdown with timeout -> concurrent.futures.threading: Add a timeout to Executor shutdown() method ___ Python tracker ___

[issue1736792] dict reentrant/threading request

2021-09-26 Thread STINNER Victor
STINNER Victor added the comment: > As I first mentioned in my post[1] on comp.lang.python, it seems possible to > modify a dict while a lookup is ongoing, without causing the lookup to > restart. That's a bad practice. Python dict raises an exception in some cases: RuntimeError("dict mutat

[issue45292] Implement PEP 654: Exception Groups

2021-09-26 Thread STINNER Victor
Change by STINNER Victor : -- title: Implement PEP 654 -> Implement PEP 654: Exception Groups ___ Python tracker ___ ___ Python-bugs

[issue45261] Unreliable (?) results from timeit (cache issue?)

2021-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Given that there isn't an actual bug here, please move this discussion to python-ideas. -- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue45293] List inplace addition different from normal addition

2021-09-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Kapil, this behavior was intentional (not a bug), but later regarded as a design mistake. GvR has said that if he had to do it over again list.__iadd__ would only accept other lists. The problem arises when people write "somelist += 'hello'" and expect

[issue45296] IDLE: Change Ctrl-Z note in exit/quit repr on Windows

2021-09-26 Thread Terry J. Reedy
New submission from Terry J. Reedy : On Windows: >>> exit 'Use exit() or Ctrl-Z plus Return to exit' >>> quit 'Use quit() or Ctrl-Z plus Return to exit' >>> exit.eof 'Ctrl-Z plus Return' On *nix, 'Ctrl-Z plus Return' is 'Ctrl-D (i.e, EOF)' IDLE uses the latter even on Windows, and Ctrl-Z does n

[issue44958] [sqlite3] only reset statements when needed

2021-09-26 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- pull_requests: +26956 pull_request: https://github.com/python/cpython/pull/28574 ___ Python tracker ___ ___

[issue44958] [sqlite3] only reset statements when needed

2021-09-26 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: I'll revert PR 27844 for now (except the tests). Since SQLite works better when we keep the number of non-reset statements to a minimum, we need to ensure that we reset statements when we're done with them (sqlite3_step() returns SQLITE_DONE or an error).

[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

2021-09-26 Thread Hai Shi
Change by Hai Shi : -- keywords: +patch pull_requests: +26955 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28573 ___ Python tracker ___

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-26 Thread Cristobal Riaga
Cristobal Riaga added the comment: So there is no way to get members in the order you defined them? -- ___ Python tracker ___ ___ P

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-26 Thread Cristobal Riaga
Cristobal Riaga added the comment: So there is no way to get the members in order? -- ___ Python tracker ___ ___ Python-bugs-list m

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread Łukasz Langa
Łukasz Langa added the comment: Thanks, Nikita! ✨ 🍰 ✨ -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d452b2963ba91d6bce29bb96733ed8bd1c0448b0 by Miss Islington (bot) in branch '3.10': bpo-45280: Add test for empty `NamedTuple` in `test_typing` (GH-28559) (GH-28571) https://github.com/python/cpython/commit/d452b2963ba91d6bce29bb96733ed8bd1c0448b0

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 08e387ab82331230d7f6608e949723d8a8e09229 by Miss Islington (bot) in branch '3.9': bpo-45280: Add test for empty `NamedTuple` in `test_typing` (GH-28559) (GH-28570) https://github.com/python/cpython/commit/08e387ab82331230d7f6608e949723d8a8e09229

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-26 Thread Łukasz Langa
Łukasz Langa added the comment: > Is it an official position? No, we need to decide what will happen to PEP 563 and PEP 649 in Python 3.11. -- nosy: +lukasz.langa ___ Python tracker _

[issue45249] Update doctect SyntaxErrors for location range

2021-09-26 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: One important thing is that "traceback.print_exception" should correctly print syntax errors . -- ___ Python tracker ___

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +26954 pull_request: https://github.com/python/cpython/pull/28571 ___ Python tracker ___ __

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +26953 pull_request: https://github.com/python/cpython/pull/28570 ___ Python tracker _

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-26 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset f56268a2cd38b3fe2be1e4361d3d8b581e73559b by Nikita Sobolev in branch 'main': bpo-45280: Add test for empty `NamedTuple` in `test_typing` (GH-28559) https://github.com/python/cpython/commit/f56268a2cd38b3fe2be1e4361d3d8b581e73559b -- nosy:

[issue45295] _PyObject_GetMethod/LOAD_METHOD for C classmethods

2021-09-26 Thread Ken Jin
New submission from Ken Jin : LOAD_METHOD + CALL_METHOD currently doesn't work for Python @classmethod and C classmethod (METH_CLASS). They still create bound classmethods which are fairly expensive. I propose supporting classmethods. I have an implementation for C classmethods. It passes mo

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-09-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: > That is true, but there are a couple setups where that doesn't work > (those keypresses are consumed by something else). I may not be a good > data point though. Can you give an example of a setup where Ctrl-D is consumed but "import sys ENTER sys.exit()

[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before

2021-09-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: In the future, please remember that this is not a help desk for getting help with your code, it is for reporting bugs. There are many forums that are happy to help you understand why your code is not working as you expect (if you are a beginner to Python, t

[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before

2021-09-26 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, you are trying to print the value of the local variable DiaObjectFactoryHelper before you have defined the variable. UnboundLocalError is a subclass of NameError that is used when the undefined name is a local variable instead of a global

[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-09-26 Thread Filipe Laíns
Filipe Laíns added the comment: > Without disagreeing with the general sentiment, just note that you can always > do Ctrl-D. That is true, but there are a couple setups where that doesn't work (those keypresses are consumed by something else). I may not be a good data point though. > Runnin

[issue45294] Conditional import fails and produce UnboundLocalError, if a variable machting import name is used before

2021-09-26 Thread arts stars
New submission from arts stars : Hello, I have this situation: def test(): if True : print("Exception"+DiaObjectFactoryHelper) else: from . import DiaObjectFactoryHelper pass test() --- it generates instead of (like the

[issue45249] Update doctect SyntaxErrors for location range

2021-09-26 Thread Andrei Kulakov
Andrei Kulakov added the comment: Terry: please take a look - https://github.com/python/cpython/pull/28567/files . -- ___ Python tracker ___ __

[issue45292] Implement PEP 654

2021-09-26 Thread Irit Katriel
New submission from Irit Katriel : We will implement Exception Groups and except* in a series of PRs: 1. Add the ExceptionGroup and BaseExceptionGroup classes 2. Update traceback rendering code (python and C) for exception groups. 3. Implement except* 4. Write documentation sections. -

[issue45292] Implement PEP 654

2021-09-26 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +patch pull_requests: +26952 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28569 ___ Python tracker ___ ___

[issue45249] Update doctect SyntaxErrors for location range

2021-09-26 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +26951 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/28567 ___ Python tracker __

[issue45293] List inplace addition different from normal addition

2021-09-26 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://docs.python.org/3/faq/programming.html#faq-augmented-assignment-tuple-error > for lists, __iadd__ is equivalent to calling extend on the list and returning > the list. That’s why we say that for lists, += is a “shorthand” for > list.extend

[issue45293] List inplace addition different from normal addition

2021-09-26 Thread Eric V. Smith
Eric V. Smith added the comment: For those not in front of a computer, the error is: >>> l = l + 'de' Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate list (not "str") to list -- nosy: +eric.smith ___ Python

[issue45293] List inplace addition different from normal addition

2021-09-26 Thread Kapil Bansal
New submission from Kapil Bansal : Hi, I tried addition and in-place addition on a list. >>> l = ['a', 'b', 'c'] >>> l = l + 'de' (raises an error) >>> l += 'de' >>> print(l) ['a', 'b' , 'c', 'd', 'e'] I want to ask why the behaviour of both these are different?? If it is done intentionall

[issue45292] Implement PEP 654

2021-09-26 Thread Irit Katriel
Change by Irit Katriel : -- assignee: iritkatriel components: Documentation, Interpreter Core, Library (Lib) nosy: iritkatriel priority: normal severity: normal status: open title: Implement PEP 654 type: enhancement versions: Python 3.11 ___ Python

[issue45291] Some instructions in the "Using Python on Unix platforms" document do no work on CentOS 7

2021-09-26 Thread Yiyang Zhan
Change by Yiyang Zhan : -- keywords: +patch pull_requests: +26950 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28566 ___ Python tracker ___

[issue45291] Some instructions in the "Using Python on Unix platforms" document do no work on CentOS 7

2021-09-26 Thread Yiyang Zhan
New submission from Yiyang Zhan : The instructions in "Custom OpenSSL" section of "Using Python on Unix platforms" do not work on CentOS 7: https://github.com/python/cpython/blob/v3.10.0rc2/Doc/using/unix.rst#custom-openssl. CPython's ./configure script assumes the OpenSSL's library resides i

[issue41271] Add support for io_uring to cpython

2021-09-26 Thread Dima Tisnek
Dima Tisnek added the comment: Would now, a year later, be a good time to consider io_uring? -- nosy: +Dima.Tisnek ___ Python tracker ___ _