skillfed

django-utils-six

Forward compatibility django.utils.six for Django 3

django-utils-six v2.0 249.0K downloads/30d#8,655 on PyPI7
Permissive license BSD-3-Clause Abandoned released

What it is and what it does

django-utils-six is a compatibility shim that restores the django.utils.six module for Django 3+. Django removed six in version 3, breaking libraries that depended on it for Python 2/3 compatibility utilities. This package copies the six implementation from Django 2.2 and makes it available as a standalone module, allowing legacy code to continue working without rewriting imports or compatibility logic.

The package is a thin wrapper with no external dependencies and supports Python 3.6, 3.7, and 3.8. It is intended as a temporary bridge for migrating codebases away from django.utils.six, not as a long-term solution. Since its only release on 2020-06-17, it has received no updates and is no longer maintained.

Use it for:

  • Migrate a Django 2.x codebase to Django 3+ without immediately refactoring all six imports
  • Unblock third-party libraries that still reference django.utils.six when upgrading to Django 3
  • Provide a compatibility layer while gradually replacing six utilities with native Python 3 equivalents
  • Test legacy Django middleware or utilities that depend on django.utils.six in a Django 3 environment

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides a backport of Django 2.2's django.utils.six module for Django 3+, enabling code written for older Django versions to run without modification.

Yes, but only as a temporary migration aid. Install this if you need to run Django 3+ code that still imports from django.utils.six and you cannot immediately refactor those imports. Do not rely on it long-term: the package is abandoned and will not track Django or Python version changes. Plan to remove the dependency by replacing six calls with native Python 3 equivalents.

Install

django-utils-six on PyPI

pip

pip install django-utils-six

uv

uv add django-utils-six

poetry

poetry add django-utils-six

Installing django-utils-six

Before you install

Installation is frictionless with no runtime dependencies, but the package has been abandoned since its single release and will not receive updates for newer Django versions or Python changes.

License in practice

BSD-3-Clause is a permissive open-source license with minimal restrictions; you can use this package freely in commercial and private projects.

Quickstart

pip install django-utils-six

from django.utils.six import string_types

if isinstance(value, string_types):
    pass

Requires Django 3 or later; does not work with Django 2.x where django.utils.six is already present

Verify before relying

  • Whether this backport remains compatible with Django versions released after 2020
  • Whether the backported six module covers all use cases that django.utils.six provided in Django 2.2
  • Whether Python versions beyond 3.8 are supported despite classifier declarations

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.6,<4.0)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,249 days since the last release
Last repo commit
First released
Downloads 249,038/month — #8,655 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_utils_six-2.0-py3-none-any.whl

Keywords: django, compatibility, six

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

django six compatibilitydjango utils six backportdjango 3 six moduleforward compatibility djangodjango 2.2 utils six
django-compatibilitymigration-aid

More Application Frameworks packages