Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix resolution of path, url and VCS dependencies #2398

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

sdispater
Copy link
Member

@sdispater sdispater commented May 9, 2020

Pull Request Check List

Resolves: #1757

  • Added tests for changed code.
  • Updated documentation for changed code.

This PR solves multiple issues related to the resolution and installation of path, url and VCS dependencies:

  • These dependencies always had a * constraint attached to them which could cause the resolver to choose other versions of the specified package in case of a conflict. This is solved by loading and setting the proper constraint during the resolution.
  • The path of path dependencies was not always properly stored in the lock file which could cause issues during the installation where the directory or the file was not found.
  • Finally, the editable installation of directory dependencies could fail due to invalid paths. This is fixed by ensuring that a Poetry package installed in editable mode is always installed using the pyproject.toml file.

@sdispater sdispater added area/solver Related to the dependency resolver area/installer Related to the dependency installer labels May 9, 2020
@sdispater sdispater requested a review from a team May 15, 2020 15:29
@sdispater sdispater merged commit e4e8e3c into master Jun 5, 2020
@sdispater sdispater deleted the fix-resolution-of-path-url-and-vcs-depedencies branch June 5, 2020 10:24
@sdispater sdispater mentioned this pull request Jun 5, 2020
sdispater added a commit to python-poetry/poetry-core that referenced this pull request Jun 5, 2020
msakai added a commit to msakai/poetry that referenced this pull request Jun 19, 2020
As PR python-poetry#2398 changed package.root_dir from str to Path, we need to call
as_posix() to it convert to str before passing to os.path.join.
msakai added a commit to msakai/poetry that referenced this pull request Jun 19, 2020
As PR python-poetry#2398 changed package.root_dir from str to Path, we need to call
as_posix() to convert it to str before passing to os.path.join.
@msakai msakai mentioned this pull request Jun 19, 2020
2 tasks
abn pushed a commit that referenced this pull request Jun 28, 2020
Ensure path requirement is converted to posix string.

Relates-to: #2398
abn pushed a commit to abn/poetry that referenced this pull request Jul 20, 2020
Ensure path requirement is converted to posix string.

Relates-to: python-poetry#2398
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area/installer Related to the dependency installer area/solver Related to the dependency resolver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative path imports are resolved relative to CWD instead of pyproject.toml
1 participant