-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fix colon mis-caching issue #33
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 40 41 +1
=====================================
+ Hits 40 41 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 40 41 +1
=====================================
+ Hits 40 41 +1
Continue to review full report at Codecov.
|
Linting issues. Anything we can do to help make that easier to work with before making PRs? |
|
||
fun('a:b', 'c') | ||
fun('a', 'b:c') | ||
assert len(calls_made) == 2 |
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.
Can you extend this unit test to do one with non-ascii parameters.
E.g.
fun('a', 'ä:á')
or whatever it is.
Also, what would happen if you pass byte string instead. E.g. b'ë'
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.
Sure thing.
TBH I just forgot to run |
The usage of quote() is inspired by Django's own `make_template_fragment_key`. Fixes peterbe#32
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.
Looks great. I didn't test it manually but tests look good.
This PR fixes #32.
The fix itself is inspired by Django's
make_template_fragment_key
: https://github.com/django/django/blob/76b3fc5c8d8dffb441aaa08f75833888be2107af/django/core/cache/utils.py#L10