-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Django 5.0 and Python 3.12 #101
base: master
Are you sure you want to change the base?
Conversation
@@ -247,7 +243,7 @@ def test_parse_file_with_only_carriage_returns(self): | |||
|
|||
parser = CSVParser() | |||
|
|||
with open(CSVFILE, 'rbU' if sys.version_info <= (3, 10) else 'rb') as csv_file: | |||
with open(CSVFILE, 'rb') as csv_file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The U
flag triggers a DeprecationWarning
on Python 3.8 still, and is not necessary.
- python: 3.8 | ||
TOXENV: py38-django32-drf3 | ||
TOXENV: py38-django32 | ||
|
||
- python: 3.9 | ||
TOXENV: py39-django32-drf3 | ||
TOXENV: py39-django32 | ||
- python: 3.9 | ||
TOXENV: py39-django41-drf3 | ||
TOXENV: py39-django41 | ||
- python: 3.9 | ||
TOXENV: py39-django42-drf3 | ||
TOXENV: py39-django42 | ||
|
||
- python: '3.10' | ||
TOXENV: py310-django32-drf3 | ||
TOXENV: py310-django32 | ||
- python: '3.10' | ||
TOXENV: py310-django41-drf3 | ||
TOXENV: py310-django41 | ||
- python: '3.10' | ||
TOXENV: py310-django42-drf3 | ||
TOXENV: py310-django42 | ||
- python: '3.10' | ||
TOXENV: py310-django50 | ||
|
||
- python: '3.11' | ||
TOXENV: py311-django41-drf3 | ||
TOXENV: py311-django41 | ||
- python: '3.11' | ||
TOXENV: py311-django42 | ||
- python: '3.11' | ||
TOXENV: py311-django42-drf3 | ||
TOXENV: py311-django50 | ||
|
||
- python: '3.12' | ||
TOXENV: py311-django42 | ||
- python: '3.12' | ||
TOXENV: py311-django50 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped the -drf3
suffix and added the new Django 5.0 / Python 3.12 environments.
#-*- coding:utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These don’t have an effect on Python 3+
envlist = | ||
py38-django{32} | ||
py39-django{32,41,42} | ||
py310-django{32,41,42,50} | ||
py311-django{41,42,50} | ||
py312-django{42,50} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dropped the drf3
from the environment names because there’s no split of versions, and it doesn’t seem like DRF will ever have a version 4 now.
set_env = | ||
DJANGO_SETTINGS_MODULE=testsettings | ||
commands = | ||
python \ | ||
-W error::DeprecationWarning \ | ||
-W error::PendingDeprecationWarning \ | ||
-m django test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using set_env
+ python -m django
instead of having a manage.py
script in the repo - fewer files are easier to manage.
Using -W error
for deprecation warnings to ensure the package doesn’t trigger any warnings, so users don’t have to see them. I use this configuration on all of my open source projects.
Upgrade to these new versions and improve the testing process a bit.
Thank you for this package, my client is getting great use from it.