You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/07/03 08:31:40 UTC

[GitHub] [airflow] potiuk commented on pull request #15515: Add python 3.9

potiuk commented on pull request #15515:
URL: https://github.com/apache/airflow/pull/15515#issuecomment-873369599


   Yes. It's not "officially" supported yet. It's been added to main and not backported to 2.1.1. The 2.1 line is released from v2-1-stable branch not from main and we try to avoid excessive cherry-picking between the branches (unless it is necessary).
   
   The 3.9 support is three things really:
   
   * CI tests - those make sense to add/fix for main only
   * Constraint files 
   * Docker images
   
   As a workaround you can still install airflow or build a docker image for python 3.9 with Airflow 2.1.1 and it will probably work fine. 
   This is quite possible (though not guaranteed to work) using the main version of constraints. The full guarantees we get only when we run the full test suite (which only happens in main for Python 3.9).
   
   Here is how you can build Airflow 2.1.1 Python 3.9 image (you can run it from main airlfow sources):
   
   ```
   docker build . \
       --build-arg PYTHON_BASE_IMAGE="python:3.9-slim-buster" \
       --build-arg AIRFLOW_VERSION="2.1.1" \
       --build-arg AIRFLOW_CONSTRAINTS_REFERENCE="constraints-main" \
       --tag "my-custom-3-9-airflow-image:2.1.1"
   ```
   
   Similarly installing airflow locally:
   
   ```
   AIRFLOW_VERSION=2.1.1
   PYTHON_VERSION="$(python --version | cut -d " " -f 2 | cut -d "." -f 1-2)"
   CONSTRAINT_URL="https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-${PYTHON_VERSION}.txt"
   pip install --upgrade "apache-airflow[postgres,google]==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}"
   ```
   Also both Docker and local installation can be run with locally modified version of constraints if you find some conflicts, happy to help if you have problems.
   
   I think as you are eager users that might be perfect opportunity for you to try it and let us know if you see any problems before we release 2.2 which will have full 3.9 support. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org