Skip to content

Commit da5e75c

Browse files
authored
Merge pull request #5650 from ryan-rozario/tilde_semver
Update docs for tilde-equals in package versions
2 parents 9525db4 + c04ce9e commit da5e75c

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

docs/specifiers.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
You can specify versions of a package using the [Semantic Versioning scheme](https://semver.org/)
77
(i.e. `major.minor.micro`).
88

9-
For example, to install requests you can use:
9+
To install a major version of requests you can use:
1010

11-
$ pipenv install requests~=1.2
11+
$ pipenv install requests~=1.1
1212

13-
Pipenv will install version `1.2` and any minor update, but not `2.0`.
13+
Pipenv will install version `1.2` as it is a minor update, but not `2.0`.
14+
15+
To install a minor version of requests you can use:
16+
17+
$ pipenv install requests~=1.0.1
18+
19+
Pipenv will install version `1.0.4` as it is a micro version update, but not `1.1.0`.
1420

1521
This will update your `Pipfile` to reflect this requirement, automatically.
1622

@@ -45,11 +51,11 @@ on your `PATH`), use the `--python VERSION` flag, like so:
4551

4652
Use Python 3
4753

48-
$ pipenv --python 3
54+
$ pipenv --python 3
4955

5056
Use Python3.11
5157

52-
$ pipenv --python 3.11
58+
$ pipenv --python 3.11
5359

5460

5561
When given a Python version, like this, Pipenv will automatically scan your system for a Python that matches that given version.

news/5594.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Made documentation clear about tilde-equals operator for package versions.

0 commit comments

Comments
 (0)