1

If I do

 pip list --outdated

I get a list of upgrade-able modules. For example:

Package            Version    Latest   Type
------------------ ---------- -------- -----
aiofiles           22.1.0     23.1.0   wheel
anyio              3.6.2      3.7.0    wheel
attrs              22.2.0     23.1.0   wheel
beautifulsoup4     4.11.2     4.12.2   wheel
comm               0.1.2      0.1.3    wheel
Cython             0.29.33    0.29.35  wheel
[...]

Is there any way to get the changelog or relevant release notes for the new versions that would be installed? I would like to get these programmatically, ideally from the command line if possible.

2 Answers 2

1

Unfortunately no. The wheels don't usually have any changelog in them, just a top-level README embedded in the Description field (and even that is optional).

Your best bet would be to check at the Project-URL(s) to try and find a changelog, but this would be difficult to do programmatically, and not all projects even bother to keep a changelog.

1
  • This is a shame. I wonder if getting a changelog if it exists is possible programmatically.
    – Simd
    May 31 at 12:22
1

There is no built-in programatic way to retrieve changelogs.

The PEPs defining "Metadata for Python Software Packages" (241, 314, 345, 566) don't define anything for changelogs. Given there is no standard location, there is no guaranteed place to find it for any given package. However, there are many common places to look.

The changelogs project attempts to do this. It's not a perfect solution as noted in the readme:

When trying to get a changelog for a given package, there are a bunch of problems:

  • There is no central place to store a changelog. If a project has a changelog, it's most likely somewhere in the git repo at all kinds of different places. This makes it hard to find.
  • The package index meta data often has no direct link to the git repo. This makes the repo hard to find.
  • There is no changelog standard. Everyone uses a different approach. This makes it hard to parse.

This project is trying to solve this by:

  • first querying the package vendor for package meta data like the homepage or docs URL.
  • if the meta data doesn't contain a valid URL to a repo, visit all available URLs and scrape them to find one.
  • if there is a valid repo URL, visit the repo and look for possible changelogs like Changes.txt, NEWS.md or history.rst.
  • fetch the content and somewhat try to parse it.
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.