You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.
Issue
poetry update --lock prints operations that don't run. The following gives the gist...
$ poetry update --lock mypackage
Updating dependencies
Resolving dependencies... (0.9s)
Writing lock file
• Installing a_different_package (0.0.0): Pending...
• Updating some_other_package (0.0.0 -> 1.0.0): Pending...
# ... and so on ...
$ # and back to my shell.
To be clear, some_other_package is not updated in the lock file.
Essentially, the printed operations correspond to what would happen in the poetry env if --lock were not specified. However since --lock is specified, it doesn't make sense to show this output, because these things do not happen.
Poetry actually ends up reaching this line, which doesn't end up doing anything because self._execute_operations is False, but does print the output like above.
I wonder if when --lock is specified, should we also call self.installer.lock()? That way, the return in this block will execute. Currently it does not because self._lock is False
Poetry version: 1.4.0
Python version: 3.10.6
OS version and name: Ubuntu 22.04
pyproject.toml: N/A
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
poetry update --lock
prints operations that don't run. The following gives the gist...To be clear,
some_other_package
is not updated in the lock file.Essentially, the printed operations correspond to what would happen in the poetry env if
--lock
were not specified. However since--lock
is specified, it doesn't make sense to show this output, because these things do not happen.We can see this here (tag 1.4.0)
poetry/src/poetry/console/commands/update.py
Line 54 in 0e72a55
Poetry actually ends up reaching this line, which doesn't end up doing anything because
self._execute_operations is False
, but does print the output like above.poetry/src/poetry/installation/executor.py
Line 187 in 0e72a55
I wonder if when
--lock
is specified, should we also callself.installer.lock()
? That way, the return in this block will execute. Currently it does not becauseself._lock is False
poetry/src/poetry/installation/installer.py
Lines 294 to 299 in 0e72a55
add
already does this.poetry/src/poetry/console/commands/add.py
Lines 257 to 258 in 0e72a55
The text was updated successfully, but these errors were encountered: