Registry / web-framework / django-utils-six

django-utils-six

JSON →
library2.0pypypi✓ verified 84d ago

django-utils-six is a Python library (version 2.0) designed to provide forward compatibility for `django.utils.six` in Django 3.0 and later versions. `django.utils.six` was a Python 2/3 compatibility module bundled with Django, but it was removed in Django 3.0. This library fills that gap, allowing older third-party applications that still depend on `from django.utils import six` to function correctly without modification in Django 3+ environments. It is a niche compatibility layer with infrequent releases.

pip install django-utils-six
INSTALL
IMPORT
SIG · DJANGO-UTILS-SIX
D
django-utils-six
web-frameworkpythonv2.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

six
from django.utils import six
from django_utils_six import six

Install django-utils-six. This package automatically makes `django.utils.six` available, allowing third-party libraries that rely on this deprecated import to function on Django 3+ without modification. There is no typical direct code usage; its primary role is passive compatibility.

pip install django-utils-six
Debug
Known issues
breakingDjango 3.0 and later versions removed `django.utils.six`. Projects or third-party applications attempting to import `django.utils.six` will raise an `ImportError`.
fix
Install `django-utils-six` to restore the `django.utils.six` path, or upgrade affected third-party packages to versions compatible with Django 3+, or refactor custom code to remove `six` usage for Python 3-only projects.
affects: Django 3.0+
deprecatedThe underlying `six` library, and thus `django-utils-six`, is primarily for Python 2/3 compatibility. With Python 2 end-of-life, `six` is largely unnecessary for new Python 3-only projects.
fix
For new projects targeting Python 3 exclusively, avoid `six` and refactor code to use native Python 3 features (e.g., `str` instead of `six.text_type`). For older projects, use this library as a temporary bridge while migrating away from `six`.
affects: All versions
gotchaThis library is a temporary solution for legacy dependencies. Relying on `django-utils-six` long-term is not ideal; the recommended approach is to ensure all dependencies are compatible with modern Django and Python versions that do not require `six`.
fix
Prioritize updating or replacing third-party packages that depend on `django.utils.six`. If maintaining custom code, refactor `six` imports and usage to directly use `import six` (if necessary) or Python 3 constructs.
affects: All versions
Upgrade
Version history
2.0latest on PyPI · released Jun 17, 2020
Audit
Dependencies
sixrequiredThis library bundles and re-exposes the 'six' compatibility library.
Agent activity
2 hits · last 30 days
node
2
Resources
django-utils-six — pip install django-utils-six · libregistry