Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typed-ast has been EOL-ed #137

Closed
sajith opened this issue Oct 3, 2022 · 1 comment
Closed

typed-ast has been EOL-ed #137

sajith opened this issue Oct 3, 2022 · 1 comment
Assignees
Labels
1.4 For release 1.4

Comments

@sajith
Copy link
Member

sajith commented Oct 3, 2022

Seems that this dependency is a source of trouble, and probably even unnecessary. According to typed-ast's README:

typed_ast will not be updated to support parsing Python 3.8 and newer. Instead, it is recommended to use the stdlib ast module there, which has been augmented to support extracting type comments and has limited support for parsing older versions of Python 3.

Also see python/typed_ast#179.

Unless Python 2 support is important for some reason, can we remove typed-ast requirement?

I tried to do a pip install -r requirements.txt, and typed-ast couldn't even be installed in a venv on a M1 MacBook, when using Python 3.9.13:

      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -Iast3/Include -I/opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ast3/Python/ast.c -o build/temp.macosx-12-arm64-cpython-39/ast3/Python/ast.o
      ast3/Python/ast.c:844:5: warning: code will never be executed [-Wunreachable-code]
          abort();
          ^~~~~
      ast3/Python/ast.c:4514:9: error: implicit declaration of function '_PyUnicode_DecodeUnicodeEscape' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
              ^
      ast3/Python/ast.c:4514:9: note: did you mean 'PyUnicode_DecodeUnicodeEscape'?
      /opt/homebrew/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/unicodeobject.h:588:23: note: 'PyUnicode_DecodeUnicodeEscape' declared here
      PyAPI_FUNC(PyObject*) PyUnicode_DecodeUnicodeEscape(
                            ^
      ast3/Python/ast.c:4514:7: warning: incompatible integer to pointer conversion assigning to 'PyObject *' (aka 'struct _object *') from 'int' [-Wint-conversion]
          v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);
            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> typed-ast
@ibaldin ibaldin self-assigned this Oct 3, 2022
@ibaldin ibaldin added the 1.4 For release 1.4 label Oct 3, 2022
@ibaldin
Copy link
Contributor

ibaldin commented Oct 3, 2022

good catch, will appear in 1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.4 For release 1.4
Projects
None yet
Development

No branches or pull requests

2 participants