Elffuss BraidHub

kikocis/auto-code-rover public

main · 1.7 KiBRawPermalink
1Add easily comparable version info to toplevel
2<!--
3Welcome! Thanks for thinking of a way to improve Matplotlib.
4
5
6Before creating a new feature request please search the issues for relevant feature requests.
7-->
8
9### Problem
10
11Currently 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.
12
13(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 :))
14<!--
15Provide a clear and concise description of the problem this feature will solve.
16
17For example:
18* I'm always frustrated when [...] because [...]
19* I would like it if [...] happened when I [...] because [...]
20* Here is a sample image of what I am asking for [...]
21-->
22
23### Proposed Solution
24
25I 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 :-)
26<!-- Provide a clear and concise description of a way to accomplish what you want. For example:
27
28* Add an option so that when [...] [...] will happen
29 -->
30
31### Additional context and prior art
32
33`version_info` is a pretty common thing (citation needed).
34<!-- Add any other context or screenshots about the feature request here. You can also include links to examples of other programs that have something similar to your request. For example:
35
36* Another project [...] solved this by [...]
37-->
38