#27753: Cleanups when no supported version of Django supports Python 2 anymore
-------------------------------------+-------------------------------------
Reporter: Aymeric Augustin | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Tim Graham:
Old description:
> Compatibility with Python 2 is currently being removed in master as part
> of the Django 2.0 development cycle: see #23919.
>
> However third-party apps may want to remain compatible with all supported
> version of Django and the corresponding versions of Python, which
> includes Python 2.
>
> To allow this, compatibility functions or modules aren't removed. They're
> still importable. They're usually just aliases or no-ops. Here's a list
> of things to deprecate and remove eventually:
>
> - django.utils.six
> - django.utils.lru_cache
> - django.utils._os.abspathu, upath, npath
> - django.utils.decorators.available_attrs
> - django.utils.encoding.python_2_unicode_compatible
> - django.utils.encoding.smart/force_text
> - django.utils.http.urlquote/urlquote_plus/urlunquote/urlunquote_plus
> ([https://github.com/django/django/pull/7906/commits/5861ce799ddb3f5912f9e16503d4239fa9d80e66
> unmerged commit])
> - django.utils.safestring.SafeBytes
> - One of either
> [https://github.com/django/django/blob/9718fa2e8abe430c3526a9278dd976443d4ae3c6/django/utils/safestring.py#L61
> django.utils.safestring.SafeString] or django.utils.safestring.SafeText
> - django.test.utils.str_prefix()
> - django.utils.encoding.DjangoUnicodeDecodeError
> - `django.utils.functional.curry()` (in favor of
> `functools.partial()`/`partialmethod()`; see
> 5b1c389603a353625ae1603ba345147356336afb)
New description:
Compatibility with Python 2 is currently being removed in master as part
of the Django 2.0 development cycle: see #23919.
However third-party apps may want to remain compatible with all supported
version of Django and the corresponding versions of Python, which includes
Python 2.
To allow this, compatibility functions or modules aren't removed. They're
still importable. They're usually just aliases or no-ops. Here's a list of
things to deprecate and remove eventually:
- django.utils.six
- django.utils.lru_cache
- django.utils._os.abspathu, upath, npath
- django.utils.decorators.available_attrs
- django.utils.encoding.python_2_unicode_compatible
- django.utils.encoding.smart/force_text
- django.utils.http.urlquote/urlquote_plus/urlunquote/urlunquote_plus
([https://github.com/django/django/pull/7906/commits/5861ce799ddb3f5912f9e16503d4239fa9d80e66
unmerged commit])
- django.utils.safestring.SafeBytes
- One of either
[https://github.com/django/django/blob/9718fa2e8abe430c3526a9278dd976443d4ae3c6/django/utils/safestring.py#L61
django.utils.safestring.SafeString] or django.utils.safestring.SafeText
- django.test.utils.str_prefix()
- django.utils.encoding.DjangoUnicodeDecodeError
- `django.utils.functional.curry()` (in favor of
`functools.partial()`/`partialmethod()`; see
5b1c389603a353625ae1603ba345147356336afb)
- django.test.utils.patch_logger()
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27753#comment:17>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.1846d44b2cfde30e289ac372e6262781%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.