[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon
Lucas Cimon added the comment: Reporting a duplicate / superseder with the following bug: parser = argparse.ArgumentParser() subparsers = parser.add_subparsers(required=True) subparsers.add_parser('foo') parser.parse_args() Raising: TypeError: sequence item 0: expected str instance, NoneType

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2021-05-21 Thread Lucas Cimon
Change by Lucas Cimon : -- nosy: +Lucas Cimon nosy_count: 7.0 -> 8.0 pull_requests: +24884 pull_request: https://github.com/python/cpython/pull/26278 ___ Python tracker ___ ___

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2021-05-21 Thread Lucas Cimon
Lucas Cimon added the comment: Sorry, the fix was by Mathias Ettinger: elif isinstance(argument, _SubParsersAction): return '{%s}' % ','.join(map(str, argument.choices)) I submitted a PR with this patch and a corresponding unit test: https://github.com/python/cpython/pull/26278 -

[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge
Isaac Ge added the comment: @ Josh Rosenberg Sorry, I mistook "follow" as "be followed by". Thanks to your explication, the document is coherent. I admit that I cannot conjure up any better altnernative. I noticed that "cased character" are explained via the footnote: https://docs.python.or

[issue44175] What do "cased" and "uncased" mean?

2021-05-21 Thread Isaac Ge
Isaac Ge added the comment: Or we could integrate the explanation of uncased characters into the footnote for cased characters, and append the footnote in "str.istitle()" and "str.upper()". -- ___ Python tracker

[issue44184] crash on windows invoking flake8

2021-05-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: > Crash related to AST in interpreter_clear() remains me bpo-41796. Well remembered, Victor! Bisecting using Pablo's reproducer: fd957c124c1d9c5eaf61f7af8cf266bafcb1 is the first bad commit commit fd957c124c1d9c5eaf61f7af8cf266bafcb1 Author: Victor

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Andre Roberge
Andre Roberge added the comment: I believe that this is similar to, but not quite as severe as a similar bug in code.interact() https://bugs.python.org/issue43366 which affects IDLE; perhaps fixing this might fix the other issue? -- nosy: +aroberge __

[issue41843] Reenable sendfile in shutil.copyfile() on Solaris

2021-05-21 Thread Jakub Kulik
Jakub Kulik added the comment: Based on the comment https://bugs.python.org/issue43743#msg393429 I think my question is answered: #36610 should not be reverted. Attached PR (which merely adds Solaris to systems where _USE_CP_SENDFILE is True) should thus be the preferred way of reenabling th

[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x

2021-05-21 Thread STINNER Victor
New submission from STINNER Victor : AMD64 Arch Linux Asan 3.x: https://buildbot.python.org/all/#/builders/582/builds/157 See also: * bpo-37224: [subinterpreters] test__xxsubinterpreters fails randomly * bpo-44100: test__xxsubinterpreters: test_one() fails in AMD64 Fedora Stable 3.x: "Fatal

[issue11176] [doc] give more meaningful argument names in argparse documentation

2021-05-21 Thread Bonifacio
Change by Bonifacio : -- pull_requests: +24885 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/26279 ___ Python tracker ___

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: Using Pablo's (or Victor's) reproducer from bpo-44184, I'm getting a crash, apparently because _PyThreadState_PushLocals() is called after PyThreadState_Clear(). In Python/pystate.c interpreter_clear(), we're first calling PyThreadState_Clear() (line 295

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Erlend E. Aasland
Erlend E. Aasland added the comment: cc. Pablo, Victor -- nosy: +pablogsal, vstinner ___ Python tracker ___ ___ Python-bugs-list ma

[issue44120] logging.config.fileConfig/dictConfig can not import class

2021-05-21 Thread Vinay Sajip
Vinay Sajip added the comment: > bar module use logging module of stdlib not bar.logging module in this test > case. Then bar.logging is ambiguous. There's no reason one has to use a stdlib package name in one's own package. -- ___ Python tracker

[issue43757] pathlib: move 'resolve()' logic out of path flavour

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset ee51c56c02d8eac28828a116fa35064919433d20 by Barney Gale in branch '3.10': [3.10] bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184) (GH-26270) https://github.com/python/cpython/commit/ee51c56c02d8eac28828a116

[issue38671] pathlib.Path.resolve(strict=False) returns relative path on Windows if the entry does not exist

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset ee51c56c02d8eac28828a116fa35064919433d20 by Barney Gale in branch '3.10': [3.10] bpo-38671: Add test that `pathlib.Path.resolve()` returns an absolute path. (GH-26184) (GH-26270) https://github.com/python/cpython/commit/ee51c56c02d8eac28828a116

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: No, this issue is in the parser while the other is caused by the code module. As I mentioned, this case doesn't ask you for tokens until you close the brace, it just ask you for one extra token because is doing a lookahead. If you give any extra token

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I will try to see if we can do something about this but the only thing I can think of is removing the lookaheads in the invalid comparison rules but then we need to solve the false positives (like keyword arguments) and that's going to be very hard to

[issue44204] socket.connect ignores CTRL+C during timeout on Win

2021-05-21 Thread Arpad Toth
New submission from Arpad Toth : Steps to Reproduce from http.client import HTTPConnection conn = HTTPConnection('192.1.5.2', 80, timeout=50) conn.request('GET', '/') conn.getresponse() Expected Behavior It should give up waiting when requested and exit immediately. Actual Behavior What happen

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset f14015adf52014c2345522fe32d43f15f001c986 by Senthil Kumaran in branch '3.10': [3.10] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26275) https://github.com/python/cpython/commit/f14015adf52014c2345522fe32d43f15f001c986 -

[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-05-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 0593ae84af9e0e8332644e7ed13d7fd8306c4e1a by Senthil Kumaran in branch '3.9': [3.9] bpo-43882 - Mention urllib.parse changes in Whats new section. (GH-26276) https://github.com/python/cpython/commit/0593ae84af9e0e8332644e7ed13d7fd8306c4e1a ---

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Vedran Čačić
Vedran Čačić added the comment: May I ask, is this going forward? I installed 3.11-dev, it's not there (though __future__ claims it should be). I understand if it isn't done yet, just want to know if there's risk it will be postponed again (or even given up). -- nosy: +veky _

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11

2021-05-21 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > May I ask, is this going forward? I installed 3.11-dev, it's not there > (though __future__ claims it should be). I understand if it isn't done yet, > just want to know if there's risk it will be postponed again (or even given > up). We are still waitin

[issue44164] Document what are resources in importlib.resources

2021-05-21 Thread Filipe Laíns
Change by Filipe Laíns : -- keywords: +patch pull_requests: +24886 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26280 ___ Python tracker ___

[issue44203] test__xxsubinterpreters: heap-buffer-overflow in interp_is_running() on AMD64 Arch Linux Asan 3.x

2021-05-21 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- nosy: +erlendaasland ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-21 Thread STINNER Victor
STINNER Victor added the comment: New changeset d3cc68900dc99966007112f884779895daefc7db by Jakub Kulík in branch '3.9': [3.9] bpo-43667: Fix broken Unicode encoding in non-UTF locales on Solaris (GH-25096) (GH-25847) https://github.com/python/cpython/commit/d3cc68900dc99966007112f884779895da

[issue43667] Solaris: Fix broken Unicode encoding in non-UTF locales

2021-05-21 Thread STINNER Victor
STINNER Victor added the comment: Backport to 3.8 may be more complicated. It's up to you to decide if you want to backport it or not. I merged your 3.9 backport, it looks very close to the change made in the main branch. -- ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24887 pull_request: https://github.com/python/cpython/pull/26281 ___ Python tracker _

[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-05-21 Thread Chris Burr
New submission from Chris Burr : When copying files between systems with different limits on the size of the extended attributes that can be added to a file shutil.copystat can fail with: /cvmfs/lhcb.cern.ch/lib/var/lib/LbEnv/2064/stable/linux-64/lib/python3.8/shutil.py in copystat(src, dst,

[issue44205] shutil.copystat can fail when copying to a file system with a smaller limit

2021-05-21 Thread Chris Burr
Change by Chris Burr : -- keywords: +patch pull_requests: +24888 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26282 ___ Python tracker ___ _

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 07dba474c582e61ca455846da7597d4346324e04 by Miss Islington (bot) in branch '3.10': bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253) (GH-26281) https://github.com/python/cpython/

[issue44206] Add a version number to dict keys.

2021-05-21 Thread Mark Shannon
New submission from Mark Shannon : Add a version number to dict keys. PEP 509 added a version number to dicts. Unfortunately this is no use for optimizing attribute loads and store on instances. We need to know whether the keys are as expected, not the dict as that is likely to be different e

[issue44206] Add a version number to dict keys.

2021-05-21 Thread Mark Shannon
Mark Shannon added the comment: The memory saving comes from converting: Py_ssize_t dk_size; dict_lookup_func dk_lookup; to: uint8_t dk_log2_size; uint8_t dk_loopup_kind; /* Only 3 possible values */ uint32_t dk_version; which saves 8 bytes on a 64 bit machine (no saving on

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24889 pull_request: https://github.com/python/cpython/pull/26283 ___ Python tracker ___ ___

[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'd intended for the changes in 5.1 to make it into CPython, but I've missed the deadline, so I've backported the referenced commits to importlib_resources 5.0.5 in order to sync into CPython. -- versions: +Python 3.11 _

[issue43956] C-API: Incorrect default value for Py_SetProgramName

2021-05-21 Thread Jouke Witteveen
Jouke Witteveen added the comment: It is unclear to me what is holding back the proposed pull request. Is it simply waiting for someone from docs@python to take a look, or did it fall off the radar of vstinner in his related activities to deprecate the legacy API? -- ___

[issue44207] Add a version number to Python functions

2021-05-21 Thread Mark Shannon
New submission from Mark Shannon : In order to specialize calls to Python functions, or to inline them, we need to know that the code object has not changed. It is also useful to know that the globals, builtins and various defaults haven't changed either. Rather than attempting to check these

[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread Jason R. Coombs
Change by Jason R. Coombs : -- keywords: +patch pull_requests: +24890 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26284 ___ Python tracker ___

[issue40280] Consider supporting emscripten/webassembly as a build target

2021-05-21 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Mark Shannon
Change by Mark Shannon : -- pull_requests: +24891 pull_request: https://github.com/python/cpython/pull/26285 ___ Python tracker ___

[issue44069] pathlib.Path.glob's generator is not a real generator

2021-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I agree that from the outside is seems slightly bizarre to make an internal list to implement a function documented as returning an iterator. However, list(scandir) was added by Serhiy in #26032 with the comment that it made globbing 1.5-4 times faster. Th

[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: I *think* that another bracket pair is needed, changing "," "/" to ["," "/"] -- nosy: +pablogsal, terry.reedy versions: +Python 3.11 -Python 3.9 ___ Python tracker _

[issue44137] importlib.resources.path raises RuntimeError when FileNotFoundError is raise in context manager

2021-05-21 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks for tracking this down, Filipe. Agreed it sounds like it's fixed in Python 3.10. It's unlikely the fix will be backported to Python 3.9. Instead, if this behavior affects your usage, consider using the `importlib_resources` backport, which also inclu

[issue44162] importlib.resources.path no longer supports directories

2021-05-21 Thread Jason R. Coombs
Change by Jason R. Coombs : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +24892 pull_request: https://github.com/python/cpython/pull/26286 ___ Python tracker _

[issue28937] str.split(): allow removing empty strings (when sep is not None)

2021-05-21 Thread Matthew Barnett
Matthew Barnett added the comment: I've only just realised that the test cases don't cover all eventualities: none of them test what happens with multiple spaces _between_ the letters, such as: ' a b c '.split(maxsplit=1) == ['a', 'b c '] Comparing that with: ' a b c '.split(' '

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch nosy: +terry.reedy nosy_count: 2.0 -> 3.0 pull_requests: +24893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26289 ___ Python tracker

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: IOError is a back-compatibility synonym for OSError. I will eliminate the last use from all 3 versions. The change to the previous example was done by 2 people who did not backport to 3.9 and I will not bother with that. Future versions are already fixed.

[issue44184] crash on windows invoking flake8

2021-05-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 12.0 -> 13.0 pull_requests: +24894 pull_request: https://github.com/python/cpython/pull/26290 ___ Python tracker ___

[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I think is correct: parameter_list ::= defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]] | parameter_list_no_posonly Says "a parameter_list" is either: defparameter ("," defparameter)* "," "/" ["," [parameter_list_no_posonly]

[issue44184] crash on windows invoking flake8

2021-05-21 Thread STINNER Victor
STINNER Victor added the comment: Anthony Sottile: I'm surprised that AST nodes survive until the last GC collection. It seems like somehow a reference cycle prevent to delete these nodes, and this reference cycle is kept alive somehow until the last GC collection at Python exit. It would b

[issue44038] In documentation Section 8.6, the definition of parameter_list need correcting

2021-05-21 Thread Terry J. Reedy
Terry J. Reedy added the comment: After mentally reparsing and translating to English, I think you are right. -- ___ Python tracker ___ ___

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24895 pull_request: https://github.com/python/cpython/pull/26291 ___ Python tracker ___ ___

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Mark, can you check the failure? Otherwise is going to start failing on the buildbots when we add the test case for the issue Erlend mentions. -- ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +24896 pull_request: https://github.com/python/cpython/pull/26292 ___ Python tracker ___ __

[issue44197] [request feature] Itertools extended combinations to limited number of repetition

2021-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it seems too obscure and special-purpose to me to even > qualify as a reasonable candidate for an itertools doc "recipe" My thoughts are the same. @latot Thank you for the suggestion but it doesn't make sense for the standard library. We respectfully d

[issue44197] [request feature] Itertools extended combinations to limited number of repetition

2021-05-21 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> rhettinger stage: resolved -> type: -> enhancement versions: +Python 3.11 ___ Python tracker ___ __

[issue43643] importlib.readers.MultiplexedPath.name is not a property

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset fdb65e399ea4e2d13dd41d65662ba25cafe15f1d by Miss Islington (bot) in branch '3.10': [3.10] bpo-43643: Sync with python/importlib_resources@c17a610aad. (GH-26284) (GH-26286) https://github.com/python/cpython/commit/fdb65e399ea4e2d13dd41d65662ba25

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +24897 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26293 ___ Python tracker _

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart
New submission from William Barnhart : An issue I encountered recently with argparse was when I tried running a script with its argument changed from something like: ``` parser.add_argument('--please_work') ``` and was replaced with: ``` parser.add_argument('--please-work') ``` I have not ever

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +24898 pull_request: https://github.com/python/cpython/pull/26294 ___ Python tracker ___ __

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread William Barnhart
Change by William Barnhart : -- keywords: +patch pull_requests: +24899 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26295 ___ Python tracker ___

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset 150bc1f4aa67226fb05fb29032375c203252a538 by Miss Islington (bot) in branch '3.10': bpo-43927: Change 'IOError' to 'OSError' (GH-26289) https://github.com/python/cpython/commit/150bc1f4aa67226fb05fb29032375c203252a538 -- __

[issue43927] Remove IOError references from the tutorial

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset e10bd76d47dbb4ac296017b963c308d287a9d2f2 by Miss Islington (bot) in branch '3.9': bpo-43927: Change 'IOError' to 'OSError' (GH-26289) https://github.com/python/cpython/commit/e10bd76d47dbb4ac296017b963c308d287a9d2f2 -- ___

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset ae1732d4611ee859c754e7a867b2a4cbb47d0637 by Miss Islington (bot) in branch '3.10': bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283) https://github.com/python/cpython/commit/ae1732d4611ee859c754e7a867b2a4cbb47d0637

[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2021-05-21 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Mark Shannon
Mark Shannon added the comment: What's the test case, exactly? ref.py for the other issue doesn't crash if I change "func.py" to "ref.py" otherwise it just complains that "func.py" doesn't exist. -- ___ Python tracker

[issue44032] Function locals and evaluation stack should be stored in a contiguous, per-thread stack

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Is the test added here: https://github.com/python/cpython/pull/26274 import ast import builtins import sys import os tree = ast.parse("pass") x = [tree] x.append(x) # Put the cycle somewhere to survive until the *last* GC collection def callback(*arg

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Guido van Rossum
Guido van Rossum added the comment: Could we implement something in the REPL where it refuses to read another line when asked for a token in an error recovery rule? -- ___ Python tracker

[issue43927] Remove IOError references from the tutorial

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

[issue42109] Use hypothesis for testing the standard library, falling back to stubs

2021-05-21 Thread Guido van Rossum
Guido van Rossum added the comment: Having read the parts of the paper that explain shortening, things are making more sense now. I have also successfully contributed type annotations to minithesis! :-) -- ___ Python tracker

[issue44209] urllib.robotparser fail on Disallow: /? from google.com

2021-05-21 Thread Karl Y. Pradene
New submission from Karl Y. Pradene : In robotparser.py On line 222 path = urllib.parse.urlunparse(urllib.parse.urlparse(path)) tranform the entry Disallow: /? in the google.com/robots.txt in : Disallow: / making every can_fetch request return False -- components: Library (Lib) messages

[issue44198] Add flags or function in pathlib.Path

2021-05-21 Thread Barney Gale
Barney Gale added the comment: My view: I think the existing solution (that you highlight) is sufficiently idiomatic and easy to discover, and doesn't warrant a new argument or function. However, that may change when `Path` is subclassable, for two reasons: 1. You will be able to subclass `

[issue44190] Dictionary assignment shorthand

2021-05-21 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-

[issue24929] _strptime.TimeRE should not enforce range in regex

2021-05-21 Thread Catherine Devlin
Catherine Devlin added the comment: Thinking about this a little more... I suggest that slowing down execution shouldn't be a worry in this case, because trying to parse a garbage string into a date shouldn't be something code is doing zillions of times, and if it is, being slow isn't a terr

[issue44140] WeakKeyDictionary should support lookup by id instead of hash

2021-05-21 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue44199] code example index error in tutorial controlflow

2021-05-21 Thread HVoltBb
HVoltBb added the comment: right. I just realized that the moment I hit the submit button, and I closed this issue right away. Thanks for clearing it up. -- ___ Python tracker __

[issue44208] argparse: Accept option without needing to distinguish "-" from "_" in arg_string

2021-05-21 Thread Catherine Devlin
Catherine Devlin added the comment: Your PR doesn't include any tests... but I like the idea enough to create the tests for you if you prefer. However, first I'd like to see whether the core devs like the idea. I could see saying either "yes, why not make things easy" or "no, there should b

[issue44187] Implement infrastructure for quickening and specializing

2021-05-21 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Yes, I was exactly working in that :) -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue44201] REPL requests another line despite syntax error

2021-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +24901 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26298 ___ Python tracker __

[issue19821] deprecate pydoc.ispackage()

2021-05-21 Thread Irit Katriel
Change by Irit Katriel : -- title: pydoc.ispackage() could be more accurate -> deprecate pydoc.ispackage() versions: +Python 3.11 -Python 3.5 ___ Python tracker ___ ___

[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns
New submission from Filipe Laíns : This protocol is needed to write type hints, so it should be public. -- components: Installation messages: 394150 nosy: FFY00, jaraco priority: normal severity: normal status: open title: Make importlib.metadata._meta.PackageMetadata public type: enhanc

[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns
Change by Filipe Laíns : -- keywords: +patch pull_requests: +24902 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26299 ___ Python tracker ___

[issue44210] Make importlib.metadata._meta.PackageMetadata public

2021-05-21 Thread Filipe Laíns
Change by Filipe Laíns : -- components: +Library (Lib) -Installation ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue43556] fix attr names for ast.expr and ast.stmt

2021-05-21 Thread Irit Katriel
Irit Katriel added the comment: New changeset 96c9961bfe1ab471a6bcd4b6e9255af25865dde2 by Zackery Spytz in branch '3.9': bpo-43556: Fix the attr names for ast.expr and ast.stmt in the docs (GH-24940) https://github.com/python/cpython/commit/96c9961bfe1ab471a6bcd4b6e9255af25865dde2 -

[issue43556] fix attr names for ast.expr and ast.stmt

2021-05-21 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: > We should check on a real-world benchmark instead of a micro benchmark. It is a pretty-targeted optimization, so I don't expect it to speed up the macro benchmarks. Though that shouldn't be a blocker for small, targeted optimizations. -- ___

[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Eric V. Smith
Eric V. Smith added the comment: > It is a pretty-targeted optimization, so I don't expect it to speed up the > macro benchmarks. Though that shouldn't be a blocker for small, targeted > optimizations. In the past we've rejected optimizations that make the code more complex and don't result

[issue44194] Folding ''.join() into f-strings

2021-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm also dubious that this would be of value in real code. Looking at the implementation, it seems to throw way too much code at too small of a problem. I suspect is is more likely to cause maintenance problems than to produce noticeable benefits for us

[issue39710] "will be returned as unicode" reminiscent from Python 2

2021-05-21 Thread Irit Katriel
Irit Katriel added the comment: The open PR updates the docstrings in Lib/calendar.py but the corresponding changes in Doc/ still need to be added. -- nosy: +iritkatriel versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker

[issue40736] better message for re.search TypeError ("expected string or bytes-like object")

2021-05-21 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue43167] Add a note to the macOS installer welcome window about customize options

2021-05-21 Thread Ned Deily
Ned Deily added the comment: As of the 3.9.5 and 3.10.0b1 macOS installers, the following text is displayed during installation near the top of the "Read Me" window: Install Options --- You can control some aspects of what is installed by this package. To see the options, click

[issue44211] Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 'image/x-ms-bmp'

2021-05-21 Thread Andreas Jansson
New submission from Andreas Jansson : The mime type of .bmp was changed from image/x-ms-bmp in https://github.com/python/cpython/pull/4756. https://github.com/python/cpython/pull/3062 then re-introduced image/x-ms-bmp while keeping the newer image/bmp mapping. -- components: Library

[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2021-05-21 Thread Irit Katriel
Change by Irit Katriel : -- stage: patch review -> test needed versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker ___ __

[issue36494] bdb.Bdb.set_trace: should set f_trace_lines = True

2021-05-21 Thread Irit Katriel
Irit Katriel added the comment: The patch needs a test. -- nosy: +iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue44211] Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 'image/x-ms-bmp'

2021-05-21 Thread Andreas Jansson
Change by Andreas Jansson : -- keywords: +patch pull_requests: +24903 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26300 ___ Python tracker ___

[issue44151] Improve parameter names and return value ordering for linear_regression

2021-05-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Zachery, unless someone steps with an objection, I think you can go forward with the PR to implement this signature: linear_regression(x, y, /) -> LinearRegression(slope, intercept) -- ___ Python tracker <

[issue43124] [security] smtplib multiple CRLF injection

2021-05-21 Thread Ned Deily
Ned Deily added the comment: Thanks for the PR! Can someone from the email team take a look at it, please? -- ___ Python tracker ___ _

[issue44184] crash on windows invoking flake8

2021-05-21 Thread Anthony Sottile
Anthony Sottile added the comment: that version of flake8 uses multiprocessing (even for 1 file) -- would the ast objects be involved in that way? (pyflakes also makes reference cyles to handle "parent" relationships) -- ___ Python tracker

[issue44206] Add a version number to dict keys.

2021-05-21 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

  1   2   >