AnacondaRecipes / python-feedstock

A conda-smithy repository for python.
BSD 3-Clause "New" or "Revised" License
4 stars 7 forks source link

Export a _PyUnicode_DecodeUnicodeEscape for compatibility with Python… #58

Closed tobijk closed 2 years ago

tobijk commented 2 years ago

Going from Python 3.9.7 to 3.9.8 function _PyUnicode_DecodeUnicodeEscape was refactored, split and renamed. Even though this was meant to be internal, it was used by packages typed_ast, and apparently also mypy. Resulting in, for example:

Python 3.9.11 (main, Mar 28 2022, 10:10:35) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import black
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tkoch/Anaconda/py3.9/envs/black-vs-click/lib/python3.9/site-packages/black.py", line 45, in <module>
    from typed_ast import ast3, ast27
  File "/home/tkoch/Anaconda/py3.9/envs/black-vs-click/lib/python3.9/site-packages/typed_ast/ast3.py", line 40, in <module>
    from typed_ast import _ast3
ImportError: /home/tkoch/Anaconda/py3.9/envs/black-vs-click/lib/python3.9/site-packages/typed_ast/_ast3.cpython-39-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_DecodeUnicodeEscape

Since we moved from 3.9.7 to 3.9.11 we're hitting this problem. This patch adds back the symbol.