buxeasywork / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

django-rosetta depends on Django 1.3, but this isn't in the dependencies #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm using Django 1.1 for a project. I installed django-rosetta 0.6.0 via pip. 
My django unittest don't work, with error "Exception: cannot import name 
receiver". I have tracked it down to the rosetta tests which import "reciever" 
from django 
(http://code.google.com/p/django-rosetta/source/browse/trunk/rosetta/tests/__ini
t__.py#5). However that name is not in that module in Django 1.1 
(http://code.djangoproject.com/browser/django/tags/releases/1.1/django/dispatch/
__init__.py) nor Django 1.2 
(http://code.djangoproject.com/browser/django/tags/releases/1.2/django/dispatch/
__init__.py)

If these tests only work with Django 1.3 (which does have this name 
http://code.djangoproject.com/browser/django/tags/releases/1.3/django/dispatch/_
_init__.py ), then the pip requirements should be corrected to show that 
django-rosetta depends on django 1.3.

Original issue reported on code.google.com by ebelu...@gmail.com on 28 Mar 2011 at 1:04

GoogleCodeExporter commented 9 years ago
Thanks for the heads-up. Is Rosetta working as expected on Django 1.1, apart 
the failing tests? 

Original comment by mbonetti on 28 Mar 2011 at 1:23

GoogleCodeExporter commented 9 years ago
Yes, aside from the failing tests, rosetta works on django 1.1 for our initial 
limited experience.

We're going to try to patch it so that the tests work on django 1.1. 

Original comment by ebelu...@gmail.com on 28 Mar 2011 at 2:13

GoogleCodeExporter commented 9 years ago
Thank you. You can use this idiom, which is also used on other tests:

  if self.django_version_major >=1 and self.django_version_minor >=3:

Original comment by mbonetti on 28 Mar 2011 at 2:25

GoogleCodeExporter commented 9 years ago
Here's a patch to make rosetta tests work on django 1.1. Rather than use a 
self.django_version* I tried to import it and if it fails, it'll redefine the 
function.

Original comment by ebelu...@gmail.com on 28 Mar 2011 at 2:43

Attachments:

GoogleCodeExporter commented 9 years ago
Here's a patch to update the setup.py file to list the Django 1.1 dependency. 
If the above make-work-on-django-1.1.py isn't used, then this should be changed 
to list ">=1.3"

Original comment by ebelu...@gmail.com on 28 Mar 2011 at 2:44

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for the patches, this is fixed on GitHub: 
https://github.com/mbi/django-rosetta/commit/eca151e9740abc5c721b12aa4d7ff9dc4a0
d20ad

Original comment by mbonetti on 27 Aug 2011 at 3:24