Skip to content

Commit

Permalink
deps: Bump minimal Django version to 4.2
Browse files Browse the repository at this point in the history
- This is current LTS release.
- Needed for RenameIndex operation in the migrations.
- Adjusted migrations CI to use older Python for older version.
- Bump miminal Python, PostgreSQL, MySQL and MariaDB versions.
  • Loading branch information
nijel committed May 3, 2023
1 parent 24f9a7e commit 730ecc7
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 13 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ jobs:
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: |
3.7
3.11
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install pip dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
Expand All @@ -41,7 +40,7 @@ jobs:
requirements: latest
database: mariadb
# Reduced testing for minimal deps
- python-version: 3.7
- python-version: 3.8
requirements: minimal
database: postgresql
# Reduced testing for edge deps
Expand Down
2 changes: 1 addition & 1 deletion ci/pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ "${1:-latest}" = migrations ] ; then
# shellcheck disable=SC2046
pip install $(grep -E '^(Cython|pycairo)[>=<]' requirements.txt)
# shellcheck disable=SC2046
pip install $(grep -E '^(psycopg2|mysqlclient)' requirements-optional.txt)
pip install $(grep -E '^(psycopg|mysqlclient)' requirements-optional.txt)
# shellcheck disable=SC2046
pip install $(grep -E '^coverage[>=<]' requirements-test.txt)
pip install -r requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions ci/run-migrate
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ check
git checkout "$TAG"
check
# Use clean virtualenv for each version, this avoids pip problems when trying to downgrade from current versions
virtualenv ".venv-$TAG"
virtualenv --python python3.7 ".venv-$TAG"
check
# shellcheck source=/dev/null
. ".venv-$TAG/bin/activate"
Expand All @@ -47,7 +47,7 @@ pip install selenium==4.0.0a6.post2
pip install importlib-metadata==4.12.0
pip install -r requirements.txt
# shellcheck disable=SC2046
pip install $(grep -E '^(psycopg2|mysqlclient)' requirements-optional.txt)
pip install $(grep -E '^(psycopg|mysqlclient)' requirements-optional.txt)
check
echo "DATABASES['default']['HOST'] = '$CI_DB_HOST'" >> weblate/settings_test.py
check
Expand Down
4 changes: 3 additions & 1 deletion docs/admin/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ Database setup for Weblate

It is recommended to run Weblate with a PostgreSQL database server.

PostgreSQL 12 and higher is supported.

.. seealso::

:ref:`production-database`,
Expand Down Expand Up @@ -436,7 +438,7 @@ Weblate can be also used with MySQL or MariaDB, please see
Django with those. Because of the limitations it is recommended to use
:ref:`postgresql` for new installations.

Weblate requires MySQL at least 5.7.8 or MariaDB at least 10.2.7.
Weblate requires MySQL at least 8 or MariaDB at least 10.4.

Following configuration is recommended for Weblate:

Expand Down
10 changes: 10 additions & 0 deletions docs/admin/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,16 @@ Please follow :ref:`generic-upgrade-instructions` in order to perform update.

.. seealso:: :ref:`generic-upgrade-instructions`

Upgrade from 4.17 to 4.18
~~~~~~~~~~~~~~~~~~~~~~~~~

Please follow :ref:`generic-upgrade-instructions` in order to perform update.

* Dropped support for PostgreSQL 10, 11, MySQL 5.7 and MariaDB 10.2, 10.3.
* Dropped support for Python 3.7.

.. seealso:: :ref:`generic-upgrade-instructions`

.. _py3:

Upgrading from Python 2 to Python 3
Expand Down
2 changes: 1 addition & 1 deletion requirements-optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ mysqlclient>=2.0.1
# PHP
phply>=1.2.6,<1.3
# Postgres
psycopg2-binary>=2.8.0,<2.10.0
psycopg>=3.1.8,<4
# Antispam
python-akismet>=0.4.2,<0.5
# SAML
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ cssselect>=1.2,<1.3
Cython>=0.29.14,<0.30
diff-match-patch==20230430
django-appconf>=1.0.3,<1.1
django-celery-beat>=2.4.0,<2.6
django-compressor>=2.4,<5
django-celery-beat>=2.5.0,<2.6
django-compressor>=4.0,<5
django-cors-headers>=3.13.0,<3.15
django-crispy-forms>=2.0.0,<2.1
django-filter>=2.4.0,<23.3
django-redis>=4.11.0,<6.0
Django[argon2]>=3.2,<4.3
djangorestframework>=3.11.0,<3.15
Django[argon2]>=4.2,<4.3
djangorestframework>=3.14.0,<3.15
filelock>=3.7,<3.13
GitPython>=2.1.15,<3.2
hiredis>=1.0.1,<2.3
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class WeblateBuild(build):
setup(
name="Weblate",
version="4.18",
python_requires=">=3.7",
python_requires=">=3.8",
packages=find_packages(),
include_package_data=True,
description=(
Expand Down

0 comments on commit 730ecc7

Please sign in to comment.