-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[RecursionError] maximum recursion depth exceeded while calling a Python object #3213
Comments
@qiankunxienb I am unable to reproduce the issue see below. If this is is still occurring, can you please add an example Using a container (podman | docker)podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -e
pip install -q poetry==1.1.3
poetry new foobar
pushd foobar
sed -i /pytest/d pyproject.toml
poetry add scrapy
EOF Created package foobar in foobar
/foobar /
Creating virtualenv foobar-lWDpn5M1-py3.8 in /root/.cache/pypoetry/virtualenvs
Using version ^2.4.0 for Scrapy
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 28 installs, 0 updates, 0 removals
• Installing pycparser (2.20)
• Installing six (1.15.0)
• Installing attrs (20.2.0)
• Installing cffi (1.14.3)
• Installing cssselect (1.1.0)
• Installing idna (2.10)
• Installing lxml (4.5.2)
• Installing pyasn1 (0.4.8)
• Installing w3lib (1.22.0)
• Installing automat (20.2.0)
• Installing constantly (15.1.0)
• Installing cryptography (3.1.1)
• Installing hyperlink (20.0.1)
• Installing incremental (17.5.0)
• Installing itemadapter (0.1.1)
• Installing parsel (1.6.0)
• Installing pyasn1-modules (0.2.8)
• Installing zope.interface (5.1.2)
• Installing pyhamcrest (2.0.2)
• Installing jmespath (0.10.0)
• Installing itemloaders (1.0.3)
• Installing protego (0.1.16)
• Installing pydispatcher (2.0.5)
• Installing pyopenssl (19.1.0)
• Installing queuelib (1.5.0)
• Installing service-identity (18.1.0)
• Installing twisted (20.3.0)
• Installing scrapy (2.4.0) |
Strange, when I add |
Popping in here to say that I'm getting this consistently when I attempt to export my lock file. Full traceback:
I've confirmed that this issue is only occurring on poetry v1.1.3. Downgrading back to v1.1.2 resolves the RecursionError. I'm running these installations using the officially supported installer, not via pip or anything like that. Here's a link to the current pyproject.toml: https://github.com/seandstewart/typical/blob/main/pyproject.toml Also, I should note that I upgraded because I noticed poetry was exporting all of my optional dependencies by default... |
I have the exact same issue as @seandstewart - install works fine, but export does not. Not sure if it is related to the OP or if it is better handled as a new issue? |
Thank you for the reproducer @seandstewart. Can you please try the fix at #3237. @estyrke @seandstewart @qiankunxienb Using pipxpipx install --suffix=@3237 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/3237/head' Using a container (podman | docker)podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -xe
pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3237/head
install -d foobar
pushd foobar
curl -sLO https://raw.githubusercontent.com/seandstewart/typical/main/pyproject.toml
poetry lock
poetry export -f requirements.txt --without-hashes
EOF Note that the lock step will take a a minute or so. |
Same problem here. |
@sergekir at the moment this comes via propagation from dependency markers so, it does not take into account the pypt python constraint. The per dependency python constraint is expected at the moment since we are simply propagating whats in the lock file. Will see if we can remove that later on. |
@abn, poetry@3237 works great for me! |
Was able to reproduce the Also providing the stacktrace from |
Hey @abn sorry for the late response - confirmed poetry@3237 works for me! |
This is to get the bug fix for some of the package resolution logic, see python-poetry/poetry#3213.
This is to get the bug fix for some of the package resolution logic, see python-poetry/poetry#3213. This works on nix for most package, but I am not able to test locally yet. If anyone wants to test this while I try to fix my local issues, that'd be very appreciated!
* Upgrade the version of poetry to the newest version This is to get the bug fix for some of the package resolution logic, see python-poetry/poetry#3213. * Upgrade the version of poetry to the newest version This is to get the bug fix for some of the package resolution logic, see python-poetry/poetry#3213. This works on nix for most package, but I am not able to test locally yet. If anyone wants to test this while I try to fix my local issues, that'd be very appreciated! * Revert changes to the lock file
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).Issue
When I run
poetry add scrapy
, it raise an error:However, when I run
poetry shell
first to enter the virtual env,and then runpoetry add scrapy
, then everying works fine.The text was updated successfully, but these errors were encountered: