Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-38307: Add end_lineno attribute to pyclbr _Objects#24348

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

kebab-mai-haddi
Copy link
Contributor

@kebab-mai-haddikebab-mai-haddi commentedJan 27, 2021
edited by terryjreedy
Loading

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

Aviral Srivastavaand others added23 commitsSeptember 28, 2019 13:21
…va254084/cpython into endline-in-readmodule-module
@kebab-mai-haddikebab-mai-haddi changed the titleEndline in readmodule modulebpo-38307: Endline in readmodule of pyclbrJan 27, 2021
Copy link
Member

@terryjreedyterryjreedy left a comment

Choose a reason for hiding this comment

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

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.

kebab-mai-haddi reacted with thumbs up emoji
@@ -0,0 +1,4 @@
Adds end line no in class' use: generating dependency.
Copy link
Member

Choose a reason for hiding this comment

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

I can’t parse this line 🙂
(and second line starting with colon seems strange)

Copy link
Member

Choose a reason for hiding this comment

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

Neither could I nor the doc tests. I replaced it.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

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)

Copy link
Member

Choose a reason for hiding this comment

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

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.

kebab-mai-haddi reacted with thumbs up emoji
@terryjreedy
Copy link
Member

terryjreedy commentedJan 27, 2021
edited
Loading

Tests/macOS just says 'Error'. I suspect that this is not related to patch.
Travis and Pipelines failures are due to bad markup in the blurb.

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.

@terryjreedy
Copy link
Member

Since retests had the same 'default role used' complaint, I removed all markup.

@kebab-mai-haddi
Copy link
ContributorAuthor

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?

@merwok
Copy link
Member

There is adiscussion 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.

kebab-mai-haddi reacted with thumbs up emoji

@kebab-mai-haddi
Copy link
ContributorAuthor

@terryjreedy , so should I modify the PR withend_lineno=None?

Copy link
Member

@terryjreedyterryjreedy left a comment

Choose a reason for hiding this comment

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

Before merging, an entry forpyclbr should be added to Improved Modules in Doc/whatsnew/3.10.rst. I think the following is enough.

Add an 'end_lineno' attribute to the Class and Function objects that appear in the
tree returned by pyclbr functions. (Contributed by Aviral Srivastava inbpo-38307.)

(With bpo marked-up as for other entries.)

@terryjreedy
Copy link
Member

I am making the changes now.

@terryjreedyterryjreedy changed the titlebpo-38307: Endline in readmodule of pyclbrbpo-38307: Add endline to pyclbr ObjectsFeb 1, 2021
@terryjreedyterryjreedy changed the titlebpo-38307: Add endline to pyclbr Objectsbpo-38307: Add end_lineno attribute to pyclbr _ObjectsFeb 1, 2021
@terryjreedyterryjreedy added the type-featureA feature request or enhancement labelFeb 1, 2021
@terryjreedyterryjreedy merged commit000cde5 intopython:masterFeb 1, 2021
@kebab-mai-haddi
Copy link
ContributorAuthor

Thank you@terryjreedy !

Does this mean that new installations of Python will have this change or should one wait for the tag release?
I know making from source will have the change but wasn't sure about which version of Python would have this change. Can you help me understand that?

Thanks again!

@merwok
Copy link
Member

As a new feature, this will be released in Python 3.10.

@terryjreedy
Copy link
Member

I don't know what you mean by a tag release, but 3.10.0a5, with Windows and macOS installers should be coming soon and will include this. 3.10.0 should be out next September.

kebab-mai-haddi reacted with thumbs up emoji

adorilson pushed a commit to adorilson/cpython that referenced this pull requestMar 13, 2021
For back-compatibility, make the new constructor parameter for public classes Function and Classkeyword-only with a default of None.Co-authored-by: Aviral Srivastava <aviralsrivastava@Avirals-MacBook-Air.localCo-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@merwokmerwokmerwok left review comments

@terryjreedyterryjreedyterryjreedy left review comments

Assignees
No one assigned
Labels
type-featureA feature request or enhancement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@kebab-mai-haddi@terryjreedy@merwok@the-knights-who-say-ni@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp