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

gh-90535: Warn of deprecation of intervals other than 1 withwhen='MIDNIGHT'#98099

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

Closed
vsajip wants to merge2 commits intopython:mainfromvsajip:fix-90535

Conversation

@vsajip
Copy link
Member

@vsajipvsajip commentedOct 8, 2022
edited by brettcannon
Loading

@vsajipvsajip self-assigned thisOct 8, 2022
@brettcannonbrettcannon changed the titlegh-90535: Warn of deprecation of intervals other than 1 with when='MI…gh-90535: Warn of deprecation of intervals other than 1 with when='MIDNIGHT'Nov 25, 2022
@brettcannonbrettcannon changed the titlegh-90535: Warn of deprecation of intervals other than 1 with when='MIDNIGHT'gh-90535: Warn of deprecation of intervals other than 1 withwhen=='MIDNIGHT'Nov 25, 2022
@brettcannonbrettcannon changed the titlegh-90535: Warn of deprecation of intervals other than 1 withwhen=='MIDNIGHT'gh-90535: Warn of deprecation of intervals other than 1 withwhen='MIDNIGHT'Nov 25, 2022
self.fn,encoding="utf-8",when='MIDNIGHT',interval=2,backupCount=0,
utc=True)
rh.close()
ifw:
Copy link
Member

Choose a reason for hiding this comment

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

Do you want the test to pass if no warning is raised? If not then in the above I would force deprecations on as exceptions viawarnings.simplefilter("error").

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Good point. Thanks for the review, Brett.

Choose a reason for hiding this comment

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

Why not useassertWarns()?

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

I do not think that this change is needed. What if you want to roll over at 4:00 every second night? What are the alternatives?

importqueue
importthreading
importcopy
importwarnings

Choose a reason for hiding this comment

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

It is better to defer thewarnings module import until it is needed (which never happen in normal case).

self.fn,encoding="utf-8",when='MIDNIGHT',interval=2,backupCount=0,
utc=True)
rh.close()
ifw:

Choose a reason for hiding this comment

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

Why not useassertWarns()?

@serhiy-storchaka
Copy link
Member

#116220 is an alternate solution, which fixes support of intervals>1 instead of deprecating it for when='MIDNIGHT' and when='Wx'.

@serhiy-storchaka
Copy link
Member

I guess it can be closed now.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@brettcannonbrettcannonbrettcannon left review comments

@serhiy-storchakaserhiy-storchakaserhiy-storchaka left review comments

Assignees

@vsajipvsajip

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@vsajip@serhiy-storchaka@brettcannon@bedevere-bot@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp