Fix and test async def linenos#198
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #197 it looks like the old workaround function
TopLevelVisitor._workaround_func_linenois safe to remove.The old AST bug where decorated defs/classes reported the decorator line instead of the
def/classline was fixed in CPython bpo-33211, closed 2018-11-23 and I think landed in 3.7 and 3.8. (python/cpython#77392)For PyPy I don't have direct evidence, but coveragepy has a note indicating that PyPy 3.8 has the bug, but it is fixed in PyPy 3.9 v7.3.8rc1 (https://github.com/coveragepy/coveragepy/blob/master/lab/notes/pypy-738-decorated-functions.txt), so its probably safe enough to land it here.
If anyone is on an older pypy, using xdoctest, and encounters this error, then I suppose make an issue.