[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-29 Thread Dennis Sweeney
Dennis Sweeney added the comment: This might be the expected behavior. See https://bugs.python.org/issue25222 If you already caught a RecursionError and you keep recursing anyway, once you go 50 levels beyond sys.getrecursionlimit(), the interpreter crashes regardless of what is `except`ed.

[issue42509] Recursive calls crash interpreter when checking exceptions

2020-11-29 Thread Xinmeng Xia
New submission from Xinmeng Xia : The following program 1 can crash in Python 3. We have reproduce it in the Python version 3.5, 3.6, 3.7, 3.8, 3.9, 3.10. This bug seems to be similar to issue 36272, however, the tracking system shows issue 36272 has been fixed and the program 2, which

Re: Reading binary data with the CSV module

2020-11-29 Thread Jason Friedman
> > csv.DictReader appears to be happy with a list of strings representing > the lines. > > Try this: > > contents = source_file.content() > > for row in csv.DictReader(contents.decode('utf-8').splitlines()): > print(row) > Works great, thank you! Question ... will this form potentially use

[issue42508] macOS IDLE with Tk 8.6.10 in 3.9.1rc1 universal2 installer fails smoke test

2020-11-29 Thread Ned Deily
New submission from Ned Deily : An IDLE installation manual smoke test gives odd behavior when run on macOS using the Tcl/Tk 8.6.10 introduced with the new macOS universal2 installer variant as of 3.9.1rc1. The test behaves as expected (without the duplicate and spurious error messages)

Re: Reading binary data with the CSV module

2020-11-29 Thread MRAB
On 2020-11-30 01:31, Jason Friedman wrote: Using the Box API: print(source_file.content()) returns b'First Name,Last Name,Email Address,Company,Position,Connected On\nPeter,van (and more data, not pasted here) Trying to read it via: with io.TextIOWrapper(source_file.content(),

[issue42507] test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10

2020-11-29 Thread Ned Deily
Change by Ned Deily : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42507] test_ttk_guionly test failures on macOS with Tcl/Tk 8.6.10

2020-11-29 Thread Ned Deily
New submission from Ned Deily : As of 3.9.1rc1 (and coming soon to 3.10.x and 3.8.x), we now provide a new additional macOS universal2 installer variant that, for various reasons, provides a built-in version of Tcl/Tk 8.6.10, instead of 8.6.8 as has been provided with the 10.9 installer

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-11-29 Thread Shantanu
Shantanu added the comment: You're right that Callable[[P], int] is invalid, so a flat representation isn't currently ambiguous. But a flat representation would foist the responsibility for checking that to all users of `__args__`. If your code isn't ParamSpec aware, your failures will

[issue12920] inspect.getsource only works for objects loaded from files, not interactive session

2020-11-29 Thread Alexey Volkov
Alexey Volkov added the comment: This is also an issue even for non-interactive scenarios: When doing `python -c ''` inspect.getsource does not work and there are no stack traces. Perhaps this case will be easier to fix? -- nosy: +Ark-kun ___

[issue42506] Unexpected output when running test_format

2020-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset d82e08d185d52086f4d921c08b853c76c80bebbe by Irit Katriel in branch '3.8': [3.8] bpo-42474: test TracebackException comparison to non-equal instances (GH-23558) https://github.com/python/cpython/commit/d82e08d185d52086f4d921c08b853c76c80bebbe

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 586bdd1add2ca7236e3096ab7167862cf17f0939 by Irit Katriel in branch '3.9': [3.9] bpo-42474: test TracebackException comparison to non-equal instances (GH-23557) https://github.com/python/cpython/commit/586bdd1add2ca7236e3096ab7167862cf17f0939

Reading binary data with the CSV module

2020-11-29 Thread Jason Friedman
Using the Box API: print(source_file.content()) returns b'First Name,Last Name,Email Address,Company,Position,Connected On\nPeter,van (and more data, not pasted here) Trying to read it via: with io.TextIOWrapper(source_file.content(), encoding='utf-8') as text_file: reader =

[issue42195] Inconsistent __args__ between typing.Callable and collections.abc.Callable

2020-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: Now that I've seen and reviewed KJ's implementation using _PosArgs, I am worried about it, as it looks quite complicated. @Shantanu, do we really need to worry that Callable[P, R] could be ambiguous? If P is a ParamSpec, wouldn't Callable[[P], R] be

[issue41837] Upgrade installers to OpenSSL 1.1.1h

2020-11-29 Thread Ned Deily
Ned Deily added the comment: Christian, ping? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42455] Add decorator_factory function to functools module

2020-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've add Nick so that he can opine. For me, I'm -0 on this one. It does factor-out a common pattern, but I find it less obvious what it does and would not enjoy debugging code that used this decorator. The idea is definitely interesting and worth

[issue42506] Unexpected output when running test_format

2020-11-29 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch pull_requests: +22445 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23564 ___ Python tracker ___

[issue42506] Unexpected output when running test_format

2020-11-29 Thread Zackery Spytz
New submission from Zackery Spytz : ./python -We -m test test_format 0:00:00 load avg: 0.64 Run tests sequentially 0:00:00 load avg: 0.64 [1/1] test_format Unexpected : '%d format: a real number is required, not str' Unexpected : '%d format: a real number is required, not str' Unexpected

[issue34570] Segmentation fault in _PyType_Lookup

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Python 2.7 is no longer supported. If you are having the issue with Python 3, please open a new issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue18213] py-bt errors on backtrace with PyRun_SimpleString and friends

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Python 2-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks Renato! -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___

Re: A problem with opening a file -- again

2020-11-29 Thread Eryk Sun
On 11/29/20, Chris Angelico wrote: > > This seems like a really REALLY bad idea. You're putting a lot of work > into your __del__ function, and that's not getting called until > everything's shutting down. (Also, xrange doesn't exist, hence the > "exception ignored" thing.) > > Avoid putting this

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: How does PR 23563 look to you all? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +22444 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23563 ___ Python tracker

Re: A problem with opening a file -- again

2020-11-29 Thread dn via Python-list
On 30/11/2020 10:36, Gabor Urban wrote: Hi guys, I tried to solve the problem once again. I have inserted some print statements the check the variables. The actual code (naplo.py) is copy-pasted here: Thanks = helpful +1 @Chris' response! Meantime, what happens if you start python, and

[issue42497] New pathlib.Path attribute

2020-11-29 Thread ThatXliner
ThatXliner added the comment: Ok, so I just made a patch implementing this using os.access. It adds the following methods to pathlib.Path - can_read= Returns True if the user can read the path - can_write = Returns True if the user can write on the path - can_execute = Returns True

Re: A problem with opening a file -- again

2020-11-29 Thread Chris Angelico
On Mon, Nov 30, 2020 at 8:37 AM Gabor Urban wrote: > class Naplo: > def __del__(self): > if self.sor != 0: > if self.start: > trc = open(self.logNev,self.startMode) > else: > trc = open(self.logNev,self.mode) > for

A problem with opening a file -- again

2020-11-29 Thread Gabor Urban
Hi guys, I tried to solve the problem once again. I have inserted some print statements the check the variables. The actual code (naplo.py) is copy-pasted here: class Naplo: def __init__(self, pNeve, pMeret, pMode = 'a'): self.logNev = pNeve self.meret = pMeret

Re: filtering out warnings

2020-11-29 Thread Jason Friedman
> > The Box API is noisy ... very helpful for diagnosing, and yet for > production code I'd like less noise. > > I tried this: > > warnings.filterwarnings( > action='ignore', > # category=Warning, > # module=r'boxsdk.*' > ) > > but I still see this: > >

Re: ssl connection has been closed unexpectedly

2020-11-29 Thread Dan Stromberg
What happens if you execute this from a shell prompt on a system with openssl installed? openssl s_client -connect host.com:443 (replacing host.com with your server's hostname and 443 with your port of interest) On Sat, Nov 28, 2020 at 3:30 PM Shaozhong SHI wrote: > Hi, > > I keep getting the

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread paul j3
paul j3 added the comment: choices is fine for a few strings, but quickly becomes awkward with other types and large numbers. The testing isn't an issue, since it just does a simple `in/contains` test. But display, whether in usage, help or error, is problematic if you try anything too

Re: numpy problem (follow up)

2020-11-29 Thread Malcolm
Hi https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy also has a numpy wheel 1.19.4+vanilla‑cp39‑cp39‑win_amd64.whl "Vanilla is a minimal distribution, which does not include any optimized BLAS libray or C runtime DLLs." Have not tried this. cheers Malcolm On 30/11/2020 7:19 am, MRAB

[issue42495] socket.gethostbyaddr raises error if invalid unicode in hosts

2020-11-29 Thread Christian Heimes
Christian Heimes added the comment: I cannot reproduce the issue on Linux: # echo "127.0.0.2 xn-9q8h" >> /etc/hosts # python3.8 >>> import socket >>> socket.gethostbyaddr("127.0.0.2") ('xn-9q8h', [], ['127.0.0.2']) -- nosy: +christian.heimes versions: -Python 3.6, Python 3.7

Re: numpy problem (follow up)

2020-11-29 Thread MRAB
On 2020-11-29 18:33, Dennis Lee Bieber wrote: On Sat, 28 Nov 2020 17:28:50 -0600, Larry Burford declaimed the following: when trying to run the tutorial program standardplot.py I get a msg that says my numpy won't pass a sanity check due to a problem in the Win runtime Wait for

[issue29732] Heap out of bounds read in tok_nextc()

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Kamil, I got the same result as Batuhan on a recent version. Are you seeing this on Python 3, or is it a python 2.7 issue? -- nosy: +iritkatriel status: open -> pending ___ Python tracker

[issue41734] Refactor b32{encode,decode} tests

2020-11-29 Thread Filipe Laíns
Filipe Laíns added the comment: Friendly ping on this. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset a83119d7be95dd3f5ff22abe289da6091584f853 by Miss Islington (bot) in branch '3.9': bpo-42450: Minor updates to the itertools recipes (GH-23555) (GH-23562) https://github.com/python/cpython/commit/a83119d7be95dd3f5ff22abe289da6091584f853

[issue39096] "Format Specification Mini-Language" doc mistake for Decimal

2020-11-29 Thread Mark Dickinson
Mark Dickinson added the comment: The 'default precision' issue is addressed; the issues that Michael reported about the `None` presentation type are still valid, I think. -- ___ Python tracker

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset fc40b3020cf3c869833fd5d3720cf9768fe3bb46 by Raymond Hettinger in branch 'master': bpo-42450: Minor updates to the itertools recipes (GH-23555) https://github.com/python/cpython/commit/fc40b3020cf3c869833fd5d3720cf9768fe3bb46 --

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread miss-islington
miss-islington added the comment: New changeset fcf7391f598e027a083173662a3ecf7865251291 by Miss Islington (bot) in branch '3.9': bpo-42406: Fix whichmodule() with multiprocessing (GH-23403) https://github.com/python/cpython/commit/fcf7391f598e027a083173662a3ecf7865251291 --

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-29 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +22443 pull_request: https://github.com/python/cpython/pull/23562 ___ Python tracker

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread miss-islington
miss-islington added the comment: New changeset b1c48e513624641d6472262c33d09624170ea1f5 by Miss Islington (bot) in branch '3.8': bpo-42406: Fix whichmodule() with multiprocessing (GH-23403) https://github.com/python/cpython/commit/b1c48e513624641d6472262c33d09624170ea1f5 --

Re: A problem with opening a file

2020-11-29 Thread Dieter Maurer
Gabor Urban wrote at 2020-11-29 08:56 +0100: >I am facing an issue I was not able to solve yet. I have a class saving >messages to a file. The relevant code is: > > > >import OS >import sys > >class MxClass: > >def __init__(self, fName, fMode,): >self.fileName = fName >

Re: ssl connection has been closed unexpectedly

2020-11-29 Thread Dieter Maurer
Shaozhong SHI wrote at 2020-11-28 23:29 +: >I keep getting the following error when I use engine = >create_engine(logging in details to postgres) >df.to_sql('table_name', and etc.) > > >OperationalError: (psycopg2.OperationalError) SSL connection has been >closed unexpectedly SSL works as

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread miss-islington
Change by miss-islington : -- pull_requests: +22442 pull_request: https://github.com/python/cpython/pull/23561 ___ Python tracker ___

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +22441 pull_request: https://github.com/python/cpython/pull/23560 ___ Python tracker

[issue42406] Importing multiprocessing breaks pickle.whichmodule

2020-11-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 86684319d3dad8e1a7b0559727a48e0bc50afb01 by Renato Cunha in branch 'master': bpo-42406: Fix whichmodule() with multiprocessing (GH-23403) https://github.com/python/cpython/commit/86684319d3dad8e1a7b0559727a48e0bc50afb01 --

[issue42497] New pathlib.Path attribute

2020-11-29 Thread ThatXliner
ThatXliner added the comment: Now I think of it, it would be weird to just add attributes testing for executable permissions. Why not add the attributes from os.access to pathlib.Path? - Path.can_execute = os.access(path, os.X_OK) - Path.can_read= os.access(path, R_OK) ...

[issue42497] New pathlib.Path attribute

2020-11-29 Thread ThatXliner
ThatXliner added the comment: Also, an App (at least on MacOS) is technically an executable (I've ran iMessage from the command line before). -- ___ Python tracker ___

[issue42497] New pathlib.Path attribute

2020-11-29 Thread ThatXliner
ThatXliner added the comment: Since pathlib.Path has module os synonyms, I think it would be reasonable to test with os.X_OK. Correct me if I'm wrong. I think most people would want to check if the current user running the script could execute something. -- type: -> enhancement

[issue42437] crypt produces wrong hashes for passwords containing dollar sign

2020-11-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35534] SIGSEGV in stackdepth_walk

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Python 2-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker ___

[issue10312] intcatcher() can deadlock

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: This is a python 2-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-29 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: Looks like we have done everything, we can close this issue -- ___ Python tracker ___

[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel
Change by Irit Katriel : -- stage: resolved -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33153] interpreter crash when multiplying large tuples

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: This is a python 2-only issue. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue41918] exec fails to take locals into account when running list comprehensions or functions

2020-11-29 Thread patterns
patterns added the comment: Also occurs in Python 3.6.9 -- nosy: +patterns ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22440 pull_request: https://github.com/python/cpython/pull/23558 ___ Python tracker ___

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Yes. I haven't managed to get the cherry-picker script working for me yet so this is a manual cherry-pick. I'm surprised the automatic backport failed - there was no merge conflict. -- ___ Python tracker

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +22439 pull_request: https://github.com/python/cpython/pull/23557 ___ Python tracker ___

[issue39096] "Format Specification Mini-Language" doc mistake for Decimal

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: These changes are a big improvement. Thanks, Mark. Should this issue be closed, or are you thinking of more changes? Personally I think we should leave it as it is now, and open another issue if people find fault with the new docs. --

[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2020-11-29 Thread FX Coudert
Change by FX Coudert : -- keywords: +patch pull_requests: +22437 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23556 ___ Python tracker ___

[issue42474] improve test coverage for TracebackException's __eq__

2020-11-29 Thread Guido van Rossum
Guido van Rossum added the comment: Irit, can you,do the manual backports? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2020-11-29 Thread James Guillochon
Change by James Guillochon : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list

[issue42505] MACOSX_DEPLOYMENT_TARGET should accept non-decimal (int) value versions

2020-11-29 Thread James Guillochon
James Guillochon added the comment: Closing in favor of https://bugs.python.org/issue42504 which has more details -- stage: -> resolved status: open -> closed ___ Python tracker

[issue42505] MACOSX_DEPLOYMENT_TARGET should accept non-decimal (int) value versions

2020-11-29 Thread James Guillochon
New submission from James Guillochon : See the discussion here https://github.com/Homebrew/homebrew-core/pull/65866#issuecomment-735366297, but this is currently a blocker for compilation via home-brew on Apple Silicon. Current workaround is to set the deployment target to "11.0" (rather

[issue42504] Failure to build with MACOSX_DEPLOYMENT_TARGET=11 on Big Sur

2020-11-29 Thread FX Coudert
New submission from FX Coudert : With macOS Big Sur (11.y.z), the major version is 11 (instead of the earlier 10.15, 10.14, etc). Therefore, MACOSX_DEPLOYMENT_TARGET=11 has become a valid setting. It is accepted by system tools: $ MACOSX_DEPLOYMENT_TARGET=11 clang a.c && echo $? 0 But it

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: Note that changing the os.fstat line to just "raise OSError()" no longer causes the "Fatal Python error", but rather gives the expected recursion exception. Here's a shorter version that causes the fatal error in Windows native 3.9, cygwin 3.8.3, and Fedora

[issue42455] Add decorator_factory function to functools module

2020-11-29 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- title: Add decorator_with_params function to functools module -> Add decorator_factory function to functools module ___ Python tracker

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Eric V. Smith
Eric V. Smith added the comment: Here's the smallest reproducer I could come up with. It fails on Windows with 3.9 native(compiled locally) (Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow), works (raises RecursionError) with cygwin 3.8.3. import os def

[issue42455] Add decorator_with_params function to functools module

2020-11-29 Thread Yurii Karabas
Yurii Karabas <1998uri...@gmail.com> added the comment: I agree, decorator factory definitely a better name -- ___ Python tracker ___

[issue42502] Conflict between get_traced_memory and setrlimit

2020-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1 KiB is too low for Python. The interpreter itself needs more than 10 MiB to start, and more if it imports some modules. I suppose that the limit set affect only new requests for memory from OS, but Python already have some free memory reserved in the

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Mark.Shannon, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue42503] Cannot declare method or static function parameter or return type as self of the class

2020-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can already write such code in 3.10. In earlier Python versions you can either write annotation explicitly as string or (since 3.7) use and import suggested by Irit. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved

[issue42455] Add decorator_with_params function to functools module

2020-11-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would call it decorator_factory. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue42503] Cannot declare method or static function parameter or return type as self of the class

2020-11-29 Thread Irit Katriel
Irit Katriel added the comment: Add at the top of your script: from __future__ import annotations -- nosy: +iritkatriel ___ Python tracker ___

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread shangxiao
shangxiao added the comment: Oh apologies, I had "open" selected when I searched for prior issues. Upon reading that issue I agree with Mr Hettinger's points about enum values not being a concern of the parser. The solution for my needs was simple enough: I made my own action which simply

[issue42496] Don't change indentation of RST markup

2020-11-29 Thread Andrés Delfino
Andrés Delfino added the comment: When I open a PR fixing mark-up it's because it has visual effects. -- ___ Python tracker ___ ___

[issue42503] Cannot declare method or static function parameter or return type as self of the class

2020-11-29 Thread parsa mpsh
New submission from parsa mpsh : python raises error `Undefined class X` when you declaring parameter type or return type of method as the self of class: class MyClass: def mymethod(self, a: MyClass): # parameter type is class self pass # or class MyClass: def mymethod(self)

[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-29 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 86150d39c888579b65841f4391d054b7b3eff9f2 by Yurii Karabas in branch 'master': bpo-42392: Remove deprecated loop parameter from docs (GH-23552) https://github.com/python/cpython/commit/86150d39c888579b65841f4391d054b7b3eff9f2 --

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: The value of the recursion limit is not relevant here, I get the same crash when I set the recursion limit to 100 (in my reproducer scriptlet). There might be a missing recursion level check in the exception handling machinery though, self-recursion in an

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: https://bugs.python.org/issue25061 also had some discussion over error message display for enums -- nosy: +xtreak ___ Python tracker

Re: How to run Jupyter notebook in command line and get full error message?

2020-11-29 Thread Skip Montanaro
> > My VPN keeps dropping and can not run Jupyter Notebook as it is. > You don't provide a lot of detail, but this seems similar to the kind of flaky networking we used to deal with in the Before Times. Simply connecting directly to a host over the Internet was often plagued by disconnects. For

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Vedran Čačić
Vedran Čačić added the comment: Recursion limit is probably set too high, but nonetheless, the program is nonsensical, the line 39 especially. The reason for difference in behavior is that RecursionError is caught by blank except in the earlier Pythons, while it crashes the stack in later

[issue42502] Conflict between get_traced_memory and setrlimit

2020-11-29 Thread Vipul Cariappa
New submission from Vipul Cariappa : I would first like to thank the python developers, contributors and the community for this wonderful programming language. I am trying to limit the memory consumption of a function; at the same time trying to figure out the maximum memory used during the

[issue42450] Docstrings in itertools recipes should have triple-quotes

2020-11-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +22436 pull_request: https://github.com/python/cpython/pull/23555 ___ Python tracker ___

[issue42500] crash with unbounded recursion in except statement

2020-11-29 Thread Ronald Oussoren
Change by Ronald Oussoren : -- title: status() crashes on Python3.9 and 3.10 -> crash with unbounded recursion in except statement ___ Python tracker ___

[issue42500] status() crashes on Python3.9 and 3.10

2020-11-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: The crash is not nice, but The script contains the following line in the definition of status(): except status() as e: That will cause unbounded recursion when os.fstat raises an exception, which likely happens here. You probably want to catch

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm inclined to state in the docs that choices is designed to work with collections of strings and that there is no special support for enums. Paul, what do you think? -- ___ Python tracker

[issue42496] Don't change indentation of RST markup

2020-11-29 Thread Georg Brandl
Georg Brandl added the comment: To be clear, this has nothing to do with the amount of indentation, but that the directive below (the versionadded) has 4 spaces, and the paragraph above had 5 before the change. Therefore the further-indented paragraph is taken as a blockquote. --

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +paul.j3, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39529] Deprecate get_event_loop()

2020-11-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +22435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23554 ___ Python tracker

[issue42433] mailbox.mbox fails on non ASCII characters

2020-11-29 Thread Florian Klink
Florian Klink added the comment: I opened https://github.com/python/cpython/pull/23553 - PTAL. I made this an enhancement for 3.10 - but it could probably also be backported to older versions -- keywords: +patch message_count: 4.0 -> 5.0 pull_requests: +22434 stage: -> patch review

[issue28764] test_mailbox fails when run as a non-root user on Android API 24

2020-11-29 Thread Florian Klink
Change by Florian Klink : -- nosy: +flokli nosy_count: 3.0 -> 4.0 pull_requests: +22433 pull_request: https://github.com/python/cpython/pull/23553 ___ Python tracker ___

[issue42501] Improve error messages for argparse choices using enum

2020-11-29 Thread shangxiao
New submission from shangxiao : Summary --- The argparse module mentions that it will happily accept an enum for the choices argument option [1]. There are currently 2 issues with this: 1. The usage displays non user-friendly values for the enum; 2. The error message for invalid values

[issue42392] remove the deprecated 'loop' parameter asyncio API

2020-11-29 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- pull_requests: +22432 pull_request: https://github.com/python/cpython/pull/23552 ___ Python tracker ___

[issue42497] New pathlib.Path attribute

2020-11-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: As a new feature, this could only go into 3.10, 3.9 is in feature freeze. The requirements are unclear, it could mean any of: - the file's *owner* has the execute bit set; - the file's mode has any execute bit set; - the *current user* has execute

  1   2   >