[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, there are no perfect solutions. Please let it go. -- ___ Python tracker ___ ___

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
Anthony Sottile added the comment: 3.7.2 has another example where OrderedDict was added to typing I don't have any personal investment in this particular change but I've had quite a few unhappy consumers of libraries due to instability in typing apis between patch versions in the past (heh

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: Well that's *always* a problem right? If you take that to the extreme we wouldn't need bugfix releases. :-) Apart from some examples in the 3.5-3.6 timeframe, what makes you think that *this* fix *specifically* is going to make more people unhappy than it

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
Anthony Sottile added the comment: to me this is the same as the Union[Pattern] / Union[Match] "fixes" that landed in 3.5.3 -- and the pain caused by using that and having CI pass (because of modern 3.5.x) but having spurious bug reports from users stuck on 3.5.2 or in 3.6.1 when NamedTuple

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Guido van Rossum
Guido van Rossum added the comment: But it *is* a bugfix. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Anthony Sottile
Anthony Sottile added the comment: should this behaviour change be backported? it potentially creates an annoying edgecase where code seemingly works unless you use an older patch version since this isn't a bugfix I wouldn't expect this to land in 3.9 and 3.10 -- nosy: +Anthony

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Ken Jin
Ken Jin added the comment: Thanks Gregory for fixing this! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread miss-islington
miss-islington added the comment: New changeset b0b8388a1c29dc9203dd1a9e8b1420a6a5e88c97 by Miss Islington (bot) in branch '3.9': bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864) https://github.com/python/cpython/commit/b0b8388a1c29dc9203dd1a9e8b1420a6a5e88c97 --

[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread miss-islington
miss-islington added the comment: New changeset 41e0aead3defa6d0486514e313b6975fbf375998 by Miss Islington (bot) in branch '3.10': bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864) https://github.com/python/cpython/commit/41e0aead3defa6d0486514e313b6975fbf375998 --

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
miss-islington added the comment: New changeset e1abffca45b60729c460e3e2ad50c8c1946cfd4e by Gregory Beauregard in branch 'main': bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864) https://github.com/python/cpython/commit/e1abffca45b60729c460e3e2ad50c8c1946cfd4e --

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
Change by miss-islington : -- pull_requests: +29054 pull_request: https://github.com/python/cpython/pull/30874 ___ Python tracker ___

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +29053 pull_request: https://github.com/python/cpython/pull/30873 ___ Python tracker

[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread Gregory Beauregard
Change by Gregory Beauregard : -- keywords: +patch pull_requests: +29045 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30864 ___ Python tracker

[issue46491] typing: allow Annotated in outermost scope

2022-01-23 Thread Guido van Rossum
Guido van Rossum added the comment: +1-- --Guido (mobile) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46491] typing: allow Annotated in outermost scope

2022-01-23 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: I support making this change. It looks like the simplest implementation is simply to remove the mention of ClassVar and Final in typing._type_check. -- components: +Library (Lib) nosy: +Jelle Zijlstra, gvanrossum, kj

[issue46491] typing: allow Annotated in outermost scope

2022-01-23 Thread Gregory Beauregard
New submission from Gregory Beauregard : Currently, `typing.Annotated` (PEP 593) cannot be used at runtime with `typing.Final` and `typing.ClassVar` with `Annotated` on the outside: ``` from typing import Annotated, Final # TypeError: typing.Final[int] is not valid as type argument var: