Reference

mopup

Auto-updater for official python.org builds of python.

exception mopup.MOPUpLookupError

Deliberate application-specific lookup errors. Something wasn’t found.

exception mopup.MOPUpValueError

Deliberate application-specific value errors. Some value was unexpected.

class mopup.PkgFileInfo
class mopup.PkgInfo
mopup.alllinksin(u, e)

Get all the links in the given URL whose text matches the given pattern.

Parameters:
  • u (DecodedURL)

  • e (Pattern[str])

Return type:

Iterable[tuple[Match[str], DecodedURL]]

mopup.choicechanges(pkgfile)

Compute the choice-changes XML for a given package based on what is currently installed.

Parameters:

pkgfile (str)

Return type:

str

mopup.do_download(download_url)

Download the given URL into the downloads directory.

Returning the path when successful.

Parameters:

download_url (DecodedURL)

Return type:

str

mopup.list_installed()

List all Python versions installed with official Python.org installers.

Return type:

None

mopup.main(target_version, interactive, force, minor_upgrade, dry_run)

Do an update.

Parameters:
  • target_version (str | None)

  • interactive (bool)

  • force (bool)

  • minor_upgrade (bool)

  • dry_run (bool)

Return type:

None

mopup.uninstall(*, minor_release_version, dry_run=False, interactive=False, force=False)

Uninstall a specific Python version from the system.

minor_release_version is a string like “3.13”. If dry_run is True, only show what would be removed without actually removing. If interactive is True, ask for confirmation before proceeding. If force is True, remove even if extra files are present.

Parameters:
  • minor_release_version (str)

  • dry_run (bool)

  • interactive (bool)

  • force (bool)

Return type:

None