Skip to content

Commit b9af854

Browse files
Merge pull request #79 from csizmaziakiki/master
Add Python 3.11 and Django 4.2 support, remove Python 3.7 and Django …
2 parents 0b5f9b7 + 9228a37 commit b9af854

File tree

6 files changed

+26
-17
lines changed

6 files changed

+26
-17
lines changed

.github/workflows/tox.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
strategy:
1616
max-parallel: 1
1717
matrix:
18-
python-version: [3.7, 3.8, 3.9, '3.10']
18+
python-version: [3.8, 3.9, '3.10', '3.11']
1919
services:
2020
postgres:
21-
image: postgres:11
21+
image: postgres:12
2222
ports:
2323
- 5432:5432
2424
options: >-
@@ -31,7 +31,7 @@ jobs:
3131
POSTGRES_USER: travis
3232
POSTGRES_PASSWORD: travis
3333
mysql:
34-
image: mysql:5.7
34+
image: mysql:8
3535
ports:
3636
- 3306:3306
3737
options: >-

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Contributors
99
| `Robert MacCloy <https://github.com/rbm>`_
1010
| `Ben Lopatin <https://github.com/bennylope>`_
1111
| `Asher Foa <https://github.com/asherf>`_
12+
| `Krisztian Csizmazia <https://github.com/csizmaziakiki>`_

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
4.1.0 (2023-12-12)
5+
------------------
6+
- Support for Django 4.2
7+
- Support for Python 3.11
8+
- Remove support for Django 2.2, 3.0, 3.1
9+
- Remove support for Python 3.7
10+
- Require MySQL 8 and Postgres 12
11+
412
3.7.0 (2019-09-05)
513
------------------
614
- Support for Django 2.3

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
from setuptools.command.test import test as TestCommand
88

99
tests_require = (
10-
'pytest>=6.2.5,<7.2',
10+
'pytest>=6.2.5,<7.5',
1111
'pytest-django',
1212
)
1313

1414

1515
install_requires = (
16-
'Django>=2.2,<3.3',
16+
'Django>=3.2,<4.3',
1717
'richenum',
1818
)
1919

@@ -87,7 +87,7 @@ def run_tests(self):
8787

8888
setup(
8989
name='django-richenum',
90-
version='4.0.0',
90+
version='5.0.0',
9191
description='Django Enum library for python.',
9292
long_description=(
9393
open('README.rst').read() + '\n\n' +
@@ -96,10 +96,10 @@ def run_tests(self):
9696
classifiers=[
9797
'Development Status :: 5 - Production/Stable',
9898
'License :: OSI Approved :: MIT License',
99-
'Programming Language :: Python :: 3.7',
10099
'Programming Language :: Python :: 3.8',
101100
'Programming Language :: Python :: 3.9',
102101
'Programming Language :: Python :: 3.10',
102+
'Programming Language :: Python :: 3.11',
103103
'Programming Language :: Python :: Implementation :: CPython',
104104
],
105105
keywords='python django enum richenum',

src/django_richenum/admin/filters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django import forms
22
from django.contrib import admin
3-
from django.utils.encoding import smart_text
4-
from django.utils.translation import ugettext_lazy as _
3+
from django.utils.encoding import smart_str
4+
from django.utils.translation import gettext_lazy as _
55

66
from ..forms.fields import IndexEnumField as IndexEnumFormField
77
from ..forms.fields import CanonicalEnumField as CanonicalNameEnumFormField
@@ -47,7 +47,7 @@ def choices(self, cl):
4747

4848
for lookup, title in choices:
4949
yield {
50-
"selected": smart_text(lookup) == self.lookup_val,
50+
"selected": smart_str(lookup) == self.lookup_val,
5151
"query_string": cl.get_query_string({
5252
self.lookup_kwarg: lookup}),
5353
"display": title,

tox.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
[tox]
2-
envlist = {py37,py38,py39,py310}-django{220}-{sqlite,mysql,postgres},lint
3-
{py37,py38,py39,py310}-django{300,310,320}-{sqlite,mysql,postgres},lint
2+
envlist = {py38,py39,py310}-django{320,400,410,420}-{sqlite,mysql,postgres},lint
43

54
[gh-actions]
65
python =
7-
3.7: py37
86
3.8: py38
97
3.9: py39
108
3.10: py310
9+
3.11: py311
1110

1211
[testenv]
1312
deps =
14-
django220: Django>=2.2,<2.3
15-
django300: Django>=2.3,<3.1
16-
django310: Django>=3.1,<3.2
1713
django320: Django>=3.2,<3.3
18-
pytest>=6.2.5,<7.2
14+
django400: Django>=3.3,<4.1
15+
django410: Django>=4.1,<4.2
16+
django420: Django>=4.2,<4.3
17+
pytest>=6.2.5,<7.5
1918
pytest-django
2019
mysqlclient
2120
psycopg2
@@ -40,6 +39,7 @@ deps =
4039
flake8
4140
pytest
4241
pylint
42+
setuptools
4343
commands =
4444
flake8 tests src setup.py
4545
pylint --rcfile=pylint.rc src/django_richenum

0 commit comments

Comments
 (0)