-
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
Poetry 1.8.0 does not tolerate new sources in pyproject.toml #9042
Comments
This comment was marked as duplicate.
This comment was marked as duplicate.
Can you verify the issue still exists with 1.8.1? And an interim workaround, if the issue is not fixed in 1.8.1, for the |
Making a note that we experienced this where we had:
The internal [[tool.poetry.source]]
name = "SOURCE"
url = "INTERNAL_PYPI_URL"
priority = "default" For now we have pinned back to |
This modification makes 1.8.1 work correctly, but it's a workaround and the original issue should still get fixed: withDockerContainer(image:'*********.com/python:3.12.1-slim-bookworm', args:'-u root') {
sh "pip install poetry==1.8.1 " +
"--trusted-host ${env.TRUSTED_PIP_HOST} " +
"--index-url ${env.PIP_REGISTRY} " +
"--root-user-action ignore " +
"--no-cache-dir"
sh "poetry config virtualenvs.create false"
sh "poetry config solver.lazy-wheel false" // <--- ADDED
sh "poetry source add --priority=primary privsrc ${env.PIP_REGISTRY}"
sh "poetry lock --no-update" // <--- ADDED
sh "poetry install --with dev"
sh "pytest"
} |
This issue contains two different issues:
Regarding 2: please try 1.8.1 and open a new issue if Regarding 1: That's mentioned in the blog post. See #8737 for more details why this error makes sense. @aabmets @kiran94 What I don't understand in your example: Why do you add a source ( |
presumably there's every reason to think that this will continue to fail in 1.8.1, if the server has not sent that header |
This comment was marked as off-topic.
This comment was marked as off-topic.
I suppose SHOULD is not MUST. 😩 @aabmets May I ask what type of custom package index you are using?
In other words, the source is used even though the packages are locked for another source? That sound like a bug. I have to check if I can reproduce that later. Or do you use any Poetry plugins that alter the behavior? |
This comment was marked as off-topic.
This comment was marked as off-topic.
I have moved the off-topic (in the context of this issue) concern regarding build time package source urls to #9057. |
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. |
EDIT: Was this fixed with Poetry 1.8.1?
Description
I'm using Poetry in a Jenkins pipeline to install packages from a private repository for the pytest stage:
The pipeline broke, because I hadn't pinned poetry version to 1.7.1 and it automatically used the latest version 1.8.0, which poetry had released on 25th of February. The pipeline works as expected with Poetry version 1.7.1.
The line
poetry install --with dev
causes poetry to throw the following error:pyproject.toml changed significantly since poetry.lock was last generated. Run `poetry lock [--no-update]` to fix the lock file.
Inserting the suggested command
poetry lock --no-update
after thepoetry source add
command will produce the following error instead:Workarounds
Option A:
Option B:
Poetry Installation Method
pip
Operating System
Linux
Poetry Version
1.8.0
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
Poetry Runtime Logs
Error log without
poetry lock --no-update
:Error log with
poetry lock --no-update
, thrown by the same command:The text was updated successfully, but these errors were encountered: