Skip to content

Commit

Permalink
Refresh dependencies for Breeze to latest ones (apache#35510)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk authored Nov 7, 2023
1 parent e512a72 commit 8895a8a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 27 deletions.
5 changes: 4 additions & 1 deletion BREEZE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTORS_QUICK_START.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dev/breeze/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

---------------------------------------------------------------------------------------------------------
38 changes: 19 additions & 19 deletions dev/breeze/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/install_breeze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
2 changes: 1 addition & 1 deletion scripts/docker/install_pipx_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/tools/setup_breeze
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 8895a8a

Please sign in to comment.