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 2023/11/07 20:33:04 UTC

(airflow) branch main updated: Refresh dependencies for Breeze to latest ones (#35510)

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

potiuk 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 8895a8a728 Refresh dependencies for Breeze to latest ones (#35510)
8895a8a728 is described below

commit 8895a8a72897ebc8bedd78e7a16216b18bdafb9c
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Nov 7 21:32:56 2023 +0100

    Refresh dependencies for Breeze to latest ones (#35510)
    
    Seems that if you have some older dependencies they might have
    problems with newer configurations (for example pre-commit). Since
    Breeze has it's own, isolated virtualenv managed by pipx, we can
    safely install latest versions of dependencies without being
    afraid of conflicts (Breeze environment is fully isolated so it
    has nothing to conflict with).
    
    This PR updates minimum versions for all dependencies of Breeze to
    latest non-conflicting versions of those. Since Breeze has the
    self-upgrade mechanism built in, it should detect and reinstall
    itself for everyone who checks out the latest main and runs breeze
    command.
---
 BREEZE.rst                           |  5 ++++-
 CONTRIBUTORS_QUICK_START.rst         |  4 +++-
 Dockerfile.ci                        |  2 +-
 dev/breeze/README.md                 |  2 +-
 dev/breeze/setup.cfg                 | 38 ++++++++++++++++++------------------
 scripts/ci/install_breeze.sh         |  2 +-
 scripts/docker/install_pipx_tools.sh |  2 +-
 scripts/tools/setup_breeze           |  4 ++--
 8 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/BREEZE.rst b/BREEZE.rst
index 1b8722a6ea..0abb43e9c6 100644
--- a/BREEZE.rst
+++ b/BREEZE.rst
@@ -175,11 +175,14 @@ The pipx tool
 We are using ``pipx`` tool to install and manage Breeze. The ``pipx`` tool is created by the creators
 of ``pip`` from `Python Packaging Authority <https://www.pypa.io/en/latest/>`_
 
+Note that ``pipx`` >= 1.2.1 is needed in order to deal with breaking ``packaging`` release in September
+2023 that broke earlier versions of ``pipx``.
+
 Install pipx
 
 .. code-block:: bash
 
-    pip install --user pipx
+    pip install --user "pipx>=1.2.1"
 
 Breeze, is not globally accessible until your PATH is updated. Add <USER FOLDER>\.local\bin as a variable
 environments. This can be done automatically by the following command (follow instructions printed).
diff --git a/CONTRIBUTORS_QUICK_START.rst b/CONTRIBUTORS_QUICK_START.rst
index 3a414b2954..0d216d458e 100644
--- a/CONTRIBUTORS_QUICK_START.rst
+++ b/CONTRIBUTORS_QUICK_START.rst
@@ -269,7 +269,9 @@ see in CI in your local environment.
 Setting up Breeze
 -----------------
 
-1. Install ``pipx`` - follow the instructions in   `Install pipx <https://pypa.github.io/pipx/>`_
+1. Install ``pipx`` (>=1.2.1) - follow the instructions in   `Install pipx <https://pypa.github.io/pipx/>`_
+   It is important to install version of pipx > 1.2.1 to workaround ``packaging`` breaking change introduced
+   in September 2023.
 
 2. Run ``pipx install -e ./dev/breeze`` in your checked-out repository. Make sure to follow any instructions
    printed by ``pipx`` during the installation - this is needed to make sure that ``breeze`` command is
diff --git a/Dockerfile.ci b/Dockerfile.ci
index d8619e1c5a..45a1166070 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -569,7 +569,7 @@ function install_pipx_tools() {
     echo "${COLOR_BLUE}Installing pipx tools${COLOR_RESET}"
     echo
     # Make sure PIPX is installed in latest version
-    pip install --root-user-action ignore  --upgrade pipx
+    pip install --root-user-action ignore  --upgrade "pipx>=1.2.1"
     if [[ $(uname -m) != "aarch64" ]]; then
         # Do not install mssql-cli for ARM
         # Install all the tools we need available in command line but without impacting the current environment
diff --git a/dev/breeze/README.md b/dev/breeze/README.md
index f2c4474cce..a5d495bb15 100644
--- a/dev/breeze/README.md
+++ b/dev/breeze/README.md
@@ -66,6 +66,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.
 
 ---------------------------------------------------------------------------------------------------------
 
-Package config hash: 1fe676b16075afde8bd7dd88b92b3e587b12927337a0edfcc8f751a7d400b772e300d64084f02e4c76e5bb5f2f349a23729258ec457bcb0b94f180ef19ffb154
+Package config hash: abef89e76b6c1cbfe37d4a083a9e75259d0169662c666c9e2549ca91ddf12d9f1274a4c7ab44e999619c0aaf9fdb56f299397e8c528fafbc94caf45f7cc70ad9
 
 ---------------------------------------------------------------------------------------------------------
diff --git a/dev/breeze/setup.cfg b/dev/breeze/setup.cfg
index 617e855659..9c163b288e 100644
--- a/dev/breeze/setup.cfg
+++ b/dev/breeze/setup.cfg
@@ -55,26 +55,26 @@ package_dir=
     =src
 packages = find:
 install_requires =
-    click
-    filelock
-    inputimeout
-    jinja2
-    packaging==23.1
-    pendulum
-    pre-commit
-    psutil
-    pytest
-    pytest-xdist
-    pyyaml
-    PyGithub
-    requests
+    click>=8.1.7
+    filelock>=3.13.0
+    inputimeout>=1.0.4
+    jinja2>=3.1.0
+    packaging>=23.2
+    pendulum>=2.1.2,<3
+    pre-commit>=3.5.0
+    psutil>=5.9.6
+    pytest>=7.4.0
+    pytest-xdist>=3.3.1
+    pyyaml>=6.0.1
+    PyGithub>=2.1.1
+    requests>=2.30.0
     rich>=13.6.0
-    rich-click>=1.7.0
-    gitpython
-    twine
-    wheel
-    setuptools
-    jsonschema
+    rich-click>=1.7.1
+    gitpython>=3.1.40
+    twine>=4.0.2
+    wheel>=0.41.3
+    setuptools>=68.2.2
+    jsonschema>=4.19.1
 
 [options.packages.find]
 where=src
diff --git a/scripts/ci/install_breeze.sh b/scripts/ci/install_breeze.sh
index 7a0e7a927b..d07ef765c6 100755
--- a/scripts/ci/install_breeze.sh
+++ b/scripts/ci/install_breeze.sh
@@ -19,6 +19,6 @@ set -euxo pipefail
 
 cd "$( dirname "${BASH_SOURCE[0]}" )/../../"
 
-python -m pip install pipx packaging==23.1
+python -m pip install "pipx>=1.2.1"
 python -m pipx install --editable ./dev/breeze/ --force
 echo '/home/runner/.local/bin' >> "${GITHUB_PATH}"
diff --git a/scripts/docker/install_pipx_tools.sh b/scripts/docker/install_pipx_tools.sh
index 47f5cd5854..2207db994d 100644
--- a/scripts/docker/install_pipx_tools.sh
+++ b/scripts/docker/install_pipx_tools.sh
@@ -24,7 +24,7 @@ function install_pipx_tools() {
     echo "${COLOR_BLUE}Installing pipx tools${COLOR_RESET}"
     echo
     # Make sure PIPX is installed in latest version
-    pip install --root-user-action ignore  --upgrade pipx
+    pip install --root-user-action ignore  --upgrade "pipx>=1.2.1"
     if [[ $(uname -m) != "aarch64" ]]; then
         # Do not install mssql-cli for ARM
         # Install all the tools we need available in command line but without impacting the current environment
diff --git a/scripts/tools/setup_breeze b/scripts/tools/setup_breeze
index b8ef210594..c740b6b4b9 100755
--- a/scripts/tools/setup_breeze
+++ b/scripts/tools/setup_breeze
@@ -31,7 +31,7 @@ function manual_instructions() {
     echo
     echo "${COLOR_BLUE}Please run those commands manually (you might need to restart shell between them)${COLOR_RESET}"
     echo
-    echo "    python -m pip install pipx"
+    echo "    python -m pip install \"pipx>=1.2.1\""
     echo "    pipx ensurepath"
     echo "    pipx install -e '${AIRFLOW_SOURCES}/dev/breeze/'"
     echo "    breeze setup autocomplete --force"
@@ -54,7 +54,7 @@ function check_breeze_installed() {
             echo "${COLOR_RED}The 'pipx' is not on path. It should be installed and 'pipx' should be available on your PATH.${COLOR_RESET}"
             export TIMEOUT=0
             if "${MY_DIR}/confirm" "Installing pipx?"; then
-                python -m pip install pipx --upgrade
+                python -m pip install "pipx>=1.2.1" --upgrade
                 echo
                 echo "${COLOR_YELLOW}Please close and re-open the shell and retry. You might need to add 'pipx' to the PATH!${COLOR_RESET}"
                 echo