pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.32k stars 365 forks source link

refactor!: remove python2 #856

Closed kuwv closed 1 year ago

kuwv commented 2 years ago

Python 2 has been deprecated for over a year now. This pull request removes integrations with invoke with six that are used to support now deprecated Python2 compatibility. Removing this will allow builds to be more simplified while allow integration with more modern tooling from the Python ecosystem.

see corresonding: https://github.com/pyinvoke/invocations/pull/30

kuwv commented 2 years ago

Tests need to be run with corresponding invocations that also has six removed.

neozenith commented 2 years ago

@kuwv Thanks for openning this, but @bitprophet is actively working on removing Python 2 (after a long time of dealing with other priorities than FOSS).

The migration of invoke, fabric and paramiko from Travis to CircleCI was a blocker which is now complete.

He is working on removing Python 2 from invoke first since it has least dependencies and Fabric and paramiko depend on Invoke.

bitprophet commented 2 years ago

What @neozenith said, though so far I've only started on Invocations myself (I think before that PR over there was filed). So you may want to just close that one, but I'll make a note to build off this one when I turn my attention to Invoke-proper.

As with any PR, I may end up using a scalpel, but especially for this kind of more grunt-work it'll save me a lot of time regardless, so thank you!

kuwv commented 2 years ago

@bitprophet, @neozenith, glad this will be useful then. I'll close the invocations PR.

kuwv commented 2 years ago

One caveat, I updated to pep517 build for setuptools.

Use:

python -m build

instead of:

python setup.py build

Also, dev-requirements.txt contains link to invocations for testing that is not intended for merging.

kuwv commented 1 year ago

@neozenith Do you need me to refresh this? Or, do you have a time frame?

bitprophet commented 1 year ago

Gonna take a crack at applying this now and hope it saves me some time! 🙏🏻 Invoke is now up on my Py2 chopping block.

bitprophet commented 1 year ago

Rebased onto latest main, made some minor changes, and merged back into main. I'll take the rest from here - thanks! 🙌🏻

kuwv commented 1 year ago

Huzzah!!!