jenisys / parse_type

parse_type extends the parse module (opposite of string.format())

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup.py: install fails with 'setuptools >= 58.0'

stanislavlevin opened this issue · comments

This project has the option use_2to3 in setup.py, which support has been removed in setuptools since version 58.0.0 https://setuptools.readthedocs.io/en/latest/history.html#v58-0-0:

2086: Removed support for 2to3 during builds. Projects should port to a unified codebase or pin to an older version of Setuptools using PEP 518 build-requires.

The build fails with:

  • /usr/bin/python3 setup.py build
    /usr/lib64/python3/site-packages/setuptools/dist.py:718: UserWarning: Usage of dash-separated 'upload-dir' will not be supported in future versions. Please use the underscore name 'upload_dir' instead
    warnings.warn(
    error in parse_type setup command: use_2to3 is invalid.

According to docs https://docs.python.org/3/library/2to3.html#module-lib2to3 the whole lib2to3 is

Deprecated since version 3.10: Python 3.9 will switch to a PEG parser (see PEP 617), and Python 3.10 may include new language syntax that is not parsable by lib2to3’s LL(1) parser. The lib2to3 module may be removed from the standard library in a future Python version. Consider third-party alternatives such as LibCST or parso.

FIXED.
INTEGRATED INTO: v0.6.0

AFFECTED PLATFORMS:

  • Linux

HOW TO REPEAT:

$ pip install -U setuptools
$ pip install --no-binary :all: --force-reinstall parse-type
...
Complete output (1 lines):
  error in parse-type setup command: use_2to3 is invalid.

WORK-AROUND UNTIL FIXED:

$ pip install 'setuptools<58.0'
$ pip install --no-binary :all: --force-reinstall parse-type
...
Successfully installed parse-type-x.x.x ...