| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| self.fn, encoding="utf-8", when='MIDNIGHT', interval=2, backupCount=0, | ||
| utc=True) | ||
| rh.close() | ||
| if w: |
There was a problem hiding this comment.
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 via warnings.simplefilter("error").
Sorry, something went wrong.
There was a problem hiding this comment.
Good point. Thanks for the review, Brett.
Sorry, something went wrong.
There was a problem hiding this comment.
Why not use assertWarns()?
Sorry, something went wrong.
There was a problem hiding this comment.
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?
Sorry, something went wrong.
| import queue | ||
| import threading | ||
| import copy | ||
| import warnings |
There was a problem hiding this comment.
It is better to defer the warnings module import until it is needed (which never happen in normal case).
Sorry, something went wrong.
| self.fn, encoding="utf-8", when='MIDNIGHT', interval=2, backupCount=0, | ||
| utc=True) | ||
| rh.close() | ||
| if w: |
There was a problem hiding this comment.
Why not use assertWarns()?
Sorry, something went wrong.
|
#116220 is an alternate solution, which fixes support of intervals>1 instead of deprecating it for when='MIDNIGHT' and when='Wx'. |
Sorry, something went wrong.
|
I guess it can be closed now. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.