You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/01/23 13:21:57 UTC

[airflow] 03/24: Adds Pendulum 1.x -> 2.x upgrade documentation (#18955)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v2-2-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit a7180427e2957d518be122a044c00fd30700c8f5
Author: Pradyumna Rahul <pr...@gmail.com>
AuthorDate: Thu Oct 14 23:26:28 2021 +0530

    Adds Pendulum 1.x -> 2.x upgrade documentation (#18955)
    
    closes: #18634
    
    Adds documentation about the upgrade from Pendulum `1.x` to `2.x` as discussed in the issue.
    
    Assumptions that were made:
    
    - Most of the Pendulum changes are already documented in the official Pendulum docs.
    
    Added the following:
    
    - Mention the upgrade from `1.x` to `2.x`
    - Added an example of a code snippet that will now throw errors
    - Added link to official pendulum `2.x` docs that discuss the changes from `1.x` to `2.x`
    
    The macros documentation as mentioned in the issue were actually pointing to the updated Pendulum documentation, so no changes were added for the same. For instance, consider the link for the macro [prev_execution_date](https://pendulum.eustace.io/docs/#introduction)
    
    (cherry picked from commit 141d9f2d5d3e47fe7beebd6a56953df1f727746e)
---
 docs/apache-airflow/upgrading-from-1-10/index.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/docs/apache-airflow/upgrading-from-1-10/index.rst b/docs/apache-airflow/upgrading-from-1-10/index.rst
index 603796c..85c04a5 100644
--- a/docs/apache-airflow/upgrading-from-1-10/index.rst
+++ b/docs/apache-airflow/upgrading-from-1-10/index.rst
@@ -355,6 +355,21 @@ Old Keys                 New keys
 
 For more information, visit https://flask-appbuilder.readthedocs.io/en/latest/security.html#authentication-oauth
 
+**Breaking Change in Pendulum Support**
+
+Airflow has upgraded from Pendulum 1.x to Pendulum 2.x.
+This comes with a few breaking changes as certain methods and their definitions in Pendulum 2.x
+have changed or have been removed.
+
+For instance the following snippet will now throw errors:
+
+.. code-block:: python
+
+    execution_date.format("YYYY-MM-DD HH:mm:ss", formatter="alternative")
+
+as the ``formatter`` option is not supported in Pendulum 2.x and ``alternative`` is used by default.
+
+For more information, visit https://pendulum.eustace.io/blog/pendulum-2.0.0-is-out.html
 
 Step 6: Upgrade Configuration settings
 '''''''''''''''''''''''''''''''''''''''''''