Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions docs/specifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
You can specify versions of a package using the [Semantic Versioning scheme](https://semver.org/)
(i.e. `major.minor.micro`).

For example, to install requests you can use:
To install a major version of requests you can use:

$ pipenv install requests~=1.2
$ pipenv install requests~=1.1

Pipenv will install version `1.2` and any minor update, but not `2.0`.
Pipenv will install version `1.2` as it is a minor update, but not `2.0`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should also provide an example of using tilde to allow updating the major version, example ~1 would allow upgrading to I guess, anything? It seems like a strange use case now that I mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added an example that allows micro version updates. Which would be more common usecase.
I dont think we need an example for updating major version.


To install a minor version of requests you can use:

$ pipenv install requests~=1.0.1

Pipenv will install version `1.0.4` as it is a micro version update, but not `1.1.0`.

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

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

Use Python 3

$ pipenv --python 3
$ pipenv --python 3

Use Python3.11

$ pipenv --python 3.11
$ pipenv --python 3.11


When given a Python version, like this, Pipenv will automatically scan your system for a Python that matches that given version.
Expand Down
1 change: 1 addition & 0 deletions news/5594.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Made documentation clear about tilde-equals operator for package versions.