Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add easily comparable version info to toplevel #18312

Copy link
Copy link
Closed
@anntzer

Description

@anntzer
Issue body actions

Problem

Currently matplotlib only exposes __version__. For quick version checks, exposing either a version_info tuple (which can be compared with other tuples) or a LooseVersion instance (which can be properly compared with other strings) would be a small usability improvement.

(In practice I guess boring string comparisons will work just fine until we hit mpl 3.10 or 4.10 which is unlikely to happen soon, but that feels quite dirty :))

Proposed Solution

I guess I slightly prefer LooseVersion, but exposing just a version_info tuple is much more common in other packages (and perhaps simpler to understand). The hardest(?) part is probably just bikeshedding this point :-)

Additional context and prior art

version_info is a pretty common thing (citation needed).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.