diff options
| author | Tymur Maryokhin | 2014-12-04 16:06:43 +0100 | 
|---|---|---|
| committer | Tymur Maryokhin | 2014-12-04 16:06:43 +0100 | 
| commit | 001884a1927f6ceaa60dcc2a4df3422f94455311 (patch) | |
| tree | 260cd45e906a28e6ab16300c380561c0f07f918f /rest_framework | |
| parent | 95af92ca01435c32f4374d26eb448f964d77c81a (diff) | |
| download | django-rest-framework-001884a1927f6ceaa60dcc2a4df3422f94455311.tar.bz2 | |
Removed unused compat code
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/compat.py | 27 | 
1 files changed, 0 insertions, 27 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index c58aa4ce..71520b92 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -61,15 +61,6 @@ if 'guardian' in settings.INSTALLED_APPS:          pass -# UserDict moves in Python 3 -try: -    from UserDict import UserDict -    from UserDict import DictMixin -except ImportError: -    from collections import UserDict -    from collections import MutableMapping as DictMixin - -  def get_model_name(model_cls):      try:          return model_cls._meta.model_name @@ -177,11 +168,6 @@ class RequestFactory(DjangoRequestFactory):                  'CONTENT_TYPE': six.text_type(content_type),                  'wsgi.input': FakePayload(data),              }) -        elif django.VERSION <= (1, 4): -            # For 1.3 we need an empty WSGI payload -            r.update({ -                'wsgi.input': FakePayload('') -            })          r.update(extra)          return self.request(**r) @@ -278,16 +264,3 @@ if six.PY3:  else:      SHORT_SEPARATORS = (b',', b':')      LONG_SEPARATORS = (b', ', b': ') - - -# Handle lazy strings across Py2/Py3 -from django.utils.functional import Promise - -if six.PY3: -    def is_non_str_iterable(obj): -        if isinstance(obj, str) or (isinstance(obj, Promise) and obj._delegate_text): -            return False -        return hasattr(obj, '__iter__') -else: -    def is_non_str_iterable(obj): -        return hasattr(obj, '__iter__') | 
