Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-103636: add enums for days and months in calendar module#103642
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
bedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
32e9466
to7172358
Comparebedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
1ca6a98
toac4867c
Comparebedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
ac4867c
to5cacc5a
Comparebedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
bedevere-bot commentedApr 20, 2023
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 |
5cacc5a
to97a6011
Comparebedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
Agent-Hellboy commentedApr 20, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have made the requested changes; please review again
as it is |
97a6011
toc74af07
Comparebedevere-bot commentedApr 20, 2023
Most changes to Pythonrequire a NEWS entry. Please add it using theblurb_it web app or theblurb command-line tool. |
I have made the requested changes; please review again |
bedevere-bot commentedApr 20, 2023
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
If you think test cases are necessary, add what you expect users to do. forminMonth:calendar.weekday(2021,m,2)==calendar.weekday(2021,m.value,2) though I think this change is okay with no test case. |
Yes, if you want i can change the return type of function returning 0-6 for days to enum , if not then i guess this is okay without test. |
Agent-Hellboy commentedApr 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@sunmy2019 ,@hugovk deprecated_names= ['January','February']def__getattr__(name):print(name)ifnameindeprecated_names:warnings.warn(f"{name} is deprecated",DeprecationWarning)returnname I picked the code fromhttps://peps.python.org/pep-0562/ why name is picking |
The question is, are we gonna deprecate these two names. My opinion: I think it's better to directly remove We don't need to provide compatibility over non-public names unless it is widely used by others. No one should use these names since only 2 of the 12 months exist. But since@ethanfurman requested "as-is". I would interpret it as "Do not change these things, and we are not going to deprecate them for compatibility". |
Agent-Hellboy commentedApr 22, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
okay, sure Btw, I got it why doesn't it works |
The "DO-NOT-MERGE / unresolved review" check is there to denote outstanding red code review. |
My apologies, that was a misunderstanding -- I meant the initial change was fine as-is (in other words, no need to make the same change as above by iterating directly over Please put that change back in place, and remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please restore the change I had confusingly labeled "leave as-is" and remove theJanuary
andFebruary
constants.
bedevere-bot commentedApr 25, 2023
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 |
I have made the requested changes; please review again I guess the below error is not related to the change
|
bedevere-bot commentedApr 25, 2023
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks good! We can commit what you've done so far, or, if you want to keep going, you can modify any function that is currently just returning anint
to return the appropriateMonth
orDay
instead.
Thanks@ethanfurman, I can create a new PR for the same |
Uh oh!
There was an error while loading.Please reload this page.
I have tried to fulfill the requirements from the comments ofhttps://stackoverflow.com/questions/76028482/python-module-defining-constants-for-month-numbers