You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bfbc4c3 deprecated the ast module, but promptlib wasn't updated accordingly.
Because of that, importing promptlib fails.
Minimal example to reproduce the issue:
Install aici:
# pip install 'git+https://github.com/microsoft/aici.git@v0.2.1#egg=pyaici&subdirectory=py'
Collecting pyaici
Cloning https://github.com/microsoft/aici.git (to revision v0.2.1) to ./pip-install-k3x4xa7d/pyaici_d72d87c10d2a44caac4ddc24c482f7b7
Running command git clone --filter=blob:none --quiet https://github.com/microsoft/aici.git /tmp/pip-install-k3x4xa7d/pyaici_d72d87c10d2a44caac4ddc24c482f7b7
Running command git checkout -q 017179c935cd25309271052e9d5983181b85eb1b
Resolved https://github.com/microsoft/aici.git to commit 017179c935cd25309271052e9d5983181b85eb1b
Running command git submodule update --init --recursive -q
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Collecting requests (from pyaici)
Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting charset-normalizer<4,>=2 (from requests->pyaici)
Using cached charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->pyaici)
Using cached idna-3.7-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->pyaici)
Using cached urllib3-2.2.1-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->pyaici)
Using cached certifi-2024.2.2-py3-none-any.whl.metadata (2.2 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached certifi-2024.2.2-py3-none-any.whl (163 kB)
Using cached charset_normalizer-3.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)
Using cached idna-3.7-py3-none-any.whl (66 kB)
Using cached urllib3-2.2.1-py3-none-any.whl (121 kB)
Building wheels for collected packages: pyaici
Building wheel for pyaici (pyproject.toml) ... done
Created wheel for pyaici: filename=pyaici-0.1-py3-none-any.whl size=31019 sha256=23c1ae5e1723dc7b79fd0492d7773c5ad421d2bf1abafc1f7b6a717237a15f4e
Stored in directory: /tmp/pip-ephem-wheel-cache-cwd6d_ij/wheels/c4/83/43/d78271a43eb24be746456fb053eb7c97e1956da461d3dc7a07
Successfully built pyaici
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests, pyaici
Successfully installed certifi-2024.2.2 charset-normalizer-3.3.2 idna-3.7 pyaici-0.1 requests-2.31.0 urllib3-2.2.1
Try to import promptlib
# python -c "import promptlib"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/root/.venv/src/pyaici/py/promptlib/__init__.py", line 1, in <module>
from .promptlib import PromptNode, append, begin, end
File "/root/.venv/src/pyaici/py/promptlib/promptlib/__init__.py", line 2, in <module>
from .prompt import PromptNode, append, begin, end, PromptProgram
File "/root/.venv/src/pyaici/py/promptlib/promptlib/prompt.py", line 5, in <module>
from pyaici import ast
ImportError: cannot import name 'ast' from 'pyaici' (/root/.venv/src/pyaici/py/pyaici/__init__.py)
The text was updated successfully, but these errors were encountered:
bfbc4c3 deprecated the
ast
module, butpromptlib
wasn't updated accordingly.Because of that, importing
promptlib
fails.Minimal example to reproduce the issue:
The text was updated successfully, but these errors were encountered: