tomwer.version#
Unique place where the version number is defined.
provides: * version = “1.2.3” or “1.2.3-beta4” * version_info = named tuple (1,2,3,”beta”,4) * hexversion: 0x010203B4 * strictversion = “1.2.3b4 * debianversion = “1.2.3~beta4” * calc_hexversion: the function to transform a version_tuple into an integer
This is called hexversion since it only really looks meaningful when viewed as the result of passing it to the built-in hex() function. The version_info value may be used for a more human-friendly encoding of the same information.
The hexversion is a 32-bit number with the following layout: Bits (big endian order) Meaning 1-8 PY_MAJOR_VERSION (the 2 in 2.1.0a3) 9-16 PY_MINOR_VERSION (the 1 in 2.1.0a3) 17-24 PY_MICRO_VERSION (the 0 in 2.1.0a3) 25-28 PY_RELEASE_LEVEL (0xA for alpha, 0xB for beta, 0xC for release candidate and 0xF for final) 29-32 PY_RELEASE_SERIAL (the 3 in 2.1.0a3, zero for final releases)
Thus 2.1.0a3 is hexversion 0x020100a3.
Functions
|
Calculate the hexadecimal version number from the tuple version_info: |