[issue45067] Failed to build _curses on CentOS 7

2021-09-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: According to https://invisible-island.net/ncurses/NEWS.html#index-t20170401 the function extended_color_content was introduced in 2017, maybe the detection of support for this function doesn't work properly for some reason (although the preprocessor logic

[issue45111] whole website translation error

2021-09-06 Thread W Huang
New submission from W Huang : Traditional Chinese is translated incorrectly into Simplified Chinese. But Taiwanese CAN NOT read Simplified Chinese fluently. In addition, there are many words called by different name between Chinese and Taiwanese. Sometimes Taiwanese CAN NOT understand what a

[issue45110] argparse repeats itself when formatting help metavars

2021-09-06 Thread paul j3
paul j3 added the comment: The idea of combining help features by defining a subclass that inherits from other subclasses was endorsed by the original developer (we could dig up an old bug/issue to prove that). The provided subclasses all tweak a "private" method, often one that's buried

[issue45110] argparse repeats itself when formatting help metavars

2021-09-06 Thread Forest
Forest added the comment: >Subclassing a help formatter is preferred because it minimizes the chance of >hurting existing users. Fair enough. Whatever the approach, I hope argparse can be made to support this through a simple, documented interface. I had to grovel through standard library

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

2021-09-06 Thread Chen Zero
Change by Chen Zero : -- title: Python exception object is different after pickle.loads and pickle.dumps -> Python exception object is different after pickle.dumps and pickle.loads ___ Python tracker

[issue45106] Issue formating for log on Linux machines

2021-09-06 Thread Inada Naoki
Inada Naoki added the comment: It is fixed in Python 3.9. * https://github.com/python/cpython/pull/14008 * https://bugs.python.org/issue37111 Python 3.8 is "security" status for now. Non-security issues won't be fixed. Please migrate to Python 3.9. -- nosy: +methane resolution: ->

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

2021-09-06 Thread Chen Zero
New submission from Chen Zero : Hi, when I'm trying to serialize/deserialize python exception object through pickle, I found that deserialize result is not the same as the original object... My python version is 3.9.1, working os: macOS Big Sur 11.4 Here is minimum reproducing code example:

[issue42959] AttributeError: module 'signal' has no attribute 'SIGHUP'

2021-09-06 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +iritkatriel nosy_count: 6.0 -> 7.0 pull_requests: +26608 pull_request: https://github.com/python/cpython/pull/23688 ___ Python tracker ___

[issue42238] Deprecate suspicious.py?

2021-09-06 Thread Julien Palard
Julien Palard added the comment: New changeset 37272f5800ee1e9fcb2da4a1766366519b9b3d94 by Julien Palard in branch 'main': bpo-42238: [doc] remove unused, and deduplicate, suspicious ignore rules. (GH-28137) https://github.com/python/cpython/commit/37272f5800ee1e9fcb2da4a1766366519b9b3d94

[issue45110] argparse repeats itself when formatting help metavars

2021-09-06 Thread Forest
Forest added the comment: Here's another working example, allowing alternate separator strings (as requested in #33389) via subclassing: class OneMetavarHelpFormatter(argparse.HelpFormatter): """A formatter that avoids repeating action metavars. """ OPTION_SEPARATOR = ', '

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-09-06 Thread STINNER Victor
STINNER Victor added the comment: Hai Shi: > IMO, I suggest to create a new function, PyStructSequence_FromModuleAndDesc() Please create a new issue. If possible, I would prefer to have a sub-issue for that, to keep this issue as a tracking issue for all issues related to subinterpreters.

[issue42959] AttributeError: module 'signal' has no attribute 'SIGHUP'

2021-09-06 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: -26608 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45110] argparse repeats itself when formatting help metavars

2021-09-06 Thread Forest
Forest added the comment: To be clear, I wrote those examples to be non-invasive, not patch proposals. A cleaner approach would be possible if patching argparse is an option. (I believe the patch in #42980 proposes such an approach.) -- ___ Python

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

2021-09-06 Thread Hai Shi
Hai Shi added the comment: > But I encourage you to try, so you get a better understanding of the problem > :) OK, thanks, Petr. I try to add this C API to see what will happen :) -- ___ Python tracker

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

2021-09-06 Thread Irit Katriel
Irit Katriel added the comment: The default __reduce__ method of Exception returns the arg you pass to the Exception constructor: >>> a = ExcA("a banana") >>> a.__reduce__() (, ('missing a banana',)) >>> This is then pickled, and when unpickled the arg is passed to the ExcA constructor.

