Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adamchainz
Copy link

@adamchainz adamchainz commented May 9, 2024

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.

@@ -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:
Copy link
Author

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.

Comment on lines 17 to +46
- 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
Copy link
Author

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.

Comment on lines -1 to -3
#-*- coding:utf-8 -*-
from __future__ import unicode_literals

Copy link
Author

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+

Comment on lines +2 to +7
envlist =
py38-django{32}
py39-django{32,41,42}
py310-django{32,41,42,50}
py311-django{41,42,50}
py312-django{42,50}
Copy link
Author

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.

Comment on lines +10 to +16
set_env =
DJANGO_SETTINGS_MODULE=testsettings
commands =
python \
-W error::DeprecationWarning \
-W error::PendingDeprecationWarning \
-m django test
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant