git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Version numbers in Standard Library


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