[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42102] Make builtins.callable "generic"

2020-10-20 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not against this, though I'm not sure it really buys us much (Any still has to be imported from typing). Maybe you can submit a PR? Running the tests might be informative. -- ___ Python track

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: All this needs is a PR filed against latest master that updates Doc/whatsnew/3.9.rst and labeled with needs-backport-3.9. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue41

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I don't see it in the 3.9 branch either. It seems the whole section mentioned in the closed PR doesn't exist anywhere. Maybe it was reverted for some reason. Let's close this issue. -- resolution: -> out of date s

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I guess my repo is out of date. Sorry. So it is in master? Let's fix it there then. -- resolution: out of date -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.10

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: There really shouldn't be any differences between that doc in the 3.9 and master branch (with rare exceptions). Can you post a diff here between the two so we can sort it out? Also can you find the commit where it was added to the 3.9 b

[issue40841] Provide mimetypes.sniff API as stdlib

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Dong-hee, I recommend that you turn this into a 3rd party package on PyPI yourself. That way your effort and code will live on! -- ___ Python tracker <https://bugs.python.org/issue40

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, I see. Łukasz (@ambv) prepared the 3.9.0 release and didn't merge his changes into master yet. I'll contact him. -- nosy: +lukasz.langa ___ Python tracker <https://bugs.python.o

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I'll see if I can reopen your PR and we can apply it to the 3.9 branch, we'll then forward port it (if and when that's done). -- ___ Python tracker <https://bugs.pyt

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset dc33f798139016961fba33b37c792c690399b2b6 by Weiliang Li in branch '3.9': bpo-41950: Typo in Python 3.9 what's new page (GH-22573) https://github.com/python/cpython/commit/dc33f798139016961fba33b37

[issue41950] Typo in Python 3.9 what's new page

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, merged, so closing. I'll open a separate issue regarding the forward-porting of the 3.9 whatsnew. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python t

[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum
New submission from Guido van Rossum : We discovered in issue41950 that the whatsnew/3.9.rst files differ quite a bit between 3.9 and master. IIUC this is (mostly) because Lukasz made a big pass updating it on occasion of the 3.9.0 release, and he did that in the 3.9 branch: https

[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum
Change by Guido van Rossum : -- keywords: +patch pull_requests: +21853 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22933 ___ Python tracker <https://bugs.python.org/issu

[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 805ef73ad0ac4a77f3764dd17dfc959d562ce627 by Terry Jan Reedy in branch 'master': bpo-42139: Update What's New 3.9 for master (#22936) https://github.com/python/cpython/commit/805ef73ad0ac4a77f3764dd17

[issue42138] Forward port Doc/whatsnew/3.9.rst to master

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Terry did the same thing in https://bugs.python.org/issue42139. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: You also need to forward-port https://bugs.python.org/issue41950. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42139] Synchronize What's New in 3.9 master and 3.9

2020-10-23 Thread Guido van Rossum
Guido van Rossum added the comment: Never mind, I read the diff backwards. You're all good and you can close this. -- ___ Python tracker <https://bugs.python.org/is

[issue12737] str.title() is overzealous by upcasing combining marks inappropriately

2020-10-25 Thread Guido van Rossum
Guido van Rossum added the comment: Are you sure? Running Ezio's titletest.py, I get this output (note that the UCD major version is in the double digits so the test for that misfires :-). titletest.py: Please set your PYTHONIOENCODING envariable to utf8 WARNING: Your old UCD is out of

[issue42169] Apparently all documentation on @typing.overload is wrong

2020-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: > The documentation for `typing.overload` says in a non-stub file the last > definition shouldn't be typed. Incorrect. It doesn't say it shouldn't be *typed*, it says it shouldn't be *decorated with @overload*, which is a differ

[issue42169] Apparently all documentation on @typing.overload is wrong

2020-10-27 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue42169> ___ ___ Python-bugs-list mailing list Un

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4173320920706b49a004b8d7108e8984e3fc by kj in branch 'master': bpo-41805: Documentation for PEP 585 (GH-22615) https://github.com/python/cpython/commit/4173320920706b49a004b8d7108e8984e3fc -- nosy: +

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Ken Ji! Are you planning more doc patches? -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42128] Structural Pattern Matching (PEP 634)

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: If you feel up to it, you might see if you could open a new, separate (draft) PR that updates all those docs. (But you could also wait and see if someone volunteers. There are some good doc writers active ATM

[issue41805] types.GenericAlias and types.Union have no documentation

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Cool. Please add me to the nosy list of any issues you open. Also, if you're interesting helping out with the match statement, once the SC approves it, we'll need to add docs for that. See issue42128 for a poss

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: Since there are so few projects, maybe you can just contact them? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42187] Deprecating / removing token.ISTERMINAL/ISNONTERMINAL

2020-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: I thought for all? -- ___ Python tracker <https://bugs.python.org/issue42187> ___ ___ Python-bugs-list mailing list Unsub

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: I'm not an expert on singledispatch. It seems the get_type_hints() call is present in 3.8 as well. Could you investigate and find a root cause? Then maybe we can fix it. (If you come up with a PR that would be very much appreciated.) -- ver

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

2020-10-29 Thread Guido van Rossum
Guido van Rossum added the comment: Good find! I see that typing.Callable has adopted this structure precisely to enable caching. We should see if we can fix _collections_abc.Callable. It's still early in the life of 3.9 so I think this is reasonable. We'll need a subclass of Ge

[issue42190] global declarations affect too much inside exec or compile

2020-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: Looks like a bug. Maybe someone can bisect and find when this started happening? -- ___ Python tracker <https://bugs.python.org/issue42

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

2020-10-30 Thread Guido van Rossum
Guido van Rossum added the comment: @corona10 Do I hear that you'd like to work on this? -- ___ Python tracker <https://bugs.python.org/issue42195> ___ ___

[issue42198] Clean up docs for Union and GenericAlias

2020-10-31 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for all your efforts, KJ! Can this issue be closed? -- ___ Python tracker <https://bugs.python.org/issue42

[issue40814] Update typing module documentation based on PEP 585

2020-10-31 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42198] Clean up docs for Union and GenericAlias

2020-10-31 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 3bf0d02f2817c48b6ee61a95b52a6d76ad543be9 by kj in branch 'master': bpo-42198: New section in stdtypes for type annotation types (GH-23063) https://github.com/python/cpython/commit/3bf0d02f2817c48b6ee61a95b52a6d

[issue42198] Clean up docs for Union and GenericAlias

2020-10-31 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Ken Ji for all your help! I'll close this now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

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

2020-11-01 Thread Guido van Rossum
Guido van Rossum added the comment: Actually you can't really change typing.Callable's __args__, because it must be hashable, and lists aren't. If GenericAlias doesn't cache yet, it might very well do so in the future to gain some speed when e.g. list[int] is use

[issue26031] Add stat caching option to pathlib

2020-11-04 Thread Guido van Rossum
Guido van Rossum added the comment: Okay, I am giving up on this. -- resolution: -> out of date stage: test needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38119] resource tracker destroys shared memory segments when other processes should still have valid access

2020-11-06 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue38119> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42288] typing.get_type_hints() returns Optional[Any] if the default value of the argument is None

2020-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: There is actually a difference between Any and Optional[Any]. Try the following using e.g. mypy: def f(a: Optional[Any]): a+1 def g(a: Any): a+1 You'll get an error in f but not in g. So this behavior is not a bug. -- resol

[issue42233] GenericAlias does not support union type expressions

2020-11-08 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4eb41d055e8307b8206f680287e492a6db068acd by kj in branch 'master': bpo-42233: Add union type expression support for GenericAlias and fix de-duplicating of GenericAlias (GH-23077) https://github.com/python/cpyt

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-09 Thread Guido van Rossum
Change by Guido van Rossum : -- components: +Windows nosy: +paul.moore, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue42296> ___ ___

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-09 Thread Guido van Rossum
New submission from Guido van Rossum : This code cannot be interrupted with ^C on Windows (e.g. in the REPL) while True: pass This seems to be a regression, it works in earlier versions. -- messages: 380597 nosy: Mark.Shannon, gvanrossum, steve.dower priority: normal severity

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-09 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42296> ___ ___ Python-bugs-list mailing list Unsub

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-09 Thread Guido van Rossum
Change by Guido van Rossum : -- priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue42296> ___ ___ Python-bugs-list mai

[issue35712] Make NotImplemented unusable in boolean context

2020-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: > list(filter(None.__ne__, L)) I assume you've been recommending this? To me it looks obfuscated. People should just use a comprehension, e.g. [x for x in L if x is not None] -- ___ Python tracker

[issue35712] Make NotImplemented unusable in boolean context

2020-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: That's off topic for this issue -- you can go to python-ideas to propose that. -- ___ Python tracker <https://bugs.python.org/is

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: So you're saying this war broken by https://github.com/python/cpython/pull/19087 ? -- ___ Python tracker <https://bugs.python.org/is

[issue35712] Make NotImplemented unusable in boolean context

2020-11-09 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <https://bugs.python.org/issue35712> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple

2020-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Agreed it's mildly sad, and I wish the cache could preserve the order in List[Union[int, str]], but for that to work we'd have to change how the cache works, which feels complex, or we'd have to chance things so that Union[int, str] !=

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: I spent some time debugging this looking for the root cause. I think it looks like the recursion check in ForwardRef._evaluate() fails to trigger. At some point recursive_guard is a frozen set containing "'Integer'" (i.e. a string

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Keep this issue. -- ___ Python tracker <https://bugs.python.org/issue41987> ___ ___ Python-bugs-list mailing list Unsub

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW here's a minimal demo: from __future__ import annotations from typing import get_type_hints class C: def func(self, a: "C"): pass print(get_type_hints(func)) In 3.8 this prints {'a': ForwardRef(

[issue42329] typing classes do not have __name__ attributes in 3.7+

2020-11-11 Thread Guido van Rossum
Guido van Rossum added the comment: Between 3.6 and 3.7 they stopped being types. IIRC this enabled optimizations. (Serhiy?) I don't think this is important, but I suppose you have some code that this breaks? The name is passed to the constructor of _SpecialGenericAlias, so I'm

[issue42329] typing classes do not have __name__ attributes in 3.7+

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: So shall we just close this? -- ___ Python tracker <https://bugs.python.org/issue42329> ___ ___ Python-bugs-list mailin

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: So the biggest difference I see is that ForwardRef._evaluate() has grown a recursive_guard argument in 3.9. This makes me think that in 3.8, only one level of evaluation was happening, and in 3.8, we keep evaluating until we don't see a stri

[issue42332] add __weakref__ to types.GenericAlias

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's reasonable to consider this a bug to be fixed. -- ___ Python tracker <https://bugs.python.org/is

[issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Exactly! -- ___ Python tracker <https://bugs.python.org/issue42317> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41987] singledispatchmethod raises an error when relying on a forward declaration

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: > Does anyone know why the treatment of unresolved references was changed in > 3.9? Probably to prepare for 3.10, where `from _future__ import annotations` is the default. > Also, I'm a bit puzzled about something from the previously men

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Can you think of a fix? (Presumably restore some code that was deleted from 3.9?) -- ___ Python tracker <https://bugs.python.org/issue42

[issue40939] Remove the old parser

2020-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly that code seems poorly thought out. If running it returns -1, an exception was presumably reported, but not necessarily SyntaxError -- so parsing it may not produce an error at all. The functionality needed is in PyRun_InteractiveOneObjectEx

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Probably the implementation focused on static typing, not runtime checking. Can you come up with a PR for a fix? -- stage: -> needs patch versions: +Python 3.10, Python 3.8 ___ Python tracker <

[issue42296] Infinite loop uninterruptable on Windows in 3.10

2020-11-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for the quick fix. It works! -- ___ Python tracker <https://bugs.python.org/issue42296> ___ ___ Python-bugs-list m

[issue39168] Generic type subscription is a huge toll on Python performance

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: @davidm I don't see such a dramatic difference -- the generic version is a tad slower, but the difference is less than the variation between runs. What platform are you using? (I'm doing this

[issue39168] Generic type subscription is a huge toll on Python performance

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: No worries. I tend to run each time it command at least three times before I trust the numbers. Professional bench markers also configure a machine without background tasks (email etc.). -- ___ Python tracker

[issue42365] Python launcher: sort order in "Installed versions" off with 3.10

2020-11-15 Thread Guido van Rossum
New submission from Guido van Rossum : I installed Python 3.10 on Windows and now the sort order of the versions printed by `py -0` is kind of weird: ``` Installed Pythons found by C:\WINDOWS\py.exe Launcher for Windows -3.9-64 * -3.8-64 -3.7-64 -3.6-64 -3.5-64 -3.10-64 ``` I'm gue

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I think it makes sense to de-dupe args for Literal. -- ___ Python tracker <https://bugs.python.org/issue42345> ___ ___

[issue42280] The list of standard generic collections is incomplete

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: I think the difference between the two lists is that not every generic type is a collection. If we apply that standard, I think the contextlib and re classes need to be *removed* from the list (did I get that right

[issue42317] Docs of `typing.get_args`: Mention that due to caching of typing generics the order of arguments for Unions can be different from the one of the returned tuple

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42280] The list of standard generic collections is incomplete

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s just close this, there are more important things to do. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42365] Python launcher: sort order in "Installed versions" off with 3.10

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Oops. :-) -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: I think now's the time to fix it, given that we're two alphas into 3.10 already. (I independently discovered this and filed it as issue 42365.) -- nosy: +gvanrossum ___ Python tracker <https://bu

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-15 Thread Guido van Rossum
Change by Guido van Rossum : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue38506> ___ ___ Python-bugs-list mailin

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, actually I think this needs to be backported to 3.8 and 3.9 (at least) since IIUC whichever release is installed last (or first?) overwrites "py.exe", so if "py.exe" came from e.g. 3.9, and 3.10 is present, we still want it to

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

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: @Hatfield-Dodds, if we changed typing.Callable to return ((int, int), str) but collections.abc.Callable continued to return ([int, int], str), would that suffice for your purposes? -- ___ Python tracker <ht

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

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Also, maybe we should make builtins.callable generic as well? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42153] doc: library imaplib a url not available

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset aa01011003bb855cd52abfd49f2443446590d913 by Yash Shete in branch 'master': bpo-42153 Fix link to IMAP documents in imaplib.rst (GH-23297) https://github.com/python/cpython/commit/aa01011003bb855cd52abfd49f2443446590d913 -

[issue42153] doc: library imaplib a url not available

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Closing in anticipation of the backports landing. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40494] collections.abc.Callable and type variables

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: >From https://bugs.python.org/issue42195 it looks like we need to create a >subclass just for Callable. See https://bugs.python.org/issue42102 and PR >22848. -- ___ Python tracker <https://bug

[issue42102] Make builtins.callable "generic"

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: I'd like to pursue this for real; other issues for callable have popped up, https://bugs.python.org/issue42195 and https://bugs.python.org/issue40494 (https://bugs.python.org/issue40398 is also related but already fixed). >From 42195 I learn that

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

2020-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: In that case I prefer ((int, int), str), in case we ever end up needing to add additional parameters to Callable. I propose we first fix https://bugs.python.org/issue42102. -- ___ Python tracker <ht

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: You may call it cosmetic, but for me it's a matter of usability. Nevertheless, given how you designed the installer, we can drop the backport. -- ___ Python tracker <https://bugs.python.org/is

[issue38506] Launcher for Windows (py.exe) may rank Python 3.xx (in the future) after 3.x

2020-11-16 Thread Guido van Rossum
Change by Guido van Rossum : -- versions: -Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue38506> ___ ___ Python-bugs-list mailin

[issue42102] Make builtins.callable "generic"

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Well, it's certainly no bug fix, but just as PEP 585 lets us write list[int] instead of typing.List[int], it could be considered useful to be able to write callable[[int, int], str] instead of typing.Callable[[int, int], str]. It's easy enough

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, I suppose the comprehensions should all have the same syntax inside their various brackets. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Not in anything dict please. Nagging question — is there sufficient difference between {x := y} and {x: y} ? -- ___ Python tracker <https://bugs.python.org/issue42

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Okay. -- ___ Python tracker <https://bugs.python.org/issue42381> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42381] Allow unparenthesized walrus in set comprehensions

2020-11-16 Thread Guido van Rossum
Guido van Rossum added the comment: Let’s make sure this is all written up in whatsnew. -- ___ Python tracker <https://bugs.python.org/issue42381> ___ ___ Pytho

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-17 Thread Guido van Rossum
Guido van Rossum added the comment: I recommend adding a whatsnew entry too. You can just add it to this issue. Interestingly you’ll probably need two separate ones, for 3.9 and 3.10. That would become two separate PRs for master, the 3.9 one to be backported. -- resolution

[issue42332] add __weakref__ to types.GenericAlias

2020-11-17 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-18 Thread Guido van Rossum
Guido van Rossum added the comment: We need to fix this to make __hash__ match __eq__. -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___ Python tracker <https://bugs.python.or

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-18 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 4687338d0ed46e1f5f5060536becf8a96496bae7 by kj in branch 'master': bpo-42345: Add whatsnew for typing.Literal in 3.10 (GH-23385) https://github.com/python/cpython/commit/4687338d0ed46e1f5f5060536becf8

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-19 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks everyone! Can I close this now? -- ___ Python tracker <https://bugs.python.org/issue42345> ___ ___ Python-bugs-list m

[issue42345] Equality of typing.Literal depends on the order of arguments

2020-11-20 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42430] Windows py launcher default for shebang line is surprising

2020-11-21 Thread Guido van Rossum
New submission from Guido van Rossum : I have 3.9 and 3.10 installed on my Windows box. The py launcher runs Python 3.10 when invoked on a script starting with a shebang line #!/usr/bin/env python even though the default without a script is 3.9, as shown here: PS C:\Users\gvanrossum\peps

[issue42430] Windows py launcher default for shebang line is surprising

2020-11-21 Thread Guido van Rossum
Guido van Rossum added the comment: Oops, I think I understand why. The py launcher actually does a search for an interpreter named "python" and that turns out to be python 3.10. Now my question becomes why py chooses a different default than that. I don't have a py.ini fi

[issue42430] Windows py launcher default for shebang line is surprising

2020-11-21 Thread Guido van Rossum
Guido van Rossum added the comment: I guess this explains it: >>> for p in os.getenv("PATH").split(os.pathsep): print(p) ... C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\WINDOWS\System32\WindowsPowerShell\v1.0\ C:\WINDOWS\System32\OpenSSH\ C:\Program Files

[issue42102] Make builtins.callable "generic"

2020-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: Hm. Shantanu's list shows that the next thing we should make usable without importing typing is Any. (I haven't any idea how to do that other than just making it a builtin.) But after that we should definitely tackle Callable, and the obvious wa

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

2020-11-22 Thread Guido van Rossum
Guido van Rossum added the comment: I'm still not sold on __args__ == (Tuple[int, int], str); it looks too weird. However if we introduced a new private type for this purpose that might work? I see that the definition of Tuple in typing.py is Tuple = _TupleType(tuple, -1, inst=False,

[issue42102] Make builtins.callable "generic"

2020-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: No, they both have a different meaning. Object has (almost) no attributes. Any has all attributes. -- ___ Python tracker <https://bugs.python.org/issue42

[issue29980] OSError: multiple exceptions should preserve the exception type if it is common

2020-11-25 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue29980> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42468] subprocess.CompletedProcess: Add boolean value

2020-11-25 Thread Guido van Rossum
Guido van Rossum added the comment: Greg, do you have an opinion here? -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue42468> ___ ___

<    27   28   29   30   31   32   33   34   35   36   >