Troubleshooting Python or Airflow compatibility issues
You can learn more about how to identify the compatibility issues related to Python or Airflow versions during CDE upgrade and troubleshoot them.
Python upgrade from version 3.8 to version 3.11
- If you are upgrading Python from version 3.8 to version 3.9, for more information, see:
- If you are upgrading Python from version 3.9 to version 3.10, for more
information, see:
- What’s New In Python 3.10
- Deprecated in Python 3.10
- Removed in Python 3.10
- Porting to Python 3.10
- Some of the important deprecations, removals, and restrictions in Python 3.10:
- If you are upgrading Python from version 3.10 to version 3.11, for more
information, see:
- What’s New In Python 3.11
- Deprecated in Python 3.11
- Porting to Python 3.11
- Some of the important deprecations, removals, and restrictions in
Python 3.11:
- PEP 594: Many legacy standard library modules have been deprecated. These will be removed in Python 3.13.
- PEP 624: Py_UNICODE encoder APIs are removed
Tools for porting Python from version 3.8 to version 3.11
This list contains automated tools that allow you to check the Python source code and
modernize it to the latest version if necessary:
- Python development mode: It can be enabled using the -X dev command line option or by setting the PYTHONDEVMODE environment variable to 1.
- DeprecationWarnings: To check for deprecation warnings in your code, see DeprecationWarnings.
- refurb: A tool for modernizing Python codebases. For more
information, see refurb. For
example,
refurb --enable-all --python-version 3.8 dag_file.py
- pyupgrade: A tool to automatically upgrade syntax for newer
versions of Python. For more information, see pyupgrade. For
example,
# create a temporary git repository for the DAG files and run pyupgrade on them # NOTE: pyupgrade will rewrite the files automatically pyupgrade --py311-plus *.py # check the modifications done by pyupgrade before updating the DAG files in CDE
Airflow upgrade from version 2.7.3 to version 2.9.3
- Significant changes in Airflow version 2.8.0:
- Raw HTML code in DAG docs and DAG params descriptions are disabled by default (#35460)
- Account for change in UTC offset when calculating next schedule (#35887)
- For the complete list of changes, see Airflow 2.8.0 documentation.
- Significant changes in Airflow version 2.8.1:
- Target version for core dependency pendulum package set to 3 (#36281)
- Airflow packaging specification follows modern Python packaging standards (#36537)
- Graphviz dependency is now an optional one, not required one (#36647)
- Do not let EventsTimetable schedule past events if catchup=False (#36134)
- For the complete list of changes, see Airflow 2.8.1 documentation.
- Significant changes in Airflow version 2.8.2:
- The allowed_deserialization_classes flag now follows a glob pattern (#36147)
- The audit_logs permissions have been updated for heightened security (#37501)
- AirflowTimeoutError is no longer except by default through Exception (#35653)
- Revoking audit_log permission from all users except admin (#37501)
- For the complete list of changes, see Airflow 2.8.2 documentation.
- Significant changes in Airflow version 2.8.3:
- The smtp provider is now pre-installed when you install Airflow (#37713)
- For the complete list of changes, see Airflow 2.8.3 documentation.
- Significant changes in Airflow version 2.8.4:
- There are no significant changes in Airflow 2.8.4. For full list of changes, see Airflow 2.8.4 documentation.
- Significant changes in Airflow version 2.9.0:
- Listener API methods are considered stable and can be used for production system (They were experimental features in older Airflow versions) (#36376)
- Dataset URIs are now validated on input (#37005)
- Add REST API actions to Audit Log events (#37734)
- Prevent large string objects from being stored in the Rendered Template Fields (#38094)
- The xcom change allows the storage of larger Xcom values in Airflow metadata 2^32 instead of 2^16 bytes. (#38401)
- Stronger validation for key parameter defaults in taskflow context variables (#38015)
- Deprecate smtp configs in airflow settings / local_settings (#37711)
- For the complete list of changes, see Airflow 2.9.0 documentation.
- Significant changes in Airflow version 2.9.1:
- Stackdriver logging bugfix requires Google provider 10.17.0 or later (#38071)
- For the complete list of changes, see Airflow 2.9.1 documentation.
- Significant changes in Airflow version 2.9.2:
- There are no significant changes in Airflow 2.9.2. For full list of changes, see Airflow 2.9.2 documentation.
- Significant changes in Airflow version 2.9.3:
- Time unit for
scheduled_duration
andqueued_duration
changed (metrics) (#37936) - For the complete list of changes, see Airflow 2.9.3 documentation.
- Time unit for