Closed marns93 closed 3 years ago
@abn Could you please have a look?
I have a similar problem in version 1.1.2.
In ad_strategies
project I have next dependencies:
[tool.poetry.dependencies]
python = "^3.8"
ad_ml = { git = "ssh://git@git.ucb.local:7999/ad/ad_ml.git", tag = "v0.6.0" }
In ad_scores
package I need ad_strategies
package:
[tool.poetry.dependencies]
python = "^3.8"
ad_strategies = { git = "ssh://git@git.ucb.local:7999/ad/ad_strategies.git", tag = "v0.3.0" }
Result of poetry export -f requirements.txt --without-hashes
command in ad_scores
package is:
ad-ml==0.6.0
ad_strategies @ git+ssh://git@git.ucb.local:7999/ad/ad_strategies.git@v0.3.0
and it wrong, I expect:
ad-ml @ git+ssh://git@git.ucb.local:7999/ad/ad_ml.git@v0.6.0
ad_strategies @ git+ssh://git@git.ucb.local:7999/ad/ad_strategies.git@v0.3.0
Sorry for my English
Can you please try the fix at #3119.
pipx install --suffix=@3119 'poetry @ git+https://github.com/python-poetry/poetry.git@refs/pull/3119/head'
podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -e
python -m pip install -q git+https://github.com/python-poetry/poetry.git@refs/pull/3119/head
python -m poetry new foobar
pushd foobar
sed -i /pytest/d pyproject.toml
python -m poetry add 'git+ssh://git@github.com/moneymeets/sampleproject.git#83068b995c2f94b0d51333b932b1a939084e9ef7'
python -m poetry export -f requirements.txt --without-hashes
EOF
Note: The container example will require authorised pubkeys or the dependency references to be updated to anonymous ssh urls or https urls.
I'm having a similar issue with nested relative path local dependencies on poetry 1.1.2:
...
mypkg.common==0.0.1
mypkg.sdk @ ../../libs/sdk
mypkg.logger==0.0.1
...
It appears that poetry@3119 fixes it:
...
mypkg.common @ /tmp/mypkg/libs/py/common; python_version >= "3.8" and python_version < "3.9"
mypkg.sdk @ /tmp/mypkg/libs/py/sdk; python_version >= "3.8" and python_version < "3.9"
mypkg.logger @ /tmp/mypkg/libs/py/logger; python_version >= "3.8" and python_version < "3.9"
...
Not a problem, but interestingly, many lines now include the python_version restrictions (all of my internal dependencies and many third party libraries).
Closing this, since the problem is finally resolved in #3119.
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
Regarding to the PR https://github.com/python-poetry/poetry/pull/3089 the dependencies are not exported correctly. The exception does not occur anymore, but the git url of the nested git dependency is missing in the requirements.txt.
The output of the export command in the sampleproject repository is as expected.
You can reproduce this issue with the linked pyproject.toml.