Version numbers in Standard Library
Thompson, Matt (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]
matthew.thompson at nasa.gov
Fri Mar 1 10:35:24 EST 2019
Dear Python List,
A question. I help maintain a Python stack for users in my division here
at NASA and one user asked about updating the re module to 2.4. I
believe because he read the docs:
https://docs.python.org/2.7/library/re.html
where you see lines like "New in version 2.4" and he also did:
$ python2 -c 'import re; print (re.__version__)'
2.2.1
And, well, one can think "oh, a newer version is needed". I searched on
conda, etc. and can't find it and finally realized that 2.4 meant Python
2.4, not re 2.4. (The 3.7 docs have lines like "Changed in version 3.7".)
My question to the pros here is what purpose do the __version__/version
variables serve in the Python Standard Library? I can understand in
external packages, but once in the Standard Library...?
For example, in re.py, that line was last changed 18 years ago according
to git blame. In tarfile.py, the version string was last changed 12
years ago. But in both, the modules were edited in 2018 so they haven't
been static for a decade.
Are those strings there just for historic purposes?
Not a big deal, I was just wondering.
Thanks,
Matt
--
Matt Thompson, SSAI, Sr Scientific Programmer/Analyst
NASA GSFC, Global Modeling and Assimilation Office
Code 610.1, 8800 Greenbelt Rd, Greenbelt, MD 20771
Phone: 301-614-6712 Fax: 301-614-6246
http://science.gsfc.nasa.gov/sed/bio/matthew.thompson
More information about the Python-list
mailing list