[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread Łukasz Langa
Change by Łukasz Langa : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 66d7a5d58a88bce312bc4668f2cc54c9488c5bd8 by Łukasz Langa (Miss Islington (bot)) in branch '3.7': bpo-34776: Fix dataclasses to support __future__ "annotations" mode (GH-9518) (#17532)

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 0d57db27f2c563b6433a220b646b50bdeff8a1f2 by Łukasz Langa (Miss Islington (bot)) in branch '3.8': bpo-34776: Fix dataclasses to support __future__ "annotations" mode (GH-9518) (#17531)

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +17010 pull_request: https://github.com/python/cpython/pull/17532 ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +17009 pull_request: https://github.com/python/cpython/pull/17531 ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-09 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset d219cc4180e7589807ebbef7421879f095e72a98 by Łukasz Langa (Yury Selivanov) in branch 'master': bpo-34776: Fix dataclasses to support __future__ "annotations" mode (#9518)

[issue34776] Postponed annotations break inspection of dataclasses

2019-12-07 Thread Ned Deily
Ned Deily added the comment: > I'll elevate the status so that I don't forget before 3.8.1. Ping, 3.8.1 cutoff is coming up very soon. -- ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury: I'm okay with merging. If I recall, you were going to add a comment or > two about the approach (a closure, if I remember correctly). Sure, I'll rebase and add a comment in a couple of days. I'll elevate the status so that I don't forget before

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread Eric V. Smith
Eric V. Smith added the comment: Yury: I'm okay with merging. If I recall, you were going to add a comment or two about the approach (a closure, if I remember correctly). I think we should backport to 3.8 and 3.7: it's a bug. -- ___ Python

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread Yury Selivanov
Yury Selivanov added the comment: FWIW we discussed my patch with Eric at PyCon 2019 and I think he had no issues with it. Eric, can I merge it? Should we backport to 3.8? -- ___ Python tracker

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread Gregory P. Smith
Change by Gregory P. Smith : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34776] Postponed annotations break inspection of dataclasses

2019-10-23 Thread David Hagen
David Hagen added the comment: This PR has been sitting for a while. Any chance we can bring it over the finish line? -- ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-03-05 Thread Eric V. Smith
Eric V. Smith added the comment: I'm finally getting time to look at this. I'll see what I can do. -- ___ Python tracker ___ ___

[issue34776] Postponed annotations break inspection of dataclasses

2019-03-02 Thread Vlad Shcherbina
Vlad Shcherbina added the comment: Any chance this could get into 3.7.3? -- nosy: +vlad ___ Python tracker ___ ___

[issue34776] Postponed annotations break inspection of dataclasses

2018-10-04 Thread Yury Selivanov
Yury Selivanov added the comment: > Please note that postponed annotations only reveal a problem that we already > had if anybody used a string forward reference: Yeah, makes sense. It's cool that the PR fixes string forward references as well. --

[issue34776] Postponed annotations break inspection of dataclasses

2018-10-04 Thread Łukasz Langa
Łukasz Langa added the comment: Yury, thanks for your patch. I'll review it soon. Please note that postponed annotations only reveal a problem that we already had if anybody used a string forward reference: >>> from dataclasses import dataclass >>> from typing import get_type_hints >>> class

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-28 Thread Stefan Behnel
Change by Stefan Behnel : -- nosy: +scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-27 Thread INADA Naoki
Change by INADA Naoki : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-27 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Gregory P. Smith
Gregory P. Smith added the comment: fwiw, agreed that this should wait for 3.7.2. -- ___ Python tracker ___ ___ Python-bugs-list

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +gregory.p.smith versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Yury Selivanov
Yury Selivanov added the comment: NP, Eric, take your time. I agree that the PR isn't simple and needs a very careful review. -- ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Eric V. Smith
Eric V. Smith added the comment: Unfortunately, I'm not going to be able to give this the attention it deserves before the 3.7.1 cutoff. The changes are sufficiently tricky that I want to make sure I think through the issue in the appropriate detail. Ned: I've made it not a release blocker.

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-24 Thread Eric V. Smith
Eric V. Smith added the comment: Ned: I'm marking this as a release blocker because I'd like to get it in 3.7.1. If I can't do that in the next 5 hours or so, I'll remove the release blocker tag. -- assignee: -> eric.smith nosy: +ned.deily priority: normal -> release blocker

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-23 Thread Yury Selivanov
Yury Selivanov added the comment: And FWIF I don't think we need to use lambdas for annotations to solve issues like this one. -- ___ Python tracker ___

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-23 Thread Yury Selivanov
Yury Selivanov added the comment: > See this for Yury's self-described "hack-ish fix we can use" until we do > something better: Actually, I think I found a better solution that doesn't require any changes to anything besides dataclasses. Currently, dataclasses uses 'exec()' function to

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-23 Thread Yury Selivanov
Change by Yury Selivanov : -- keywords: +patch pull_requests: +8923 stage: -> patch review ___ Python tracker ___ ___

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-23 Thread Eric V. Smith
Eric V. Smith added the comment: [Adding to nosy people who were on the original email] Copying (part of) my response from the email thread: These work: print(get_type_hints(Bar.__init__, globals())) print(get_type_hints(Bar.__init__, Bar.__module__)) But I agree that maybe doing something

[issue34776] Postponed annotations break inspection of dataclasses

2018-09-23 Thread David Hagen
New submission from David Hagen : The new postponed annotations have an unexpected interaction with dataclasses. Namely, you cannot get the type hints of any of the data classes methods. For example, I have some code that inspects the type parameters of a class's `__init__` method. (The real