modernize icon indicating copy to clipboard operation
modernize copied to clipboard

Add support for the --output-dir and --add-suffix options from 2to3

Open shaib opened this issue 7 years ago • 4 comments

These options were added to 2to3 in Python 2.7 and 3.2. This commit adds the options always, with descriptive errors if the user attempts to use them with a version of Python that is too old.

Most of the code here was shamelessly stolen from lib2to3's source.

I note that Python 2.6 and 3.0<=Python<=3.3 are no longer supported by the project (according to the travis config), so the code may be simplified by just assuming the newer versions.

Another alternative I considered was to only add the options where they can be handled. I decided against it in the interest of discoverability, but if the decision is to keep some support for older Pythons, that is also a valid way to go.

shaib avatar Feb 20 '18 16:02 shaib

Yep, I think it's OK to simplify it and assume it's run by a moderately recent Python version.

takluyver avatar May 06 '18 20:05 takluyver

@shaib there were some changes with code style, and we now use fissix and py>=3.6 and so we can be sure these flags always exist

graingert avatar Sep 03 '20 23:09 graingert

Should this PR be updated for fissix or closed?

cclauss avatar Jun 27 '22 12:06 cclauss

FWIW I no longer have interest in this PR.

shaib avatar Oct 01 '22 16:10 shaib