Your message dated Sat, 31 Dec 2022 11:22:36 +0100
with message-id <2ca1349d-2478-33c3-3439-dbb312e73...@ubuntu.com>
and subject line Re: [python3.11] platform.python_version() returns wrong value
has caused the Debian Bug report #1024248,
regarding [python3.11] platform.python_version() returns wrong value
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1024248: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1024248
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python3.11
Version: 3.11.0-3
Severity: important
Control: affects -1 src:sunpy
The version number returned from platform.python_version() is not
conform to its documentation and is not parseable with
packaging.version.Version:
----------------------8<----------------------------------------
$ python3.11
Python 3.11.0+ (main, Nov 4 2022, 09:23:33) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
from platform import python_version
from packaging.version import Version
python_version()
'3.11.0+'
print(python_version.__doc__)
Returns the Python version as string 'major.minor.patchlevel'
Note that unlike the Python sys.version, the returned value
will always include the patchlevel (it defaults to 0).
Version(python_version())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/packaging/version.py", line 266,
in __init__
raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '3.11.0+'
----------------------8<----------------------------------------
This is a bug of the Debian package itself, the trailing "+" is added in
debian/patches/git-updates.diff.
Sunpy uses packaging.version.Version(python_version) to skip some tests,
which creates an error and therefore prevents Sunpy from compilation.
--- End Message ---
--- Begin Message ---
you always see this when cpython is built from git. I see this as an upstream
bug in packaging, but don't see this will be fixed. so just closing.
--- End Message ---