Yes, it’s https://bugs.python.org/issue34776
--
Eric
> On Sep 27, 2018, at 12:05 PM, Ivan Levkivskyi wrote:
>
> Do we have a b.p.o. issue about this? If no, then I would recommend to open
> one, so that we will not loose track of this.
>
> --
> Ivan
>
>
>
>> On Sat, 22 Sep 2018 at 16:32, D
Do we have a b.p.o. issue about this? If no, then I would recommend to open
one, so that we will not loose track of this.
--
Ivan
On Sat, 22 Sep 2018 at 16:32, David Hagen wrote:
> The new postponed annotations have an unexpected interaction with
> dataclasses. Namely, you cannot get the type
> On Sep 22, 2018, at 1:38 PM, Yury Selivanov wrote:
>
> On Sat, Sep 22, 2018 at 3:11 PM Guido van Rossum wrote:
> [..]
>> Still, I wonder if there's a tweak possible of the globals and locals used
>> when exec()'ing the function definitions in dataclasses.py, so that
>> get_type_hints() ge
On Sat, Sep 22, 2018 at 12:41 PM Guido van Rossum
wrote:
> Probably a bugs.python.org issue is a better place to dive into the
details than python-dev.
Issue tracker issue created: https://bugs.python.org/issue34776
___
Python-Dev mailing list
Python-De
On Sat, Sep 22, 2018 at 3:11 PM Guido van Rossum wrote:
> Still, I wonder if there's a tweak possible of the globals and locals
used when exec()'ing the function definitions in dataclasses.py, so that
get_type_hints() gets the right globals for this use case.
On Sat, Sep 22, 2018 at 4:38 PM Yury
On Sat, Sep 22, 2018 at 3:11 PM Guido van Rossum wrote:
[..]
> Still, I wonder if there's a tweak possible of the globals and locals used
> when exec()'ing the function definitions in dataclasses.py, so that
> get_type_hints() gets the right globals for this use case.
>
> It's really tough to be
On Sat, Sep 22, 2018 at 11:29 AM Eric V. Smith wrote:
> I think this problem is endemic to get_type_hints(). I've never
> understood how you're supposed to use the globals and locals arguments
> to it, but this works:
>
> print(get_type_hints(Bar.__init__, globals()))
>
> as does:
>
> print(get_t
On 9/22/2018 12:41 PM, Guido van Rossum wrote:
This is a good catch -- thanks for bringing it up. I'm adding Eric Smith
(author of dataclasses) and Ivan Levkivskyi (co-author of typing) as
well as Łukasz Langa (author of PEP 563) to the thread to see if they
have further insights.
I don't see
This is a good catch -- thanks for bringing it up. I'm adding Eric Smith
(author of dataclasses) and Ivan Levkivskyi (co-author of typing) as well
as Łukasz Langa (author of PEP 563) to the thread to see if they have
further insights.
Personally I don't think it's feasible to change PEP 563 to use