#1149337 python-datamodel-code-generator: FTBFS against python 3.15rc2 (ValueError: '3.15' is not a valid PythonVersion)

#1149337#5
Date:
2026-09-29 13:54:01 UTC
From:
To:
Hi!

While rebuilding the python related packages against the Python 3.15rc2
version we found that python-datamodel-code-generator fails to build
from source:
https://debusine.debian.net/debian/r-python-python3.15/artifact/4856740/

 From the log, the error seems to be:

   ERROR tests/test_build_architecture_docs_script.py - ValueError:
'3.15' is no...
   ERROR tests/test_build_playground_assets_script.py - ValueError:
'3.15' is no...
   ERROR tests/test_build_schema_docs_script.py - ValueError: '3.15' is
not a va...
   ERROR tests/test_http.py - ValueError: '3.15' is not a valid
PythonVersion
   !!!!!!!!!!!!!!!!!!! Interrupted: 38 errors during collection
!!!!!!!!!!!!!!!!!!!
   ====================== 75 deselected, 38 errors in 4.34s
=======================

It looks like the code needs to be updated to accept 3.15 as a valid
Python version.

Setting the severity to important for now. Once Python 3.15 is released
and later added to python3-defaults, this bug will become release
critical.