Yelp / aactivator

Automatically source and unsource a project's environment
MIT License
148 stars 17 forks source link

`pipes` is deprecated #42

Closed kennydo closed 1 year ago

kennydo commented 1 year ago

The script currently has from pipes import quote. pipes is deprecated in python3.11, and will be removed in 3.13 (https://docs.python.org/3/library/pipes.html).

Would anyone mind if I made a PR to replace that import with from shlex import quote, since that's where pipes was getting that function from anyways (https://github.com/python/cpython/blob/3.11/Lib/pipes.py#L66)?

chriskuehl commented 1 year ago

That would be great, thanks!

chriskuehl commented 1 year ago

Will probably need to drop Python 2 support though, e.g. delete these lines: https://github.com/Yelp/aactivator/blob/f74fac9d4dd7bcd193f81e8bc421f9ca95c45ee2/setup.py#L17-L18

And add python_requires='>=3.7' to the same file.

...and I guess adjust the tests to stop testing Python 2.

If you just want to do a conditional import for now that would be OK, and then we can handle dropping Python 2 support separately later.