Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
e112654f
Kaydet (Commit)
e112654f
authored
Kas 23, 2013
tarafından
Florian Apolloner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #21200 -- Consistantly raise errors across all cache backends.
Thanks to tchaumeny for the patch.
üst
0ec712dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
1.7.txt
docs/releases/1.7.txt
+12
-0
tests.py
tests/cache/tests.py
+15
-0
No files found.
docs/releases/1.7.txt
Dosyayı görüntüle @
e112654f
...
...
@@ -536,6 +536,18 @@ For apps with migrations, ``allow_migrate`` will now get passed
without custom attributes, methods or managers. Make sure your ``allow_migrate``
methods are only referring to fields or other items in ``model._meta``.
Behavior of ``LocMemCache`` regarding pickle errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An inconsistency existed in previous versions of Django regarding how pickle
errors are handled by different cache backends.
``django.core.cache.backends.locmem.LocMemCache`` used to fail silently when
such an error occurs, which is inconsistent with other backends and leads to
cache-specific errors. This has been fixed in Django 1.7, see
`Ticket #21200`_ for more details.
.. _Ticket #21200: https://code.djangoproject.com/ticket/21200
Passing ``None`` to ``Manager.db_manager()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
tests/cache/tests.py
Dosyayı görüntüle @
e112654f
...
...
@@ -48,6 +48,11 @@ class C:
return
24
class
Unpickable
(
object
):
def
__getstate__
(
self
):
raise
pickle
.
PickleError
()
@override_settings
(
CACHES
=
{
'default'
:
{
'BACKEND'
:
'django.core.cache.backends.dummy.DummyCache'
,
...
...
@@ -847,6 +852,16 @@ class BaseCacheTests(object):
self
.
assertEqual
(
get_cache_data
.
content
,
content
.
encode
(
'utf-8'
))
self
.
assertEqual
(
get_cache_data
.
cookies
,
response
.
cookies
)
def
test_add_fail_on_pickleerror
(
self
):
"See https://code.djangoproject.com/ticket/21200"
with
self
.
assertRaises
(
pickle
.
PickleError
):
cache
.
add
(
'unpickable'
,
Unpickable
())
def
test_set_fail_on_pickleerror
(
self
):
"See https://code.djangoproject.com/ticket/21200"
with
self
.
assertRaises
(
pickle
.
PickleError
):
cache
.
set
(
'unpickable'
,
Unpickable
())
@override_settings
(
CACHES
=
caches_setting_for_tests
(
BACKEND
=
'django.core.cache.backends.db.DatabaseCache'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment