[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Eryk Sun
Eryk Sun added the comment: > Alternatively, can't we just os.chdir(self._old_cwd) in __enter__ and > preemptively fail? If the context manager isn't going to address the long-path case reliably using either a file-descriptor approach or repeated relative chdir() calls, then I think failin

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-10-25 Thread Tom Pohl
Tom Pohl added the comment: Thanks, Terry, for the hint. The idea got some support on python-ideas, so I thought it is worthwhile to do a PR. As a first-time contributor, I now have to wait for approval for the pipeline to run... -- ___ Python tr

[issue22789] Compress the marshalled data in PYC files

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

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > A LBYL won't always raise errors early as you point out. It will give earlier > warnings for a lot of cases, but makes contextlib.chdir usable in less places > than os.chdir. > Some return paths will always be errors, and some will be technically > recover

[issue36675] Doctest directives and comments missing from code samples

2021-10-25 Thread Ming Hua
Change by Ming Hua : -- nosy: +minghua ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Jeremy
Jeremy added the comment: A LBYL won't always raise errors early as you point out. It will give earlier warnings for a lot of cases, but makes contextlib.chdir usable in less places than os.chdir. Some return paths will always be errors, and some will be technically recoverable but too diffi

[issue45610] Cookies with longer paths are listed before cookies with shorter paths.

2021-10-25 Thread IYism
New submission from IYism : E.g: Set-Cookie: a=1; Domain=test.com; Path=/ Set-Cookie: a=2; Domain=demo.test.com; Path=/ Browser send Cookie: a=2; a=1 According to the agreed specification, a=2 should be read first, not a=1 But the wrong behavior of python is that the cookie reads a=1 by

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Does a LBYL strategy actually fix the problem? E.g. what if the directory gets rm'd between __enter__ and __exit__? Maybe we shouldn't try to be clever at all and just leave it to the user to decide what to do, and how to handle any chdir-back failures?

[issue45350] configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10

2021-10-25 Thread Ned Deily
Ned Deily added the comment: Note that we have since discovered that the fix for this problem inadvertently did not make it into the 3.10.0 release. It is in the current 3.10 branch and will be in 3.10.1, the first bugfix release for 3.10. -- ___

[issue45096] Update Tools/freeze to make use of Tools/scripts/freeze_modules.py?

2021-10-25 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +27485 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29222 ___ Python tracker ___

[issue11477] Incorrect operand precedence when implementing sequences in C

2021-10-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: Given that a lot of code is presumably relying on this (see the notes from 2015)... I wouldn't be surprised if this turns into a wart we document but not actually fix. :/ Or a conditional behavior we control via a `from __future__ import correct_extension

[issue45607] Make it possible to enrich an exception's error message

2021-10-25 Thread Zac Hatfield-Dodds
Zac Hatfield-Dodds added the comment: This code shows my current best workaround based on a wrapper exception, with the traceback below annotating the additional details that I'd prefer to omit for clarity: $ python example.py Traceback (most recent call last): File "example.py", line 8,

[issue45609] Specialize STORE_SUBSCR

2021-10-25 Thread Dennis Sweeney
Change by Dennis Sweeney : -- keywords: +patch pull_requests: +27484 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29221 ___ Python tracker ___ _

[issue45609] Specialize STORE_SUBSCR

2021-10-25 Thread Dennis Sweeney
New submission from Dennis Sweeney : See the issue here for lots of data from before specializing: https://github.com/faster-cpython/ideas/issues/105 See https://gist.github.com/sweeneyde/91855e50feb9992b604ddda2d4f1511e for specialization data, pyperformance benchmarks, and microbenchmarks.

[issue2628] ftplib Persistent data connection

2021-10-25 Thread Ethan Furman
Ethan Furman added the comment: We don't have a CLA from jbell. I've sent an email asking him to do so... we'll see what happens. -- nosy: +ethan.furman ___ Python tracker __

[issue45588] cached_method similar to cached_property to cache with classes

2021-10-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The lru_cache can trigger infinite recursion if it is used > to cache a hash computation because the cache look-up itself > requires the hash. Yes, I see the problem. Am not sure whether I should add a note to the docs for this. > The dataclass thin

[issue45607] Make it possible to enrich an exception's error message

2021-10-25 Thread Andre Roberge
Change by Andre Roberge : -- nosy: +aroberge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Filipe Laíns
Change by Filipe Laíns : -- pull_requests: +27483 pull_request: https://github.com/python/cpython/pull/29220 ___ Python tracker ___ _

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Filipe Laíns
Filipe Laíns added the comment: s/if we can chdir/if we can't chdir/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Filipe Laíns
Filipe Laíns added the comment: Alternatively, can't we just os.chdir(self._old_cwd) in __enter__ and preemptively fail? IMO it's probably better to just straight up fail if we can chdir back to the original directory than to have relatively fragile recovery logic. -- __

[issue45504] [argparse] Entering a partial config_parser flag works with subparsers

2021-10-25 Thread Steven W
Steven W added the comment: Thanks. This can be closed. https://docs.python.org/3/library/argparse.html -- ___ Python tracker ___

[issue41592] Make _SubParsersAction public

2021-10-25 Thread paul j3
paul j3 added the comment: A _SubParsersAction is private to the extent that users should not attempt to create it directly, and thus don't need to know the details - beyond what's documented: "The add_subparsers() method is normally called with no arguments and returns a special action obj

[issue39846] Register .whl as a unpack format in shutil unpack

2021-10-25 Thread John Andersen
John Andersen added the comment: I ran into this today. Using a wrapper function around _make_zipfile due to https://github.com/python/cpython/blob/d5650a1738fe34f6e1db4af5f4c4edb7cae90a36/Lib/shutil.py#L817-L819 where there is a check for if the format is zip then don't pass owner and group

[issue45235] argparse does not preserve namespace with subparser defaults

2021-10-25 Thread paul j3
paul j3 added the comment: parser = argparse.ArgumentParser() sub = parser.add_subparsers() example_subparser = sub.add_parser("example") example_subparser.add_argument("--flag", default=10) print(parser.parse_args(["example","--flag=15"], argparse.Namespace(flag=20))) still r

[issue45607] Make it possible to enrich an exception's error message

2021-10-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +Zac Hatfield-Dodds ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue45607] Make it possible to enrich an exception's error message

2021-10-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue2771] Test issue

2021-10-25 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: python-dev -> ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue2771] Test issue

2021-10-25 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: python-dev -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue2771] Test issue

2021-10-25 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: -> python-dev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue2771] Test issue

2021-10-25 Thread Ezio Melotti
Change by Ezio Melotti : -- assignee: ezio.melotti -> python-dev versions: +Python 3.11 -Python 3.9 ___ Python tracker ___ ___ Python

[issue45591] PathFinder does not find namespace packages children

2021-10-25 Thread Filipe Laíns
Filipe Laíns added the comment: Ah, this was not obvious to me! I did not specify a path, but as it defaults to `sys.path` and `namespace.a` is available there, I was expecting it to find it. One of the things that threw me off was the first arguments being called `fullname`, which I assumed i

[issue21876] os.rename(src, dst) does nothing when src and dst files are hard-linked

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue17569] urllib2 urlopen truncates https pages after 32768 characters

2021-10-25 Thread Irit Katriel
Irit Katriel added the comment: Python 2.7 is no longer maintained. Please create a new issue if you are seeing this problem on 3.9+. -- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <

[issue33552] f-strings and string annotations

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8 ___ Python tracker ___ ___ Pytho

[issue45608] [sqlite3] some DB-API attributes are undocumented

2021-10-25 Thread Erlend E. Aasland
Change by Erlend E. Aasland : -- keywords: +patch pull_requests: +27482 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29219 ___ Python tracker __

[issue45608] [sqlite3] some DB-API attributes are undocumented

2021-10-25 Thread Erlend E. Aasland
New submission from Erlend E. Aasland : Some DB-API 2.0 attributes are undocumented: - apilevel - threadsafety - paramstyle These attributes should be documented. See also: - bpo-8196 - https://discuss.python.org/t/is-sqlite3-threadsafety-the-same-thing-as-sqlite3-threadsafe-from-the-c-libr

[issue35174] Calling for super().__str__ seems to call self.__repr__ in list subclass

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> not a bug status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue31594] Make bytes and bytearray maketrans accept dictionaries as first argument as it's done in str

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> rejected stage: -> resolved status: open -> closed type: behavior -> enhancement ___ Python tracker ___ ___

[issue11477] Incorrect operand precedence when implementing sequences in C

2021-10-25 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.6 ___ Python tracker ___ ___

[issue45020] Freeze all modules imported during startup.

2021-10-25 Thread Eric Snow
Eric Snow added the comment: New changeset 6afb285ff0790471a6858e44f85d143f07fda70c by Eric Snow in branch 'main': bpo-45020: Add tests for the -X "frozen_modules" option. (gh-28997) https://github.com/python/cpython/commit/6afb285ff0790471a6858e44f85d143f07fda70c -- __

[issue13298] Result type depends on order of operands for bytes and bytearray

2021-10-25 Thread Irit Katriel
Irit Katriel added the comment: Reproduced on 3.11. -- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 ___ Python tracker ___ ___

[issue23556] [doc] Scope for raise without argument is different in Python 2 and 3

2021-10-25 Thread Irit Katriel
Irit Katriel added the comment: Martin's patch needs to be converted to a GitHub PR and then reviewed. -- keywords: +easy -patch nosy: +iritkatriel title: Scope for raise without argument is different in Python 2 and 3 -> [doc] Scope for raise without argument is different in Python 2

[issue45545] chdir __exit__ is not safe

2021-10-25 Thread Jeremy
Change by Jeremy : -- keywords: +patch pull_requests: +27481 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29218 ___ Python tracker ___ _

[issue45607] Make it possible to enrich an exception's error message

2021-10-25 Thread Irit Katriel
New submission from Irit Katriel : The requirement comes from Hypothesis, see https://github.com/python/cpython/pull/28569#discussion_r730338369 It is necessary there to add a note to an exception describing which test case it comes from. The note should be printed by __str__ of this exception

[issue15795] Zipfile.extractall does not preserve file permissions

2021-10-25 Thread Selim Belhaouane
Change by Selim Belhaouane : -- nosy: +selimb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-10-25 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: -terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue37658] In some cases asyncio.wait_for can lead to socket leak.

2021-10-25 Thread Sam Bull
Sam Bull added the comment: Can I get a review? https://github.com/python/cpython/pull/29202 Seems like a simple mistake given the original description of this issue: > 1. the inner task is completed and the outer task will receive the result – > transport and protocol in this case > 2. The

[issue45466] Simple curl/wget-like download functionality in urllib (like http offers server)

2021-10-25 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +27479 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29217 ___ Python tracker

[issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane

2021-10-25 Thread Rasmus Bondesson
New submission from Rasmus Bondesson : Create a symlink that points to file that doesn't exist: ln -s /nonexisting_file my_symlink Then try to glob for that symlink from Python using pathlib: python3 >>> import pathlib >>> list(pathlib.Path(".").glob("my_symlink")) []

[issue45592] NamespaceLoader does not implement create_module or exec_module

2021-10-25 Thread Brett Cannon
Brett Cannon added the comment: create_module() being empty is on purpose: https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.create_module . You only define create_module() if you need a specific type of object for the module instance. -- ___

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: > The issue is that this feature is internally inconsistent (isinstance() is > not consistent with issubclass()), issubclass(x, list[int]) rejects the second argument for reasons explained in the PEP. I don't think from that reasoning you can infer that li

[issue45591] PathFinder does not find namespace packages children

2021-10-25 Thread Brett Cannon
Brett Cannon added the comment: You didn't specify the path to search in to find `a`. https://docs.python.org/3/library/importlib.html#importlib.machinery.PathFinder.find_spec says that PathFinder only has class methods, which means find_spec() won't know where 'namespace' is, so the search

[issue45548] Update Modules/Setup

2021-10-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 2b8677a3cd855eb3a579894c64588eab0e006269 by Christian Heimes in branch 'main': bpo-45548: FreeBSD doesn't like auto vars in makesetup (GH-29216) https://github.com/python/cpython/commit/2b8677a3cd855eb3a579894c64588eab0e006269 -- __

[issue45235] argparse does not preserve namespace with subparser defaults

2021-10-25 Thread paul j3
paul j3 added the comment: I just downloaded this `argparse.py`. This change makes it impossible to use a subparser argument if it is defined in the user provided namespace, or by the main parser. It blocks not only subparser default, but also user input. It has reverted the 9351 patch whi

[issue45595] [Build] Make extensions depend on header files

2021-10-25 Thread Christian Heimes
Change by Christian Heimes : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue45548] Update Modules/Setup

2021-10-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +27478 pull_request: https://github.com/python/cpython/pull/29216 ___ Python tracker ___

[issue45235] argparse does not preserve namespace with subparser defaults

2021-10-25 Thread paul j3
paul j3 added the comment: I haven't studied or tested this change, but it looks like a partial retraction of https://bugs.python.org/issue9351 argparse set_defaults on subcommands should override top level set_defaults Originally the main namespace was passed to the subparser. Steven Beth

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-25 Thread Irit Katriel
Irit Katriel added the comment: Martin, would you like to submit a patch with this addition to the doc? -- ___ Python tracker ___ _

[issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__.

2021-10-25 Thread Andrei Kulakov
Andrei Kulakov added the comment: I've been thinking that perhaps it makes sense to special case printing of `self` argument in `__init__` methods. The same exact issue happens with PDB `args` command in `__init__` methods. My idea is that in the __init__, you generally don't want to print `

[issue45548] Update Modules/Setup

2021-10-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset ece916e92ce76cfdbfd208605a6fc827db0fbd52 by Christian Heimes in branch 'main': bpo-45548: Add missing extensions to Modules/Setup (GH-29199) https://github.com/python/cpython/commit/ece916e92ce76cfdbfd208605a6fc827db0fbd52 -- __

[issue45595] [Build] Make extensions depend on header files

2021-10-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 81669d1b7bd668d1bd0fab92836e8b5e7976e362 by Christian Heimes in branch 'main': bpo-45595: Make extensions depend on header files (GH-29198) https://github.com/python/cpython/commit/81669d1b7bd668d1bd0fab92836e8b5e7976e362 -- ___

[issue33439] python-config.py should be part of the stdlib

2021-10-25 Thread Gregory P. Smith
Gregory P. Smith added the comment: `Misc/python-config.in` ultimately becomes a Python script that prints things to stdout. It isn't written to be a module as is. Any work to make it one is effectively writing entirely new code to do what it does. To keep a single source of truth for `pyt

[issue45235] argparse does not preserve namespace with subparser defaults

2021-10-25 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue45504] [argparse] Entering a partial config_parser flag works with subparsers

2021-10-25 Thread paul j3
paul j3 added the comment: As a default option flags can be abbreviated (unless there's a conflict). Recent version have a allow_abbrev parameter that lets you turn this off. -- nosy: +paul.j3 ___ Python tracker

[issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

2021-10-25 Thread paul j3
paul j3 added the comment: Are you expecting the subcommand help to show the 'help' line that the main help shows? subparsers.add_parser('a', help='a help') add_parser takes all of the parameters that `ArgumentParser` takes, including description and epilog. I don't think we need to

[issue41592] Make _SubParsersAction public

2021-10-25 Thread Eric Pederson
Eric Pederson added the comment: But is _SubParsersAction really private if there are methods on it that are required to use (add_parser())? -- ___ Python tracker ___ ___

[issue45580] argparse.ArgumentParser.add_mutually_exclusive_group : metavar create parenthesis undefined behavior

2021-10-25 Thread paul j3
paul j3 added the comment: The usage formatting is fragile, with many associated bug reports. Until someone does a major rewrite, it is best to avoid special characters, especially `()` and `[]` in the `dest` or `metavar`. Usage uses () to encolde mutually_exclusive_groups and [] to mark no

[issue41592] Make _SubParsersAction public

2021-10-25 Thread paul j3
paul j3 added the comment: `add_argument` also returns a Action subclass object. All of those subclasses are "private". While that return reference is usually ignored, sometimes it is useful to it, assigning it to a variable or list. The documentation could be clearer about access to Acti

[issue45548] Update Modules/Setup

2021-10-25 Thread Christian Heimes
Christian Heimes added the comment: New changeset 77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1 by Christian Heimes in branch 'main': bpo-45548: Remove checks for finite and gamma (GH-29206) https://github.com/python/cpython/commit/77e3f224d6ae6d38e5fc899fb5eaadf2b7c255a1 -- ___

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue18510. It was also discussed on the Python-Dev mailing list (maybe more than once). If you have some new arguments or something in past 8 years made the old arguments no longer valid please open a new discussion on the mailing l

[issue45587] argparse add_argument_group: distinguish title and description from **kwargs

2021-10-25 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue24739] allow argparse.FileType to accept newline argument

2021-10-25 Thread paul j3
paul j3 added the comment: Adding `newline` to `FileType` requires modifying both the `__init__` and `__call__` methods. That's nearly the whole class. I'd copy and edit, and forget about subclassing. -- ___ Python tracker

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Two years is not so long for a bug. We fixed 8-year and 12-year bugs. The issue is that this feature is internally inconsistent (isinstance() is not consistent with issubclass()), the C implementation of list[int] is not consistent with the Python implemen

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Eric V. Smith
Eric V. Smith added the comment: I don't have any code that would care, but if there's one thing I've learned in 15 years of python core development, it's that this will break someone's code. If you want more feedback, you should probably bring this up for discussion on the python-ideas mail

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: I really don't recall if we even seriously considered what isinstance(list[int], type) should return. PEP 585 doesn't mention it. I presume it falls out of the way it's being tested and the way list[int] passes most attribute requests on to the origin (i.e

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Андрей Казанцев
Андрей Казанцев added the comment: Can you please specify in what cases we need to get an exception instead of False? It just seems very strange to me to rely on this behaviour. -- ___ Python tracker ___

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Eric V. Smith
Eric V. Smith added the comment: That seems like a pretty big change that could break a lot of existing code. I suggest writing a wrapper around "in" if you want this behavior. -- nosy: +eric.smith ___ Python tracker

[issue40915] multiple problems with mmap.resize() in Windows

2021-10-25 Thread Tim Golden
Change by Tim Golden : -- keywords: +patch pull_requests: +27477 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29213 ___ Python tracker __

[issue45605] Return False from __contains__ method if object not hashable for set and dict

2021-10-25 Thread Андрей Казанцев
New submission from Андрей Казанцев : Now if do something like `[] in set()` python raise an exception, but if an object isn't hashable then we know for sure that it isn't in the set. Propose return False for these cases. P.S. I would like to make a patch -- components: Library (Lib)

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Was it mistake to make isinstance(list[int], type) returning True? What was the motivation for this? At first glance returning True looks wrong. -- ___ Python tracker __

[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are there changes in handling empty values for other options? If yes, we perhaps need to add version-dependent tests for empty values instead of just skipping this case. -- ___ Python tracker

[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-25 Thread E. Paine
E. Paine added the comment: > Any word on the tk Menu type parameter change? I haven't submitted a bug report yet and want to do a little more research before I do so (the Tcl ticket system is quite difficult to search) -- ___ Python tracker

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two ways to fix the larger issue. 1. Make issubclass(types.GenericAlias, type) returning True, and also make isinstance(typing.List[int], type) returning True and issubclass(typing._GenericAlias, type) returning True, and analyze every place in

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Martin Rueckl
Martin Rueckl added the comment: I just created a PR and signed the contributor agreement. Waiting for it to update :-) Comments welcome! -- ___ Python tracker ___ __

[issue45604] multiprocessing.log_to_stderr missing documentation for parameter

2021-10-25 Thread Alex Wells
New submission from Alex Wells : The documentation for multiprocessing.log_to_stderr() specifies that the method takes no parameters. However, intellisense in VSCode and debugging the method both show that there is a single parameter, "level", whose default value is None. Documentation here:

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Martin Rueckl
Change by Martin Rueckl : -- keywords: +patch pull_requests: +27476 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29212 ___ Python tracker ___ __

[issue44319] setup openssl failed on linux

2021-10-25 Thread Devin Prescott
Devin Prescott added the comment: This docker file will get you the same environment: ## Build Command ## #docker build --rm -t centos7/builder . ## Run Command ## #docker run --rm -it centos7/builder # INSIDE DOCKER: #make -j $(nproc) FROM centos:7 ##

[issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11

2021-10-25 Thread Zachary Ware
Zachary Ware added the comment: Thanks for tracking that down! Any word on the tk Menu type parameter change? -- ___ Python tracker ___ __

[issue45601] test_tk and test_ttk_guionly fail with resource not availiable

2021-10-25 Thread Zachary Ware
Zachary Ware added the comment: The failure that you saw was due to a change in Tcl/Tk 8.6.11; we recently updated our tests to handle that change in bpo-45436; the fixes have not been released at any version yet, but the fixes have been applied back to 3.7. The "resource not available" not

[issue45438] inspect not capturing type annotations created by __class_getitem__

2021-10-25 Thread Martin Rueckl
Martin Rueckl added the comment: Can confirm for 3.9.7 as well. -- nosy: +martinitus ___ Python tracker ___ ___ Python-bugs-list ma

[issue45511] Batch-mode input() limited to 4095 characters on *NIX

2021-10-25 Thread Eryk Sun
Eryk Sun added the comment: > but I'm interrested in knowing more about the issue/original cause. When the readline module is imported in interactive mode, the PyOS_ReadlineFunctionPointer function pointer is set to call_readline(), which uses GNU Readline. Otherwise PyOS_Readline() calls Py

[issue24739] allow argparse.FileType to accept newline argument

2021-10-25 Thread Mitar
Mitar added the comment: I think the issue is that it is hard to subclass it. Ideally, call to open would be made through a new _open method which would then call it, and one could easily subclass that method if/when needed. -- nosy: +mitar ___ Py

[issue45292] Implement PEP 654: Exception Groups

2021-10-25 Thread Irit Katriel
Change by Irit Katriel : -- pull_requests: +27475 pull_request: https://github.com/python/cpython/pull/29207 ___ Python tracker ___

[issue45511] Batch-mode input() limited to 4095 characters on *NIX

2021-10-25 Thread Grégory Starck
Grégory Starck added the comment: > This does not seems to be a copypaste issue. well. it's either not a prob in my_fgets()/fgets IMO. what the process reads on its stdin is already corrupted/broken. but I'm interrested in knowing more about the issue/original cause. --

[issue45588] cached_method similar to cached_property to cache with classes

2021-10-25 Thread Marten Lienen
Marten Lienen added the comment: The lru_cache can trigger infinite recursion if it is used to cache a hash computation because the cache look-up itself requires the hash. from functools import lru_cache class CachedHash: @lru_cache def __hash__(self): # Expensive calculation

[issue45599] Please officially support %G, %V and %u directives in time library

2021-10-25 Thread Raphael
Change by Raphael : -- title: Please official support %G, %V and %u directives in time library -> Please officially support %G, %V and %u directives in time library ___ Python tracker ___

[issue45511] Batch-mode input() limited to 4095 characters on *NIX

2021-10-25 Thread Romuald Brunet
Romuald Brunet added the comment: This does not seems to be a copypaste issue. I've re-tested using xdotool to "manually" type 5000 characters in to a X terminal (gnome-terminal and xterm, to be sure) and got the same result. I also have 4 read(0, "...") with the last one ending with a "\n",

[issue45548] Update Modules/Setup

2021-10-25 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +27474 pull_request: https://github.com/python/cpython/pull/29206 ___ Python tracker ___

[issue45603] [Windows] account privileges and updating Python packages

2021-10-25 Thread Eryk Sun
Eryk Sun added the comment: The pip package installer is not part of Python's standard library. Issues with pip should be reported at the following site: https://github.com/pypa/pip/issues Note that pip 20.0+ automatically switches to a --user installation if the user lacks the required acc

[issue45586] Use starred expressions in subscripts

2021-10-25 Thread Peter Tillema
Peter Tillema added the comment: Right, I should have clarified it a bit more. I'm using NumPy arrays because they allow indexing like this, where the input arguments are converted to a tuple. So a[1, 2, *[3, 4]] is different than a[[1, 2, *[3, 4]]] This indeed only works on NumPy arra

  1   2   >