Re: [Django] #19221: Check that cache keys are string

2024-03-24 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  Mark Hughes  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by DKPHUONG):

 * owner:  DKPHUONG => (none)
 * status:  assigned => new

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e6f39cb61-04956734-fd4c-4baa-8349-a7fd476a0653-00%40eu-central-1.amazonses.com.


Re: [Django] #19221: Check that cache keys are string

2024-03-23 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  Mark Hughes  |Owner:  DKPHUONG
 Type:  Bug  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by DKPHUONG):

 * owner:  (none) => DKPHUONG
 * status:  new => assigned

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e6ec3be31-51732d1b-b10b-458c-a036-75b7be5a02e6-00%40eu-central-1.amazonses.com.


Re: [Django] #19221: Check that cache keys are string

2024-03-12 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  Mark Hughes  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Ülgen Sarıkavak):

 * cc: Ülgen Sarıkavak (added)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018e316c884b-d9156015-f5e5-4c18-8dfe-ba55f9bdfcf4-00%40eu-central-1.amazonses.com.


Re: [Django] #19221: Check that cache keys are string

2022-03-11 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  Mark Hughes  |Owner:  (none)
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  dev
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Mariusz Felisiak):

 * owner:  Dan Stephenson => (none)
 * status:  assigned => new


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107017f78741a5f-5e377152-1028-428d-9be1-d99d73cf364b-00%40eu-central-1.amazonses.com.


Re: [Django] #19221: Check that cache keys are string

2020-04-16 Thread Django
#19221: Check that cache keys are string
-+-
 Reporter:  Mark Hughes  |Owner:  Dan
 |  Stephenson
 Type:  Bug  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Balazs Endresz):

 The `default_key_func` is still the old version in the docs, which fails
 with any non-string arguments:
 https://github.com/django/django/blob/stable/3.0.x/docs/ref/settings.txt#L171

 Btw, not just the `key` but the `key_prefix` can be non-string too. What
 tripped me up was this in the test settings:
 `CACHES['default']['KEY_PREFIX'] = random()` when used with the
 `KEY_PREFIX` code snippet from the docs.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b843676af0d5e24d73e7060e58460e15%40djangoproject.com.


Re: [Django] #19221: Check that cache keys are string

2017-01-14 Thread Django
#19221: Check that cache keys are string
-+-
 Reporter:  Mark Hughes  |Owner:  Dan
 |  Stephenson
 Type:  Bug  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Dan Stephenson):

 Can i propose prepending the name of the keys object type, to fix the
 issue of `42` and `"42"` pointing at same data as it does currently.

 {{{
 return '%s:%s:%s_%s' % (key_prefix, version, type(key).__name__, key)
 }}}


 The challenge for this change would be in how we handle pre-existing cache
 keys after Django is upgraded.

 - We could add some code into the **has_key** function temporarily, so
 that in scenarios where it returns None, there is an additional check
 against the legacy format, if something is found, we would update the
 cache key (delete the old one), and return it.

 or

 - Add an advisory to the release notes that the internal cache naming has
 changed, and to prevent orphaned keys taking up space, its recommended to
 flush existing caches alongside the version upgrade.

 comments welcome!

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.736173d853562ed12d2f9d997ed776a6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19221: Check that cache keys are string

2017-01-14 Thread Django
#19221: Check that cache keys are string
-+-
 Reporter:  Mark Hughes  |Owner:  Dan
 |  Stephenson
 Type:  Bug  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Dan Stephenson):

 * status:  new => assigned
 * cc: dan@… (added)
 * owner:  nobody => Dan Stephenson


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.bdfa6528e234d0b4c8646eb4db874f2e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19221: Check that cache keys are string

2016-12-22 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  Mark Hughes  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by Tim Graham):

 * cc: Carl Meyer (added)


Comment:

 Carl, I thought this might be a good task for a new-ish contributor but
 I'm not sure what the implementation of "assume string and only do more
 work if that assumption fails" might look like. It looks like you're
 suggesting not to use `isinstance` but I'm not sure what the alternative
 is.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.3a18f84f1f53597542a5c24f376a0378%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #19221: Check that cache keys are string

2013-02-25 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  mhsparks |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by carljm):

 I agree that implicitly converting `42` and `"42"` to be the same cache
 key is bad, and we should migrate away from it with an appropriate
 deprecation path. (I think the patch to do so should take some care to
 "assume string and only do more work if that assumption fails" rather than
 "check pre-emptively", in order to preserve all possible speed in the
 common case.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #19221: Check that cache keys are string (was: Cache keys can't be integers)

2013-02-24 Thread Django
#19221: Check that cache keys are string
-+
 Reporter:  mhsparks |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by aaugustin):

 * stage:  Design decision needed => Accepted


Comment:

 Since no one had a better idea, let's do what I explained above.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.