Skip to content

Commit 8e5426d

Browse files
authored
Poetry documentation proofread (#10354)
1 parent 7cb58f6 commit 8e5426d

11 files changed

+61
-61
lines changed

docs/basic-usage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Poetry will not install a Python interpreter for you.
8989

9090
### Initialising a pre-existing project
9191

92-
Instead of creating a new project, Poetry can be used to 'initialise' a pre-populated
92+
Instead of creating a new project, Poetry can be used to 'initialize' a pre-populated
9393
directory. To interactively create a `pyproject.toml` file in directory `pre-existing-project`:
9494

9595
```bash

docs/building-extension-modules.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ script = "relative/path/to/build-extension.py"
7979
```
8080

8181
{{% note %}}
82-
The name of the build script is arbitrary. Common practice has been to name it `build.py`, however this is not
82+
The name of the build script is arbitrary. Common practice has been to name it `build.py`, however, this is not
8383
mandatory. You **should** consider [using a subdirectory]({{< relref "#can-i-store-the-build-script-in-a-subdirectory" >}})
8484
if feasible.
8585
{{% /note %}}
@@ -322,7 +322,7 @@ def build():
322322
maturin("build", "-r", *cargo_args)
323323

324324
# We won't use the wheel built by maturin directly since
325-
# we want Poetry to build it but, we need to retrieve the
325+
# we want Poetry to build it, but we need to retrieve the
326326
# compiled extensions from the maturin wheel.
327327
wheel = next(iter(wheels_dir.glob("*.whl")))
328328
with zipfile.ZipFile(wheel.as_posix()) as whl:

docs/cli.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ If necessary the build process happens in an isolated environment.
213213

214214
{{% note %}}
215215
When using `--local-version`, the identifier must be [PEP 440](https://peps.python.org/pep-0440/#local-version-identifiers)
216-
compliant. This is useful for adding build numbers, platform specificities etc. for private packages.
216+
compliant. This is useful for adding build numbers, platform specificities, etc. for private packages.
217217

218218
`--local-version` is deprecated and will be removed in a future version of Poetry.
219219
Use `--config-settings local-version=<version>` instead.
@@ -717,7 +717,7 @@ Should match a repository name set by the [`config`](#config) command.
717717
* `--password (-p)`: The password to access the repository.
718718
* `--cert`: Certificate authority to access the repository.
719719
* `--client-cert`: Client certificate to access the repository.
720-
* `--dist-dir`: Dist directory where built artifact are stored. Default is `dist`.
720+
* `--dist-dir`: Dist directory where built artifacts are stored. Default is `dist`.
721721
* `--build`: Build the package before publishing.
722722
* `--dry-run`: Perform all actions except upload the package.
723723
* `--skip-existing`: Ignore errors from files already existing in the repository.
@@ -852,7 +852,7 @@ poetry search requests pendulum
852852
PyPI no longer allows for the search of packages without a browser. Please use https://pypi.org/search
853853
(via a browser) instead.
854854

855-
For more information please see [warehouse documentation](https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods)
855+
For more information, please see [warehouse documentation](https://warehouse.pypa.io/api-reference/xml-rpc.html#deprecated-methods)
856856
and this [discussion](https://discuss.python.org/t/fastly-interfering-with-pypi-search/73597/6).
857857
{{% /note %}}
858858

docs/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ The directory in which Poetry managed Python versions are installed to.
382382
Do not download entire wheels to extract metadata but use
383383
[HTTP range requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests)
384384
to only download the METADATA files of wheels.
385-
Especially with slow network connections this setting can speed up dependency resolution significantly.
385+
Especially with slow network connections, this setting can speed up dependency resolution significantly.
386386
If the cache has already been filled or the server does not support HTTP range requests,
387387
this setting makes no difference.
388388

docs/contributing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ your best judgement, and feel free to propose changes to this document in a pull
2323
### Reporting bugs
2424

2525
This section guides you through submitting a bug report for Poetry.
26-
Following these guidelines helps maintainers and the community understand your report, reproduce the behavior, and find
26+
Following these guidelines helps maintainers and the community understands your report, reproduces the behavior, and finds
2727
related reports.
2828

2929
#### Before submitting a bug report
@@ -66,7 +66,7 @@ and under which conditions it normally happens.
6666

6767
Provide more context by answering these questions:
6868

69-
* **Did the problem start happening recently** (e.g. after updating to a new version of Poetry) or was this always a
69+
* **Did the problem start happening recently** (e.g., after updating to a new version of Poetry) or was this always a
7070
problem?
7171
* If the problem started happening recently, **can you reproduce the problem in an older version of Poetry?** What's the
7272
most recent version in which the problem does not happen?
@@ -144,7 +144,7 @@ Poetry's development toolchain requires Python 3.9 or newer.
144144
{{% /note %}}
145145

146146
You should first fork the Poetry repository and then clone it locally, so that you can make pull requests against the
147-
project. If you are new to Git and pull request based development, GitHub provides a
147+
project. If you are new to Git and pull request-based development, GitHub provides a
148148
[guide](https://docs.github.com/en/get-started/quickstart/contributing-to-projects) you will find helpful.
149149

150150
Next, you should install Poetry's dependencies, and run the test suite to make sure everything is working as expected:

docs/dependency-specification.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ to [PEP 508](https://peps.python.org/pep-0508/).
4141
In many cases, `tool.poetry.dependencies` can be replaced with `project.dependencies`.
4242
However, there are some cases where you might still need to use `tool.poetry.dependencies`.
4343
For example, if you want to define additional information that is not required for building
44-
but only for locking (for example an explicit source), you can enrich dependency
44+
but only for locking (for example, an explicit source), you can enrich dependency
4545
information in the `tool.poetry` section.
4646

4747
```toml
@@ -99,7 +99,7 @@ If you only specify a major, and minor version, then minor- and patch-level chan
9999

100100
### Wildcard requirements
101101

102-
**Wildcard requirements** allow for the latest (dependency dependent) version where the wildcard is positioned.
102+
**Wildcard requirements** allow for the latest (dependency-dependent) version where the wildcard is positioned.
103103

104104
`*`, `1.*` and `1.2.*` are examples of wildcard requirements.
105105

@@ -133,7 +133,7 @@ You can specify the exact version of a package.
133133
`1.2.3` is an example of an exact version specification.
134134

135135
This will tell Poetry to install this version and this version only.
136-
If other dependencies require a different version, the solver will ultimately fail and abort any install or update procedures.
136+
If other dependencies require a different version, the solver will ultimately fail and abort any installation or update procedures.
137137

138138
Exact versions can also be specified with `==` according to [PEP 440](https://peps.python.org/pep-0440/).
139139

@@ -147,7 +147,7 @@ Not supported in `project.dependencies`.
147147
When using `poetry add` such constraints are automatically converted into an equivalent constraint.
148148
{{% /warning %}}
149149

150-
**Caret requirements** allow [SemVer](https://semver.org/) compatible updates to a specified version. An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. For instance, if we previously ran `poetry add requests@^2.13.0` and wanted to update the library and ran `poetry update requests`, poetry would update us to version `2.14.0` if it was available, but would not update us to `3.0.0`. If instead we had specified the version string as `^0.1.13`, poetry would update to `0.1.14` but not `0.2.0`. `0.0.x` is not considered compatible with any other version.
150+
**Caret requirements** allow [SemVer](https://semver.org/) compatible updates to a specified version. An update is allowed if the new version number does not modify the left-most non-zero digit in the major, minor, patch grouping. For instance, if we previously ran `poetry add requests@^2.13.0` and wanted to update the library and ran `poetry update requests`, poetry would update us to version `2.14.0` if it was available, but would not update us to `3.0.0`. If instead, we had specified the version string as `^0.1.13`, poetry would update to `0.1.14` but not `0.2.0`. `0.0.x` is not considered compatible with any other version.
151151

152152
Here are some more examples of caret requirements and the versions that would be allowed with them:
153153

@@ -281,7 +281,7 @@ Since we haven’t specified any other information,
281281
Poetry assumes that we intend to use the latest commit on the `main` branch
282282
to build our project.
283283

284-
You can explicit specify which branch, commit hash or tagged ref should be usd:
284+
You can explicitly specify which branch, commit hash or tagged ref should be usd:
285285

286286
{{< tabs tabTotal="2" tabID1="git-rev-project" tabID2="git-rev-poetry" tabName1="[project]" tabName2="[tool.poetry]">}}
287287

@@ -346,7 +346,7 @@ The corresponding `add` call looks like this:
346346
poetry add "git+https://github.com/myorg/mypackage_with_subdirs.git#subdirectory=subdir"
347347
```
348348

349-
To use an SSH connection, for example in the case of private repositories, use the following example syntax:
349+
To use an SSH connection, for example, in the case of private repositories, use the following example syntax:
350350

351351
{{< tabs tabTotal="2" tabID1="git-ssh-project" tabID2="git-ssh-poetry" tabName1="[project]" tabName2="[tool.poetry]">}}
352352

@@ -424,7 +424,7 @@ my-package = { path = "../my-package/", develop = true }
424424
my-package = { path = "../my-package/dist/my-package-0.1.0.tar.gz" }
425425
```
426426

427-
To install directory path dependencies in editable mode use the `develop` keyword and set it to `true`.
427+
To install directory path dependencies in editable mode, use the `develop` keyword and set it to `true`.
428428
{{< /tab >}}
429429
{{< /tabs >}}
430430

@@ -679,11 +679,11 @@ priority = "explicit"
679679

680680
## Multiple constraints dependencies
681681

682-
Sometimes, one of your dependency may have different version ranges depending
682+
Sometimes, one of your dependencies may have different version ranges depending
683683
on the target Python versions.
684684

685685
Let's say you have a dependency on the package `foo` which is only compatible
686-
with Python 3.6-3.7 up to version 1.9, and compatible with Python 3.8+ from version 2.0:
686+
with Python 3.63.7 up to version 1.9, and compatible with Python 3.8+ from version 2.0:
687687
you would declare it like so:
688688

689689
{{< tabs tabTotal="2" tabID1="multiple-constraints-project" tabID2="multiple-constraints-poetry" tabName1="[project]" tabName2="[tool.poetry]">}}
@@ -718,8 +718,8 @@ otherwise it will cause an error when resolving dependencies.
718718
### Combining git / url / path dependencies with source repositories
719719

720720
Direct origin (`git`/ `url`/ `path`) dependencies can satisfy the requirement of a dependency that
721-
doesn't explicitly specify a source, even when mutually exclusive markers are used. For instance
722-
in the following example the url package will also be a valid solution for the second requirement:
721+
doesn't explicitly specify a source, even when mutually exclusive markers are used. For instance,
722+
in the following example, the url package will also be a valid solution for the second requirement:
723723
```toml
724724
foo = [
725725
{ platform = "darwin", url = "https://example.com/example-1.0-py3-none-any.whl" },
@@ -728,7 +728,7 @@ foo = [
728728
```
729729

730730
Sometimes you may instead want to use a direct origin dependency for specific conditions
731-
(i.e. a compiled package that is not available on PyPI for a certain platform/architecture) while
731+
(i.e., a compiled package that is not available on PyPI for a certain platform/architecture) while
732732
falling back on source repositories in other cases. In this case you should explicitly ask for your
733733
dependency to be satisfied by another `source`. For example:
734734
```toml
@@ -742,7 +742,7 @@ foo = [
742742

743743
In the case of more complex dependency specifications, you may find that you
744744
end up with lines which are very long and difficult to read. In these cases,
745-
you can shift from using "inline table" syntax, to the "standard table" syntax.
745+
you can shift from using "inline table" syntax to the "standard table" syntax.
746746

747747
An example where this might be useful is the following:
748748

docs/faq.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@ menu:
1414
### Why is the dependency resolution process slow?
1515

1616
While the dependency resolver at the heart of Poetry is highly optimized and
17-
should be fast enough for most cases, with certain sets of dependencies
17+
should be fast enough for most cases, with certain sets of dependencies,
1818
it can take time to find a valid solution.
1919

2020
This is due to the fact that not all libraries on PyPI have properly declared their metadata
2121
and, as such, they are not available via the PyPI JSON API. At this point, Poetry has no choice
2222
but to download the packages and inspect them to get the necessary information. This is an expensive
2323
operation, both in bandwidth and time, which is why it seems this is a long process.
2424

25-
At the moment there is no way around it. However, if you notice that Poetry
25+
At the moment, there is no way around it. However, if you notice that Poetry
2626
is downloading many versions of a single package, you can lessen the workload
27-
by constraining that one package in your pyproject.toml more narrowly. That way
27+
by constraining that one package in your pyproject.toml more narrowly. That way,
2828
Poetry does not have to sift through so many versions of it, which may speed up
2929
the locking process considerably in some cases.
3030

@@ -40,7 +40,7 @@ Poetry uses "major.minor.micro" version identifiers as mentioned in
4040

4141
Version bumps are done similar to Python's versioning:
4242
* A major version bump (incrementing the first number) is only done for breaking changes
43-
if a deprecation cycle is not possible and many users have to perform some manual steps
43+
if a deprecation cycle is not possible, and many users have to perform some manual steps
4444
to migrate from one version to the next one.
4545
* A minor version bump (incrementing the second number) may include new features as well
4646
as new deprecations and drop features deprecated in an earlier minor release.
@@ -64,22 +64,22 @@ Once a release of your package is published, you cannot tweak its dependencies a
6464
– you have to do a new release but the previous one stays broken.
6565
(Users can still work around the broken dependency by restricting it by themselves.)
6666

67-
To avoid such issues you can define an upper bound on your constraints,
67+
To avoid such issues, you can define an upper bound on your constraints,
6868
which you can increase in a new release after testing that your package is compatible
6969
with the new major version of your dependency.
7070

71-
For example instead of using `>=3.4` you can use `^3.4` which allows all versions `<4.0`.
71+
For example, instead of using `>=3.4` you can use `^3.4` which allows all versions `<4.0`.
7272
The `^` operator works very well with libraries following [semantic versioning](https://semver.org).
7373

7474
However, when defining an upper bound, users of your package are not able to update
7575
a dependency beyond the upper bound even if it does not break anything
7676
and is fully compatible with your package.
77-
You have to release a new version of your package with an increased upper bound first.
77+
You have to release a new version of your package with an increased upper-bound first.
7878

79-
If your package will be used as a library in other packages, it might be better to avoid
79+
If your package is used as a library in other packages, it might be better to avoid
8080
upper bounds and thus unnecessary dependency conflicts (unless you already know for sure
8181
that the next release of the dependency will break your package).
82-
If your package will be used as an application, it might be worth to define an upper bound.
82+
If your package is used as an application, it might be worth defining an upper bound.
8383

8484
### Is tox supported?
8585

@@ -125,7 +125,7 @@ commands =
125125
```
126126

127127
`tox` will create an `sdist` package of the project and uses `pip` to install it in a fresh environment.
128-
Thus, dependencies are resolved by `pip` in the first place. But afterward we run Poetry,
128+
Thus, dependencies are resolved by `pip` in the first place. But afterward, we run Poetry,
129129
which will install the locked dependencies into the environment.
130130

131131
#### Use case #3
@@ -171,7 +171,7 @@ dependencies specified in `poetry.lock` into [Nox](https://nox.thea.codes/en/sta
171171
### I don't want Poetry to manage my virtual environments. Can I disable it?
172172

173173
While Poetry automatically creates virtual environments to always work isolated
174-
from the global Python installation, there are rare scenarios where the use a Poetry managed
174+
from the global Python installation, there are rare scenarios where the use of a Poetry managed
175175
virtual environment is not possible or preferred.
176176

177177
In this case, you can disable this feature by setting the `virtualenvs.create` setting to `false`:
@@ -189,7 +189,7 @@ The Poetry team strongly encourages the use of a virtual environment.
189189

190190
### Why is Poetry telling me that the current project's supported Python range is not compatible with one or more packages' Python requirements?
191191

192-
Unlike `pip`, Poetry doesn't resolve for just the Python in the current environment. Instead it makes sure that a dependency
192+
Unlike `pip`, Poetry doesn't resolve for just the Python in the current environment. Instead, it makes sure that a dependency
193193
is resolvable within the given Python version range in `pyproject.toml`.
194194

195195
Assume you have the following `pyproject.toml`:
@@ -200,15 +200,15 @@ python = "^3.7"
200200
```
201201

202202
This means your project aims to be compatible with any Python version >=3.7,<4.0. Whenever you try to add a dependency
203-
whose Python requirement doesn't match the whole range Poetry will tell you this, e.g.:
203+
whose Python requirement doesn't match the whole range, Poetry will tell you this, e.g.:
204204

205205
```
206206
The current project's supported Python range (>=3.7.0,<4.0.0) is not compatible with some of the required packages Python requirement:
207207
- scipy requires Python >=3.7,<3.11, so it will not be installable for Python >=3.11,<4.0.0
208208
```
209209

210210
Usually you will want to match the supported Python range of your project with the upper bound of the failing dependency.
211-
Alternatively you can tell Poetry to install this dependency [only for a specific range of Python versions]({{< relref "dependency-specification#multiple-constraints-dependencies" >}}),
211+
Alternatively, you can tell Poetry to install this dependency [only for a specific range of Python versions]({{< relref "dependency-specification#multiple-constraints-dependencies" >}}),
212212
if you know that it's not needed in all versions.
213213

214214
If you do not want to set an upper bound in the metadata when building your project,
@@ -228,7 +228,7 @@ python = ">=3.7,<3.11" # used for locking dependencies
228228

229229
This is done to be compliant with the broader Python ecosystem.
230230

231-
For example, if Poetry builds a distribution for a project that uses a version that is not valid according to
231+
For example, if Poetry builds a distribution for a project that uses a version that is not valid, according to
232232
[PEP 440](https://peps.python.org/pep-0440), third party tools will be unable to parse the version correctly.
233233

234234

0 commit comments

Comments
 (0)