Commits

James Bennett committed b3c41b3

Move import of Django's get_version into django-registration's get_version, to avoid dependency-order problems.

Comments (2)

  1. Rob Terhaar

    Confirmed that this does not fix the problem. If I have Django 1.4.5 installed, and I try to install this code, I get the following stack trace until I upgrade django to 1.5.1.

    Downloading/unpacking https://bitbucket.org/ubernostrum/django-registration/get/b3c41b3c7f50.zip (from -r requirements-dev.txt (line 20))
      Downloading b3c41b3c7f50.zip (133kB): 133kB downloaded
      Storing download in cache at /Users/rterhaar/.pip_download_cache/https%3A%2F%2Fbitbucket.org%2Fubernostrum%2Fdjango-registration%2Fget%2Fb3c41b3c7f50.zip
      Running setup.py egg_info for package from https://bitbucket.org/ubernostrum/django-registration/get/b3c41b3c7f50.zip
        Traceback (most recent call last):
          File "<string>", line 16, in <module>
          File "/var/folders/w8/8426fjsn0fg3f9_hcwpxhzz80000gn/T/pip-zy0wUm-build/setup.py", line 30, in <module>
            version=get_version().replace(' ', '-'),
          File "registration/__init__.py", line 5, in get_version
            from django.utils.version import get_version as django_get_version
        ImportError: cannot import name get_version
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
    
      File "<string>", line 16, in <module>
    
      File "/var/folders/w8/8426fjsn0fg3f9_hcwpxhzz80000gn/T/pip-zy0wUm-build/setup.py", line 30, in <module>
    
        version=get_version().replace(' ', '-'),
    
      File "registration/__init__.py", line 5, in get_version
    
        from django.utils.version import get_version as django_get_version
    
    ImportError: cannot import name get_version
    

Files changed (1)

registration/__init__.py

-from django.utils.version import get_version as django_get_version
-
-
 VERSION = (0, 9, 0, 'beta', 1)
 
 
 def get_version():
+    from django.utils.version import get_version as django_get_version
     return django_get_version(VERSION) # pragma: no cover
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.