diff --git a/docs/basic-usage.md b/docs/basic-usage.md index a2b3faeac88..a3469e61c58 100644 --- a/docs/basic-usage.md +++ b/docs/basic-usage.md @@ -87,7 +87,7 @@ If you want to use Poetry only for dependency management but not for packaging, ```toml [tool.poetry] -mode = "non-package" +package-mode = false ``` In this mode, metadata such as `name` and `version` are optional. diff --git a/docs/pyproject.md b/docs/pyproject.md index ad7cf796725..4828b98d5c2 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -13,14 +13,14 @@ menu: The `tool.poetry` section of the `pyproject.toml` file is composed of multiple sections. -## mode +## package-mode -The mode of the project, either `"package"` (default) or `"non-package"`. **Optional** +Whether Poetry operates in package mode (default) or not. **Optional** See {{< relref "basic-usage#operating-modes" >}} for more information. ```toml -mode = "non-package" +package-mode = false ``` ## name diff --git a/src/poetry/console/commands/install.py b/src/poetry/console/commands/install.py index 78a51881d04..96e41195eda 100644 --- a/src/poetry/console/commands/install.py +++ b/src/poetry/console/commands/install.py @@ -79,7 +79,7 @@ class InstallCommand(InstallerCommand): poetry install --no-root If you want to use Poetry only for dependency management but not for packaging, -you can set the operating mode to "non-package" in your pyproject.toml file. +you can set the "package-mode" to false in your pyproject.toml file. """ _loggers = ["poetry.repositories.pypi_repository", "poetry.inspection.info"] diff --git a/tests/console/commands/test_install.py b/tests/console/commands/test_install.py index 6099451640c..54661b8cb9a 100644 --- a/tests/console/commands/test_install.py +++ b/tests/console/commands/test_install.py @@ -515,7 +515,7 @@ def test_non_package_mode_does_not_try_to_install_root( ) -> None: content = """\ [tool.poetry] -mode = "non-package" +package-mode = false """ poetry = project_factory(name="non-package-mode", pyproject_content=content) diff --git a/tests/fixtures/non_package_mode/pyproject.toml b/tests/fixtures/non_package_mode/pyproject.toml index 5a5fbee0a1a..95a5edb17f7 100644 --- a/tests/fixtures/non_package_mode/pyproject.toml +++ b/tests/fixtures/non_package_mode/pyproject.toml @@ -1,5 +1,5 @@ [tool.poetry] -mode = "non-package" +package-mode = false [tool.poetry.dependencies] python = "^3.8"