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

poetry install: Conflict with poetry vendored dependencies [Docker/no venv] #1883

Closed
2 of 3 tasks
dmfigol opened this issue Jan 14, 2020 · 4 comments · Fixed by #1981
Closed
2 of 3 tasks

poetry install: Conflict with poetry vendored dependencies [Docker/no venv] #1883

dmfigol opened this issue Jan 14, 2020 · 4 comments · Fixed by #1981
Labels
kind/bug Something isn't working as expected

Comments

@dmfigol
Copy link

dmfigol commented Jan 14, 2020

Issue

This seems to be related to #1882 but I wouldn't call it a duplicate
Dockerfile: https://github.com/nornir-automation/nornir/blob/e416bee609b8ad0d2ef1f8467dc3a33b9854f11e/Dockerfile
We are using poetry config virtualenvs.create false so dependencies are installed to the /usr/local/lib/python3.6/site-packages, however we can see in the logs that there is some conflict between poetry vendored dependencies and our dependencies

...
Step 8/11 : RUN poetry install --no-interaction
 ---> Running in b626817c6265
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.


Package operations: 95 installs, 19 updates, 0 removals

  - Installing decorator (4.4.0)
  - Installing ipython-genutils (0.2.0)
  - Updating six (1.13.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.12.0)
  - Updating attrs (19.3.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 19.1.0)
  - Installing parso (0.5.1)
  - Updating ptyprocess (0.6.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.6.0)
  - Updating pycparser (2.19 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.19)
  - Updating pyrsistent (0.14.11 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.15.4)
  - Installing traitlets (4.3.2)
  - Installing wcwidth (0.1.7)
  - Installing asn1crypto (0.24.0)
  - Installing backcall (0.1.0)
  - Updating cffi (1.13.2 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.12.3)
  - Installing colorama (0.4.1)
  - Installing jedi (0.15.1)
  - Updating jsonschema (3.2.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 3.0.2)
  - Installing jupyter-core (4.5.0)
  - Installing markupsafe (1.1.1)
  - Updating pexpect (4.7.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 4.7.0)
  - Installing pickleshare (0.7.5)
  - Installing prompt-toolkit (2.0.9)
  - Installing pygments (2.4.2)
  - Installing python-dateutil (2.8.0)
  - Installing pyzmq (18.1.0)
  - Installing tornado (6.0.3)
  - Updating webencodings (0.5.1 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.5.1)
  - Installing bcrypt (3.1.7)
  - Installing bleach (3.1.0)
  - Updating cryptography (2.8 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.7)
  - Installing defusedxml (0.6.0)
  - Installing entrypoints (0.3)
  - Installing ipython (7.8.0)
  - Installing jinja2 (2.10.1)
  - Installing jupyter-client (5.3.3)
  - Installing mistune (0.8.4)
  - Updating more-itertools (8.0.2 /root/.poetry/lib/poetry/_vendor/py3.6 -> 7.2.0)
  - Installing nbformat (4.4.0)
  - Installing pandocfilters (1.4.2)
  - Installing pynacl (1.3.0)
  - Installing testpath (0.4.2)
  - Installing future (0.17.1)
  - Installing ipykernel (5.1.2)
  - Installing nbconvert (5.6.0)
  - Installing paramiko (2.6.0)
  - Installing prometheus-client (0.7.1)
  - Installing send2trash (1.5.0)
  - Installing terminado (0.8.2)
  - Updating zipp (0.6.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.6.0)
  - Updating certifi (2019.11.28 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2019.9.11)
  - Updating chardet (3.0.4 /root/.poetry/lib/poetry/_vendor/py3.6 -> 3.0.4)
  - Updating idna (2.8 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.8)
  - Updating importlib-metadata (1.1.3 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.23)
  - Installing lxml (4.4.1)
  - Installing notebook (6.0.1)
  - Updating pyparsing (2.4.6 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.4.2)
  - Installing pyserial (3.4)
  - Installing pytz (2019.2)
  - Installing scp (0.13.2)
  - Installing textfsm (1.1.0)
  - Updating urllib3 (1.25.7 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.25.5)
  - Installing alabaster (0.7.12)
  - Installing atomicwrites (1.3.0)
  - Installing babel (2.7.0)
  - Installing docutils (0.15.2)
  - Installing imagesize (1.1.0)
  - Installing ncclient (0.6.6)
  - Installing netaddr (0.7.19)
  - Installing netmiko (2.4.2)
  - Installing packaging (19.2)
  - Installing pluggy (0.13.0)
  - Installing py (1.8.0)
  - Installing pyyaml (5.1.2)
  - Updating requests (2.22.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.22.0)
  - Installing snowballstemmer (1.9.1)
  - Installing sphinxcontrib-websupport (1.1.2)
  - Installing typing (3.7.4.1)
  - Installing widgetsnbextension (3.5.1)
  - Installing appdirs (1.4.3)
  - Installing click (7.0)
  - Installing coverage (4.5.4)
  - Installing dataclasses (0.6)
  - Installing ipywidgets (7.5.1)
  - Installing junos-eznc (2.2.1)
  - Installing jupyter-console (6.0.0)
  - Installing mccabe (0.6.1)
  - Installing mypy-extensions (0.4.1)
  - Installing nxapi-plumbing (0.5.2)
  - Installing pockets (0.7.2)
  - Installing pycodestyle (2.5.0)
  - Installing pydocstyle (4.0.1)
  - Installing pyeapi (0.8.2)
  - Installing pyflakes (2.1.1)
  - Installing pyiosxr (0.53)
  - Installing pytest (5.1.2)
  - Installing qtconsole (4.5.5)
  - Installing sphinx (1.8.5)
  - Installing toml (0.10.0)
  - Installing typed-ast (1.4.0)
  - Installing typing-extensions (3.7.4)
  - Installing black (19.3b0)
  - Installing flake8-import-order (0.18.1)
  - Installing jupyter (1.0.0)
  - Installing mypy (0.740)
  - Installing napalm (2.4.0)
  - Installing nbsphinx (0.4.2)
  - Installing nbval (0.9.2)
  - Installing pydantic (1.1)
  - Installing pylama (7.7.1)
  - Installing pytest-cov (2.7.1)
  - Installing requests-mock (1.7.0)
  - Installing ruamel.yaml (0.15.100)
  - Installing sphinx-issues (1.2.0)
  - Installing sphinx-rtd-theme (0.4.3)
  - Installing sphinxcontrib-napoleon (0.7)
Removing intermediate container b626817c6265
 ---> bef8d86d5e6b
Step 9/11 : COPY . .
 ---> 78d495161129
Step 10/11 : RUN poetry install --no-interaction
 ---> Running in 13f1f9d93236
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.


Package operations: 0 installs, 19 updates, 0 removals

  - Updating six (1.13.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.12.0)
  - Updating attrs (19.3.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 19.1.0)
  - Updating ptyprocess (0.6.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.6.0)
  - Updating pycparser (2.19 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.19)
  - Updating pyrsistent (0.14.11 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.15.4)
  - Updating cffi (1.13.2 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.12.3)
  - Updating jsonschema (3.2.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 3.0.2)
  - Updating pexpect (4.7.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 4.7.0)
  - Updating webencodings (0.5.1 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.5.1)
  - Updating cryptography (2.8 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.7)
  - Updating more-itertools (8.0.2 /root/.poetry/lib/poetry/_vendor/py3.6 -> 7.2.0)
  - Updating zipp (0.6.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.6.0)
  - Updating certifi (2019.11.28 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2019.9.11)
  - Updating chardet (3.0.4 /root/.poetry/lib/poetry/_vendor/py3.6 -> 3.0.4)
  - Updating idna (2.8 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.8)
  - Updating importlib-metadata (1.1.3 /root/.poetry/lib/poetry/_vendor/py3.6 -> 0.23)
  - Updating pyparsing (2.4.6 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.4.2)
  - Updating urllib3 (1.25.7 /root/.poetry/lib/poetry/_vendor/py3.6 -> 1.25.5)
  - Updating requests (2.22.0 /root/.poetry/lib/poetry/_vendor/py3.6 -> 2.22.0)
  - Installing nornir (2.3.0)

Besides weird output, this also leads to increased build time (when venv is used the build time is 1.5 times less)

@fralik
Copy link

fralik commented Jan 17, 2020

Isn't it like expecred behavior when you set virtualenvs.create to false? This is what virtual environments are for - not to have version conflicts.

@dmfigol
Copy link
Author

dmfigol commented Jan 17, 2020

@fralik No, it is not expected, because poetry installs itself in a separate folder with vendored dependencies.

@trim21
Copy link
Contributor

trim21 commented Jan 18, 2020

It didn't happen on 1.0.0, so I just downgraded.

workaround: install packages with pip install --no-deps -q -r <(poetry export -f requirements.txt --dev) first, then poetry install

Can't find a way to workaround this.

sdispater added a commit that referenced this issue Feb 28, 2020
* Fix vendor package as installed package (#1883)

* import from

Co-Authored-By: Sébastien Eustace <sebastien.eustace@gmail.com>

* test vendor package as installed

* refactor

* remove blank line

Co-authored-by: Sébastien Eustace <sebastien.eustace@gmail.com>
sdispater added a commit that referenced this issue Mar 20, 2020
* Fix Github actions cache issues (#1908)

* Fix case of `-f` flag

* Make it clearer what options to pass to `--format`

* fix (masonry.api): `get_requires_for_build_wheel` must return additional list of requirements for building a package, not listed in `pyproject.toml` and not dependencies for the package itself (#1875)

fix (tests): adopted tests

* Lazy Keyring intialization for PasswordManager (#1892)

* Fix Github Actions cache issues (#1928)

* Avoid nested quantifiers with overlapping character space on git url parsing (#1902 (#1913)

* fix (git): match for `\w` instead of `.` for getting user

* change (vcs.git): hold pattern of the regex parts in a dictionary to be consistent over all regexs

* new (vcs.git): test for `parse_url` and some fixes for the regex pattern

* new (vcs.git): test for `parse_url` with string that should fail

* fix (test.vcs.git): make flake8 happy

* fix: correct parsing of wheel version with regex. (#1932)

The previous regexp was only taking the first integer of the version number,
this presented problems when the major version number reached double digits.

Poetry would determine that the version of the dependency is '1', rather than,
ie: '14'. This caused failures to solve versions.

* Fix errors when using the --help option (#1910)

* Fix how repository credentials are retrieved from env vars (#1909)

# Conflicts:
#	poetry/utils/password_manager.py

* Fix downloading packages from Simplepypi (#1851)

* fix downloading packages from simplepypi

* unused code removed

* remove unused imports

* Upgrade dependencies for the 1.0.3 release (#1965)

* Bump version to 1.0.3 (#1966)

* Fix non-compliant Git URL matching

RFC 3986 § 2.3 permits more characters in a URL than were matched. This
corrects that, though there may be other deficiencies. This was a
regression from v1.0.2, where at least “.” was matched without error.

* Update README.md "Updating Poetry"

Currently the note in "Updating Poetry" is different from the one below in "Enable tab completion for Bash, Fish, or Zsh". This MR is to make them more consistent.

* init: change dev dependency prompt

* Fix CI issues (#2069)

* fix (setup_reader): check if `func.value` has attr `id` (#2041)

* fix(git): get commit sha of git commit from annotated tags (#1948)

* fix(git): have annotated tags resolve to the commit sha

* fix(git): fix quote

* fix(git): change to rev-parse

* fix: use correct badge on README (#2065)

* Fix #1791: Load repository URL from config (#2061)

* Fix #1791: Load repository URL from config

* Ran black to fix linting errors

* Add test for repo URL env variable

* Changed schema to support url in multi dependencies (#2035)

* Fix handling of forward slashes and url encoding in credentials (#1911)

* Add support for forward slashes and url encoding in credentials

* Remove extra newline

* Remove unquote

* Bump actions/checkout from v1 to v2 (#2075)

* Update release.yml

* Update main.yml

* Fix vendor package as installed package (#1883) (#1981)

* Fix vendor package as installed package (#1883)

* import from

Co-Authored-By: Sébastien Eustace <sebastien.eustace@gmail.com>

* test vendor package as installed

* refactor

* remove blank line

Co-authored-by: Sébastien Eustace <sebastien.eustace@gmail.com>

* fix(utils.env): import cli_run from virtualenv (#2096)

* fix(utils.env): import cli_run from virtualenv if create_environment import failes

* fix (utils.env): added accidentally removed code

* list .venv when it exists (#1762)

* list .venv when it exists

* only list when in-project is true

* missing config

* move logic to manager.list

* Add .venv when it exists

* fix: exclude subpackage from `setup.py` if `__init__.py` is excluded (#1009) (#1626)

* fix: exclude subpackage from `setup.py` if `__init__.py` is excluded

Fixes: #1009

* fix: added missing test data

* fix: lint test data

* change (sdist.git): exclude folders with no python file

* fix (sdist.git): make black happy

* get_vcs starts searching git folder from tmp dir instead of project (#1946) (#1947)

* fix (builder): take `self._original_path` if available to find `.git` folder

* change (vcs): use `git rev-parse --show-toplevel` to find git root folder

* fix (vcs): change back to original working dir after finding vcs

* change (builder): introduce self._original_path to keep original path
if(vcs): resolve directory for `get_vcs`

* Normalize author name unicode before matching (#2006)

* Fix accented characters not being matched in author name

Fixes #2004

* Normalized the strings instead of modifying the pattern

* Applied isort & black

* Fix the url used for installation when fallbacking on PyPI (#2099)

* Upgrade dependencies before the 1.0.4 release (#2100)

* Upgrade dependencies before the 1.0.4 release (#2103)

* Release 1.0.4 (#2101)

* Update release script

* Bump version to 1.0.4

* Fix release script (#2104)

* Fix VCS when git is not in PATH

* Upgrade dependencies before the 1.0.5 release (#2111)

* Bump version to 1.0.5 (#2112)

* Fix GitHub URL for black

Black is now officially supported by the Python Software Foundation

* Update Contributing.md* Fix markdown formatting* Update link to official website FAQ

* Update managing-environments.md

Co-authored-by: brandonaut <brandon@hubermx.com>
Co-authored-by: finswimmer <finswimmer77@gmail.com>
Co-authored-by: Yannick PÉROUX <yannick.peroux@gmail.com>
Co-authored-by: Edward George <edwardgeorge@gmail.com>
Co-authored-by: Jan Škoda <skoda@jskoda.cz>
Co-authored-by: Andrew Marshall <andrew@johnandrewmarshall.com>
Co-authored-by: Andrew Selzer <andrewfselzer@gmail.com>
Co-authored-by: Andriy Maletsky <andriy.maletsky@gmail.com>
Co-authored-by: Julien Lhermitte <705366+jrmlhermitte@users.noreply.github.com>
Co-authored-by: Michael Aquilina <michaelaquilina@gmail.com>
Co-authored-by: Joshua Cannon <joshdcannon@gmail.com>
Co-authored-by: László Velinszky <laszlo.velinszky@meltwater.com>
Co-authored-by: Lu Zhu <misterzhu@gmail.com>
Co-authored-by: BSKY <git@bsky.moe>
Co-authored-by: Trim21 <github@trim21.me>
Co-authored-by: Frost Ming <frostming@tencent.com>
Co-authored-by: Raphael Yancey <raphael@badfile.net>
Co-authored-by: adisbladis <adisbladis@gmail.com>
Co-authored-by: Dimitri Merejkowsky <dimitri.merejkowsky@tanker.io>
Co-authored-by: Jules Chéron <jules.cheron@gmail.com>
Co-authored-by: Alex Povel <48824213+alexpovel@users.noreply.github.com>
Copy link

github-actions bot commented Mar 3, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants