[issue44892] Configparser fails when the .cfg file contains comments

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Make PR branch from main, which I used for testing. I verified issue on 3.10 and 3.9, so we will backport. -- stage: needs patch -> test needed title: Configparser fails when the file contains $ inside a comment -> Configparser fails when the .cfg

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: Serhiy’s comment from 2014-01-04 gives the answer. It’s different reading from a file than from a string. And only “python x.py” still reads from a file. -- ___ Python tracker

[issue44892] Configparser fails when the file contains $ inside a comment

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Diego, I repaired the defacement, which included removing you as nosy. Relevant doc: https://docs.python.org/3/library/configparser.html#configparser.BasicInterpolation To me, the following line implies that % may be used freely in comments. gain: 80%% #

[issue44892] [configparser] Module configparser fails when the config file contains a "%" inside a commentary

2021-09-06 Thread Kubilay Kocak
Change by Kubilay Kocak : -- assignee: terry.reedy -> components: +Library (Lib) -Extension Modules, FreeBSD, IDLE, IO, Installation, Interpreter Core, SSL, Subinterpreters, Tests, Tkinter, Windows, XML, macOS nosy: +lukasz.langa -koobs, ned.deily, paul.moore, ronaldoussoren,

[issue45123] PyAiter_Check & PyObject_GetAiter issues

2021-09-06 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +26618 pull_request: https://github.com/python/cpython/pull/28194 ___ Python tracker ___

[issue45123] PyAiter_Check & PyObject_GetAiter issues

2021-09-06 Thread Yury Selivanov
New submission from Yury Selivanov : Per discussion on python-dev (also see the linked email), PyAiter_Check should only check for `__anext__` existence (and not for `__aiter__`) to be consistent with `Py_IterCheck`. While there, I'd like to rename PyAiter_Check to PyAIter_Check and

[issue45117] `dict` not subscriptable despite using `__future__` typing annotations

2021-09-06 Thread Dennis Sweeney
Dennis Sweeney added the comment: Hi Stefan, `from __future__ import annotations` only affects annotations -- just the things after the colon. It makes it so that annotations are never evaluated, so things like this work: >>> from __future__ import annotations >>> x:

[issue44892] [configparser] Module configparser fails when the config file contains a0918076336 "100%" inside a commentary

2021-09-06 Thread Nirawat Puechpian
Change by Nirawat Puechpian : -- assignee: -> terry.reedy components: +Extension Modules, FreeBSD, IDLE, IO, Installation, Interpreter Core, SSL, Subinterpreters, Tests, Tkinter, Windows, XML, macOS -Library (Lib) nosy: +koobs, ned.deily, paul.moore, ronaldoussoren, steve.dower,

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: What I missed before is that duplicating the effect of the first two interactive entries (no exception) requires escaping the backslash so that the source argument for the explicit compile does not have a null. compile("'\\0'", '', 'exec') at

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: I sent the patch for this issue: https://github.com/python/mypy/pull/11067 -- ___ Python tracker ___

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread Dong-hee Na
Change by Dong-hee Na : -- Removed message: https://bugs.python.org/msg401202 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: I sent the patch for this issue: https://github.com/python/mypy/pull/11067 -- nosy: +corona10 ___ Python tracker ___

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Dong-hee Na added the comment: FYI, mypyc is using PyCode_New. mypyc should be fixed not to use PyCode_New :) -- ___ Python tracker ___

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
Shantanu added the comment: Sorry if my message was confusing. Hopefully the following makes things clear: 3.9.6: snippet runs without error 3.9.7, with bpo-44806: (a probably reasonable) TypeError, but a breaking change main, with bpo-45081: RecursionError --

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
Shantanu added the comment: As I mentioned in the post, bpo-45081 actually makes this issue worse, since we get a RecursionError. I think `TypeError: Protocols cannot be instantiated` is probably okay behaviour (as opposed to RecursionError), more just unfortunate that it seems to be an

[issue45104] Error in __new__ docs

2021-09-06 Thread Vedran Čačić
Vedran Čačić added the comment: The first variant seems best to me. -- nosy: +veky ___ Python tracker ___ ___ Python-bugs-list

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Eric V. Smith
Eric V. Smith added the comment: Possibly related to issue 45081, which ended up not having anything to do with dataclasses (despite the title). Can you check if that fix solves your problem? -- nosy: +eric.smith ___ Python tracker

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: Which part puzzles you? I see that you tried >>> #\0 This does not contain a null byte, just three characters: a hash, a backslash, and a digit zero. -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Using trashcan, it's possible to create a long longer than 10 000 exceptions. But currently, Python does crash in this case, so I stopped the benchmark at 10 000. -- ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: bench.py: pyperf benchmarks on BaseException_dealloc(). Benchmarks results on PR 28190 on Fedora 34 with LTO (I didn't use PGO nor CPU pinning). It says "faster" but it's likely noise in the build or in the benchmark (again, I didn't use CPU pinning, and I

[issue20115] NUL bytes in commented lines

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: The compile() doc currently says ""This function raises SyntaxError if the compiled source is invalid, and ValueError if the source contains null bytes." And indeed, in repository 3.9, 3.10, 3.11, >>> compile('\0','','exec') Traceback (most recent call

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: That sounds like a good plan (note that alpha 1 will go out around Oct 4). I left an issue for Cython: https://github.com/cython/cython/issues/4365 -- ___ Python tracker

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: I understood that these function calls shoud be replaced with: * PyCode_NewEmpty(const char *filename, const char *funcname, int firstlineno) * code.replace() method: https://docs.python.org/dev/library/types.html#types.CodeType.replace --

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: If possible, I suggest to do in in this order: * Fix Cython * Publish a Cython release including the fix * (Maybe wait a bit) * Remove the two functions Previously, we tried to first modified Python, and then update Cython: it went bad. Otherwise, the

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: PS. It would be nice to also update Cython, which is the only thing that uses these C APIs. -- ___ Python tracker ___

[issue45122] Remove PyCode_New and PyCode_NewWithPosOnlyArgs

2021-09-06 Thread Guido van Rossum
New submission from Guido van Rossum : This is up for grabs. For reference, the Steering Council approved getting rid of these two C APIs without honoring the customary two-release deprecation period required by PEP 387. For reference see

[issue44828] Using tkinter.filedialog crashes on macOS Python 3.9.6

2021-09-06 Thread Fahim Faisal
Fahim Faisal added the comment: Can also confirm this issue, tested on M1 and Intel Mac and both has the same error when using Monterey 12.0 Beta 21A5506j. On the same computer, using Big Sur, saves the file successfully and no error present. Seems like a Monterey issue, not dependent on

[issue44958] [sqlite3] only reset statements when needed

2021-09-06 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: In msg399939, item 2 lacks one more "reset path": > 2. at cursor exit, if there's an active statement Rewording this to: 2. when a statement is removed from a cursor; that is either at cursor dealloc, or when the current statement is replaced.

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: test_recursion_in_except_handler() creates chained of exceptions. When an exception is deallocated, it calls the deallocator of another exception, etc. * recurse_in_except() sub-test creates chains of 11 nested deallocator calls *

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26617 pull_request: https://github.com/python/cpython/pull/28190 ___ Python tracker ___

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
Change by Shantanu : -- nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45121] Regression in 3.9.7 with typing.Protocol

2021-09-06 Thread Shantanu
New submission from Shantanu : Consider: ``` from typing import Protocol class P(Protocol): ... class C(P): def __init__(self): super().__init__() C() ``` This code passes without error on 3.9.6. With 3.9.7, we get: ``` Traceback (most recent call last): File

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: > Since PR25244 (28d28e053db6b69d91c2dfd579207cd8ccbc39e7), _PyEval_EvalFrameDefault() in ceval.c has seemed to be unoptimized with PGO (msvc14.29.16.10). > At least the functions below have become un-inlined there at all. I'm not sure if PGO builds are

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Raymond: > Perhaps these critical code sections should have been left as macros. It is > difficult to assuring system wide inlining across modules. These functions were not converted recently to static inline function. For example, Py_INCREF() was already a

[issue45120] Windows cp encodings "UNDEFINED" entries update

2021-09-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 8.0 -> 9.0 pull_requests: +26615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28189 ___ Python tracker

[issue45120] Windows cp encodings "UNDEFINED" entries update

2021-09-06 Thread Rafael Belo
New submission from Rafael Belo : There is a mismatch in specification and behavior in some windows encodings. Some older windows codepages specifications present "UNDEFINED" mapping, whereas in reality, they present another behavior which is updated in a section named "bestfit". For example

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine
E. Paine added the comment: IDLE is hanging on Lib/idlelib/configdialog.py:94 (`self.wait_window()`). Commenting this does not solve the problem: I think it's in the Tk event loop somewhere, since my debugger shows the Python callback completing successfully. This still doesn't explain the

[issue32750] lib2to3 log_error method behavior is inconsitent with documentation

2021-09-06 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine
E. Paine added the comment: > did problems occur without displaying any emoji I was using an unmodified version of IDLE. > If they include one of those characters in the font name displayed in the > font list This is not the case. It is listed simply as "Phaistos", when calling

[issue34561] Replace list sorting merge_collapse()?

2021-09-06 Thread Carl Friedrich Bolz-Tereick
Carl Friedrich Bolz-Tereick added the comment: Thanks for your work Tim, just adapted the changes to PyPy's Timsort, using bits of runstack.py! -- nosy: +Carl.Friedrich.Bolz ___ Python tracker

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: If nothing else, I should amend the doc note about font problems to include Windows if we verify the report. -- ___ Python tracker ___

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for finding what I could not. Your previous message, referenced above, reporting a problem that remains in 8.6.11 on linux, was ... "For me, this is not limited to special characters. Trying to load anything in Tk using the 'JoyPixels' font

[issue29232] Quiet Install

2021-09-06 Thread Steve Dower
Steve Dower added the comment: The underlying issue is known and tracked by issue25166 -- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> Windows All Users installation places uninstaller in user profile ___

[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: Re null in source code, see issue20115. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: It may be a Linux kernel 5.15 regression. I'm now trying to report this issue to the Linux kernel. -- ___ Python tracker ___

[issue45111] whole website translation error

2021-09-06 Thread Ned Deily
Change by Ned Deily : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___

[issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST)

2021-09-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: The doc section in question is https://docs.python.org/3/library/ast.html#ast.parse I confirmed that 'break', 'continue', 'yield', and 'return' still parse, with the results how having "type_ignores=[]" added. 'Module(body=[Expr(value=Yield())],

[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: It seems like the kernel was just upgrade from 5.14 to 5.15.rc0: vstinner@python-builder-rawhide$ date lun. 06 sept. 2021 14:05:43 EDT vstinner@python-builder-rawhide$ grep kernel /var/log/dnf.log 2021-09-03T06:35:58-0400 DEBUG Installed:

[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: I rewrote the test in C, see attached setitimer.c. On Fedora 34: --- $ rpm -q glibc glibc-2.33-20.fc34.x86_64 $ uname -r 5.13.8-200.fc34.x86_64 $ gcc setitimer.c -o setitimer && ./setitimer setitimer(<0.5, 0.5>) SIGVTALRM SIGVTALRM SIGVTALRM SIGVTALRM

[issue34561] Replace list sorting merge_collapse()?

2021-09-06 Thread Tim Peters
Change by Tim Peters : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34561] Replace list sorting merge_collapse()?

2021-09-06 Thread Tim Peters
Tim Peters added the comment: New changeset 5cb4c672d855033592f0e05162f887def236c00a by Tim Peters in branch 'main': bpo-34561: Switch to Munro & Wild "powersort" merge strategy. (#28108) https://github.com/python/cpython/commit/5cb4c672d855033592f0e05162f887def236c00a --

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2021-09-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: To be more precise, this change fixes https://bugs.python.org/issue41082 by raising RuntimeError instead of KeyError and also by documenting it, which means matplotlib can fix it by either using os.path.expanduser or catching RuntimeError, whichever might

[issue39899] `pathlib.Path.expanduser()` does not call `os.path.expanduser()`

2021-09-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: Note this change also fixes https://bugs.python.org/issue41082 . I'm guessing it's too much of an edge case to backport this fix to 3.9, so I've put up a possible fix via docs update on that issue. -- nosy: +andrei.avk, kj

[issue41082] Error handling and documentation of Path.home()

2021-09-06 Thread Andrei Kulakov
Andrei Kulakov added the comment: I looked a bit more into this, it's been fixed in 3.10, in this PR: https://github.com/python/cpython/pull/18841 It wasn't backported to 3.9. I'm not quite sure if it's best to backport to 3.9 or fix via docs for 3.9. Just in case I've put up a small PR for

[issue41082] Error handling and documentation of Path.home()

2021-09-06 Thread Andrei Kulakov
Change by Andrei Kulakov : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41082] Error handling and documentation of Path.home()

2021-09-06 Thread Andrei Kulakov
Change by Andrei Kulakov : -- keywords: +patch pull_requests: +26614 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28186 ___ Python tracker ___

[issue29232] Quiet Install

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: Earl, is there still an open problem to look into here or can this be closed? -- nosy: +iritkatriel ___ Python tracker ___

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread miss-islington
miss-islington added the comment: New changeset 6b5aea2dc1bf7e117d40d6c9035d5c13124fd968 by Miss Islington (bot) in branch '3.10': bpo-45052: Unskips a failing `test_shared_memory_basics` test (GH-28182) https://github.com/python/cpython/commit/6b5aea2dc1bf7e117d40d6c9035d5c13124fd968

[issue25066] Better repr for multiprocessing.synchronize objects

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: The patch need to be converted to a GitHub PR. -- keywords: +easy -patch nosy: +iritkatriel stage: patch review -> needs patch versions: +Python 3.11 -Python 3.5, Python 3.6 ___ Python tracker

[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45119] test_signal.test_itimer_virtual() failed on AMD64 Fedora Rawhide 3.x

2021-09-06 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Fedora Rawhide 3.x: https://buildbot.python.org/all/#/builders/285/builds/685 It is likely test_itimer_virtual() of test_signal which failed. On the buildbot worker: $ rpm -q glibc glibc-2.34.9000-5.fc36.x86_64 $ uname -r

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread Steve Dower
Steve Dower added the comment: It should also be possible to reduce the stack size of each frame. We've done that before, because there were multiple temporary buffers allocated on the stack that were trivially moved into functions. I bet we can also reduce the number of indirections, as

[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: This doc has changed, and it's now like this: parameter_list::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_posonly parameter_list_no_posonly ::= defparameter

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think that adding extra tests and docs are two separate new tasks. I will open them today. Thanks a lot, everyone! пн, 6 сент. 2021 г. в 19:56, Steve Dower : > > Steve Dower added the comment: > > The test fix looks good to me. That resolves this issue,

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Steve Dower
Steve Dower added the comment: The test fix looks good to me. That resolves this issue, yes? The other work is going on elsewhere? -- nosy: -miss-islington ___ Python tracker

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +26613 pull_request: https://github.com/python/cpython/pull/28185 ___ Python tracker

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Steve Dower
Steve Dower added the comment: New changeset 19871fce3b74fc3f37e334a999e00d0ef65a8f1e by Nikita Sobolev in branch 'main': bpo-45052: Unskips a failing `test_shared_memory_basics` test (GH-28182) https://github.com/python/cpython/commit/19871fce3b74fc3f37e334a999e00d0ef65a8f1e --

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread Steve Dower
Steve Dower added the comment: I strongly disagree. If CI needs to be faster, please just change the CI configuration. If contributors have to wait a few minutes longer, they can wait - they'll save that time in local compilations. Local debugging absolutely relies on debug builds. You'd be

[issue7391] [doc] restore the "Idioms and Anti-Idioms in Python" document

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: The document out of date when it was removed and is now another dozen years older. Since then no one has expresses any interest with this and other tools have emerged to deal with code formatting. -- resolution: -> out of date stage: ->

[issue18534] [doc] State clearly that open() 'file' param is "name" attr of the result

2021-09-06 Thread Irit Katriel
Change by Irit Katriel : -- keywords: +easy title: State clearly that open() 'file' param is "name" attr of the result -> [doc] State clearly that open() 'file' param is "name" attr of the result versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Perhaps these critical code sections should have been left as macros. It is difficult to assuring system wide inlining across modules. -- nosy: +rhettinger ___ Python tracker

[issue45112] Python exception object is different after pickle.dumps and pickle.loads

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: It would be nice if exception pickling was more friendly to subclasses. Perhaps, the default should be to store and restore all state including args and a __dict__ if any. -- ___ Python tracker

[issue45105] Incorrect handling of unicode character \U00010900

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Rather than defining again functions as macro, you should consider using __forceinline function attribute: see bpo-45094. -- ___ Python tracker

[issue45118] regrtest no longer lists "re-run tests" in the second summary

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26612 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28183 ___ Python tracker ___

[issue45118] regrtest no longer lists "re-run tests" in the second summary

2021-09-06 Thread STINNER Victor
New submission from STINNER Victor : When running Python with test -w/--verbose2 command line option to re-run tests which failed, the failing tests are listed in the first summary, and they are not listed in the final summary. Example with Lib/test/test_x.py: --- import builtins import

[issue7391] [doc] restore the "Idioms and Anti-Idioms in Python" document

2021-09-06 Thread Irit Katriel
Change by Irit Katriel : -- title: Re-title the "Using Backslash to Continue Statements" anti-idiom -> [doc] restore the "Idioms and Anti-Idioms in Python" document versions: +Python 3.11 -Python 3.2, Python 3.3 ___ Python tracker

[issue44348] test_exceptions.ExceptionTests.test_recursion_in_except_handler stack overflow on Windows debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Another *working* approach to fix this issue: bpo-45115 "Windows: enable compiler optimizations when building Python in debug mode". -- ___ Python tracker

[issue45117] `dict` not subscriptable despite using `__future__` typing annotations

2021-09-06 Thread Ștefan Istrate
New submission from Ștefan Istrate : According to PEP 585 (https://www.python.org/dev/peps/pep-0585/#implementation), I expect that typing aliases could simply use `dict` instead of `typing.Dict`. This works without problems in Python 3.9, but in Python 3.8, despite using `from __future__

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: -pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28182 ___ Python tracker ___

[issue30060] Crash with subinterpreters and Py_NewInterpreter()

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: Closing as there was no followup to Eric's question. Please create a new issue if you still see this problem on a version >= 3.9. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: pending -> closed

[issue28451] pydoc.safeimport() raises ErrorDuringImport() if __builtin__.__import__ is monkey patched

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: It is no longer using the traceback check: https://github.com/python/cpython/blob/37272f5800ee1e9fcb2da4a1766366519b9b3d94/Lib/pydoc.py#L445 -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Nikita Sobolev added the comment: Ok, that's what I was able to find. Original BPO: https://bugs.python.org/issue35813 Original PRs (sources + tests): - https://github.com/python/cpython/pull/11664 it was a little bit "rushed" - https://github.com/python/cpython/pull/11816 follow up Related:

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: I recently documented the "Python debug build": https://docs.python.org/dev/using/configure.html#python-debug-build -- ___ Python tracker

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +26610 pull_request: https://github.com/python/cpython/pull/28128 ___ Python tracker ___

[issue45094] Consider using __forceinline and __attribute__((always_inline)) on static inline functions (Py_INCREF, Py_TYPE) for debug builds

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Sadly, Py_ALWAYS_INLINE does *not* prevent test_exceptions to crash with my PR 28128 (convert Py_TYPE macro to a static inline function). Even if the Py_TYPE() static inline function is inlined, the stack memory still increases. MSC produces inefficient

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread neonene
Change by neonene : Added file: https://bugs.python.org/file50264/ceval_310rc1_patched.c ___ Python tracker ___ ___ Python-bugs-list

