Skip to content
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

Fix CI #14

Closed
Emerentius opened this issue Nov 6, 2021 · 3 comments · Fixed by #18
Closed

Fix CI #14

Emerentius opened this issue Nov 6, 2021 · 3 comments · Fixed by #18

Comments

@Emerentius
Copy link
Owner

Emerentius commented Nov 6, 2021

CI fails but I see no problem locally. There is an issue using poetry to add packages to (regular) venvs although poetry --version shows 1.1.6 for both CI and locally.

It looks like it could be related to python-poetry/poetry#4541. I get the same error "'Link' object has no attribute 'is_absolute'".
Example error when installing mypy (similar errors happen for tuna & mypy, I didn't try anything else):

runner@fv-az121-771:~/work/virtpy/virtpy/foobar$ poetry add mypy
Using version ^0.910 for mypy

Updating dependencies
Resolving dependencies... (0.1s)

Writing lock file

Package operations: 4 installs, 0 updates, 0 removals

  • Installing mypy-extensions (0.4.3): Failed

  AttributeError

  'Link' object has no attribute 'is_absolute'

  at ~/.local/venv/lib/python3.8/site-packages/poetry/core/packages/file_dependency.py:33 in __init__
       29│         self._path = path
       30│         self._base = base or Path.cwd()
       31│         self._full_path = path
       32│ 
    →  33│         if not self._path.is_absolute():
       34│             try:
       35│                 self._full_path = self._base.joinpath(self._path).resolve()
       36│             except FileNotFoundError:
       37│                 raise ValueError("Directory {} does not exist".format(self._path))

  • Installing toml (0.10.2)
  • Installing typing-extensions (3.10.0.2): Failed

  AttributeError

  'Link' object has no attribute 'is_absolute'

  at ~/.local/venv/lib/python3.8/site-packages/poetry/core/packages/file_dependency.py:33 in __init__
       29│         self._path = path
       30│         self._base = base or Path.cwd()
       31│         self._full_path = path
       32│ 
    →  33│         if not self._path.is_absolute():
       34│             try:
       35│                 self._full_path = self._base.joinpath(self._path).resolve()
       36│             except FileNotFoundError:
       37│                 raise ValueError("Directory {} does not exist".format(self._path))


Failed to add packages, reverting the pyproject.toml file to its original content.
@Emerentius
Copy link
Owner Author

I've set the failing test to #[ignore] for now in 11f7a63 until this is fixed.

@Emerentius
Copy link
Owner Author

I see the test failing on windows as well when trying to install tuna but I don't get any error installing it manually into either a regular venv or a virtpy.

@Emerentius
Copy link
Owner Author

There were multiple issues:

  • poetry 1.1.6 was broken in CI
  • We incorrectly lowercased package names (following the instructions in the official specifications that are also wrong)
  • poetry no longer always prefixes file paths with file://, but the pip shim expected this. It now works with both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant