bpo-30274: Rename 'name' to 'fullname' argument to ExtensionFileLoader.#1735
bpo-30274: Rename 'name' to 'fullname' argument to ExtensionFileLoader.#1735sayanchowdhury wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
You also need to use the deprecated name if it's given.
There was a problem hiding this comment.
You need to put self.name = fullname in an else: statement, otherwise you'll always re-assign self.name to fullname anyway.
There was a problem hiding this comment.
Oops, terrible mistake it was. Fixed it.
|
I believe this was done during Pycon US sprint, so I applied the sprint label. |
There was a problem hiding this comment.
You need to pass stacklevel=2 in order to make DeprecationWarning more useful.
There was a problem hiding this comment.
Also, please add a test case for DeprecationWarning.
There was a problem hiding this comment.
We don't edit Misc/NEWS manually anymore. Please use blurb to create a NEWS entry: https://github.com/python/core-workflow/tree/master/blurb
There was a problem hiding this comment.
Okay, I will looking in blurb and update the PR accordingly
f54b116 to
9aee00f
Compare
9aee00f to
340ba58
Compare
There was a problem hiding this comment.
The side effect of this change is that it makes both arguments optional, with default to None. I have doubts that this is an intentional change.
The only correct calls are:
ExtensionFileLoader(thename, thepath)
ExtensionFileLoader(thename, path=thepath)
ExtensionFileLoader(fullname=thename, path=thepath)
ExtensionFileLoader(name=thename, path=thepath) # deprecatedPassing both fullname and name should be an error.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
@sayanchowdhury do you plan to address the review comments or should I close it? |
|
@brettcannon I'll try to get this closed as soon as possible. |
340ba58 to
8e5ac17
Compare
|
@serhiy-storchaka Which error should I be throwing here? |
|
|
|
Though I've written the test for I tried to import |
|
@sayanchowdhury did you run |
bf2ad7b to
882bc02
Compare
|
@berkerpeksag I did not. Thanks. I have updated the PR. I don't know if the message for TypeError sounds good. Please review the PR. |
berkerpeksag
left a comment
There was a problem hiding this comment.
Please add a NEWS entry. See https://devguide.python.org/committing/#what-s-new-and-news-entries for details.
882bc02 to
1d03f9e
Compare
|
Thanks for making the requested changes! @berkerpeksag, @serhiy-storchaka, @brettcannon, @ambv: please review the changes made to this pull request. |
brettcannon
left a comment
There was a problem hiding this comment.
I'm really sorry to send this back to you, @sayanchowdhury, but I just noticed some indentation inconsistencies. (I would have committed them myself and then merged but I don't think you checked the box to let me edit the PR).
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Signed-off-by: Sayan Chowdhury <sayan.chowdhury2012@gmail.com>
b6d8d63 to
c7b25cf
Compare
Sorry for that one. Probably because it is an old PR. |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @berkerpeksag, @serhiy-storchaka, @brettcannon, @ambv: please review the changes made to this pull request. |
|
👍 |
|
@sayanchowdhury changes looks great! Unfortunately the macOS tests failed for some reason and now there's a merge conflict. If you could fix the merge conflict then hopefully the tests will pass and then we can merge this! |
|
Sorry, I can't merge this PR. Reason: |
|
@sayanchowdhury, please resolve the merge conflict as this has been approved and is ready to merge. Thanks! |
|
Ping. I see this has stalled, in what way can we get it started again? |
|
@DimitrisJim macOS test failure needs to be resolved and the merge conflict needs to be fixed. |
|
This PR is stale because it has been open for 30 days with no activity. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
The problem is that it makes all parameters optional. ExtensionFileLoader() is now valid.
|
At this point I think the risk of breakage outweighs the purity of normalizing the argument name. Thanks to @sayanchowdhury for the PR, but I think this has stalled out too long to merge at this point. |
DeprecationWarning is raised for any use of 'name'.
https://bugs.python.org/issue30274
Automerge-Triggered-By: @brettcannon