Skip to content
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

Upgrade to python 3.5+ syntax, add autoformat #11768

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

alok
Copy link
Contributor

@alok alok commented Jun 1, 2019

Addresses #11749. If autoformat (done with black) is not desired, I can remove
that.

If it is desired, then I still need to add it to Travis to enforce that people
use it. One issue is that it requires 3.6+ to run.

@alok alok marked this pull request as ready for review June 1, 2019 06:33
@LucianaMarques
Copy link
Contributor

LucianaMarques commented Jun 2, 2019

Hi @alok ! My latest PR changed the iptestcontroller.py file, so you probably need to rebase your local repository.

@Carreau
Copy link
Member

Carreau commented Jun 4, 2019

Thanks ! I'll try to have a look when I can !

I can remove that.

Well we'd love to enforce black, but we don't want to modify all the files at once as it would break some things like git blame; see among other this discussion and this thread on twitter; if you don't mind removing/rebasing that would be great.

@alok alok force-pushed the py3 branch 2 times, most recently from dc80f99 to ac357d7 Compare June 4, 2019 08:56
@alok
Copy link
Contributor Author

alok commented Jun 4, 2019

@Carreau I rebased. Though if you wouldn't mind updating the tests, that would be nice since I have no idea what the mini-language for test case formatting is.

@Carreau
Copy link
Member

Carreau commented Jun 4, 2019

since I have no idea what the mini-language for test case formatting is.

Not quite sure what mini language you are referring to.
Also in #11749 I was referring to actuall checking of Python version like here, here ,

Ss this touch ~150 files, I might end up integrating it in multiple step. Did you use a script or changed all by hand ?

@alok
Copy link
Contributor Author

alok commented Jun 4, 2019

Nevermind, it was an issue that came up with black.

I just ran pyupgrade --py3-plus **.py. That was it.

@drunkwcodes
Copy link
Contributor

This PR may really break python2.7 compatibility in master such as string prefix u deletion.
Would you like to add a warning for python2 users pinning the version to 5?

And it is better to remain PEP461 string formatting unchanged for the target python version is 3.5.

@alok
Copy link
Contributor Author

alok commented Jun 7, 2019

@drunkwcodes I'm not going to do any of that. 2.7 support has been dropped since 6.0, which came out 2 years ago.

@drunkwcodes
Copy link
Contributor

@alok Fine. But PEP461 formatting?

@alok
Copy link
Contributor Author

alok commented Jun 7, 2019 via email

@drunkwcodes
Copy link
Contributor

@alok That is the proof of unnecessity about the change of string formatting.
Reverting those changes and u prefix deletion makes this PR less possible to be rejected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants