-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
django.utils.datetime_safe module is removed in Django v5.0 #1902
Comments
Django 5.0 is now out, and this issue now officially is a problem A link to proposed solution is documented above... |
Agreed. This is blocking our upgrade to Django v5.0. django-haystack/haystack/fields.py Line 5 in eb3f1d5
https://docs.djangoproject.com/en/5.0/releases/5.0/#features-removed-in-5-0 |
Django now uses django.utils.formats.sanitize_strftime_format() to handle what datetime_safe was doing previously. |
Are you able to create a PR for that? |
I'm not certain that haystack needs to sanitize the date strings. Django only seems to do this in a few very specific and important instances, and in one instance, django.utils.feedgenerator, they just replaced datetime_safe with python's native datetime. |
Fixed in #1915 but not yet released to PyPI. Workaround for Django v5.0 deployments: |
@cclauss Thanks! Any ETA on a PyPI release? |
When we run
pytest
on our project, we receive:https://github.com/search?q=repo%3Adjango-haystack%2Fdjango-haystack%20datetime_safe
haystack/fields.py
haystack/backends/whoosh_backend.py
test_haystack/whoosh_tests/test_whoosh_backend.py
As discussed but not implemented in #1828 @jayvdb
https://docs.djangoproject.com/en/5.0/releases/5.0
https://docs.djangoproject.com/en/5.0/releases/5.0/#features-removed-in-5-0
Expected behavior
No pytest warnings.
Actual behavior
Pytest warnings.
Steps to reproduce the behavior
%
pytest
Configuration
The text was updated successfully, but these errors were encountered: