getsentry/raven-python — pull request #172 by doismellburning (2012-08-17 20:21:24+00:00)
Title: Django 1.4

So I'm looking to use Raven with Django 1.4, and I noticed that, from `setup.py` and `.travis.yml` that there seems to be only "Official" support for 1.3.

I've tweaked things as appropriate to cover 1.4 but I've got one failing test on travis: http://travis-ci.org/#!/doismellburning/raven-python/jobs/2154312 - failing output below:

======================================================================
ERROR: test_handles_gettext_lazy (tests.contrib.django.tests.PromiseSerializerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/vagrant/builds/doismellburning/raven-python/tests/contrib/django/tests.py", line 614, in test_handles_gettext_lazy
transform(fake_gettext_lazy("something")))),
File "/usr/lib/python2.7/pickle.py", line 1374, in dumps
Pickler(file, protocol).dump(obj)
File "/usr/lib/python2.7/pickle.py", line 224, in dump
self.save(obj)
File "/usr/lib/python2.7/pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib/python2.7/pickle.py", line 401, in save_reduce
save(args)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 562, in save_tuple
save(element)
File "/usr/lib/python2.7/pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib/python2.7/pickle.py", line 748, in save_global
(obj, module, name))
PicklingError: Can't pickle : it's not found as tests.contrib.django.tests.fake_gettext

----------------------------------------------------------------------
Ran 166 tests in 2.283s

FAILED (errors=1)

The document at http://code.google.com/p/modwsgi/wiki/IssuesWithPickleModule gives some seemingly-useful advice; I'm looked at `django.utils.functional` between 1.3 and 1.4 at the moment to try to work out what's different.

I *suspect* from the `modwsgi` article above that it's a moderately spurious failure; `lazy()` has changed such that pickle can't find the original, and otherwise all tests pass, but I want to fix the test ideally...

Anyway, basically, this is a placeholder pull request for my "attempting to get things fully working for Django 1.4"; it's not complete and I fully acknowledge this, but consider it a placeholder and that any help or advice would be welcomed! Thanks