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

2021-04-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset b0544ba77cf86074fb1adde00558c67ca75eeea1 by Pablo Galindo in branch 'master': bpo-38605: Revert making 'from __future__ import annotations' the default (GH-25490)

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

2021-04-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: fixed -> postponed status: closed -> open ___ Python tracker ___ ___

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

2021-04-20 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +pablogsal nosy_count: 13.0 -> 14.0 pull_requests: +24214 pull_request: https://github.com/python/cpython/pull/25490 ___ Python tracker

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

2021-04-06 Thread miss-islington
miss-islington added the comment: New changeset 1be456ae9d53bb1cba2b24fc86175c282d1c2169 by Saiyang Gou in branch 'master': bpo-38605: Update "Future statements" docs since PEP 563 is always enabled (GH-25236) https://github.com/python/cpython/commit/1be456ae9d53bb1cba2b24fc86175c282d1c2169

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

2021-04-06 Thread Saiyang Gou
Change by Saiyang Gou : -- nosy: +gousaiyang nosy_count: 11.0 -> 12.0 pull_requests: +23974 pull_request: https://github.com/python/cpython/pull/25236 ___ Python tracker ___

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

2020-10-10 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 0ae216b11644b23511c6287a52e7d28aeb9f by Batuhan Taskaya in branch 'master': bpo-38605: bump the magic number for 'annotations' future (#22630) https://github.com/python/cpython/commit/0ae216b11644b23511c6287a52e7d28aeb9f --

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

2020-10-10 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- pull_requests: +21607 pull_request: https://github.com/python/cpython/pull/22630 ___ Python tracker ___

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

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_grammar and test_pydoc became failed on my machine until I removed all .pyc files. We need to bump the magic number for .pyc files. -- nosy: +serhiy.storchaka ___ Python tracker

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

2020-10-06 Thread STINNER Victor
STINNER Victor added the comment: Good! I'm happy to see yet another "Python 4.0 change" going away :-) Let's make "Python 4.0" as compatible as possible ;-) -- ___ Python tracker

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

2020-10-06 Thread Guido van Rossum
Guido van Rossum added the comment: I'm marking this fixed, but there are some subtle edge cases. That's what alpha releases are for. @BTaskaya, adding those arguments to various inspect functions sounds like a nice thing to do. You could either open a new issue or just reference this

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

2020-10-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 044a1048ca93d466965afc027b91a5a9eb9ce23c by Batuhan Taskaya in branch 'master': bpo-38605: Make 'from __future__ import annotations' the default (GH-20434) https://github.com/python/cpython/commit/044a1048ca93d466965afc027b91a5a9eb9ce23c

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

2020-10-06 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: @gvanrossum should I draft a patch to convert this inspect.signature(callable, *, follow_wrapped=True) (and also things like inspect.Signature.from_callable) into inspect.signature(callable, *, follow_wrapped=True, globalns=None, localns=None) in order to

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

2020-10-01 Thread STINNER Victor
STINNER Victor added the comment: > Issue 41314 changed the __future__ annotations default version to 3.10. > 3.10.0a1 is scheduled for next Oct 5, less than 2 months from now. It would > be good if PR 20434 were merged before that. Python 3.9.0 final is also around the corner. Any update

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

2020-08-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Issue 41314 changed the __future__ annotations default version to 3.10. 3.10.0a1 is scheduled for next Oct 5, less than 2 months from now. It would be good if PR 20434 were merged before that. -- nosy: +terry.reedy

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

2020-08-01 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-05-28 Thread Guido van Rossum
Guido van Rossum added the comment: There will still be a lot of code written that way, because people need compatibility with earlier versions of Python. So I think it should be fixed in get_type_hints(). -- ___ Python tracker

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

2020-05-28 Thread STINNER Victor
Change by STINNER Victor : -- nosy: -vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-05-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: An example would be this https://github.com/python/cpython/blob/24bddc1b3b58f6899b2d412e51b37f68536e4fe2/Lib/test/test_typing.py#L2744-L2745. Either I can change tests in order to reflect now everything is a forward ref by default class Loop: attr:

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

2020-05-28 Thread Guido van Rossum
Guido van Rossum added the comment: I think in general it is more insightful to discuss the behavior of get_type_hints() given specific things in annotations. We generally don't write forward refs inside forward refs, like "SomeClass['int']". So maybe that code was wrong? Where did you find

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

2020-05-28 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: >From now on, should typing.get_type_hints automatically resolve arguments too? >An example would be this; import typing T = typing.TypeVar("T") class Loop(typing.Generic[T]): subloop: typing.Final["Loop[int]"] print(typing.get_type_hints(Loop)) >>>

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

2020-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: To my knowledge, dataclasses works with `from __future__ import annotations`. If there are specific examples of problems, I'd like to hear about it: please open a separate issue. There is a hack (discussed at PyCon 2018 with all of the relevant players)

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

2020-05-26 Thread Guido van Rossum
Guido van Rossum added the comment: - Double forward ref: IMO this can be resolved in the get_type_hints() functions. (Łukasz do you agree?) - inspect.signature(): Maybe this could switch to using typing.get_type_hints()? Then again if performance is important here maybe we cannot change

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

2020-05-26 Thread STINNER Victor
STINNER Victor added the comment: > The second problem is `inspect.signature`. If we don't resolve annotations > there and continue it is definitely going to break some code. Would you mind to elaborate why would it break some code? Consumers of annotations should already be prepared to get

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

2020-05-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: After trying to complete a patch, there are a few issues that immediately showed itself (and this might lead to not to do this in 3.10, I dont know); First one is double-forward-ref, which is usage of string-annotations when there is postponed evaluatation

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

2020-05-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I opened the PR 20434 as draft, but from what I understand, there is going to be some breakage (on our test suite). I'll try to narrow it down (currently ~4 tests instead of ~20) but I dont want to prevent anyone else from working on this, so feel free to

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

2020-05-26 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- Removed message: https://bugs.python.org/msg370003 ___ Python tracker ___ ___ Python-bugs-list

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

2020-05-26 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +19691 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/20434 ___ Python tracker

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

2020-05-26 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I'm starting it if anyone else already prepared a patch. -- ___ Python tracker ___ ___

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

2020-05-26 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2020-05-26 Thread STINNER Victor
STINNER Victor added the comment: Is there anyone interested to implement this change in Python 3.10? -- ___ Python tracker ___

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

2020-05-18 Thread Łukasz Langa
Łukasz Langa added the comment: We'll make this an announced 3.10 feature early on. The discussion at the Summit wasn't as clear cut to me: 35% of participants would rather see this default later than 3.9. -- ___ Python tracker

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

2020-05-18 Thread STINNER Victor
STINNER Victor added the comment: > Too bad nobody took any action here after the positive outcome of the > discussion at the summit. I didn't understand it this way. I understood that some people were not 100% comfortable to target 3.9. The question was 3.9 or 3.10. Since the release

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

2020-05-18 Thread Guido van Rossum
Guido van Rossum added the comment: Too bad nobody took any action here after the positive outcome of the discussion at the summit. -- components: +Interpreter Core -Library (Lib) stage: -> needs patch type: -> behavior versions: -Python 3.9

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

2020-05-18 Thread STINNER Victor
Change by STINNER Victor : -- title: [typing] PEP 563: Postponed evaluation of annotations: enable it by default before Python 4.0 -> [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10 ___ Python tracker