GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — bpo-29463: Add docstring field to some AST nodes. by methane · Pull Request #46 · python/cpython Conversation
vstinner
previously requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. of its body
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
methane
force-pushed
the
ast-docstring
branch
from
16facf2 to
e7ec3c1
Compare
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring field for now. It was first statement of there body.
methane
force-pushed
the
ast-docstring
branch
from
e7ec3c1 to
7666aaf
Compare
vstinner
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a minor nit, not a blocker one.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, the doc still sounds strange to me. I propose: The docstring is now exported from the node
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks. In above, I feel "AsyncFunctionDef is added" wrong too. How do you think?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, you're right: :class:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Thanks for this ! Improvement to the AST are welcome ! Would it have been possible to make the docstring optional ? (It's already breaking things, like IPython). Should I comment on upstream bpo ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Carreau Yes, please discuss on bpo. Merged pull request is not good place to discussion, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I created http://bugs.python.org/issue29622 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @Haypo, responded and subscribed to both. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
python/cpython#46 or bpo-29463 added docstring as a property to the module class that comes out of AST (so the free strings no longer appear an the first element in the parsed files).
python/cpython#46 or bpo-29463 added docstring as a property to the module class that comes out of AST (so the free strings no longer appear an the first element in the parsed files).
python/cpython#46 / https://bugs.python.org/issue29463 move the module comment into the AST node and hence out of the tree which means the 2nd entry in the tree is now the import rather than the `__version__` string. Adds nightly on travis.
* FIX: install on python 3.7 python/cpython#46 / https://bugs.python.org/issue29463 move the module comment into the AST node and hence out of the tree which means the 2nd entry in the tree is now the import rather than the `__version__` string. Adds nightly on travis. * BLD: update python tags in setup.py * CI: switch to 3.7-dev * CI: allow failure on 3.7 dev
* Pin pytest to latest version 3.3.2 * Pin pytest-asyncio to latest version 0.8.0 * Pin pytest-aiohttp to latest version 0.3.0 * Update cherry_picker from 0.2.5 to 0.2.7 * Pin aiohttp to latest version 2.3.9 * Pin gidgethub to latest version 2.4.1 * Pin cachetools to latest version 2.0.1 * Pin requests to latest version 2.18.4 * Pin redis to latest version 2.10.6 * Pin celery to latest version 4.1.0 * Comment out python 3.7 from travis CI
Bump version number Closes python#46
Update pyproject.toml and setup.py Closes python#46 See merge request python-devs/importlib_resources!47
…sprint test: Fix fstring related tests in test_tokenize.py
Co-authored-by: Ken Jin <[email protected]>
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS python#46.)
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS python#46.)
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS python#46.)
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS python#46.)
Email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a ValueError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS python#46.)
…il addresses (#122540) The email generators had been incorrectly flattening non-ASCII email addresses to RFC 2047 encoded-word format, leaving them undeliverable. (RFC 2047 prohibits use of encoded-word in an addr-spec.) This change raises a HeaderWriteError when attempting to flatten an EmailMessage with a non-ASCII addr-spec and a policy with utf8=False. (Exception: If the non-ASCII address originated from parsing a message, it will be flattened as originally parsed, without error.) This also applies to other contexts in which RFC2047 words are not allowed by the RFCs. Non-ASCII email addresses are supported when using a policy with utf8=True (such as email.policy.SMTPUTF8) under RFCs 6531 and 6532. Non-ASCII email address domains (but not localparts) can also be used with non-SMTPUTF8 policies by encoding the domain as an IDNA A-label. (The email package does not perform this encoding, because it cannot know whether the caller wants IDNA 2003, IDNA 2008, or some other variant such as UTS #46.) Co-authored-by: R. David Murray <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.