# This file contains pip package version constraints that are needed to ensure
# compatibility across the 4 main requirements files.
#
# This should only be used when we have an indirect dependency version clash
# (direct dependency clashes should be addressed in the requirements files).
#
# These should be checked regularly to see if they are still required.

# very slow regression in 0.981/0.982/0.990 (https://github.com/python/mypy/issues/13821)
# but an indirect dependency via sqlalchemy so need to constrain it here as well
# as in requirements-dev.in
mypy>=0.930,<0.981  # very slow regression in 0.98x/0.99x (https://github.com/python/mypy/issues/13821)

#   numpy==1.24.0 (from -c requirements-tutorial.txt (line 214))
#   numpy==1.24.0 (from -c requirements.txt (line 137))
#   numpy<2 (from mlflow==2.0.1->-r requirements-test.in (line 39))
#   numpy>=1.17.3 (from scikit-learn==1.2.0->-c requirements.txt (line 263))
#   numpy>=1.19 (from matplotlib==3.6.2->-c requirements-tutorial.txt (line 168))
#   numpy (from shap==0.41.0->mlflow==2.0.1->-r requirements-test.in (line 39))
#   numpy>=1.20.3 (from pandas==1.5.2->-c requirements.txt (line 183))
#   numpy (from imageio==2.23.0->-c requirements.txt (line 93))
#   numpy>=1.16 (from contourpy==1.0.6->-c requirements-tutorial.txt (line 44))
#   numpy>=1.13.3 (from test-tube==0.7.5->-r requirements-test.in (line 41))
#   numpy<1.24,>=1.18 (from numba==0.56.4->shap==0.41.0->mlflow==2.0.1->-r requirements-test.in (line 39))
#   numpy>=1.12.0 (from tensorboard==2.11.0->-c requirements.txt (line 305))
#   numpy<1.26.0,>=1.18.5 (from scipy==1.9.3->-c requirements.txt (line 269))
#   numpy>=1.16.6 (from pyarrow==7.0.0->-c requirements.txt (line 206))
#   numpy (from torch==1.8.1->-c requirements.txt (line 319))
numpy<1.24  # numba compatibility is the constraint; check https://github.com/numba/numba/issues/8464 for removal

#   packaging==22.0 (from -c requirements.txt (line 177))
#   packaging==22.0 (from -c requirements-tutorial.txt (line 219))
#   packaging>=22 (from tox==4.0.14->-r requirements-test.in (line 36))
#   packaging (from neptune-client==0.16.15->-r requirements-test.in (line 40))
#   packaging<22 (from mlflow==2.0.1->-r requirements-test.in (line 39))
#   packaging (from pytest==7.2.0->-r requirements-test.in (line 18))
packaging<22  # needed to constrain things to ensure compat with mlflow; check https://github.com/mlflow/mlflow/blob/master/requirements/skinny-requirements.txt#L14 for removal
pytoolconfig<1.2.4  # this is related to the above constraint as >=1.2.4 introduces a requirement of packaging>=22
tox<4.0.1  # this is related to the above constraint as >=4.0.1 introduces a requirement of packaging>=22
