8000 Add easily comparable version info to toplevel · Issue #18312 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Add easily comparable version info to toplevel #18312
Closed
@anntzer

Description

@anntzer

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

      0