This is an automated email from the ASF dual-hosted git repository.
taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new fa3265becf doc: Use sys.version_info for determine Python Major.Minor
(#38372)
fa3265becf is described below
commit fa3265becf0e67b2fa0843934f0e212dee9c6167
Author: Andrey Anshin <[email protected]>
AuthorDate: Fri Mar 22 12:54:34 2024 +0400
doc: Use sys.version_info for determine Python Major.Minor (#38372)
---
docs/apache-airflow/installation/installing-from-pypi.rst | 6 +++---
docs/apache-airflow/start.rst | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/apache-airflow/installation/installing-from-pypi.rst
b/docs/apache-airflow/installation/installing-from-pypi.rst
index 6c379f6639..bd4ecbcbe1 100644
--- a/docs/apache-airflow/installation/installing-from-pypi.rst
+++ b/docs/apache-airflow/installation/installing-from-pypi.rst
@@ -249,7 +249,7 @@ a one-liner (the example below installs Postgres and Google
providers, as well a
:substitutions:
AIRFLOW_VERSION=|version|
- PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
+ PYTHON_VERSION="$(python -c 'import sys;
print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
pip install "apache-airflow[async,postgres,google]==${AIRFLOW_VERSION}"
--constraint "${CONSTRAINT_URL}"
@@ -268,7 +268,7 @@ released and tested together when the version of Airflow
you are installing was
:substitutions:
AIRFLOW_VERSION=|version|
- PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
+ PYTHON_VERSION="$(python -c 'import sys;
print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
pip install "apache-airflow[postgres,google]==${AIRFLOW_VERSION}"
--constraint "${CONSTRAINT_URL}"
@@ -324,7 +324,7 @@ dependencies compatible with just airflow core at the
moment Airflow was release
:substitutions:
AIRFLOW_VERSION=|version|
- PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
+ PYTHON_VERSION="$(python -c 'import sys;
print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
# For example: 3.8
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-no-providers-${PYTHON_VERSION}.txt"
# For example:
https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-no-providers-3.8.txt
diff --git a/docs/apache-airflow/start.rst b/docs/apache-airflow/start.rst
index ff2229b106..e7d62f6acf 100644
--- a/docs/apache-airflow/start.rst
+++ b/docs/apache-airflow/start.rst
@@ -62,7 +62,7 @@ constraint files to enable reproducible installation, so
using ``pip`` and const
# Extract the version of Python you have installed. If you're currently
using a Python version that is not supported by Airflow, you may want to set
this manually.
# See above for supported versions.
- PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f
1-2)"
+ PYTHON_VERSION="$(python -c 'import sys;
print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
# For example this would install |version| with python 3.8:
https://raw.githubusercontent.com/apache/airflow/constraints-|version|/constraints-3.8.txt