[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

RE: on writing a while loop for rolling two dice

2021-09-06 Thread Avi Gross via Python-list
For some people the "while true" method seems reasonable but it has a problem if the internal body does not have some guarantee of an exit. And that exit can be subtle. Many have mentioned ways an end condition can fail due to rounding errors not being exactly equal to what you are looking for, or

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

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

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

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

[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

[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

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

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

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

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

[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

[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

Re: Problem with python

2021-09-06 Thread Grant Edwards
On 2021-09-04, Hope Rouselle wrote: > Igor Korot writes: > >> Hi, >> Will this syntax work in python 2? > > If you say > > print(something) > > it works in both. But it doesn't always work the _same_ in both. If you're expecting some particular output, then one or the other might not won't

Re: on writing a while loop for rolling two dice

2021-09-06 Thread Dennis Lee Bieber
On Sat, 4 Sep 2021 12:27:55 -0500, "Michael F. Stemper" declaimed the following: > >Kernighan and Ritchie agree(d) with you. Per _The C Programming >Language__: > Experience shows that do-while is much less used that while > and for. > And just for confusion, consider languages with

Re-design the position of the RPROMPT string.

2021-09-06 Thread hongy...@gmail.com
I forked and made some improvements to the ariadne package [1]. I noticed that the current RPROMPT line is composed by percol.view.PROMPT [2] and percol.view.__class__.RPROMPT [3], as shown below: X10DAi-00 (M-h/M-n)> M-m:string Path:C-d Local:C-l Unique:M-r Exit0:M-t Fold:F1,F2,F3

[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

[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

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

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

[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

[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

[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

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

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

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

[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

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

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

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

[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())],

[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

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

[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

Re: CPython / Decimal and bit length of value.

2021-09-06 Thread jak
Il 03/09/2021 22:09, Nacnud Nac ha scritto: Hi, Is there a quick way to get the number of bits required to store the value in a Decimal class? What obvious thing am I missing? I'm working with really large integers, say, in the order of 5_000_000 of ASCII base 10 digits. It seems the function

[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

[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

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

[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

[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

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

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

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

[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

[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

Re: on floating-point numbers

2021-09-06 Thread Dennis Lee Bieber
On Sat, 04 Sep 2021 10:40:35 -0300, Hope Rouselle declaimed the following: >course, I don't even have floats to worry about.) If I'm given 1.17, >say, I am not confident that I could turn this number into 117 by >multiplying it by 100. And that was the question. Can I always >multiply such

Re: on floating-point numbers

2021-09-06 Thread Grant Edwards
On 2021-09-05, Peter J. Holzer wrote: > On 2021-09-05 03:38:55 +1200, Greg Ewing wrote: >> If 7.23 were exactly representable, you would have got >> 723/1000. >> >> Contrast this with something that *is* exactly representable: >> >> >>> 7.875.as_integer_ratio() >> (63, 8) >> >> and observe

Re: on floating-point numbers

2021-09-06 Thread Hope Rouselle
"Peter J. Holzer" writes: > On 2021-09-05 03:38:55 +1200, Greg Ewing wrote: >> If 7.23 were exactly representable, you would have got >> 723/1000. >> >> Contrast this with something that *is* exactly representable: >> >> >>> 7.875.as_integer_ratio() >> (63, 8) >> >> and observe that 7875/1000

[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

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

[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

[issue40512] [subinterpreters] Meta issue: per-interpreter GIL

2021-09-06 Thread hai shi
hai shi added the comment: bpo-45113: [subinterpreters][C API] Add a new function to create PyStructSequence from Heap. -- versions: +Python 3.11 -Python 3.10 ___ Python tracker

[issue45114] bad example for os.stat

2021-09-06 Thread Harri
New submission from Harri : The example on https://docs.python.org/3/library/stat.html should be improved to avoid endless recursion, if there is a symlink loop. I would suggest to use os.lstat instead of os.stat. -- assignee: docs@python components: Documentation messages: 401133

[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

[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

[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

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

2021-09-06 Thread Petr Viktorin
Petr Viktorin added the comment: I think you will run into issues with allocating tp_members, because there isn't a good mechanism to for type objects to manage C-level data. But I encourage you to try, so you get a better understanding of the problem :) --

[issue44863] Allow TypedDict to inherit from Generics

2021-09-06 Thread Samodya Abey
Samodya Abey added the comment: My initial intention to create this ticket was to explore the idea that if we could side step from creating a PEP or updating PEP-589. IMO only contribution from a new PEP will be: 1. relaxing this line from PEP-589 and be explicit to include Generic: "A

[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: Adding Pablo, a.k.a The King of Errors. -- nosy: +iritkatriel, pablogsal ___ 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

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

[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

[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

[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

[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

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

2021-09-06 Thread hai shi
New submission from hai shi : Copied from https://bugs.python.org/issue40512#msg399847: Victor: PyStructSequence_InitType2() is not compatible with subinterpreters: it uses static types. Moreover, it allocates tp_members memory which is not released when the type is destroyed. But I'm not

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

[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

[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

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

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

[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

[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

[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

RE: on writing a while loop for rolling two dice

2021-09-06 Thread Avi Gross via Python-list
Let me add something, Stefan. Some people just want to get a job done. For this person, he had a very specific need for a one-time project where the rest of it was understood but one small step was confusing. Frankly, he could have done it faster by opening a text editor on something like a CSV

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

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

  1   2   >