Skip to content

Commit 43cf17b

Browse files
committed
Add version_description to user_runtime.python
`user_runtime.python_version` is deprecated, but that information is still useful. The web service already expects `version_description`, so we just need to add it here.
1 parent cf430d6 commit 43cf17b

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
New Functionality
2+
^^^^^^^^^^^^^^^^^
3+
4+
- Added ``python.version_description`` to the ``user_runtime`` reserved template
5+
variable. This contains the full version string from ``sys.version``, and replaces
6+
the deprecated ``user_runtime.python`` field.

compute_sdk/globus_compute_sdk/sdk/batch.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ class PythonInfo:
5151
----------
5252
version
5353
Python version string (e.g., ``"3.13.7"``)
54+
version_description
55+
Complete Python version string from ``sys.version`` (e.g.,
56+
``"3.13.7 (main, Sep 30 2025, 03:50:19) [GCC 14.2.0]"``)
5457
version_tuple
5558
Python version as a tuple (e.g., ``(3, 13, 7)``)
5659
version_info
@@ -64,6 +67,7 @@ class PythonInfo:
6467
"""
6568

6669
version: str
70+
version_description: str
6771
version_tuple: tuple[int, int, int]
6872
version_info: tuple[int, int, int, str, int]
6973
implementation: str
@@ -108,6 +112,7 @@ def create_user_runtime() -> UserRuntime:
108112
python_version=sys.version,
109113
python=UserRuntime.PythonInfo(
110114
version=platform.python_version(),
115+
version_description=sys.version,
111116
version_tuple=sys.version_info[:3],
112117
version_info=tuple(sys.version_info), # type: ignore[arg-type]
113118
compiler=platform.python_compiler(),

compute_sdk/tests/unit/test_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ def test_batch_includes_user_runtime_info(gcc):
315315
"python_version": sys.version,
316316
"python": {
317317
"version": platform.python_version(),
318+
"version_description": sys.version,
318319
"version_tuple": sys.version_info[:3],
319320
"version_info": tuple(sys.version_info),
320321
"implementation": platform.python_implementation(),

0 commit comments

Comments
 (0)