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

Updates to develop dependencies are not applied by 1.1.1 #3096

Closed
2 of 3 tasks
ginty opened this issue Oct 6, 2020 · 7 comments · Fixed by #3105 or #3109
Closed
2 of 3 tasks

Updates to develop dependencies are not applied by 1.1.1 #3096

ginty opened this issue Oct 6, 2020 · 7 comments · Fixed by #3105 or #3109
Labels
kind/bug Something isn't working as expected

Comments

@ginty
Copy link

ginty commented Oct 6, 2020

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • Ubuntu:
  • 1.1.1:
  • Link of a Gist with the contents of your pyproject.toml file:

Issue

I understand that from 1.1.0 onwards a local development dependency must be defined with the develop=true switch, e.g.

[tool.poetry.dependencies]
my_dependency = { path = "../../my_dependency", develop = true }

With Poetry 1.0.10 this worked as I would expect, some kind of link is created such that whenever I updated a file in my_dependency it would be reflected in the parent app the next time it was invoked.

However with version 1.1.0 and 1.1.1 any updates made to the dependency are not reflected in the app and it seems to be stuck on the version that was around at install time.

@ginty ginty added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 6, 2020
@abn
Copy link
Member

abn commented Oct 6, 2020

@ginty I tried to reproduce this; no luck.

$ poetry run python -c "import quix"
Hello from Quix!
$ echo 'print("Oh wow another message!")' >> ../../lib2/quix/quix/__init__.py 
$ poetry run python -c "import quix"
Hello from Quix!
Oh wow another message!
$ cat pyproject.toml | grep quix
quix = { path = "../../lib2/quix", develop = true }
$ tree ../../
../../
├── foobar
│   └── __init__.py
├── lib
│   └── baz
│       ├── baz
│       │   └── __init__.py
│       ├── poetry.lock
│       ├── pyproject.toml
│       ├── README.rst
│       └── tests
│           ├── __init__.py
│           └── test_baz.py
├── lib2
│   └── quix
│       ├── pyproject.toml
│       ├── quix
│       │   ├── __init__.py
│       │   └── __pycache__
│       │       └── __init__.cpython-38.pyc
│       ├── README.rst
│       └── tests
│           ├── __init__.py
│           └── test_quix.py
├── pyproject.toml
├── README.rst
└── tests
    ├── __init__.py
    └── test_foobar.py

11 directories, 17 files
$ poetry --version
Poetry version 1.1.1

@ginty
Copy link
Author

ginty commented Oct 6, 2020

Thanks for that @abn.
I can confirm that on my setup a similar simple test also works fine.

However on a larger project, it does not work consistently.
In my project I have two development deps:

[tool.poetry.dependencies]
python = "^3.6"
origen = { path = "../../python", develop = true }
python_plugin = { path = "../python_plugin", develop = true }

And it seems that the python_plugin one does update as expected, while the origen one does not.

Looking at the virtualenv, I can see that the one that works seems to have been installed with a path (pth), whereas the origen dependency which does not work, has not.

Please let me know if there is anything else I can report/check to help.

stephen@falcon:~/Code/github/o2/test_apps/python_app$ ls -al ~/.cache/pypoetry/virtualenvs/example-SlMy6f3g-py3.6/lib/python3.6/site-packages/
total 1880
drwxr-xr-x 147 stephen stephen  12288 Oct  6 11:13 .
drwxr-xr-x   3 stephen stephen   4096 Oct  6 11:12 ..
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 Babel-2.8.0.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 CacheControl-0.12.6.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 Jinja2-2.11.2.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:13 Mako-1.1.0.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 MarkupSafe-1.1.1.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 Pygments-2.7.1.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 SecretStorage-3.1.2.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:13 Sphinx-3.0.2.dist-info
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:13 __pycache__
-rwxr-xr-x   1 stephen stephen 853792 Oct  6 11:12 _cffi_backend.cpython-36m-x86_64-linux-gnu.so
drwxr-xr-x   3 stephen stephen   4096 Oct  6 11:13 _distutils_hack
drwxr-xr-x   7 stephen stephen   4096 Oct  6 11:13 _pytest
-rw-r--r--   1 stephen stephen     18 Oct  6 11:12 _virtualenv.pth
-rw-r--r--   1 stephen stephen   5662 Oct  6 11:12 _virtualenv.py
drwxr-xr-x   4 stephen stephen   4096 Oct  6 11:12 alabaster
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:12 alabaster-0.7.12.dist-info
..snip
drwxr-xr-x   9 stephen stephen   4096 Oct  6 11:13 origen
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:13 origen-2.0.0.dev3.dist-info
..snip
drwxr-xr-x   2 stephen stephen   4096 Oct  6 11:13 python_plugin-0.1.0.dist-info
-rw-r--r--   1 stephen stephen     53 Oct  6 11:13 python_plugin.pth
...

@abn
Copy link
Member

abn commented Oct 6, 2020

A few questions;

  1. Does a project with only origen work as expected?
  2. Is origen a setuptools project?
  3. Does the lock file specify origen is in develop = true mode?

@ginty
Copy link
Author

ginty commented Oct 6, 2020

Hi @abn, here you go:

  1. Does a project with only origen work as expected?

Yes it does, if I comment out the python_plugin line, then origen gets installed as a develop dependency correctly. This is very consistent, un-commenting it re-creates the error again.

  1. Is origen a setuptools project?

No, it is a Poetry (?) project. Here it is if you want to see it - https://github.com/Origen-SDK/o2/tree/py_plugin/python

  1. Does the lock file specify origen is in develop = true mode?

No, this correlates with the error. When toggling it back and forth via (1) I can see develop = transition between true and false in the lock file.

@abn
Copy link
Member

abn commented Oct 6, 2020

@ginty can you give #3105 a try? Just to make sure these are not the same issue?

@ginty
Copy link
Author

ginty commented Oct 6, 2020

Hi @abn, that does fix it, both install now with develop enabled, thanks!

@abn abn removed the status/triage This issue needs to be triaged label Oct 6, 2020
@abn abn closed this as completed Oct 6, 2020
Copy link

github-actions bot commented Mar 2, 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 2, 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
2 participants