-
Notifications
You must be signed in to change notification settings - Fork 5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #6256 : migrate to python 3.7+ #6260
Conversation
* Update classifiers * Update python_requires * Fix deprecated code (some from python 2.x): - `io.open` -> `open` - `IOError` -> `OSError` (in python 3 `IOError` is alias) - `socket.error` -> `OSError` - `u''` -> `''` - `str().format` -> f-strings (where it was quick automatically validated change) - `object` is not needed as base class - use `set` comprehensions - `sum` over generators (do not produce temporary lists) - use plain `super()` * remove unused imports
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.
@penguinolog - thank you for taking the time to make these changes. There were still a few f-string conversions that we might as well get in if you don't mind.
@blink1073 - are these changes (drop of 3.6, add of 3.10) be something we could deliver in a 6.5 release?
@@ -146,7 +143,7 @@ def _copy(self, copy_from, copy_to=None): | |||
@gen.coroutine | |||
def _upload(self, model, path): | |||
"""Handle upload of a new file to path""" | |||
self.log.info(u"Uploading file to %s", path) | |||
self.log.info("Uploading file to %s", path) |
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.
f-string? (others below as well)
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.
logging call without f-string is a bit more native (lazy logging formatting) and pylint will complain (BTW personally I prefer f-strings)
leave lazy logging format
Makes sense to me |
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.
LGTM - thank you @penguinolog.
@kevin-bates @blink1073 can this PR go forward? |
Hi @penguinolog - yes, I'd like to move this forward but was hoping to get #6213 merged prior to avoid merge conflicts (although there's only a single file overlap in that PR). I've pinged the other PR so I'm hoping we get some traction there. Thank you for your patience. |
@kevin-bates looks like #6213 stuck with lack of frontenders :( |
@kevin-bates can this PR go before frontend part? Project is moving forward and migration is stuck |
@echarles since you're actively working on the 6.4.x, do you have an order preference? |
As the frontend releated changes will occur in the @kevin-bates @blink1073 Have you already looked at the changes, in which case I let you go forward. If not, I am happy to review. |
Kevin already reviewed, so proceeding. Thanks @penguinolog! |
io.open
->open
IOError
->OSError
(in python 3IOError
is alias)socket.error
->OSError
u''
->''
str().format
-> f-strings(where it was quick automatically validated change)
object
is not needed as base classset
comprehensionssum
over generators (do not produce temporary lists)super()