Message 305798 - Python tracker

Message305798

Author barry
Recipients barry
Date 2017-11-07.23:15:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1510096549.91.0.213398074469.issue31973@psf.upfronthosting.co.za>
In-reply-to
Content
Issue bpo-26182 added DeprecationWarnings for "import async" and "import await" since both of those pseudo-keywords were to become actual reserved keywords in Python 3.7.  This latter has now happened, but the fix in bpo-26182 is incomplete.  It does not trigger warnings on "from .async import foo".

base/
    __init__.py
    async.py
    good.py

-----async.py
x = 1

-----good.py
from .async import x


$ python3.6 -W error::DeprecationWarning -c "import base.good"
$ python3.7 -c "import base.good"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/x1/base/good.py", line 1
    from .async import x
              ^
SyntaxError: invalid syntax
$ cd base
$ python3.6 -W error::DeprecationWarning -c "import async"
DeprecationWarning: 'async' and 'await' will become reserved keywords in Python 3.7
History
Date User Action Args
2017-11-07 23:15:49barrysetrecipients: + barry
2017-11-07 23:15:49barrysetmessageid: <1510096549.91.0.213398074469.issue31973@psf.upfronthosting.co.za>
2017-11-07 23:15:49barrylinkissue31973 messages
2017-11-07 23:15:49barrycreate