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 core redis compat if django 4+ #397

Merged
merged 4 commits into from
Jun 16, 2022

Conversation

glasnt
Copy link
Sponsor Contributor

@glasnt glasnt commented Jun 15, 2022

Resolves #356

Now django-environ supports Django 4.0, this feature can be added: use the core redis library by default if running Django 4.0

(Would appreciate input how to best test this)

@sergeyklay
Copy link
Collaborator

@glasnt Could you please send this PR to develop branch?

@glasnt glasnt changed the base branch from main to develop June 16, 2022 07:34
@glasnt
Copy link
Sponsor Contributor Author

glasnt commented Jun 16, 2022

@sergeyklay that should be fixed now. My apologies!

@coveralls
Copy link

coveralls commented Jun 16, 2022

Coverage Status

Coverage increased (+0.06%) to 91.667% when pulling 7ee07ab on glasnt:feat/redis-django into 27fcdc3 on joke2k:develop.

@sergeyklay
Copy link
Collaborator

@glasnt Tests failed. See logs

2022-06-16T07:50:12.1170507Z     def test_cache_parsing(url, backend, location):
2022-06-16T07:50:12.1170795Z         url = Env.cache_url_config(url)
2022-06-16T07:50:12.1171022Z     
2022-06-16T07:50:12.1171332Z >       assert url['BACKEND'] == backend
2022-06-16T07:50:12.1171863Z E       AssertionError: assert 'django.core....is.RedisCache' == 'django_redis...he.RedisCache'
2022-06-16T07:50:12.1172533Z E         - django_redis.cache.RedisCache
2022-06-16T07:50:12.1172876Z E         + django.core.cache.backends.redis.RedisCache

Could you adjust tests? Also note I changed a bit your patch.

@sergeyklay sergeyklay added the enhancement New feature or request label Jun 16, 2022
@sergeyklay sergeyklay self-assigned this Jun 16, 2022
@sergeyklay sergeyklay merged commit 6985d8f into joke2k:develop Jun 16, 2022
@sergeyklay
Copy link
Collaborator

Thank you for the patch, and for helping make this project better!

@glasnt
Copy link
Sponsor Contributor Author

glasnt commented Jun 16, 2022

Thank you @sergeyklay for your help on this one! I was going to address your comments this morning but you've already done it! ✨

@glasnt glasnt deleted the feat/redis-django branch June 16, 2022 22:25
@sergeyklay
Copy link
Collaborator

Yes, I wanted to merge it ASAP. Thank you very much for your input!

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

Successfully merging this pull request may close these issues.

Feature request: support default redis backend
3 participants