Skip to content

Commit

Permalink
release 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wd0517 committed Aug 18, 2023
1 parent 5dc2a33 commit 799303b
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 272 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
django-version:
- '3.2.20'
- '4.1.10'
- '4.2.4'
tidb-version:
- 'v7.1.1'
Expand All @@ -47,9 +46,6 @@ jobs:
tidb-version: 'v4.0.15'
- django-version: '4.2.4'
tidb-version: 'v5.4.3'
# Django 3.2 is under extended support, some functions are not compatible with Python 3.11
- python-version: '3.11'
django-version: '3.2.20'

name: py${{ matrix.python-version }}_tidb${{ matrix.tidb-version }}_django${{ matrix.django-version }}
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions django_test_apps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dates
datetimes
db_typecasts
db_utils
db_functions
defer
defer_regress
delete
Expand Down
6 changes: 4 additions & 2 deletions django_test_suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ export PYTHONUNBUFFERED=1
export DJANGO_TESTS_DIR="django_tests_dir"
mkdir -p $DJANGO_TESTS_DIR

pip3 install .
pip3 install -e .
git clone --depth 1 --branch $DJANGO_VERSION https://github.com/django/django.git $DJANGO_TESTS_DIR/django
cp tidb_settings.py $DJANGO_TESTS_DIR/django/tidb_settings.py
cp tidb_settings.py $DJANGO_TESTS_DIR/django/tests/tidb_settings.py

cd $DJANGO_TESTS_DIR/django && pip3 install -e . && pip3 install -r tests/requirements/py3.txt && pip3 install -r tests/requirements/mysql.txt; cd ../../
# Do not install django in editable mode until this issue is fixed: https://github.com/python/cpython/issues/108078
# Django Ticket: https://code.djangoproject.com/ticket/34780
cd $DJANGO_TESTS_DIR/django && pip3 install . && pip3 install -r tests/requirements/py3.txt && pip3 install -r tests/requirements/mysql.txt; cd ../../
cd $DJANGO_TESTS_DIR/django/tests

EXIT_STATUS=0
Expand Down
2 changes: 1 addition & 1 deletion django_tidb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
# wrong version of Django is installed.
from .functions import register_functions

__version__ = "3.0.0"
__version__ = "4.2.0"

register_functions()
308 changes: 51 additions & 257 deletions django_tidb/features.py

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,15 @@ authors = [
]
description = "Django backend for TiDB"
readme = "README.md"
requires-python = ">=3.6"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
5 changes: 5 additions & 0 deletions tidb_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
USE_TZ = False
SECRET_KEY = 'django_tests_secret_key'

# Use a fast hasher to speed up tests.
PASSWORD_HASHERS = [
"django.contrib.auth.hashers.MD5PasswordHasher",
]
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@

[tox]
alwayscopy=true
envlist = py310,py39,py38,py37,lint
envlist = py311,py310,py39,py38,lint

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
Expand Down

0 comments on commit 799303b

Please sign in to comment.