Skip to content

Commit

Permalink
Merge pull request #79 from csizmaziakiki/master
Browse files Browse the repository at this point in the history
Add Python 3.11 and Django 4.2 support, remove Python 3.7 and Django …
  • Loading branch information
csizmaziakiki authored Dec 13, 2023
2 parents 0b5f9b7 + 9228a37 commit b9af854
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
strategy:
max-parallel: 1
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: [3.8, 3.9, '3.10', '3.11']
services:
postgres:
image: postgres:11
image: postgres:12
ports:
- 5432:5432
options: >-
Expand All @@ -31,7 +31,7 @@ jobs:
POSTGRES_USER: travis
POSTGRES_PASSWORD: travis
mysql:
image: mysql:5.7
image: mysql:8
ports:
- 3306:3306
options: >-
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Contributors
| `Robert MacCloy <https://github.com/rbm>`_
| `Ben Lopatin <https://github.com/bennylope>`_
| `Asher Foa <https://github.com/asherf>`_
| `Krisztian Csizmazia <https://github.com/csizmaziakiki>`_
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

4.1.0 (2023-12-12)
------------------
- Support for Django 4.2
- Support for Python 3.11
- Remove support for Django 2.2, 3.0, 3.1
- Remove support for Python 3.7
- Require MySQL 8 and Postgres 12

3.7.0 (2019-09-05)
------------------
- Support for Django 2.3
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
from setuptools.command.test import test as TestCommand

tests_require = (
'pytest>=6.2.5,<7.2',
'pytest>=6.2.5,<7.5',
'pytest-django',
)


install_requires = (
'Django>=2.2,<3.3',
'Django>=3.2,<4.3',
'richenum',
)

Expand Down Expand Up @@ -87,7 +87,7 @@ def run_tests(self):

setup(
name='django-richenum',
version='4.0.0',
version='5.0.0',
description='Django Enum library for python.',
long_description=(
open('README.rst').read() + '\n\n' +
Expand All @@ -96,10 +96,10 @@ def run_tests(self):
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
],
keywords='python django enum richenum',
Expand Down
6 changes: 3 additions & 3 deletions src/django_richenum/admin/filters.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django import forms
from django.contrib import admin
from django.utils.encoding import smart_text
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_str
from django.utils.translation import gettext_lazy as _

from ..forms.fields import IndexEnumField as IndexEnumFormField
from ..forms.fields import CanonicalEnumField as CanonicalNameEnumFormField
Expand Down Expand Up @@ -47,7 +47,7 @@ def choices(self, cl):

for lookup, title in choices:
yield {
"selected": smart_text(lookup) == self.lookup_val,
"selected": smart_str(lookup) == self.lookup_val,
"query_string": cl.get_query_string({
self.lookup_kwarg: lookup}),
"display": title,
Expand Down
14 changes: 7 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[tox]
envlist = {py37,py38,py39,py310}-django{220}-{sqlite,mysql,postgres},lint
{py37,py38,py39,py310}-django{300,310,320}-{sqlite,mysql,postgres},lint
envlist = {py38,py39,py310}-django{320,400,410,420}-{sqlite,mysql,postgres},lint

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

[testenv]
deps =
django220: Django>=2.2,<2.3
django300: Django>=2.3,<3.1
django310: Django>=3.1,<3.2
django320: Django>=3.2,<3.3
pytest>=6.2.5,<7.2
django400: Django>=3.3,<4.1
django410: Django>=4.1,<4.2
django420: Django>=4.2,<4.3
pytest>=6.2.5,<7.5
pytest-django
mysqlclient
psycopg2
Expand All @@ -40,6 +39,7 @@ deps =
flake8
pytest
pylint
setuptools
commands =
flake8 tests src setup.py
pylint --rcfile=pylint.rc src/django_richenum
Expand Down

0 comments on commit b9af854

Please sign in to comment.