[issue45116] Performance regression 3.10b1 and later on Windows

2021-09-06 Thread neonene
New submission from neonene : pyperformance on Windows shows some gap between 3.10a7 and 3.10b1. The following are the ratios compared with 3.10a7 (the higher the slower). - Windows x64 | PGO release official-binary

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: This change is motivated by my PR 28128 which converts the Py_TYPE() macro to a static inline function. The problem is that by default, MSC disables inlining and test_exceptions does crash with a stack overflow, since my change increases the usage of the

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +26609 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28181 ___ Python tracker ___

[issue45115] Windows: enable compiler optimizations when building Python in debug mode

2021-09-06 Thread STINNER Victor
New submission from STINNER Victor : The Visual Studio project of Python, PCBuild\ directory, disables compiler optimizations when Python is built in debug mode. It seems to be the default in Visual Studio. Disabling compiler optimizations cause two kinds of issues: * It increases the stack

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine
E. Paine added the comment: Apologies, my previous message was not clear. When the segfault occurs is not consistent and sometimes occurs when previewing the font (as reported in the linked message) but more often when clicking the "ok" button (for which the faulthandler details are

[issue45103] IDLE: make configdialog font page survive font failures

2021-09-06 Thread E. Paine
E. Paine added the comment: FTR, the issue mentioned is issue42225. msg380227 still applies for me (with Tk 8.6.11), with segfaults when I try to preview the font. For some reason, however, the segfault appears to be when we're closing the options window: Python 3.9.6 (default, Jun 30

[issue44863] Allow TypedDict to inherit from Generics

2021-09-06 Thread Guido van Rossum
Guido van Rossum added the comment: Since this primarily affects static type checkers such as mypy, Pyre and pyright, it’s best to discuss it on typing-sig. -- ___ Python tracker

[issue45112] Python exception object is different after pickle.dumps and pickle.loads

2021-09-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: not a bug -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list

[issue45112] Python exception object is different after pickle.dumps and pickle.loads

2021-09-06 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue45112] Python exception object is different after pickle.dumps and pickle.loads

2021-09-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Pickling customized subclasses can be tricky. The essential details are here: https://docs.python.org/3/library/pickle.html#object.__reduce__ Here's some code to get you started. class ExcA(Exception): def __init__(self, want): msg =

  1   2   >