potiuk commented on code in PR #69124:
URL: https://github.com/apache/airflow/pull/69124#discussion_r3611467013


##########
scripts/ci/prek/common_prek_utils.py:
##########
@@ -152,6 +160,32 @@ def read_allowed_kubernetes_versions() -> list[str]:
     return [v.lstrip("v") for v in versions]
 
 
+def read_allowed_python_major_minor_versions() -> list[str]:
+    """Parse ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS from global_constants.py 
(single source of truth)."""
+    return 
list(_read_global_constants_assignment("ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS"))
+
+
+def read_current_postgres_versions() -> list[str]:
+    """Parse CURRENT_POSTGRES_VERSIONS from global_constants.py (single source 
of truth)."""
+    return list(_read_global_constants_assignment("CURRENT_POSTGRES_VERSIONS"))
+
+
+def read_current_mysql_versions() -> list[str]:
+    """The MySQL release versions Airflow currently tests with.
+
+    Mirrors how ``CURRENT_MYSQL_VERSIONS`` is built in global_constants.py: the
+    "old" releases plus the LTS releases, plus an innovation release when one 
is
+    configured. Returns the numeric versions only (e.g. ``["8.0", "8.4"]``); 
the
+    docs add the textual "Innovation" annotation on top of these.
+    """
+    versions: list[str] = 
list(_read_global_constants_assignment("MYSQL_OLD_RELEASES"))
+    versions += list(_read_global_constants_assignment("MYSQL_LTS_RELEASES"))
+    innovation = _read_global_constants_assignment("MYSQL_INNOVATION_RELEASE")
+    if innovation:

Review Comment:
   I think we do not plan to change it :) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to