[issue44186] TimedRotatingFileHandler overwrite log

2021-06-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> vinay.sajip nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing

[issue44227] help(bisect.bisect_left)

2021-06-06 Thread PeterChu
Change by PeterChu : -- nosy: +PeterChu nosy_count: 2.0 -> 3.0 pull_requests: +25146 pull_request: https://github.com/python/cpython/pull/26548 ___ Python tracker ___

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
Change by Samuel Marks : -- keywords: +patch pull_requests: +25147 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26559 ___ Python tracker ___

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
New submission from Samuel Marks : Since Python 2.3 alpha 2 [19-Feb-2003] `EX_OK` has existed… but only for Unix. This adds support for Windows. -- components: Windows messages: 395203 nosy: paul.moore, samuelmarks, steve.dower, tim.golden, zach.ware priority: normal severity: normal

[issue44321] os.EX_OK for Windows

2021-06-06 Thread Samuel Marks
Samuel Marks added the comment: `EXIT_SUCCESS` is defined in `stdlib.h`, as per https://docs.microsoft.com/en-us/cpp/c-runtime-library/exit-success-exit-failure (following the standard https://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdlib.h.html) There are also

[issue44317] Suggestion for better syntax errors in tokenizer errors

2021-06-06 Thread wyz23x2
Change by wyz23x2 : -- type: behavior -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-06-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +BTaskaya nosy_count: 10.0 -> 11.0 pull_requests: +25148 pull_request: https://github.com/python/cpython/pull/26550 ___ Python tracker ___

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-06 Thread Ken Jin
Ken Jin added the comment: The new test `test_entry_points_by_index` (added in c34ed08d975fb7daa7b329f7c631647782290393 ) seems to fail on some windows buildbots:

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-06-06 Thread Ken Jin
Ken Jin added the comment: @victor, git bisect tells me the change f3fa63ec75fdbb4a08a10957a5c631bf0c4a5970 caused test_exceptions.ExceptionTests.test_recursion_in_except_handler to stack overflow only on windows debug builds. 3 windows buildbots using python debug mode is affected. Python

[issue39573] [C API] Make PyObject an opaque structure in the limited C API

2021-06-06 Thread William Pickard
William Pickard added the comment: MSVC by default disables method inlining (/Ob0) when '/Od' is specified on the command line while the optimization options specify '/Ob2'. -- ___ Python tracker

[issue43654] IDLE: Fix tab completion after settings and some keys

2021-06-06 Thread Tal Einat
Tal Einat added the comment: > The unknown is whether anyone has changed these pseudoevent bindings and if > so, how much do we care? Let's ask on idle-dev. > Guido, do you have any comment on this proposal from a change policy > perspective? I'm not an ex-BDFL, but I can't think of a

[issue44227] help(bisect.bisect_left)

2021-06-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset b5cedd098043dc58ecf9c2f33774cd7646506a92 by Miss Islington (bot) in branch '3.10': bpo-44227: Update bisect docstrings (GH-26548) (GH-26563) https://github.com/python/cpython/commit/b5cedd098043dc58ecf9c2f33774cd7646506a92 --

[issue44326] [sqlite3] remove unused db member from pysqlite_Statement

2021-06-06 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The db member of pysqlite_Statement is only "used" in the __init__ method. Suggesting to remove this. A couple of lines less of code, a couple of bytes less per statement object. -- assignee: erlendaasland components: Extension Modules

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-06 Thread Ryan Hileman
Ryan Hileman added the comment: I just ran into this. GetTickCount64() is a bad choice even without improving the Windows timer resolution, as every mutex wait will have 16ms of jitter. Here are some lock.acquire(timeout=0.001) times measured with time.perf_counter(): elapsed=21.215ms

[issue44327] [sqlite3] remove unused members from pysqlite_Connection

2021-06-06 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The timeout and timeout_started members of pysqlite_Connection are never used. Suggesting to remove them. -- assignee: erlendaasland components: Extension Modules messages: 395219 nosy: erlendaasland priority: low severity: normal status: open

[issue44327] [sqlite3] remove unused members from pysqlite_Connection

2021-06-06 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +25154 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26565 ___ Python tracker

[issue44328] time.monotonic() should use QueryPerformanceCounter() on Windows

2021-06-06 Thread Ryan Hileman
New submission from Ryan Hileman : Related to https://bugs.python.org/issue41299#msg395220 Presumably `time.monotonic()` on Windows historically used GetTickCount64() because QueryPerformanceCounter() could fail. However, that hasn't been the case since Windows XP:

[issue44327] [sqlite3] remove unused members from pysqlite_Connection

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 505624e917a2d3d845304f8d34fccd41f06d4720 by Erlend Egeberg Aasland in branch 'main': bpo-44327: Remove unused members from pysqlite_Connection (GH-26565) https://github.com/python/cpython/commit/505624e917a2d3d845304f8d34fccd41f06d4720

[issue44246] 3.10 beta 1: breaking change in importlib.metadata entry points

2021-06-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: The line where the failure occurs is the point where it's checking that the warning was issued. The fact that a StopIteration is raised indicates that no warnings were caught. I can think of a couple of scenarios where that could happen: - That warning is

[issue44323] insttall module faid on wondows 10

2021-06-06 Thread Battant
New submission from Battant : Hello Configuration : windows 10 python install p: python3.9 from microsoft store step to reproduce : on windows, install visual studio and buid tools clone cpython repository main branch https://github.com/python/cpython compile python with command

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
Arjun added the comment: I forgot to add, I would be willing to make the necessary changes, if accepted -- ___ Python tracker ___

[issue44326] [sqlite3] remove unused members from pysqlite_Statement

2021-06-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: The "sql" member is also unused. Removing this will make the tp_clear method redundant, as there are no PyObjects to clear anymore. -- title: [sqlite3] remove unused db member from pysqlite_Statement -> [sqlite3] remove unused members from

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-06 Thread Ryan Hileman
Change by Ryan Hileman : -- versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40468] IDLE: configdialog tab rearrange

2021-06-06 Thread Tal Einat
Change by Tal Einat : -- keywords: +patch pull_requests: +25149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26561 ___ Python tracker ___

[issue44227] help(bisect.bisect_left)

2021-06-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +25152 pull_request: https://github.com/python/cpython/pull/26563 ___ Python tracker

[issue37768] IDLE: Show help(object) output in a text viewer

2021-06-06 Thread Tal Einat
Change by Tal Einat : -- pull_requests: +25150 pull_request: https://github.com/python/cpython/pull/26561 ___ Python tracker ___

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy : Document that SyntaxError args[1] is a tuple of the other attributes and how the meaning of the attributes is adjusted when the syntax error is in an f-string field replacement expression. Also add compile() to the list of builtins that can raise

[issue44297] Frame with -1 line number

2021-06-06 Thread Dominic Davis-Foster
Dominic Davis-Foster added the comment: Is this a re-regression of https://bugs.python.org/issue43933? -- nosy: +domdfcoding ___ Python tracker ___

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
New submission from Arjun : Recently, CPython got a new syntax error, "SyntaxError: expression expected after dictionary key and ':'". I propose to add a "expected expression" in general for consistency. I would like to have it changed for all the "equals" (e.g. PLUSEQUAL, MINEQUAL, etc).

[issue44325] IDLE: Fix shell comment anomalies

2021-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy : Spinoff from #38673, about standard REPL, msg356271 (me) and msg356348 (Guido). In the following interactions, no blank lines were entered. 3.9 behavior >>> #a >>> # a >>> #a >>> # a >>> Mystery 1: why the blank continuation line? I previously wrote

[issue44326] [sqlite3] remove unused members from pysqlite_Statement

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 0d12f245523178eb62e22f5da5a276bfc7004ac4 by Erlend Egeberg Aasland in branch 'main': bpo-44326: Remove unused members from pysqlite_Statement (GH-26564) https://github.com/python/cpython/commit/0d12f245523178eb62e22f5da5a276bfc7004ac4

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +25151 pull_request: https://github.com/python/cpython/pull/26562 ___ Python tracker ___

[issue43610] Ctrl C makes interpreter exit

2021-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified that sndhdr.what(0) calls "with open(0, rb)" so that Eryk's comment applies. (On Windows, handle 0 is invalid, so the call errors immediately instead of hanging.) -- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved

[issue44326] [sqlite3] remove unused db member from pysqlite_Statement

2021-06-06 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- Removed message: https://bugs.python.org/msg395216 ___ Python tracker ___ ___ Python-bugs-list

[issue44326] [sqlite3] remove unused db member from pysqlite_Statement

2021-06-06 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : The db member of pysqlite_Statement is only "used" in the statement create method. Suggesting to remove this. A couple of lines less of code, a couple of bytes less per statement object. -- ___ Python

[issue44326] [sqlite3] remove unused db member from pysqlite_Statement

2021-06-06 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +25153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26564 ___ Python tracker

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I suspect this is going to be a pain for malformed expressions on the right. For instance: >>> a = {x: for x in {}} File "", line 1 a = {x: for x in {}} ^^^ SyntaxError: expected an expression --

[issue44325] IDLE: Fix shell comment anomalies

2021-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I added debug prints to _maybe_compile and confirmed 1) trailing whitespace (' ' and '\t' at least) is removed before this function is called. I presume in IDLE rather than code.II, but cannot find where. It is not with .rstrip. (Note: doing so after '\'

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: ... to expand: so currently, if statement creation fails, we must deallocate the PyObject. -- ___ Python tracker ___

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Yes, we need to allocate/track every time. I just propose to do so as late as > possible, in order to avoid allocating a PyObject before we know if it is > possible to actually create the statement. That describes much better the intent :)

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-06 Thread Ryan Hileman
Ryan Hileman added the comment: Ok, I filed a PR for this. I used pytime's interface to avoid duplicating the QueryPerformanceFrequency() code. I found a StackOverflow answer that says QueryPerformance functions will only fail if you pass in an unaligned pointer:

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: +25160 pull_request: https://github.com/python/cpython/pull/26570 ___ Python tracker ___

[issue37449] Move ensurepip off of pkgutil and to importlib.resources

2021-06-06 Thread Jason R. Coombs
Jason R. Coombs added the comment: New changeset afb2eed72b32a35b4726ff35f92e4fbf54926046 by wim glenn in branch 'main': bpo-37449: ensurepip uses importlib.resources.files() traversable APIs (#22659) https://github.com/python/cpython/commit/afb2eed72b32a35b4726ff35f92e4fbf54926046

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > will avoid unneeded allocations/GC tracking, I am not sure what you mean, in the happy path you still need to GC track and allocate. -- nosy: +pablogsal ___ Python tracker

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Ah, I see I formulated myself a bit unclear: Yes, we need to allocate/track every time. I just propose to do so as late as possible, in order to avoid allocating a PyObject before we know if it is possible to actually create the statement. --

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Currently, pysqlite_statement_create() approx. looks like this: 1. some sanity checks (type, sql lenght, etc.) 2. allocate (PyObject_GC_New) 3. initialise members 4. determine if statement is a DML statement 5. create the statement (sqlite3_prepare_v2)

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +25155 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26566 ___ Python tracker

[issue44327] [sqlite3] remove unused members from pysqlite_Connection

2021-06-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44326] [sqlite3] remove unused members from pysqlite_Statement

2021-06-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This one will be very tricky to do correctly because the '=' is very context-sensitive and the parser can be confused when backtracking, so this *may* be quite delicate/complex. I need to play a bit with this to know how feasible this would be.

[issue44087] [sqlite3] consider adding Py_TPFLAGS_DISALLOW_INSTANTIATION to sqlite3.Statement

2021-06-06 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +25156 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26567 ___ Python tracker

[issue44329] [sqlite3] refactor pysqlite_statement_create

2021-06-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > I am not sure what you mean, in the happy path you still need to GC track and > allocate. Currently, we allocate the object, then try to create the statement using the SQLite API. If we create the statement first, we can do the sanity check on the

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Arjun
Arjun added the comment: > This one will be very tricky to do correctly because the '=' is very > context-sensitive and the parser can be confused when backtracking, so this > *may* be quite delicate/complex Well, I was thinking we could just do a simple check in

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >> Well, I was thinking we could just do a simple check in >> _PyPegen_check_tokenizer_errors or _PyPegen_run_parser functions. If the >> last three tokens in the Parser object's tokens array are NAME, >> EQUAL/MINEQUAL/etc and NEWLINE, we raise the

[issue44324] add a "expected expression" syntax error

2021-06-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > I saw that unclosed parentheses' special error are checked in the same > place. Just to clarify: unclosed parentheses is a tokenizer error, not a parser error and this is handled by checking the tokenize status when it has already failed. The

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 67dfa6f2a508c325715625fe442f2ce20270a8b3 by Terry Jan Reedy in branch 'main': bpo-44322: Document more SyntaxError details. (GH-26562) https://github.com/python/cpython/commit/67dfa6f2a508c325715625fe442f2ce20270a8b3 --

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +25159 pull_request: https://github.com/python/cpython/pull/26569 ___ Python tracker

[issue44331] Generate static PyCodeObjects for faster startup

2021-06-06 Thread Neil Schemenauer
Change by Neil Schemenauer : -- keywords: +patch pull_requests: +25161 pull_request: https://github.com/python/cpython/pull/26571 ___ Python tracker ___

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset d5f8bd60e1203a41996b3ee370d6f09389070627 by Terry Jan Reedy in branch '3.9': [3.9] bpo-44322: Document more SyntaxError details. (GH-26562) https://github.com/python/cpython/commit/d5f8bd60e1203a41996b3ee370d6f09389070627 --

[issue41299] Python3 threading.Event().wait time is twice as large as Python27

2021-06-06 Thread Ryan Hileman
Change by Ryan Hileman : -- keywords: +patch pull_requests: +25157 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26568 ___ Python tracker ___

[issue44328] time.monotonic() should use a different clock source on Windows

2021-06-06 Thread Ryan Hileman
Ryan Hileman added the comment: I found these two references: - https://stackoverflow.com/questions/35601880/windows-timing-drift-of-performancecounter-c - https://bugs.python.org/issue10278#msg143209 Which suggest QueryPerformanceCounter() may be bad because it can drift. However, these

[issue44330] IDLE: Colorizer test hangs on macOS

2021-06-06 Thread Terry J. Reedy
New submission from Terry J. Reedy : Ned, have you seen or heard anything about tkinter/tk8.6.11 freezing on macOS? It is happening in many places. On my MacBook, python3.9 -m test -ugui -v test_idle runs OK in about 10 seconds. With installed python3.10.0b2, it runs test_colorizer

[issue44330] IDLE: Colorizer and output tests hang on macOS

2021-06-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: IDLE: Colorizer test hangs on macOS -> IDLE: Colorizer and output tests hang on macOS ___ Python tracker ___

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 2af690fdb26d0312de056b54ddb113d3c44dee8c by Miss Islington (bot) in branch '3.10': bpo-44322: Document more SyntaxError details. (GH-26562) https://github.com/python/cpython/commit/2af690fdb26d0312de056b54ddb113d3c44dee8c --

[issue44331] Generate static PyCodeObjects for faster startup

2021-06-06 Thread Neil Schemenauer
New submission from Neil Schemenauer : Note: This is a proof of concept and not ready for merging as is. This is based on 'frozen_modules' from Jeethu Rao , via Larry Hastings. Larry's git branch was: g...@github.com:larryhastings/cpython.git

[issue44322] Document SyntaxError args and interpretation for f-string fields

2021-06-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44332] For Loop temporary variable scope should be local to For loop

2021-06-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, it is intentional design and has been since Python 1. You are incorrect about x consuming memory "always". If the value bound to x is in use elsewhere, deleting x will save no memory. If the value is not in use elsewhere, it will be

[issue41391] Make test_unicodedata pass when running without network

2021-06-06 Thread Chih-Hsuan Yen
Chih-Hsuan Yen added the comment: Closing in favor of a simpler fix merged from issue43144. Thanks for the fix! -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue44332] For Loop temporary variable scope should be local to For loop

2021-06-06 Thread Debasis Satapathy
New submission from Debasis Satapathy : numbers = [1, 2, 3, 4, 5, 6, 7, 8] for x in numbers: print(x) print(x) In the above code, print(x) statement should give error. Because x scope should be local to for loop only. 99% cases, developers will not use the temporary variable x outside of

[issue44332] For Loop temporary variable scope should be local to For loop

2021-06-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: By the way, loop variables are not considered to be "temporary" in Python. They are no more temporary than any other local variable -- they *are* local variables with exactly the same scope and lifetime as all other local variables. --