# HG changeset patch # User Mads Kiilerich # Date 2024-07-19 17:19:10 # Node ID ff6c3e2851666e1e5ccf8d35a365d7df4089b079 # Parent 36a36ebdf4bbc4da77c41cabdbdf4a688e8fbeea venv: limit pip version to stay below 24.1 Latest pip version pip fail: WARNING: Ignoring version 5.0.5 of celery since it has invalid metadata: Requested celery<5.1,>=5 from .../celery-5.0.5-py3-none-any.whl (from Kallithea==0.7.0) has invalid metadata: Expected matching RIGHT_PARENTHESIS for LEFT_PARENTHESIS, after version specifier pytz (>dev) ~^ Please use pip<24.1 if you need to use this version. We already use setuptools<67 for the same reason. Pip will keep noting that a newer pip version is available. Resist the temptation to upgrade. diff --git a/Jenkinsfile b/Jenkinsfile --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,7 +27,7 @@ node { stage('virtual env') { def virtualenvscript = """$createvirtualenv $activatevirtualenv - python -m pip install --upgrade pip + python -m pip install --upgrade "pip<24.1" pip install --upgrade "setuptools<67" pip install --upgrade pylint pip install --upgrade pytest-cov diff --git a/docs/contributing.rst b/docs/contributing.rst --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -33,7 +33,7 @@ bash shell:: cd kallithea python3 -m venv venv . venv/bin/activate - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam kallithea-cli config-create my.ini kallithea-cli db-create -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp diff --git a/docs/installation.rst b/docs/installation.rst --- a/docs/installation.rst +++ b/docs/installation.rst @@ -55,7 +55,7 @@ repository, use the following commands i cd kallithea python3 -m venv venv . venv/bin/activate - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" pip install --upgrade -e . python3 setup.py compile_catalog # for translation of the UI @@ -98,7 +98,7 @@ An additional benefit of virtualenv is t bash shell:: . /srv/kallithea/venv/bin/activate - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" .. note:: You can't use UNIX ``sudo`` to source the ``activate`` script; it will "activate" a shell that terminates immediately. diff --git a/docs/installation_win.rst b/docs/installation_win.rst --- a/docs/installation_win.rst +++ b/docs/installation_win.rst @@ -104,7 +104,7 @@ In a command prompt type (adapting paths cd C:\Kallithea\Env\Scripts activate - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar (depending of your folder structure). Then type:: diff --git a/docs/installation_win_old.rst b/docs/installation_win_old.rst --- a/docs/installation_win_old.rst +++ b/docs/installation_win_old.rst @@ -170,7 +170,7 @@ In that CMD (loaded with VS2008 PATHs) t cd C:\Kallithea\Env\Scripts (or similar) activate - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" The prompt will change into "(Env) C:\\Kallithea\\Env\\Scripts" or similar (depending of your folder structure). Then type:: diff --git a/scripts/dbmigrate-test b/scripts/dbmigrate-test --- a/scripts/dbmigrate-test +++ b/scripts/dbmigrate-test @@ -94,7 +94,7 @@ install_kallithea() { ( cd "$prefix" . "$prefix-env/bin/activate" - pip install --quiet --upgrade pip "setuptools<67" mercurial $EXTRA + pip install --quiet --upgrade "pip<24.1" "setuptools<67" mercurial $EXTRA pip install --quiet -e . ) } diff --git a/scripts/validate-commits b/scripts/validate-commits --- a/scripts/validate-commits +++ b/scripts/validate-commits @@ -42,7 +42,7 @@ for rev in $(hg log -r "$revset" -T '{no cleanup python3 -m venv "$venv" source "$venv/bin/activate" - pip install --upgrade pip "setuptools<67" + pip install --upgrade "pip<24.1" "setuptools<67" pip install -e . -r dev_requirements.txt python-ldap python-pam # run-all-cleanup diff --git a/scripts/validate-minimum-dependency-versions b/scripts/validate-minimum-dependency-versions --- a/scripts/validate-minimum-dependency-versions +++ b/scripts/validate-minimum-dependency-versions @@ -30,7 +30,7 @@ sed 's/>=/==/p' dev_requirements.txt >> python3 -m venv "$venv" source "$venv/bin/activate" -pip install --upgrade pip "setuptools<67" +pip install --upgrade "pip<24.1" "setuptools<67" pip install -e . -r "$min_requirements" python-ldap python-pam 2> >(tee "$log" >&2) # Treat any message on stderr as a problem, for the caller to interpret. diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -72,7 +72,7 @@ requirements = [ "paginate >= 0.5, < 0.6", "paginate_sqlalchemy >= 0.3.0, < 0.4", "bcrypt >= 3.1.0, < 3.2", - "pip >= 20.0, < 999", + "pip >= 20.0, < 24.1", "chardet >= 3", ] if sys.version_info < (3, 8):