Skip to content

Commit

Permalink
Remove outdated poetry lock --no-update suggestion (#9936)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Jan 5, 2025
1 parent d9f1914 commit b9646bd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,7 @@ poetry self lock

#### Options

* `--check`: Verify that `poetry.lock` is consistent with `pyproject.toml`. (**Deprecated**)
* `--no-update`: Do not update locked versions, only refresh lock file.
* `--regenerate`: Ignore existing lock file and overwrite it with a new lock file created from scratch.

### self show

Expand Down
2 changes: 1 addition & 1 deletion src/poetry/console/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def handle(self) -> int:
if self.poetry.locker.is_locked() and not self.poetry.locker.is_fresh():
check_result["errors"] += [
"pyproject.toml changed significantly since poetry.lock was last generated. "
"Run `poetry lock [--no-update]` to fix the lock file."
"Run `poetry lock` to fix the lock file."
]

if not check_result["errors"] and not check_result["warnings"]:
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/installation/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _do_install(self) -> int:
if not self._locker.is_fresh():
raise ValueError(
"pyproject.toml changed significantly since poetry.lock was last"
" generated. Run `poetry lock [--no-update]` to fix the lock file."
" generated. Run `poetry lock` to fix the lock file."
)
if not (reresolve or self._locker.is_locked_groups_and_markers()):
if self._io.is_verbose():
Expand Down
2 changes: 1 addition & 1 deletion tests/console/commands/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_check_lock_outdated(
status_code = tester.execute(options)
expected = (
"Error: pyproject.toml changed significantly since poetry.lock was last generated. "
"Run `poetry lock [--no-update]` to fix the lock file.\n"
"Run `poetry lock` to fix the lock file.\n"
)

assert tester.io.fetch_error() == expected
Expand Down
2 changes: 1 addition & 1 deletion tests/installation/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def test_not_fresh_lock(installer: Installer, locker: Locker) -> None:
ValueError,
match=re.escape(
"pyproject.toml changed significantly since poetry.lock was last generated. "
"Run `poetry lock [--no-update]` to fix the lock file."
"Run `poetry lock` to fix the lock file."
),
):
installer.run()
Expand Down
2 changes: 1 addition & 1 deletion tests/packages/test_locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def test_locker_properly_assigns_metadata_files(locker: Locker) -> None:
For multiple constraints dependencies, there is only one common entry in
metadata.files. However, we must not assign all the files to each of the packages
because this can result in duplicated and outdated entries when running
`poetry lock --no-update` and hash check failures when running `poetry install`.
`poetry lock` and hash check failures when running `poetry install`.
"""
content = """\
[[package]]
Expand Down

0 comments on commit b9646bd

Please sign in to comment.