id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 10210,utils/cache.py _generate_cache_key expects headers to be string,daaku,nobody,"I'm using trunk@9817. Tests are failing in the auth module when the cache framework is enabled. This was with a new project, where I enabled admin (for getting templates for auth tests) and the cache middleware. {{{ Creating test database... Creating table django_admin_log Creating table auth_permission Creating table auth_group Creating table auth_user Creating table auth_message Creating table django_content_type Creating table django_session Creating table django_site Installing index for admin.LogEntry model Installing index for auth.Permission model Installing index for auth.Message model ...E.E.E.E...... ====================================================================== ERROR: test_confirm_complete (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/contrib/auth/tests/views.py"", line 81, in test_confirm_complete response = self.client.get(path) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 277, in get return self.request(**r) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 221, in request response = self.handler(environ) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 70, in __call__ response = middleware_method(request, response) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/middleware/cache.py"", line 93, in process_response cache_key = learn_cache_key(request, response, timeout, self.key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 192, in learn_cache_key return _generate_cache_key(request, headerlist, key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 145, in _generate_cache_key ctx.update(value) TypeError: update() argument 1 must be string or read-only buffer, not SimpleCookie ====================================================================== ERROR: test_confirm_invalid (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/contrib/auth/tests/views.py"", line 54, in test_confirm_invalid response = self.client.get(path) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 277, in get return self.request(**r) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 221, in request response = self.handler(environ) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 70, in __call__ response = middleware_method(request, response) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/middleware/cache.py"", line 93, in process_response cache_key = learn_cache_key(request, response, timeout, self.key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 192, in learn_cache_key return _generate_cache_key(request, headerlist, key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 145, in _generate_cache_key ctx.update(value) TypeError: update() argument 1 must be string or read-only buffer, not SimpleCookie ====================================================================== ERROR: test_confirm_valid (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/contrib/auth/tests/views.py"", line 43, in test_confirm_valid response = self.client.get(path) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 277, in get return self.request(**r) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 221, in request response = self.handler(environ) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 66, in __call__ response = self.get_response(request) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/core/handlers/base.py"", line 67, in get_response response = middleware_method(request) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/middleware/cache.py"", line 126, in process_request cache_key = get_cache_key(request, self.key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 165, in get_cache_key return _generate_cache_key(request, headerlist, key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 145, in _generate_cache_key ctx.update(value) TypeError: update() argument 1 must be string or read-only buffer, not SimpleCookie ====================================================================== ERROR: Error is raised if the provided email address isn't currently registered ---------------------------------------------------------------------- Traceback (most recent call last): File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/contrib/auth/tests/views.py"", line 16, in test_email_not_found response = self.client.get('/password_reset/') File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 277, in get return self.request(**r) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 221, in request response = self.handler(environ) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/test/client.py"", line 70, in __call__ response = middleware_method(request, response) File ""/Users/nshah/Development/arch-dev01/www/daaku/lib/django/middleware/cache.py"", line 93, in process_response cache_key = learn_cache_key(request, response, timeout, self.key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 192, in learn_cache_key return _generate_cache_key(request, headerlist, key_prefix) File ""/data/www/daaku/lib/django/utils/cache.py"", line 145, in _generate_cache_key ctx.update(value) TypeError: update() argument 1 must be string or read-only buffer, not SimpleCookie ---------------------------------------------------------------------- Ran 16 tests in 0.443s FAILED (errors=4) Destroying test database... }}} ",,closed,Core (Cache system),dev,,duplicate,,,Unreviewed,0,0,0,0,0,0