Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip list --outdated --format=freeze does not return the right version of the outdated packages. #9789

Closed
matrixise opened this issue Apr 7, 2021 · 15 comments · Fixed by #11482
Labels
type: bug A confirmed bug or unintended behavior

Comments

@matrixise
Copy link

matrixise commented Apr 7, 2021

Description

To see the outdated packages, just pip list -o, but when I use --format=freeze, the command returns an output with the oldest versions and not the newest ones.

Expected behavior

Returns an output with the newest versions of the packages.

pip version

21.0.1

Python version

3.9.4

OS

macOS Big Sur

How to Reproduce

  1. Get package from '...'
  2. Then run '...'
  3. An error occurs.

Output

(happiness) stephane@gandalf ~/s/g/m/happiness (main)> pip list -o
Package             Version Latest Type
------------------- ------- ------ -----
asgiref             3.3.1   3.3.4  wheel
decorator           4.4.2   5.0.5  wheel
Django              3.1.7   3.2    wheel
django-extensions   3.1.1   3.1.2  wheel
django-heroku       0.0.0   0.3.1  wheel
djangorestframework 3.12.2  3.12.4 wheel
Faker               6.5.0   8.0.0  wheel
gunicorn            20.0.4  20.1.0 sdist
idna                2.10    3.1    wheel
ipython             7.21.0  7.22.0 wheel
parso               0.8.1   0.8.2  wheel
prompt-toolkit      3.0.16  3.0.18 wheel
Pygments            2.8.0   2.8.1  wheel
urllib3             1.26.3  1.26.4 wheel
(happiness) stephane@gandalf ~/s/g/m/happiness (main)> pip list -o --format=freeze
asgiref==3.3.1
decorator==4.4.2
Django==3.1.7
django-extensions==3.1.1
django-heroku==0.0.0
djangorestframework==3.12.2
Faker==6.5.0
gunicorn==20.0.4
idna==2.10
ipython==7.21.0
parso==0.8.1
prompt-toolkit==3.0.16
Pygments==2.8.0
urllib3==1.26.3

Code of Conduct

I agree to follow the PSF Code of Conduct.

Hi all,

Here is my bug report about pip list -o --format=freeze

Thank you

@matrixise matrixise added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Apr 7, 2021
@pfmoore
Copy link
Member

pfmoore commented Apr 7, 2021

If we were to put the latest versions in, that might be an incompatible set of versions. So it's not actually usable as "freeze" output.

What's your use case for this?

@matrixise
Copy link
Author

Hi @pfmoore

Sometimes, just to update my dependencies for a PoC or MVP, I would like to use pip list -o --format=freeze | xargs -n 1 pip install -U for an update of my dependencies.

Do you have another alternative?

Have a nice day,

Stéphane

@pfmoore
Copy link
Member

pfmoore commented Apr 7, 2021

Do you have another alternative?

No, but there's a good chance that will leave you with a broken system, because you're not going to get dependencies resolved properly, so I'm not sure it's something we want to make possible...

If you don't understand why it could leave you with a broken system:

  1. Individual pip install runs (the -n 1 to xargs) don't ensure that the newly installed package satisfies all the dependencies of already-installed stuff. Removing -n 1 will just make it more likely that the command will fail because of inconsistencies, and still won't ensure a fully-updated consistent system.
  2. pip list --outdated lists all new versions, with no check that they are mutually consistent.

@matrixise
Copy link
Author

yep, I know I risk breaking my system, but fortunately, I use a lot of tests for the usage of the external APIs.

About the xargs, that was just an example. Sometimes, I just update the dependencies and freeze the list in the requirements.txt file. After that, I delete/recreate the environment and restart a fresh install of the dependencies and in this case, I can see if there is an issue with the graph of the dependencies.

But we start to go outside of the main discussion ;-)

So, in this case, I see pip list -o --format=freeze does not give the same result as pip list -o and --format is just for the output formatting. is it right? maybe we could indicate it in the documentation or the --help section of the CLI. I have filled this issue just because that was not clear for me, maybe it's the case for other people.

Have a nice day,

@piotr-dobrogost
Copy link

As pip list --outdated lists two versions for each package in its output one can argue which of these two is the right one that should be listed when used with --format=freeze.
I can see how the interaction between --outdated and --format=freeze options might not be clear at first sight.
If you know the history and the fact that --outdated was added later than --format=freeze you kind of can guess that --outdated acts in this case as a filter only and does not change the meaning of --format=freeze which is to list packages and versions obtained from pip list in a specific format.
In other words when you use both --outdated and --format=freeze you can think of the latter as overriding the former so to speak.

@pfmoore
Copy link
Member

pfmoore commented Apr 8, 2021

To be clear, it's certainly possible to report the "new" version in the freeze output. It's also possible to disallow the freeze format when using --outdated, as it doesn't allow reporting "current" and "latest" versions, which is fundamental to the "outdated" display. It's also possible to do nothing (except maybe document more clearly that the freeze format shows the installed version).

The question is, whether having pip list --outdated --format=freeze report a set of requirements that looks like it upgrades everything, but which in practice has a high probability of being inconsistent, is a good UI in the first place. It feels like a bug magnet to me, and even if @matrixise knows it risks breaking his system, I bet a lot of our users wouldn't, would assume it's a great way of doing --upgrade-all, break their systems, and come here raising bugs.

Actually, if you want the output @matrixise expects, the following gives it:

> py -m pip list --outdated --format=json | jq -r '.[] | .name+\"=\"+.latest_version'
idna=3.1
setuptools=54.2.0
urllib3=1.26.4

(excuse Powershell quoting rules, for Unix probably just omit the backslashes).

@piotr-dobrogost
Copy link

It's also possible to disallow the freeze format when using --outdated, as it doesn't allow reporting "current" and "latest" versions, which is fundamental to the "outdated" display.

I think this should be done to avoid needless confusion.

@uranusjr
Copy link
Member

uranusjr commented Apr 9, 2021

I agree, let’s make the two mutually exclusive.

@nvllsvm
Copy link

nvllsvm commented Oct 16, 2022

--format=json is a more explicit replacement when combined with some Python glue:

pip list --outdated --format=json | python -c '
import json
import sys

for item in json.loads(sys.stdin.read()):
    print("=".join([item["name"], item["latest_version"]]))
'
}

inmantaci pushed a commit to inmanta/inmanta-core that referenced this issue Oct 17, 2022
Bumps [pip](https://github.com/pypa/pip) from 22.2.2 to 22.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>22.3 (2022-10-15)</h1>
<h2>Deprecations and Removals</h2>
<ul>
<li>Deprecate <code>--install-options</code> which forces pip to use the deprecated <code>install</code>
command of <code>setuptools</code>. (<code>[#11358](pypa/pip#11358) &lt;https://github.com/pypa/pip/issues/11358&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when no-binary is enabled for
source distributions without 'pyproject.toml'. (<code>[#11452](pypa/pip#11452) &lt;https://github.com/pypa/pip/issues/11452&gt;</code>_)</li>
<li>Deprecate ```--no-binary`` disabling the wheel cache. (<code>[#11454](pypa/pip#11454) &lt;https://github.com/pypa/pip/issues/11454&gt;</code>_)</li>
<li>Remove <code>--use-feature=2020-resolver</code> opt-in flag. This was supposed to be removed in 21.0, but missed during that release cycle. (<code>[#11493](pypa/pip#11493) &lt;https://github.com/pypa/pip/issues/11493&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when the 'wheel' package is absent for
source distributions without 'pyproject.toml'. (<code>[#8559](pypa/pip#8559) &lt;https://github.com/pypa/pip/issues/8559&gt;</code>_)</li>
<li>Remove the ability to use <code>pip list --outdated</code> in combination with <code>--format=freeze</code>. (<code>[#9789](pypa/pip#9789) &lt;https://github.com/pypa/pip/issues/9789&gt;</code>_)</li>
</ul>
<h2>Features</h2>
<ul>
<li>Use <code>shell=True</code> for opening the editor with <code>pip config edit</code>. (<code>[#10716](pypa/pip#10716) &lt;https://github.com/pypa/pip/issues/10716&gt;</code>_)</li>
<li>Use the <code>data-dist-info-metadata</code> attribute from :pep:<code>658</code> to resolve distribution metadata without downloading the dist yet. (<code>[#11111](pypa/pip#11111) &lt;https://github.com/pypa/pip/issues/11111&gt;</code>_)</li>
<li>Add an option to run the test suite with pip built as a zipapp. (<code>[#11250](pypa/pip#11250) &lt;https://github.com/pypa/pip/issues/11250&gt;</code>_)</li>
<li>Add a <code>--python</code> option to allow pip to manage Python environments other
than the one pip is installed in. (<code>[#11320](pypa/pip#11320) &lt;https://github.com/pypa/pip/issues/11320&gt;</code>_)</li>
<li>Document the new (experimental) zipapp distribution of pip. (<code>[#11459](pypa/pip#11459) &lt;https://github.com/pypa/pip/issues/11459&gt;</code>_)</li>
<li>Use the much faster 'bzr co --lightweight' to obtain a copy of a Bazaar tree. (<code>[#5444](pypa/pip#5444) &lt;https://github.com/pypa/pip/issues/5444&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix <code>--no-index</code> when <code>--index-url</code> or <code>--extra-index-url</code> is specified
inside a requirements file. (<code>[#11276](pypa/pip#11276) &lt;https://github.com/pypa/pip/issues/11276&gt;</code>_)</li>
<li>Ensure that the candidate <code>pip</code> executable exists, when checking for a new version of pip. (<code>[#11309](pypa/pip#11309) &lt;https://github.com/pypa/pip/issues/11309&gt;</code>_)</li>
<li>Ignore distributions with invalid <code>Name</code> in metadata instead of crashing, when
using the <code>importlib.metadata</code> backend. (<code>[#11352](pypa/pip#11352) &lt;https://github.com/pypa/pip/issues/11352&gt;</code>_)</li>
<li>Raise RequirementsFileParseError when parsing malformed requirements options that can't be sucessfully parsed by shlex. (<code>[#11491](pypa/pip#11491) &lt;https://github.com/pypa/pip/issues/11491&gt;</code>_)</li>
<li>Fix build environment isolation on some system Pythons. (<code>[#6264](pypa/pip#6264) &lt;https://github.com/pypa/pip/issues/6264&gt;</code>_)</li>
</ul>
<h2>Vendored Libraries</h2>
<ul>
<li>Upgrade certifi to 2022.9.24</li>
<li>Upgrade distlib to 0.3.6</li>
<li>Upgrade idna to 3.4</li>
<li>Upgrade pep517 to 0.13.0</li>
<li>Upgrade pygments to 2.13.0</li>
<li>Upgrade tenacity to 8.1.0</li>
<li>Upgrade typing_extensions to 4.4.0</li>
<li>Upgrade urllib3 to 1.26.12</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/0a76da3a94130fad58b086e331c3d3e1b02a89eb"><code>0a76da3</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/25638287f8b8bd571a10c4f5ae1b7f4eae454dcc"><code>2563828</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/e86f27fe4ee3fe45fc0fcd2372f71d39d1d013c1"><code>e86f27f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11493">#11493</a> from pradyunsg/remove-2020-resolver-opt-in</li>
<li><a href="https://github.com/pypa/pip/commit/1fcc3ce4b531ac6bc80c1d102d4ef9610074e195"><code>1fcc3ce</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11514">#11514</a> from pradyunsg/certifi-update</li>
<li><a href="https://github.com/pypa/pip/commit/65c23fa99d19af8ebd375e7129213794dce4b4b2"><code>65c23fa</code></a> Unnormalise the certifi version</li>
<li><a href="https://github.com/pypa/pip/commit/739158cc80f138dbed9e426f3408811acef2d993"><code>739158c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11516">#11516</a> from pradyunsg/check-manifest</li>
<li><a href="https://github.com/pypa/pip/commit/4e48bbc31cf34b1b4ccd100a787d1204ddb8866b"><code>4e48bbc</code></a> Move check-manifest to a CI check</li>
<li><a href="https://github.com/pypa/pip/commit/1b7e5ef34f926f33fa7932239229220dd65eb7a6"><code>1b7e5ef</code></a> Upgrade certifi to 2022.9.24</li>
<li><a href="https://github.com/pypa/pip/commit/2a0552ac61ee26df04e08e21943a1e36aa880db1"><code>2a0552a</code></a> Replace complex certifi patch with a more targetted requests patch</li>
<li><a href="https://github.com/pypa/pip/commit/eb906997da97bbbd1f74127297d7ce9a54a6a2a0"><code>eb90699</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11502">#11502</a> from pradyunsg/vendoring-updates</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/22.2.2...22.3">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=22.2.2&new-version=22.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
inmantaci pushed a commit to inmanta/inmanta-core that referenced this issue Oct 17, 2022
Bumps [pip](https://github.com/pypa/pip) from 22.2.2 to 22.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>22.3 (2022-10-15)</h1>
<h2>Deprecations and Removals</h2>
<ul>
<li>Deprecate <code>--install-options</code> which forces pip to use the deprecated <code>install</code>
command of <code>setuptools</code>. (<code>[#11358](pypa/pip#11358) &lt;https://github.com/pypa/pip/issues/11358&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when no-binary is enabled for
source distributions without 'pyproject.toml'. (<code>[#11452](pypa/pip#11452) &lt;https://github.com/pypa/pip/issues/11452&gt;</code>_)</li>
<li>Deprecate ```--no-binary`` disabling the wheel cache. (<code>[#11454](pypa/pip#11454) &lt;https://github.com/pypa/pip/issues/11454&gt;</code>_)</li>
<li>Remove <code>--use-feature=2020-resolver</code> opt-in flag. This was supposed to be removed in 21.0, but missed during that release cycle. (<code>[#11493](pypa/pip#11493) &lt;https://github.com/pypa/pip/issues/11493&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when the 'wheel' package is absent for
source distributions without 'pyproject.toml'. (<code>[#8559](pypa/pip#8559) &lt;https://github.com/pypa/pip/issues/8559&gt;</code>_)</li>
<li>Remove the ability to use <code>pip list --outdated</code> in combination with <code>--format=freeze</code>. (<code>[#9789](pypa/pip#9789) &lt;https://github.com/pypa/pip/issues/9789&gt;</code>_)</li>
</ul>
<h2>Features</h2>
<ul>
<li>Use <code>shell=True</code> for opening the editor with <code>pip config edit</code>. (<code>[#10716](pypa/pip#10716) &lt;https://github.com/pypa/pip/issues/10716&gt;</code>_)</li>
<li>Use the <code>data-dist-info-metadata</code> attribute from :pep:<code>658</code> to resolve distribution metadata without downloading the dist yet. (<code>[#11111](pypa/pip#11111) &lt;https://github.com/pypa/pip/issues/11111&gt;</code>_)</li>
<li>Add an option to run the test suite with pip built as a zipapp. (<code>[#11250](pypa/pip#11250) &lt;https://github.com/pypa/pip/issues/11250&gt;</code>_)</li>
<li>Add a <code>--python</code> option to allow pip to manage Python environments other
than the one pip is installed in. (<code>[#11320](pypa/pip#11320) &lt;https://github.com/pypa/pip/issues/11320&gt;</code>_)</li>
<li>Document the new (experimental) zipapp distribution of pip. (<code>[#11459](pypa/pip#11459) &lt;https://github.com/pypa/pip/issues/11459&gt;</code>_)</li>
<li>Use the much faster 'bzr co --lightweight' to obtain a copy of a Bazaar tree. (<code>[#5444](pypa/pip#5444) &lt;https://github.com/pypa/pip/issues/5444&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix <code>--no-index</code> when <code>--index-url</code> or <code>--extra-index-url</code> is specified
inside a requirements file. (<code>[#11276](pypa/pip#11276) &lt;https://github.com/pypa/pip/issues/11276&gt;</code>_)</li>
<li>Ensure that the candidate <code>pip</code> executable exists, when checking for a new version of pip. (<code>[#11309](pypa/pip#11309) &lt;https://github.com/pypa/pip/issues/11309&gt;</code>_)</li>
<li>Ignore distributions with invalid <code>Name</code> in metadata instead of crashing, when
using the <code>importlib.metadata</code> backend. (<code>[#11352](pypa/pip#11352) &lt;https://github.com/pypa/pip/issues/11352&gt;</code>_)</li>
<li>Raise RequirementsFileParseError when parsing malformed requirements options that can't be sucessfully parsed by shlex. (<code>[#11491](pypa/pip#11491) &lt;https://github.com/pypa/pip/issues/11491&gt;</code>_)</li>
<li>Fix build environment isolation on some system Pythons. (<code>[#6264](pypa/pip#6264) &lt;https://github.com/pypa/pip/issues/6264&gt;</code>_)</li>
</ul>
<h2>Vendored Libraries</h2>
<ul>
<li>Upgrade certifi to 2022.9.24</li>
<li>Upgrade distlib to 0.3.6</li>
<li>Upgrade idna to 3.4</li>
<li>Upgrade pep517 to 0.13.0</li>
<li>Upgrade pygments to 2.13.0</li>
<li>Upgrade tenacity to 8.1.0</li>
<li>Upgrade typing_extensions to 4.4.0</li>
<li>Upgrade urllib3 to 1.26.12</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/0a76da3a94130fad58b086e331c3d3e1b02a89eb"><code>0a76da3</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/25638287f8b8bd571a10c4f5ae1b7f4eae454dcc"><code>2563828</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/e86f27fe4ee3fe45fc0fcd2372f71d39d1d013c1"><code>e86f27f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11493">#11493</a> from pradyunsg/remove-2020-resolver-opt-in</li>
<li><a href="https://github.com/pypa/pip/commit/1fcc3ce4b531ac6bc80c1d102d4ef9610074e195"><code>1fcc3ce</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11514">#11514</a> from pradyunsg/certifi-update</li>
<li><a href="https://github.com/pypa/pip/commit/65c23fa99d19af8ebd375e7129213794dce4b4b2"><code>65c23fa</code></a> Unnormalise the certifi version</li>
<li><a href="https://github.com/pypa/pip/commit/739158cc80f138dbed9e426f3408811acef2d993"><code>739158c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11516">#11516</a> from pradyunsg/check-manifest</li>
<li><a href="https://github.com/pypa/pip/commit/4e48bbc31cf34b1b4ccd100a787d1204ddb8866b"><code>4e48bbc</code></a> Move check-manifest to a CI check</li>
<li><a href="https://github.com/pypa/pip/commit/1b7e5ef34f926f33fa7932239229220dd65eb7a6"><code>1b7e5ef</code></a> Upgrade certifi to 2022.9.24</li>
<li><a href="https://github.com/pypa/pip/commit/2a0552ac61ee26df04e08e21943a1e36aa880db1"><code>2a0552a</code></a> Replace complex certifi patch with a more targetted requests patch</li>
<li><a href="https://github.com/pypa/pip/commit/eb906997da97bbbd1f74127297d7ce9a54a6a2a0"><code>eb90699</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11502">#11502</a> from pradyunsg/vendoring-updates</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/22.2.2...22.3">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=22.2.2&new-version=22.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
@ashr123
Copy link

ashr123 commented Oct 20, 2022

maybe I've missed it, but how can I upgrade safely all my packages on my system? (linux user)

@pfmoore
Copy link
Member

pfmoore commented Oct 20, 2022

maybe I've missed it, but how can I upgrade safely all my packages on my system?

It's not straightforward. The best way is probably to use a virtual environment and simply recreate it. Or if you're using your system-managed environment, your system package manager should handle it (assuming you've not installed packages to your system environment using pip). Otherwise, "manually, and carefully" is the best answer I can give...

Just to be clear, pip list --outdated --format=freeze wasn't a safe way to upgrade all the packages on your system, either, which is why we removed it (it gave the impression it was safe when it wasn't).

mergify bot pushed a commit to aws/jsii that referenced this issue Oct 20, 2022
…s/@jsii/python-runtime (#3803)

Updates the requirements on [pip](https://github.com/pypa/pip) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pypa/pip/blob/main/NEWS.rst">pip's changelog</a>.</em></p>
<blockquote>
<h1>22.3 (2022-10-15)</h1>
<h2>Deprecations and Removals</h2>
<ul>
<li>Deprecate <code>--install-options</code> which forces pip to use the deprecated <code>install</code>
command of <code>setuptools</code>. (<code>[#11358](pypa/pip#11358) &lt;https://github.com/pypa/pip/issues/11358&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when no-binary is enabled for
source distributions without 'pyproject.toml'. (<code>[#11452](pypa/pip#11452) &lt;https://github.com/pypa/pip/issues/11452&gt;</code>_)</li>
<li>Deprecate ```--no-binary`` disabling the wheel cache. (<code>[#11454](pypa/pip#11454) &lt;https://github.com/pypa/pip/issues/11454&gt;</code>_)</li>
<li>Remove <code>--use-feature=2020-resolver</code> opt-in flag. This was supposed to be removed in 21.0, but missed during that release cycle. (<code>[#11493](pypa/pip#11493) &lt;https://github.com/pypa/pip/issues/11493&gt;</code>_)</li>
<li>Deprecate installation with 'setup.py install' when the 'wheel' package is absent for
source distributions without 'pyproject.toml'. (<code>[#8559](pypa/pip#8559) &lt;https://github.com/pypa/pip/issues/8559&gt;</code>_)</li>
<li>Remove the ability to use <code>pip list --outdated</code> in combination with <code>--format=freeze</code>. (<code>[#9789](pypa/pip#9789) &lt;https://github.com/pypa/pip/issues/9789&gt;</code>_)</li>
</ul>
<h2>Features</h2>
<ul>
<li>Use <code>shell=True</code> for opening the editor with <code>pip config edit</code>. (<code>[#10716](pypa/pip#10716) &lt;https://github.com/pypa/pip/issues/10716&gt;</code>_)</li>
<li>Use the <code>data-dist-info-metadata</code> attribute from :pep:<code>658</code> to resolve distribution metadata without downloading the dist yet. (<code>[#11111](pypa/pip#11111) &lt;https://github.com/pypa/pip/issues/11111&gt;</code>_)</li>
<li>Add an option to run the test suite with pip built as a zipapp. (<code>[#11250](pypa/pip#11250) &lt;https://github.com/pypa/pip/issues/11250&gt;</code>_)</li>
<li>Add a <code>--python</code> option to allow pip to manage Python environments other
than the one pip is installed in. (<code>[#11320](pypa/pip#11320) &lt;https://github.com/pypa/pip/issues/11320&gt;</code>_)</li>
<li>Document the new (experimental) zipapp distribution of pip. (<code>[#11459](pypa/pip#11459) &lt;https://github.com/pypa/pip/issues/11459&gt;</code>_)</li>
<li>Use the much faster 'bzr co --lightweight' to obtain a copy of a Bazaar tree. (<code>[#5444](pypa/pip#5444) &lt;https://github.com/pypa/pip/issues/5444&gt;</code>_)</li>
</ul>
<h2>Bug Fixes</h2>
<ul>
<li>Fix <code>--no-index</code> when <code>--index-url</code> or <code>--extra-index-url</code> is specified
inside a requirements file. (<code>[#11276](pypa/pip#11276) &lt;https://github.com/pypa/pip/issues/11276&gt;</code>_)</li>
<li>Ensure that the candidate <code>pip</code> executable exists, when checking for a new version of pip. (<code>[#11309](pypa/pip#11309) &lt;https://github.com/pypa/pip/issues/11309&gt;</code>_)</li>
<li>Ignore distributions with invalid <code>Name</code> in metadata instead of crashing, when
using the <code>importlib.metadata</code> backend. (<code>[#11352](pypa/pip#11352) &lt;https://github.com/pypa/pip/issues/11352&gt;</code>_)</li>
<li>Raise RequirementsFileParseError when parsing malformed requirements options that can't be sucessfully parsed by shlex. (<code>[#11491](pypa/pip#11491) &lt;https://github.com/pypa/pip/issues/11491&gt;</code>_)</li>
<li>Fix build environment isolation on some system Pythons. (<code>[#6264](pypa/pip#6264) &lt;https://github.com/pypa/pip/issues/6264&gt;</code>_)</li>
</ul>
<h2>Vendored Libraries</h2>
<ul>
<li>Upgrade certifi to 2022.9.24</li>
<li>Upgrade distlib to 0.3.6</li>
<li>Upgrade idna to 3.4</li>
<li>Upgrade pep517 to 0.13.0</li>
<li>Upgrade pygments to 2.13.0</li>
<li>Upgrade tenacity to 8.1.0</li>
<li>Upgrade typing_extensions to 4.4.0</li>
<li>Upgrade urllib3 to 1.26.12</li>
</ul>

</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pypa/pip/commit/0a76da3a94130fad58b086e331c3d3e1b02a89eb"><code>0a76da3</code></a> Bump for release</li>
<li><a href="https://github.com/pypa/pip/commit/25638287f8b8bd571a10c4f5ae1b7f4eae454dcc"><code>2563828</code></a> Update AUTHORS.txt</li>
<li><a href="https://github.com/pypa/pip/commit/e86f27fe4ee3fe45fc0fcd2372f71d39d1d013c1"><code>e86f27f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11493">#11493</a> from pradyunsg/remove-2020-resolver-opt-in</li>
<li><a href="https://github.com/pypa/pip/commit/1fcc3ce4b531ac6bc80c1d102d4ef9610074e195"><code>1fcc3ce</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11514">#11514</a> from pradyunsg/certifi-update</li>
<li><a href="https://github.com/pypa/pip/commit/65c23fa99d19af8ebd375e7129213794dce4b4b2"><code>65c23fa</code></a> Unnormalise the certifi version</li>
<li><a href="https://github.com/pypa/pip/commit/739158cc80f138dbed9e426f3408811acef2d993"><code>739158c</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11516">#11516</a> from pradyunsg/check-manifest</li>
<li><a href="https://github.com/pypa/pip/commit/4e48bbc31cf34b1b4ccd100a787d1204ddb8866b"><code>4e48bbc</code></a> Move check-manifest to a CI check</li>
<li><a href="https://github.com/pypa/pip/commit/1b7e5ef34f926f33fa7932239229220dd65eb7a6"><code>1b7e5ef</code></a> Upgrade certifi to 2022.9.24</li>
<li><a href="https://github.com/pypa/pip/commit/2a0552ac61ee26df04e08e21943a1e36aa880db1"><code>2a0552a</code></a> Replace complex certifi patch with a more targetted requests patch</li>
<li><a href="https://github.com/pypa/pip/commit/eb906997da97bbbd1f74127297d7ce9a54a6a2a0"><code>eb90699</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/pypa/pip/issues/11502">#11502</a> from pradyunsg/vendoring-updates</li>
<li>Additional commits viewable in <a href="https://github.com/pypa/pip/compare/22.2...22.3">compare view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
@rautamiekka
Copy link

A prime way to destroy an SSD and kill data-capped Internet connections, not to mention a massive waste of time, instead of providing a sensible means, namely --upgrade-all.

Instead the SysAdmin must learn complicated scripting (jq is seriously complicated, PowerShell not exactly easy either), when pip could internally do this much easier with existing functions.

0 steps forward. 2 or 3 steps backwards.

@pfmoore
Copy link
Member

pfmoore commented Oct 21, 2022

--upgrade-all has been on our list of useful improvements for ages now, since the new resolver was rolled out. PRs are, of course, welcome 🙂

@ashr123
Copy link

ashr123 commented Oct 21, 2022

@pfmoore is there an open issue for that? If so can you link it?

@pradyunsg
Copy link
Member

#4551

I'm gonna lock this, because I'm pretty sure there's not much more new coming out of a this discussion, that isn't already mentioned there. If you have something new to add, please do so on the linked issue.

@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Oct 21, 2022
@pypa pypa locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants