bpo-38307: Add end_lineno attribute to pyclbr _Objects #24348
Conversation
…nstead to the stack
…va254084/cpython into endline-in-readmodule-module
…in the nest functions
…addi/cpython into endline-in-readmodule-module
Thank you for the revised patch. On the issue, I questioned whether we can insert end_lineno within the existing signatures. I have posted to pydev for additional opinions. The patch otherwise looks fine except for the blurb, which I would revise before merging. |
@@ -0,0 +1,4 @@ | |||
Adds end line no in class' use: generating dependency. |
merwok
Jan 27, 2021
Member
I can’t parse this line
(and second line starting with colon seems strange)
kebab-mai-haddi
Jan 27, 2021
Author
Contributor
Thanks, @terryjreedy !
But how could you push a change to my forked repository?
(I am not objecting to it, I just do not understand how another person can push to mine repo)
terryjreedy
Jan 27, 2021
Member
When you made the PR, you left a checkmark in the box that says to allow core developers ('Members of Python' when you mouse over the icons) to modify the files in this branch. If you had removed it, I would have asked to put is back in if possible. To pull to your local repository, which you should do before making further changes, checkout this branch, endline-in-readmodule-module, and, I believe, if you defined 'origin' as the devguide suggests
git pull origin endline-in-readmodule-module
Don't use rebase.
Tests/macOS just says 'Error'. I suspect that this is not related to patch. The revised blurb should pass. It may still be too wordy. The person merging this should likely add a What's New entry. The details will depend on where the new argument is added. This is worth an addition to Misc/Acks. This should not be done until just before merging, or after. |
Since retests had the same 'default role used' complaint, I removed all markup. |
Thanks, @terryjreedy . All tests passed, does this mean the PR will be merged as per the standards? |
There is a discussion about this change : it breaks compatibility but for something that was not supposed to be used directly — more changes are suggested to break with a clear message rather than appear to work. |
@terryjreedy , so should I modify the PR with |
Before merging, an entry for Add an 'end_lineno' attribute to the Class and Function objects that appear in the (With bpo marked-up as for other entries.) |
I am making the changes now. |
Co-authored-by: Éric Araujo <merwok@netwok.org>
000cde5
into
python:master
For back-compatibility, make the new constructor parameter for public classes Function and Class
keyword-only with a default of None.
bpo-38307: Provide class' and function's end line in order to provide the scope of the classes and functions in a module.
https://bugs.python.org/issue38307