This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients gvanrossum, levkivskyi, serhiy.storchaka, xtreak
Date 2020-08-10.08:38:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597048694.8.0.655500821688.issue40185@roundup.psfhosted.org>
In-reply-to
Content
This seems to have caused a test failure in astroid project. I am not sure if the fix needs to be done from their end probably relying on some implementation detail or from the patch itself. Feel free to ignore if it's a third-party only error.

Reproducer script : /tmp/namedtuple_astroid.py

from astroid import parse

mod = parse('''from typing import NamedTuple; NamedTuple("A")''')
print(str(next(mod.body[-1].value.infer())))
assert str(next(mod.body[-1].value.infer())) != 'Uninferable'

Before this commit : 

python /tmp/namedtuple_astroid.py
Instance of typing.NamedTuple

After this commit : 

python /tmp/namedtuple_astroid.py
Uninferable
Traceback (most recent call last):
  File "/tmp/namedtuple_astroid.py", line 4, in <module>
    assert str(next(mod.body[-1].value.infer())) != 'Uninferable'
AssertionError
History
Date User Action Args
2020-08-10 08:38:14xtreaksetrecipients: + xtreak, gvanrossum, serhiy.storchaka, levkivskyi
2020-08-10 08:38:14xtreaksetmessageid: <1597048694.8.0.655500821688.issue40185@roundup.psfhosted.org>
2020-08-10 08:38:14xtreaklinkissue40185 messages
2020-08-10 08:38:14xtreakcreate