[issue41281] Wrong/missing code formats in datetime documentation

2020-07-11 Thread yyyyyyyan
Change by yyyan : -- keywords: +patch pull_requests: +20595 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21447 ___ Python tracker ___

[issue41281] Wrong/missing code formats in datetime documentation

2020-07-11 Thread yyyyyyyan
New submission from yyyan : The datetime page in the docs is missing a lot of needed backquotes syntax for inline code samples. There are some wrong role links too, due to ambiguity in the text roles. -- assignee: docs@python components: Documentation messages: 373547 nosy:

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: In 3.9, the @cache() alias is provided as a cleaner way to create an unbounded cache.¹ There is no need to special case a zero-arity function. Besides as Rémi and Serhiy have pointed out, we can't know the arity in advance. ¹

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The number of arguments is determined when the function is called (and it may be different for every call). maxsize is specified when the function is created. -- nosy: +serhiy.storchaka ___ Python tracker

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi Tom Forbes, I don't think there is a way to be sure that's the function does not take any argument. Are you worried about the lost memory when maxsize is not set? -- nosy: +remi.lapeyre ___ Python tracker

[issue41233] Missing links to errnos on Built-in Exceptions page

2020-07-11 Thread yyyyyyyan
yyyan added the comment: Thank you so much! :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Tom Forbes
New submission from Tom Forbes : `functools.lru_cache` has a maxsize=128 default for all functions. If a function has no arguments then this maxsize default is redundant and should be set to `maxsize=None`: ``` @functools.lru_cache() def function_with_no_args(): pass ``` Currently you

[issue41274] Better way to random.seed()?

2020-07-11 Thread Juan Jimenez
Juan Jimenez added the comment: How would I know if my demo is good enough to be included in that repo? Is there a guide for this, or do I just create a pull request, throw it over the fence and wait until the wolves either grunt in approval or throw it back at me in pieces? I ask because I

[issue41233] Missing links to errnos on Built-in Exceptions page

2020-07-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Near the bottom of the opening page: https://devguide.python.org/#status-of-python-branches The meaning of 'status' is explained elsewhere. -- ___ Python tracker

[issue41266] IDLE call hints and completions confused by ints and floats

2020-07-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Neither '1 .bit_length()' (space required) nor '1.3.hex()', both legal syntax, get either proper completions or call hints. Neither does the erroneous syntax '1.bit_length'. This suggests that the backwards parsing from the final '.' could be improved.

[issue40360] Deprecate lib2to3 (and 2to3) for future removal

2020-07-11 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for joining in! How do you do incremental parsing with LL1 currently? FWIW I found https://ohmlang.github.io/pubs/sle2017/incremental-packrat-parsing.pdf which may have some useful ideas. -- ___ Python

[issue41233] Missing links to errnos on Built-in Exceptions page

2020-07-11 Thread yyyyyyyan
yyyan added the comment: Thank you, @terry.reedy! Can you point me if this is defined in some written document I can check? Or is it an internal rule everyone kinda finds out by themselves? -- ___ Python tracker

[issue41268] 3.9-dev regression? TypeError: exec_module() missing 1 required positional argument: 'module'

2020-07-11 Thread Ned Deily
Change by Ned Deily : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34624] -W option and PYTHONWARNINGS env variable does not accept module regexes

2020-07-11 Thread Thomas Gläßle
Thomas Gläßle added the comment: Hi, I have rebased this on master and fixed the minor conflict. Let me know if there is anything else I can do. Best, Thomas -- versions: +Python 3.10, Python 3.9 ___ Python tracker

[issue41220] add optional make_key argument to lru_cache

2020-07-11 Thread Jim Jewett
Jim Jewett added the comment: Going back to Raymond's analysis, this is useful when at least some of the parameters either do not change the result, or are not hashable. At a minimum, you need to figure out which parameters those are, and whether to drop them or transform them. Is this

[issue41246] IOCP Proactor same socket overlapped callbacks

2020-07-11 Thread Tony
Tony added the comment: I feel like the metadata is not really a concern here. I like when there is no code duplication :) -- ___ Python tracker ___

[issue41246] IOCP Proactor same socket overlapped callbacks

2020-07-11 Thread Jim Jewett
Jim Jewett added the comment: Looks good to me. I at first worried that the different function names were useful metadata that was getting lost -- but the names were already duplicated in several cases. *If* that is still a concern for the committer, then instead of repeating the code

[issue41217] Obsolete note for default asyncio event loop on Windows

2020-07-11 Thread Jim Jewett
Jim Jewett added the comment: Looks good to me. -- nosy: +Jim.Jewett ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue41212] Emoji Unicode failing in standard release of Python 3.8.3 / tkinter 8.6.8

2020-07-11 Thread Jim Jewett
Jim Jewett added the comment: @Ben Griffin -- Unicode has defined astral characters for a while, but they were explicitly intended for rare characters, with any living languages intended for the basic plane. It is only the most recent releases of unicode that have broken the "most people

[issue39542] Cleanup object.h header

2020-07-11 Thread Jim Jewett
Jim Jewett added the comment: Raymond, did you replace the screenshot with a later one showing that things are fixed now? The timestamp suggests it went up at the same time as your comment, but what I see in the .png file is that the two are identical other than addresses. --

[issue38490] statistics: add covariance, Pearson's correlation, and simple linear regression

2020-07-11 Thread Tymek Wołodźko
Tymek Wołodźko added the comment: Is there anything more I should do about the PR? Sincerely, Tim On Fri, May 22, 2020 at 10:45 PM Cheryl Sabella wrote: > > Cheryl Sabella added the comment: > > @steven.daprano and @tim.peters, please take a look at the PR as it is > just waiting on your

[issue41279] Convert StreamReaderProtocol to a BufferedProtocol

2020-07-11 Thread Tony
Change by Tony : -- keywords: +patch pull_requests: +20594 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21446 ___ Python tracker ___

[issue41273] asyncio: proactor read transport: use recv_into instead of recv

2020-07-11 Thread Tony
Change by Tony : -- pull_requests: +20593 pull_request: https://github.com/python/cpython/pull/21446 ___ Python tracker ___ ___

[issue41266] Wrong hint when class methods and builtins named same

2020-07-11 Thread E. Paine
E. Paine added the comment: Both of the following cases give the correct popup help information: float.hex( And: t = type("test_hex", (), {"hex": lambda nothing: None}) t.hex( The reason your case fails is because IDLE doesn't evaluate `1.3` to a float and does indeed use the normal `hex`

[issue41279] Convert StreamReaderProtocol to a BufferedProtocol

2020-07-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +asyncio nosy: +asvetlov, yselivanov ___ Python tracker ___ ___

[issue38556] Walrus operator in list comprehensions [Python 3.8.0]

2020-07-11 Thread Anselm Kiefner
Anselm Kiefner added the comment: I just stumbled over this same restriction and when I googled for "SyntaxError: cannot assign to named expression", 0 actual results showed - an absolute unicorn for a Python error. > "Due to design constraints in the reference implementation (the symbol

[issue41279] Convert StreamReaderProtocol to a BufferedProtocol

2020-07-11 Thread Tony
New submission from Tony : This will greatly increase performance, from my internal tests it was about 150% on linux. Using read_into instead of read will make it so we do not allocate a new buffer each time data is received. -- messages: 373526 nosy: tontinton priority: normal

[issue41208] An exploitable segmentation fault in marshal module

2020-07-11 Thread Iman Sharafodin
Iman Sharafodin added the comment: Nevertheless, I have an exploitable crash for the Pickle module too right now, but as you're not interested, I didn't open an issue to share it. Thanks anyway. -- ___ Python tracker

[issue41278] Wrong Completion on Editing Mode of IDLE

2020-07-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows, with 3.8.4rc1 and 3.8 repository, ^space brings up proper list. Give more details. -- ___ Python tracker ___

[issue41236] "about" button in MacOS caused an error

2020-07-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: You're right. "python3.9 -m tkinter" runs the tkinter widget demo. And python >= About python brings up 'about tkinter' window. I just deleted 3.7 so I cannot easily test. 3.8 works also. -- ___ Python

[issue41136] argparse uses default encoding when read arguments from file

2020-07-11 Thread Zackery Spytz
Change by Zackery Spytz : -- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +20592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21444 ___ Python tracker

[issue41220] add optional make_key argument to lru_cache

2020-07-11 Thread Itay azolay
Itay azolay added the comment: Hey Felipe! Thanks for stepping in! I do get your argument. However, in my opinion, I try to argue the same thing for max or sorted. "if one wants to use `sorted`, they should make sure their arguments are comparable". However, it is not the case, since we do

[issue41273] asyncio: proactor read transport: use recv_into instead of recv

2020-07-11 Thread Tony
Change by Tony : -- pull_requests: +20589 pull_request: https://github.com/python/cpython/pull/21442 ___ Python tracker ___ ___

[issue41270] NamedTemporaryFile is not its own iterator.

2020-07-11 Thread Tony
Change by Tony : -- pull_requests: +20590 pull_request: https://github.com/python/cpython/pull/21442 ___ Python tracker ___ ___

[issue41268] 3.9-dev regression? TypeError: exec_module() missing 1 required positional argument: 'module'

2020-07-11 Thread Hugo van Kemenade
Hugo van Kemenade added the comment: Okay, looks like this is actually a setuptools issue, introduced in version 47.3.2. Reported: https://github.com/pypa/setuptools/issues/2246 -- ___ Python tracker

[issue41210] LZMADecompressor.decompress(FORMAT_RAW) truncate output when input is paticular LZMA+BCJ data

2020-07-11 Thread Hiroshi Miura
Hiroshi Miura added the comment: Here is a BCJ only CFFI test project. https://github.com/miurahr/bcj-cffi It imports two bcj_x86 C sources, one is from liblzma (src/xz_bcj_x86.c) taht is bind with python's lzma module, and the other is from xz-embbed project for linux

[issue41278] Wrong Completion on Editing Mode of IDLE

2020-07-11 Thread Alex
New submission from Alex <2423067...@qq.com>: When I type (on editing mode, not interacting mode) __main__. + Ctrl+Space, the completion window shows 'idlelib'. -- assignee: terry.reedy components: IDLE messages: 373518 nosy: Alex-Python-Programmer, terry.reedy priority: normal

[issue41236] "about" button in MacOS caused an error

2020-07-11 Thread Ned Deily
Ned Deily added the comment: Terry, based on the error message provided, i.e. "About Widget Demo", I assumed that the poster was not using IDLE here. But we can't tell without more input. "when I run 3.9 test.pythoninfo, I am asked to install gcc tools and maybe xcode. Is this expected?"