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

Add in support for Django 5.0 by adding in compat functionality for datetime_safe #1666

Merged
merged 37 commits into from Jan 18, 2024

Conversation

chander
Copy link
Contributor

@chander chander commented Jan 9, 2024

This change adds in support for Django 5.0 in Tastypie by doing the following:

  1. Add in a compatability function.
  2. Update the tests to properly indicate the versions of python and django suitable for testing with this release.
  3. Ensure that tox tests pass properly.

Running Sphinx v7.2.6
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [doctest]: targets for 51 source files that are out of date
updating environment: [new config] 51 added, 0 changed, 0 removed
reading sources... [100%] who_uses
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
running tests...

Document: cookbook

1 items passed all tests:
16 tests in default
16 tests in 1 items.
16 passed and 0 failed.
Test passed.

Doctest summary

16 tests
0 failures in tests
0 failures in setup code
0 failures in cleanup code
build succeeded.

Testing of doctests in the sources finished, look at the results in ../tmp/html/output.txt.

Django 4.1 has changed the name of _sanitize_token to _check_token_format - handle the case(s) where the new name is required to be imported, rather than the old one.
Add django 4.1 to the tests
Certain django versions don't support the old python versions
…en) and replaced it with a new function called _check_token_format. The signature of these two functions is different, handle both cases for backwards compatibility
…n import, but flake doesn't like that when it's inline with other code - it just wants one
@coveralls
Copy link

coveralls commented Jan 9, 2024

Coverage Status

coverage: 94.303% (+0.03%) from 94.274%
when pulling e213f6d on chander:master
into 88e0218 on django-tastypie:master.

@chander
Copy link
Contributor Author

chander commented Jan 9, 2024

@georgedorn can you please review and merge to add Django 5.0 support to tastypie? Thanks

tests/settings.py Outdated Show resolved Hide resolved
@chander
Copy link
Contributor Author

chander commented Jan 10, 2024

@georgedorn should be good to go now -unless you have other changes?

@georgedorn georgedorn merged commit 1a57b0d into django-tastypie:master Jan 18, 2024
20 checks passed
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

3 participants