10000 gh-118465: Add __firstlineno__ attribute to class by serhiy-storchaka · Pull Request #118475 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-118465: Add __firstlineno__ attribute to class #118475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into class-firstlineno
  • Loading branch information
serhiy-storchaka authored May 2, 2024
commit c168577d536f57f59043bd4ef33fe496a332b150
4 changes: 4 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ Other Language Changes
of the class definition.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the class has decorators then I think this is the first line of the first decorator. Need a test for this case, and probably to mention in the doc.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are existing tests, and they are passed.

I'll add explicit mentioning of this fact, but AFAIK it was not specified for co_firstlineno etc.

(Contributed by Serhiy Storchaka in :gh:`118465`.)

* ``from __future__ import ...`` statements are now just normal
relative imports if dots are present before the module name.
(Contributed by Jeremiah Gabriel Pascual in :gh:`118216`.)


New Modules
===========
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0