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

Remove Python 2 code. #174

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

HexDecimal
Copy link

Removes from __future__ import unicode_literals from all scripts. I have not changed the FAQ topic which talks about Unicode, so it might be outdated now. Closes #70

Removes six as a requirement. Six features were replaced with their Python 3 equivalents. Closes #71

Removes functions backported from Python 3, and any Python 2 branches.

super() no longer needs arguments when called inside of methods.

@svenevs
Copy link
Owner

svenevs commented Sep 6, 2022

I took a quick look, but haven't had time to finish / add in a couple of related updates. Wanted to drop a quick note saying thanks for opening this, really helpful! 🙂

@HexDecimal
Copy link
Author

Don't worry. I can handle merge conflicts if any come up.

@svenevs
Copy link
Owner

svenevs commented Mar 29, 2023

There are a couple of PRs I want to land that are adding bugfixes / new features. Then I will do a fast release.

After that, I am going to see how much longer this takes. If you are willing to rebase it I can keep adding commits here. However this is stale and many moons ago, so I am also happy to just cherry pick things into different (smaller, one by one PRs). There is no rush! Just depends on your level of interest 👍

Regardless, thank you for spending the time you did to get this PR here in the first place!

This is safe to remove from Python 3 scripts.

I have not changed the FAQ topic which talks about Unicode.  It might be
outdated.
@HexDecimal
Copy link
Author

I'll try to keep this rebased onto master. It'd be easy enough to split this into smaller PR's if you'd prefer that.

@svenevs
Copy link
Owner

svenevs commented Mar 29, 2023

Thanks! Initial rebase was needed for CI fixes, if you want to rebase as things go that's great too.

At the end of this PR we'll just merge (rather than squash) things down, I may rewrite the history at the end. And hope it never needs to be bisected 😶

This will be good as one PR I think, I'm very excited about this one!

@Rotzbua
Copy link
Contributor

Rotzbua commented Sep 12, 2023

@svenevs For automatic migration of old python2 code you can use (pyupgrade)[https://github.com/asottile/pyupgrade]. It may be easier to run this tool by your own instead of investing time in rebase.

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.

remove six dependency and associated usage remove py2 unicode imports
3 participants