exhale icon indicating copy to clipboard operation
exhale copied to clipboard

Remove Python 2 code.

Open HexDecimal opened this issue 3 years ago • 6 comments

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.

HexDecimal avatar Aug 30 '22 00:08 HexDecimal

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! 🙂

svenevs avatar Sep 06 '22 23:09 svenevs

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

HexDecimal avatar Sep 07 '22 00:09 HexDecimal

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 :+1:

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

svenevs avatar Mar 29 '23 04:03 svenevs

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.

HexDecimal avatar Mar 29 '23 05:03 HexDecimal

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!

svenevs avatar Mar 29 '23 05:03 svenevs

@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.

Rotzbua avatar Sep 12 '23 06:09 Rotzbua