[Django] #23919: Cleanups for when we drop Python 2 compatibility

209 views
Skip to first unread message

Django

unread,
Nov 25, 2014, 6:44:00 PM11/25/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Keywords:
Triage Stage: Someday/Maybe | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

--
Ticket URL: <https://code.djangoproject.com/ticket/23919>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 3, 2014, 10:12:38 AM12/3/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version:
Component: Core (Other) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by wrwrwr):

Various `nonlocal` workarounds
([https://github.com/django/django/blob/master/django/contrib/auth/tests/test_hashers.py#L227
example]).

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:1>

Django

unread,
Dec 18, 2014, 4:07:01 PM12/18/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version:
Component: Core (Other) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by collinanderson:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:2>

Django

unread,
Dec 19, 2014, 1:21:03 PM12/19/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version:
Component: Core (Other) | Resolution:
Severity: Normal | Triage Stage:
Keywords: | Someday/Maybe

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:3>

Django

unread,
Dec 19, 2014, 1:32:30 PM12/19/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by akaariai):

I believe we can get rid of the Field.creation_counter hack. In Python 3
it is possible to store the attrs in a sorted dictionary. See
http://stackoverflow.com/questions/4459531/how-to-read-class-attributes-
in-the-same-order-as-declared.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:4>

Django

unread,
Dec 28, 2014, 1:50:28 AM12/28/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 collinanderson:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156

* `django.core.mail.message.make_msgid()` #23905

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:5>

Django

unread,
Dec 29, 2014, 9:01:41 AM12/29/14
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * `django.core.mail.message.make_msgid()` #23905

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* `django.core.mail.message.make_msgid()` #23905

* Functions in `django.utils.http` like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:6>

Django

unread,
Jan 2, 2015, 8:54:17 AM1/2/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * `django.core.mail.message.make_msgid()` #23905
> * Functions in `django.utils.http` like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* `django.core.mail.message.make_msgid()` #23905
* Functions in `django.utils.http` like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.

* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:7>

Django

unread,
Jan 23, 2015, 12:22:05 PM1/23/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------
Changes (by collinanderson):

* cc: cmawebsite@… (added)


Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * `django.core.mail.message.make_msgid()` #23905
> * Functions in `django.utils.http` like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.dispatch.weakref_backports`
* `django.utils.2to3_fixes`
* `django.utils.lru_cache`
* `django.utils.html_parser.use_workaround`
* `django.utils.decorators.ContextDecorator`
* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`
* `@python_2_unicode_compatible`
* `from __future__ import unicode_literals`

* Lots of workarounds in `django.http.cookie`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* `django.core.mail.message.make_msgid()` #23905
* Functions in `django.utils.http` like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac

* `git grep 'long int'` (mostly docs)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:8>

Django

unread,
Jan 26, 2015, 12:26:19 PM1/26/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 collinanderson:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>
> * `django.dispatch.weakref_backports`
> * `django.utils.2to3_fixes`
> * `django.utils.lru_cache`
> * `django.utils.html_parser.use_workaround`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`
> * `@python_2_unicode_compatible`
> * `from __future__ import unicode_literals`

> * Lots of workarounds in `django.http.cookie`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * `django.core.mail.message.make_msgid()` #23905
> * Functions in `django.utils.http` like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the


versions of these functions on Python 3 don't have the unicode characters
bug we are working around.

* `django.utils.lru_cache`


* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156

* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:9>

Django

unread,
Apr 12, 2015, 8:09:21 AM4/12/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by funkybob):

In far too many tests we rely on the fact six aliases builtins [like
input] instead of using mock.

I submitted a patch recently to clean up a couple of these I found, but I
am finding more.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:10>

Django

unread,
Apr 12, 2015, 8:22:48 AM4/12/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 funkybob:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`

> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`

> * `from __future__ import unicode_literals`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`

* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`

* `from __future__ import unicode_literals`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)

* `django.utils._os [npath,upath]`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:11>

Django

unread,
Jul 6, 2015, 10:08:12 AM7/6/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`

> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`

> * `from __future__ import unicode_literals`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility (in a few years or so). Please edit the description of the
ticket as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`

* `django.utils.six`
* Change `inspect.getargspec()` (deprecated since 3.0) to
`inspect.getfullargspec()`

* `from __future__ import unicode_literals`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`

* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:12>

Django

unread,
Sep 24, 2015, 10:55:14 AM9/24/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop


> Python 2 compatibility (in a few years or so). Please edit the
> description of the ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`

> * `django.utils.six`
> * Change `inspect.getargspec()` (deprecated since 3.0) to
> `inspect.getfullargspec()`

> * `from __future__ import unicode_literals`
> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)

* Support for pysqlite (doesn't support Python 3)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:13>

Django

unread,
Sep 24, 2015, 2:37:24 PM9/24/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 MoritzS:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)

* Replace `super(ClassName, self)` with `super()`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:14>

Django

unread,
Sep 28, 2015, 10:34:02 AM9/28/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`

* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:15>

Django

unread,
Oct 31, 2015, 7:04:58 PM10/31/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 claudep:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)

* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:16>

Django

unread,
Nov 27, 2015, 1:34:49 PM11/27/15
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 charettes:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]

* Remove `__ne__` from objects already defining a `__eq__`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:17>

Django

unread,
Mar 8, 2016, 9:13:11 PM3/8/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 collinanderson:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]
> * Remove `__ne__` from objects already defining a `__eq__`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__`

* Remove note about PYTHONHASHSEED (see #26243)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:18>

Django

unread,
Mar 9, 2016, 1:59:57 AM3/9/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 akaariai:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]
> * Remove `__ne__` from objects already defining a `__eq__`
> * Remove note about PYTHONHASHSEED (see #26243)

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__`
* Remove note about PYTHONHASHSEED (see #26243)

* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:19>

Django

unread,
May 11, 2016, 11:42:24 AM5/11/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 timgraham:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]
> * Remove `__ne__` from objects already defining a `__eq__`
> * Remove note about PYTHONHASHSEED (see #26243)
> * Remove Field.creation_counter (replace by metaclass `__prepare__`
> returning `OrderedDict()`,
> https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
> namespace)

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__`
* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)

* `django.test.utils.reset_warning_registry()`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:20>

Django

unread,
Jun 1, 2016, 9:43:13 AM6/1/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 jdufresne:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]
> * Remove `__ne__` from objects already defining a `__eq__`
> * Remove note about PYTHONHASHSEED (see #26243)
> * Remove Field.creation_counter (replace by metaclass `__prepare__`
> returning `OrderedDict()`,
> https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
> namespace)
> * `django.test.utils.reset_warning_registry()`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__`
* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* `django.test.utils.reset_warning_registry()`

* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:21>

Django

unread,
Sep 6, 2016, 8:21:37 AM9/6/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 funkybob:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

> * `str()` stuff for environment variables, e.g.
> 0bfb53866199f366ed140d49938fd185e5898156
> * Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
> other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
> * `git grep 'long int'` (mostly docs)
> * `django.utils._os [npath,upath]`
> * In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
> longer needed)
> * Support for pysqlite (doesn't support Python 3)
> * Replace `super(ClassName, self)` with `super()`
> * Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
> default on Python 3)
> * Evaluate replacement of custom `__del__` methods by
> [https://docs.python.org/3/library/weakref.html#weakref.finalize
> weakref.finalize]
> * Remove `__ne__` from objects already defining a `__eq__`
> * Remove note about PYTHONHASHSEED (see #26243)
> * Remove Field.creation_counter (replace by metaclass `__prepare__`
> returning `OrderedDict()`,
> https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
> namespace)
> * `django.test.utils.reset_warning_registry()`
> * Replace `errno` checks by `IOError` subclasses defined by
> [https://www.python.org/dev/peps/pep-3151/ PEP 3151]

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__`
* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* `django.test.utils.reset_warning_registry()`
* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]

* `django.utils.glob`
* `django.utils.cookies.SimpleCookie`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:22>

Django

unread,
Sep 7, 2016, 6:53:45 AM9/7/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 funkybob:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* `django.test.mock`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:23>

Django

unread,
Sep 11, 2016, 11:34:57 AM9/11/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 jdufresne:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:24>

Django

unread,
Oct 2, 2016, 2:20:46 PM10/2/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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 Claude Paroz:

Old description:

> This is a tracking ticket of things that we can remove when we drop

> Python 2 compatibility in Django 2.0. Please edit the description of the


> ticket as you come across new items.
>

> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.
> * `django.utils.lru_cache`
> * `django.utils.six`

> * `from __future__ import unicode_literals`

New description:

This is a tracking ticket of things that we can remove when we drop Python

2 compatibility in Django 2.0. Please edit the description of the ticket


as you come across new items.

* `django.core.mail.message.make_msgid()` #23905


* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache`
* `django.utils.six`

* `from __future__ import unicode_literals`

* Replace `io.open()` by a plain `open()`

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:25>

Django

unread,
Dec 7, 2016, 7:57:05 AM12/7/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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:

New description:

* Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:26>

Django

unread,
Dec 21, 2016, 8:50:46 AM12/21/16
to django-...@googlegroups.com

Old description:

New description:

* `re.U`, `re.UNICODE` (default behavior of Python 3)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:27>

Django

unread,
Dec 30, 2016, 4:32:57 AM12/30/16
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

Note that I have a local branch which does some boring removals
(unicode_literals, utf-8 preambles, some six usage). So ping me as soon as
the Django 2.0 deprecated stuff is removed and I'll offer a patch for
that.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:28>

Django

unread,
Jan 18, 2017, 5:02:18 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Asif Saifuddin Auvi):

I am also working to remove python2 workarounds by following a module by
module approach.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:29>

Django

unread,
Jan 18, 2017, 5:19:29 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Aymeric Augustin):

If Claude has already prepared these changes, perhaps you should wait for
his patch instead of duplicating his work?

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:30>

Django

unread,
Jan 18, 2017, 6:36:07 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Asif Saifuddin Auvi):

Replying to [comment:30 Aymeric Augustin]:


> If Claude has already prepared these changes, perhaps you should wait
for his patch instead of duplicating his work?

Yes I talked with Claude on IRC to pause before his work is merged.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:31>

Django

unread,
Jan 18, 2017, 6:46:40 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Josh Smeaton):

Replying to [comment:4 Anssi Kääriäinen]:
> I believe we can get rid of the Field.creation_counter hack. In Python 3
it is possible to store the attrs in a sorted dictionary. See
http://stackoverflow.com/questions/4459531/how-to-read-class-attributes-
in-the-same-order-as-declared.

We could also remove this when we support python 3.6, as class attributes
retain their order. I'm guessing this is a consequence (or the cause of)
dictionaries retaining insertion order.
https://docs.python.org/3.6/whatsnew/3.6.html#pep-520-preserving-class-
attribute-definition-order

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:32>

Django

unread,
Jan 18, 2017, 7:30:53 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"d7b9aaa366dd54ecc3142c588162e3adc7c2f7ac" d7b9aaa]:
{{{
#!CommitTicketReference repository=""
revision="d7b9aaa366dd54ecc3142c588162e3adc7c2f7ac"
Refs #23919 -- Removed encoding preambles and future imports
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:33>

Django

unread,
Jan 18, 2017, 8:32:19 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Core (Other) | Version:
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
-------------------------------------+-------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"f3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca" f3c43ad]:
{{{
#!CommitTicketReference repository=""
revision="f3c43ad1fd9556f0fd026a5dfa93c67a5cf186ca"
Refs #23919 -- Removed python_2_unicode_compatible decorator usage
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:34>

Django

unread,
Jan 18, 2017, 10:01:38 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------

Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* stage: Someday/Maybe => Accepted


Comment:

[https://github.com/django/django/pull/7870 PR] for removing Python 2
references from docs.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:35>

Django

unread,
Jan 18, 2017, 11:49:14 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"c716fe87821df00f9f03ecc761c914d1682591a2" c716fe87]:
{{{
#!CommitTicketReference repository=""
revision="c716fe87821df00f9f03ecc761c914d1682591a2"
Refs #23919 -- Removed six.PY2/PY3 usage

Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:36>

Django

unread,
Jan 18, 2017, 11:51:51 AM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"f6acd1d271122d66de8061e75ae26137ddf02658" f6acd1d]:
{{{
#!CommitTicketReference repository=""
revision="f6acd1d271122d66de8061e75ae26137ddf02658"
Refs #23919 -- Removed Python 2 notes in docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:37>

Django

unread,
Jan 18, 2017, 2:20:20 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"7b2f2e74adb36a4334e83130f6abc2f79d395235" 7b2f2e74]:
{{{
#!CommitTicketReference repository=""
revision="7b2f2e74adb36a4334e83130f6abc2f79d395235"
Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:38>

Django

unread,
Jan 18, 2017, 3:34:54 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"2b281cc35ed9d997614ca3c416928d7fabfef1ad" 2b281cc3]:
{{{
#!CommitTicketReference repository=""
revision="2b281cc35ed9d997614ca3c416928d7fabfef1ad"
Refs #23919 -- Removed most of remaining six usage

Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:39>

Django

unread,
Jan 18, 2017, 4:08:43 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Aymeric Augustin:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* `django.dispatch.weakref_backports`
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* `@python_2_unicode_compatible`
* force/smart _unicode
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.

* `django.utils.lru_cache` - [https://github.com/django/django/pull/7877
PR 7877]


* `django.utils.six`
* `from __future__ import unicode_literals`
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* Remove `# -*- coding: utf-8 -*-` source file encoding (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]

* Remove `__ne__` from objects already defining a `__eq__` -
[https://github.com/django/django/pull/7877 PR 7877]


* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* `django.test.utils.reset_warning_registry()`
* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]
* `django.utils.glob`
* `django.utils.cookies.SimpleCookie`
* `django.test.mock`
* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager

* Replace `io.open()` by a plain `open()` -
[https://github.com/django/django/pull/7877 PR 7877]


* Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.
* `re.U`, `re.UNICODE` (default behavior of Python 3)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:40>

Django

unread,
Jan 18, 2017, 5:07:43 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Claude Paroz:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the
> ticket as you come across new items.
>
> * `django.core.mail.message.make_msgid()` #23905
> * `django.dispatch.weakref_backports`
> * `django.http.cookie` workarounds
> * `django.utils.2to3_fixes`
> * `django.utils.decorators.ContextDecorator`
> * `django.utils.encoding`
> * `@python_2_unicode_compatible`
> * force/smart _unicode
> * either force/smart _text or force/smart _str
> * `django.utils.html_parser.use_workaround`
> * `django.utils.http` functions like `urlquote_plus` -- I think the
> versions of these functions on Python 3 don't have the unicode characters
> bug we are working around.

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* ~~`django.dispatch.weakref_backports`~~


* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`

* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~


* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* `django.utils.lru_cache` - [https://github.com/django/django/pull/7877
PR 7877]

* `django.utils.six` - Remaining:
[https://github.com/django/django/pull/7878 PR 7878]
* ~~`from __future__ import unicode_literals`~~


* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`

* ~~Remove `# -*- coding: utf-8 -*-` source file encoding~~ (that's the


default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* Remove `__ne__` from objects already defining a `__eq__` -
[https://github.com/django/django/pull/7877 PR 7877]
* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* `django.test.utils.reset_warning_registry()`
* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]

* ~~`django.utils.glob`~~


* `django.utils.cookies.SimpleCookie`
* `django.test.mock`
* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager
* Replace `io.open()` by a plain `open()` -
[https://github.com/django/django/pull/7877 PR 7877]
* Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.
* `re.U`, `re.UNICODE` (default behavior of Python 3)

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:41>

Django

unread,
Jan 18, 2017, 5:33:21 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by felixxm:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the
> ticket as you come across new items.
>
> * `django.core.mail.message.make_msgid()` #23905

New description:

[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:42>

Django

unread,
Jan 18, 2017, 10:29:57 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"a5563963397aeee30c32e3c1dab31bfe453ca89f" a5563963]:
{{{
#!CommitTicketReference repository=""
revision="a5563963397aeee30c32e3c1dab31bfe453ca89f"
Refs #23919 -- Replaced io.open() with open().

io.open() is an alias for open() on Python 3.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:45>

Django

unread,
Jan 18, 2017, 10:29:58 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"eb422e476f3c0070dbf200bd62d97d12150c6fd9" eb422e47]:
{{{
#!CommitTicketReference repository=""
revision="eb422e476f3c0070dbf200bd62d97d12150c6fd9"
Refs #23919 -- Removed obsolete __ne__() methods.

__ne__() defaults to the opposite of __eq__() on Python 3
when it doesn't return NotImplemented.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:44>

Django

unread,
Jan 18, 2017, 10:29:58 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3cc5f01d9bd52930cec3c08d6ec7e19d0c2a6489" 3cc5f01d]:
{{{
#!CommitTicketReference repository=""
revision="3cc5f01d9bd52930cec3c08d6ec7e19d0c2a6489"
Refs #23919 -- Stopped using django.utils.lru_cache().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:43>

Django

unread,
Jan 18, 2017, 11:23:03 PM1/18/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Simon Charette:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* ~~`django.dispatch.weakref_backports`~~
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`
* `django.utils.decorators.ContextDecorator`
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.

* ~~Stop using `django.utils.lru_cache`~~
* Figure the deprecation plan for `django.utils.lru_cache`


* `django.utils.six` - Remaining:
[https://github.com/django/django/pull/7878 PR 7878]
* ~~`from __future__ import unicode_literals`~~
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps
other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac
* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* ~~Remove `# -*- coding: utf-8 -*-` source file encoding~~ (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]

* ~~Remove `__ne__` from objects already defining a `__eq__`~~


* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* `django.test.utils.reset_warning_registry()`
* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]
* ~~`django.utils.glob`~~
* `django.utils.cookies.SimpleCookie`
* `django.test.mock`
* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager

* ~~Replace `io.open()` by a plain `open()`~~


* Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.
* `re.U`, `re.UNICODE` (default behavior of Python 3) -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:46>

Django

unread,
Jan 19, 2017, 12:04:44 AM1/19/17
to django-...@googlegroups.com

Old description:

New description:

* `str()` stuff for `type(name)` and `__name__`.


* Inheriting from `object` in `django.core.servers.basehttp` (and perhaps

other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac --
[https://github.com/django/django/pull/7881 PR 7881]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:47>

Django

unread,
Jan 19, 2017, 2:40:15 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"cecc079168e8669138728d31611ff3a1e7eb3a9f" cecc079]:
{{{
#!CommitTicketReference repository=""
revision="cecc079168e8669138728d31611ff3a1e7eb3a9f"
Refs #23919 -- Stopped inheriting from object to define new style classes.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:48>

Django

unread,
Jan 19, 2017, 8:12:13 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Anand Reddy Pandikunta:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* ~~`django.dispatch.weakref_backports`~~
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`

* `django.utils.decorators.ContextDecorator` -
[https://github.com/django/django/pull/7887 PR 7887]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:49>

Django

unread,
Jan 19, 2017, 8:50:47 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"5320fa77c3b2bc02ac232c3e0f5279d99a528e6a" 5320fa7]:
{{{
#!CommitTicketReference repository=""
revision="5320fa77c3b2bc02ac232c3e0f5279d99a528e6a"
Refs #23919 -- Removed obsolete contextlib.closing() calls (for Python 2).
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:50>

Django

unread,
Jan 19, 2017, 10:56:40 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"e5c67f099159f522d140148fa1a6c876d38288f4" e5c67f0]:
{{{
#!CommitTicketReference repository=""
revision="e5c67f099159f522d140148fa1a6c876d38288f4"
Refs #23919 -- Removed reset_warning_registry() workaround for Python <
3.4.2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:51>

Django

unread,
Jan 19, 2017, 11:27:16 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Simon Charette <charette.s@…>):

In [changeset:"4c5ed3e683576ece880ae99398a1e7d8c5829617" 4c5ed3e6]:
{{{
#!CommitTicketReference repository=""
revision="4c5ed3e683576ece880ae99398a1e7d8c5829617"
Refs #23919 -- Removed __nonzero__() methods (for Python 2).

Thanks Tim for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:52>

Django

unread,
Jan 19, 2017, 11:28:56 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"41e0033caf1267edda2b780ae50a3881c3de94ef" 41e0033c]:
{{{
#!CommitTicketReference repository=""
revision="41e0033caf1267edda2b780ae50a3881c3de94ef"
Refs #23919 -- Removed usage of django.utils.decorators.ContextDecorator.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:53>

Django

unread,
Jan 19, 2017, 11:32:19 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Simon Charette <charette.s@…>):

In [changeset:"9695b149820cff31cfa48973efe4256c80811e87" 9695b14]:
{{{
#!CommitTicketReference repository=""
revision="9695b149820cff31cfa48973efe4256c80811e87"
Refs #23919 -- Removed str() conversion of type and method __name__.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:54>

Django

unread,
Jan 19, 2017, 11:37:24 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Simon Charette:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* `django.core.mail.message.make_msgid()` #23905
* ~~`django.dispatch.weakref_backports`~~
* `django.http.cookie` workarounds
* `django.utils.2to3_fixes`

* ~~`django.utils.decorators.ContextDecorator` ~~


* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str
* `django.utils.html_parser.use_workaround`
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* ~~Stop using `django.utils.lru_cache`~~
* Figure the deprecation plan for `django.utils.lru_cache`
* `django.utils.six` - Remaining:
[https://github.com/django/django/pull/7878 PR 7878]
* ~~`from __future__ import unicode_literals`~~
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156

* ~~`str()` stuff for `type(name)` and `__name__`~~
* ~~Inheriting from `object` in `django.core.servers.basehttp` (and
perhaps other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac~~


* `git grep 'long int'` (mostly docs)
* `django.utils._os [npath,upath]`
* In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)
* Support for pysqlite (doesn't support Python 3)
* Replace `super(ClassName, self)` with `super()`
* ~~Remove `# -*- coding: utf-8 -*-` source file encoding~~ (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* ~~Remove `__ne__` from objects already defining a `__eq__`~~
* Remove note about PYTHONHASHSEED (see #26243)
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)

* ~~`django.test.utils.reset_warning_registry()`~~


* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]
* ~~`django.utils.glob`~~
* `django.utils.cookies.SimpleCookie`
* `django.test.mock`
* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager
* ~~Replace `io.open()` by a plain `open()`~~
* Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.
* `re.U`, `re.UNICODE` (default behavior of Python 3) -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:55>

Django

unread,
Jan 19, 2017, 11:55:43 AM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"d4bb37593ed1cc0831404b6c5e8581e628d00f3b" d4bb3759]:
{{{
#!CommitTicketReference repository=""
revision="d4bb37593ed1cc0831404b6c5e8581e628d00f3b"
Refs #23919 -- Removed obsolete compare_digest() and pbkdf2()
implementations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:56>

Django

unread,
Jan 19, 2017, 12:58:38 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"9e917cc29181ad32abc21488ee70e739ce805f3a" 9e917cc2]:
{{{
#!CommitTicketReference repository=""
revision="9e917cc29181ad32abc21488ee70e739ce805f3a"
Fixed #23905, refs #23919 -- Used make_msgid() from stdlib.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:57>

Django

unread,
Jan 19, 2017, 1:19:46 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"9d27478958b50f2f689a103e39bf998fe7486675" 9d27478]:
{{{
#!CommitTicketReference repository=""
revision="9d27478958b50f2f689a103e39bf998fe7486675"
Refs #23919 -- Removed docs references to long integers.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:58>

Django

unread,
Jan 19, 2017, 1:57:03 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"9ee47ce7b45eaf1a9313f8c1680649a68cbb5681" 9ee47ce7]:
{{{
#!CommitTicketReference repository=""
revision="9ee47ce7b45eaf1a9313f8c1680649a68cbb5681"
Refs #23919 -- Removed enum ImportError handling for Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:59>

Django

unread,
Jan 19, 2017, 5:22:04 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"eb0b921c29ace8643a5a4cd136c433727c53dead" eb0b921c]:
{{{
#!CommitTicketReference repository=""
revision="eb0b921c29ace8643a5a4cd136c433727c53dead"
Refs #23919 -- Removed SessionBase.iterkeys(), itervalues(), iteritems().

These methods only work on Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:60>

Django

unread,
Jan 19, 2017, 8:07:22 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"fedda6d9bdbb7624ae36a791ef91aeca9ba6ab8d" fedda6d]:
{{{
#!CommitTicketReference repository=""
revision="fedda6d9bdbb7624ae36a791ef91aeca9ba6ab8d"
Refs #23919 -- Removed Python 2 version check in django.http.cookie.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:61>

Django

unread,
Jan 19, 2017, 10:20:37 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"bf1c9570270b46e9e92b256fb9be394258029bbf" bf1c9570]:
{{{
#!CommitTicketReference repository=""
revision="bf1c9570270b46e9e92b256fb9be394258029bbf"
Refs #23919 -- Removed Python 2 workaround for hashing Oracle params (refs
#27632).
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:62>

Django

unread,
Jan 19, 2017, 10:29:53 PM1/19/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
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:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* ~~`django.core.mail.message.make_msgid()`~~ #23905
* ~~`django.dispatch.weakref_backports`~~
* ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
* ~~`django.utils.2to3_fixes`~~


* ~~`django.utils.decorators.ContextDecorator` ~~
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str

* ~~`django.utils.html_parser.use_workaround`~~


* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* ~~Stop using `django.utils.lru_cache`~~

* ~~Figure the deprecation plan for `django.utils.lru_cache`~~ (staying
for now)


* `django.utils.six` - Remaining:
[https://github.com/django/django/pull/7878 PR 7878]
* ~~`from __future__ import unicode_literals`~~
* `str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156
* ~~`str()` stuff for `type(name)` and `__name__`~~
* ~~Inheriting from `object` in `django.core.servers.basehttp` (and
perhaps other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac~~

* ~~`git grep 'long int'` (mostly docs)~~
* ~~`django.utils._os [npath,upath]`~~
* ~~In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)~~


* Support for pysqlite (doesn't support Python 3)

[https://github.com/django/django/pull/7890 PR]


* Replace `super(ClassName, self)` with `super()`
* ~~Remove `# -*- coding: utf-8 -*-` source file encoding~~ (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* ~~Remove `__ne__` from objects already defining a `__eq__`~~

* ~~Remove note about PYTHONHASHSEED (see #26243)~~


* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* ~~`django.test.utils.reset_warning_registry()`~~
* Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]
* ~~`django.utils.glob`~~

* ~~`django.utils.cookies.SimpleCookie`~~ (remains for Python 3.4
compatibility)
* ~~`django.test.mock`~~


* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager
* ~~Replace `io.open()` by a plain `open()`~~

* ~~Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some


usage is merely to account for differences in messages between Python 2

and 3.~~


* `re.U`, `re.UNICODE` (default behavior of Python 3) -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:63>

Django

unread,
Jan 20, 2017, 12:19:32 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by ChillarAnand:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the
> ticket as you come across new items.
>

New description:

[https://github.com/django/django/pull/7905 PR]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:64>

Django

unread,
Jan 20, 2017, 2:45:37 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"dc8834cad41aa407f402dc54788df3cd37ab3e22" dc8834ca]:
{{{
#!CommitTicketReference repository=""
revision="dc8834cad41aa407f402dc54788df3cd37ab3e22"
Refs #23919 -- Removed unneeded force_str calls
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:65>

Django

unread,
Jan 20, 2017, 2:50:07 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Aymeric Augustin <aymeric.augustin@…>):

In [changeset:"109b33f64c8d3f48c9e0bd3ea8d42fe6f3cb02b7" 109b33f]:
{{{
#!CommitTicketReference repository=""
revision="109b33f64c8d3f48c9e0bd3ea8d42fe6f3cb02b7"
Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python
2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:66>

Django

unread,
Jan 20, 2017, 8:01:22 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"4e729feaa647547f25debb1cb63dec989dc41a20" 4e729fea]:
{{{
#!CommitTicketReference repository=""
revision="4e729feaa647547f25debb1cb63dec989dc41a20"
Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.

These functions do nothing on Python 3.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:67>

Django

unread,
Jan 20, 2017, 8:14:53 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"042b7350a080cc964f913faf1cf7f0097f650a58" 042b735]:
{{{
#!CommitTicketReference repository=""
revision="042b7350a080cc964f913faf1cf7f0097f650a58"
Refs #23919 -- Removed unneeded str() calls
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:68>

Django

unread,
Jan 20, 2017, 8:22:38 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Claude Paroz:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* ~~`django.core.mail.message.make_msgid()`~~ #23905
* ~~`django.dispatch.weakref_backports`~~
* ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
* ~~`django.utils.2to3_fixes`~~
* ~~`django.utils.decorators.ContextDecorator` ~~
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str
* ~~`django.utils.html_parser.use_workaround`~~
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* ~~Stop using `django.utils.lru_cache`~~
* ~~Figure the deprecation plan for `django.utils.lru_cache`~~ (staying
for now)
* `django.utils.six` - Remaining:
[https://github.com/django/django/pull/7878 PR 7878]
* ~~`from __future__ import unicode_literals`~~

* ~~`str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156~~

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:69>

Django

unread,
Jan 20, 2017, 9:01:25 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"7aba69145dcb436539a7798086748b73a39121e5" 7aba691]:
{{{
#!CommitTicketReference repository=""
revision="7aba69145dcb436539a7798086748b73a39121e5"
Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:70>

Django

unread,
Jan 20, 2017, 9:44:12 AM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"289fc1bfa54af563d17549ade8d77553711453a1" 289fc1bf]:
{{{
#!CommitTicketReference repository=""
revision="289fc1bfa54af563d17549ade8d77553711453a1"
Refs #23919 -- Removed str_prefix usage
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:71>

Django

unread,
Jan 20, 2017, 6:45:09 PM1/20/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"1b06d5e6f6be8e567ce78c892c485af039830d7d" 1b06d5e6]:
{{{
#!CommitTicketReference repository=""
revision="1b06d5e6f6be8e567ce78c892c485af039830d7d"
Refs #23919 -- Removed pysqlite support (it's Python 2 only).
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:72>

Django

unread,
Jan 21, 2017, 1:20:50 PM1/21/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"9e6e32bf5dce69f3257fcbe4ce80839fb65ab3df" 9e6e32bf]:
{{{
#!CommitTicketReference repository=""
revision="9e6e32bf5dce69f3257fcbe4ce80839fb65ab3df"
Refs #23919 -- Removed django.utils.decorators.available_attrs() usage.

It's only needed to workaround a bug on Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:73>

Django

unread,
Jan 21, 2017, 2:50:11 PM1/21/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"c22212220a7900173358a1f16179dcfc9e03de78" c222122]:
{{{
#!CommitTicketReference repository=""
revision="c22212220a7900173358a1f16179dcfc9e03de78"
Refs #23919 -- Removed re.U and re.UNICODE (default on Python 3).
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:74>

Django

unread,
Jan 21, 2017, 6:45:31 PM1/21/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by felixxm:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

* ~~`re.U`, `re.UNICODE` (default behavior of Python 3)~~ -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:75>

Django

unread,
Jan 21, 2017, 8:02:19 PM1/21/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"d170c63351944fd91b2206d10f89e7ff75b53b76" d170c63]:
{{{
#!CommitTicketReference repository=""
revision="d170c63351944fd91b2206d10f89e7ff75b53b76"
Refs #23919 -- Removed misc references to Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:76>

Django

unread,
Jan 22, 2017, 7:07:08 AM1/22/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by ChillarAnand:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python

context manager [https://github.com/django/django/pull/7922 PR]


* ~~Replace `io.open()` by a plain `open()`~~
* ~~Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.~~
* ~~`re.U`, `re.UNICODE` (default behavior of Python 3)~~ -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:77>

Django

unread,
Jan 22, 2017, 2:13:17 PM1/22/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba" 6e55e1d]:
{{{
#!CommitTicketReference repository=""
revision="6e55e1d88a5c4453e25f0caf7ffb68973de5c0ba"
Refs #23919 -- Replaced six.reraise by raise
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:78>

Django

unread,
Jan 22, 2017, 2:21:02 PM1/22/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Claude Paroz:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* ~~`django.core.mail.message.make_msgid()`~~ #23905
* ~~`django.dispatch.weakref_backports`~~
* ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
* ~~`django.utils.2to3_fixes`~~
* ~~`django.utils.decorators.ContextDecorator` ~~
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str
* ~~`django.utils.html_parser.use_workaround`~~
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* ~~Stop using `django.utils.lru_cache`~~
* ~~Figure the deprecation plan for `django.utils.lru_cache`~~ (staying
for now)

* ~~`django.utils.six`~~


* ~~`from __future__ import unicode_literals`~~
* ~~`str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156~~
* ~~`str()` stuff for `type(name)` and `__name__`~~
* ~~Inheriting from `object` in `django.core.servers.basehttp` (and
perhaps other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac~~
* ~~`git grep 'long int'` (mostly docs)~~
* ~~`django.utils._os [npath,upath]`~~
* ~~In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)~~

* ~~Support for pysqlite (doesn't support Python 3)~~

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:79>

Django

unread,
Jan 24, 2017, 8:32:20 AM1/24/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"435e4bf38e97255acd97eacadeb8fe312ba97aff" 435e4bf3]:
{{{
#!CommitTicketReference repository=""
revision="435e4bf38e97255acd97eacadeb8fe312ba97aff"
Refs #23919 -- Removed __traceback__ setting needed for Python 2.

Partially reverted refs #25761 and refs #16245.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:80>

Django

unread,
Jan 24, 2017, 10:17:20 AM1/24/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"5b95d421f7ab8deadaf3c1ad3f341bdfc85bfca4" 5b95d42]:
{{{
#!CommitTicketReference repository=""
revision="5b95d421f7ab8deadaf3c1ad3f341bdfc85bfca4"
Refs #23919 -- Removed a MySQLdb workaround (refs #6052) for Python 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:81>

Django

unread,
Jan 25, 2017, 10:13:30 AM1/25/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"632c4ffd9cb1da273303bcd8005fff216506c795" 632c4ffd]:
{{{
#!CommitTicketReference repository=""
revision="632c4ffd9cb1da273303bcd8005fff216506c795"
Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:82>

Django

unread,
Jan 25, 2017, 10:16:30 AM1/25/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"2d96c027f5eb32c2c09bd57df2240ae1d343b98e" 2d96c027]:
{{{
#!CommitTicketReference repository=""
revision="2d96c027f5eb32c2c09bd57df2240ae1d343b98e"
Refs #23919 -- Removed obsolete MySQLdb references.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:83>

Django

unread,
Jan 25, 2017, 11:53:47 AM1/25/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe" dc165ec8]:
{{{
#!CommitTicketReference repository=""
revision="dc165ec8e5698ffc6dee6b510f1f92c9fd7467fe"
Refs #23919 -- Replaced super(ClassName, self) with super() in docs.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:84>

Django

unread,
Jan 25, 2017, 1:37:22 PM1/25/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d6eaf7c0183cd04b78f2a55e1d60bb7e59598310" d6eaf7c]:
{{{
#!CommitTicketReference repository=""
revision="d6eaf7c0183cd04b78f2a55e1d60bb7e59598310"
Refs #23919 -- Replaced super(ClassName, self) with super().
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:85>

Django

unread,
Jan 25, 2017, 1:59:44 PM1/25/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"1c466994d9729a8902d34e277a3a685bef2a08e1" 1c466994]:
{{{
#!CommitTicketReference repository=""
revision="1c466994d9729a8902d34e277a3a685bef2a08e1"
Refs #23919 -- Removed misc Python 2/3 references.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:86>

Django

unread,
Jan 26, 2017, 3:32:03 AM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Aymeric Augustin:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python


2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* ~~`django.core.mail.message.make_msgid()`~~ #23905
* ~~`django.dispatch.weakref_backports`~~
* ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
* ~~`django.utils.2to3_fixes`~~
* ~~`django.utils.decorators.ContextDecorator` ~~
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str

[https://github.com/django/django/pull/7913 PR]


* ~~`django.utils.html_parser.use_workaround`~~
* `django.utils.http` functions like `urlquote_plus` -- I think the
versions of these functions on Python 3 don't have the unicode characters
bug we are working around.
* ~~Stop using `django.utils.lru_cache`~~
* ~~Figure the deprecation plan for `django.utils.lru_cache`~~ (staying
for now)
* ~~`django.utils.six`~~
* ~~`from __future__ import unicode_literals`~~
* ~~`str()` stuff for environment variables, e.g.
0bfb53866199f366ed140d49938fd185e5898156~~
* ~~`str()` stuff for `type(name)` and `__name__`~~
* ~~Inheriting from `object` in `django.core.servers.basehttp` (and
perhaps other places) ala 4ee06ec3fc8e94d164afbd2f9c880c60c658a9ac~~
* ~~`git grep 'long int'` (mostly docs)~~
* ~~`django.utils._os [npath,upath]`~~
* ~~In tests: `contextlib.closing(self.urlopen` (`contextlib.closing` no
longer needed)~~
* ~~Support for pysqlite (doesn't support Python 3)~~

* ~~Replace `super(ClassName, self)` with `super()`~~


[https://github.com/django/django/pull/7905 PR]
* ~~Remove `# -*- coding: utf-8 -*-` source file encoding~~ (that's the
default on Python 3)
* Evaluate replacement of custom `__del__` methods by
[https://docs.python.org/3/library/weakref.html#weakref.finalize
weakref.finalize]
* ~~Remove `__ne__` from objects already defining a `__eq__`~~
* ~~Remove note about PYTHONHASHSEED (see #26243)~~
* Remove Field.creation_counter (replace by metaclass `__prepare__`
returning `OrderedDict()`,
https://docs.python.org/3/reference/datamodel.html#preparing-the-class-
namespace)
* ~~`django.test.utils.reset_warning_registry()`~~

* ~~Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]~~
[https://github.com/django/django/pull/7915 PR]


* ~~`django.utils.glob`~~
* ~~`django.utils.cookies.SimpleCookie`~~ (remains for Python 3.4
compatibility)
* ~~`django.test.mock`~~
* Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager [https://github.com/django/django/pull/7922 PR]
* ~~Replace `io.open()` by a plain `open()`~~
* ~~Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.~~
* ~~`re.U`, `re.UNICODE` (default behavior of Python 3)~~ -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:87>

Django

unread,
Jan 26, 2017, 8:43:12 AM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"d1bab24e0144d14513a1411503c95ececb425188" d1bab24]:
{{{
#!CommitTicketReference repository=""
revision="d1bab24e0144d14513a1411503c95ececb425188"
Refs #23919, #27778 -- Removed obsolete mentions of unicode.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:88>

Django

unread,
Jan 26, 2017, 1:49:42 PM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"fee42fd99ee470528858c2ccb3621135c30ec262" fee42fd9]:
{{{
#!CommitTicketReference repository=""
revision="fee42fd99ee470528858c2ccb3621135c30ec262"
Refs #23919 -- Replaced usage of django.utils.http utilities with Python
equivalents

Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:89>

Django

unread,
Jan 26, 2017, 1:54:34 PM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6478e07a62ce968f33e71a345e561bce36923f8e" 6478e07]:
{{{
#!CommitTicketReference repository=""
revision="6478e07a62ce968f33e71a345e561bce36923f8e"
Refs #23919 -- Replaced tempfile.mkdtemp() with TemporaryDirectory()
context manager.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:90>

Django

unread,
Jan 26, 2017, 2:17:17 PM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by Claude Paroz:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

This is a tracking ticket of things that we can remove when we drop Python
2 compatibility in Django 2.0. Please edit the description of the ticket
as you come across new items.

* ~~`django.core.mail.message.make_msgid()`~~ #23905
* ~~`django.dispatch.weakref_backports`~~
* ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
* ~~`django.utils.2to3_fixes`~~
* ~~`django.utils.decorators.ContextDecorator` ~~
* `django.utils.encoding`
* ~~`@python_2_unicode_compatible`~~
* ~~force/smart _unicode~~
* either force/smart _text or force/smart _str
[https://github.com/django/django/pull/7913 PR]
* ~~`django.utils.html_parser.use_workaround`~~

* ~~`django.utils.http` functions like `urlquote_plus` -- I think the


versions of these functions on Python 3 don't have the unicode characters

bug we are working around.~~

* ~~Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager~~


* ~~Replace `io.open()` by a plain `open()`~~
* ~~Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.~~
* ~~`re.U`, `re.UNICODE` (default behavior of Python 3)~~ -
[https://github.com/django/django/pull/7879 PR 7879]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:91>

Django

unread,
Jan 26, 2017, 2:21:29 PM1/26/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Description changed by ChillarAnand:

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the
> ticket as you come across new items.
>
> * ~~`django.core.mail.message.make_msgid()`~~ #23905
> * ~~`django.dispatch.weakref_backports`~~
> * ~~`django.http.cookie` workarounds~~ (remains for Python 3.4)
> * ~~`django.utils.2to3_fixes`~~
> * ~~`django.utils.decorators.ContextDecorator` ~~
> * `django.utils.encoding`
> * ~~`@python_2_unicode_compatible`~~
> * ~~force/smart _unicode~~
> * either force/smart _text or force/smart _str
> [https://github.com/django/django/pull/7913 PR]
> * ~~`django.utils.html_parser.use_workaround`~~

New description:

bug we are working around [https://github.com/django/django/pull/7953 PR]

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:92>

Django

unread,
Jan 27, 2017, 12:46:44 PM1/27/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"e07e743e0c375b380748561d18b975c8211a4a01" e07e743e]:
{{{
#!CommitTicketReference repository=""
revision="e07e743e0c375b380748561d18b975c8211a4a01"
Refs #23919 -- Used DeclarativeFieldsMetaclass.__prepare__() for tracking
form field order.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:93>

Django

unread,
Jan 27, 2017, 5:40:11 PM1/27/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"9e9e73735e9aa651b5c8ad7a700f90ccb5d3b18b" 9e9e7373]:
{{{
#!CommitTicketReference repository=""
revision="9e9e73735e9aa651b5c8ad7a700f90ccb5d3b18b"
Refs #23919 -- Removed an obsolete test for a Python 2 code path (refs
#15662).

Fixed #21628 by removing the last usage of the imp module.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:94>

Django

unread,
Jan 29, 2017, 1:04:20 AM1/29/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Josh Smeaton):

I had an attempt at dropping the creation_counter for model fields, but I
*think* it might be more costly than the current method, considering so
many things rely on the order being consistent. My attempt was here, with
associated discussion I'll copy some of below:
https://github.com/django/django/pull/7983

> I'm not sure this is worth continuing with, at least not in the same
way. Too many systems rely on the fields being ordered, which isn't going
to be possible without maintaining another list of fields such as
definition_order = []. This can be done for local fields, but then
proxy/parent fields will need to be returned in the same definition order.
This might be something like:

{{{
parent_fields + [field for field in self.definition_order if field in
local_fields]
}}}

> Then we'd need to account for private and hidden fields. But what's the
point? We'd now be storing a separate list of all field references for
each model, rather than a counter (int) on each field, and reordering
fields in _get_fields() whether or not they need to be ordered. Of course
I'd be happy to see a better solution that worked, I'm just giving up on
this particular method for the moment.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:95>

Django

unread,
Jan 30, 2017, 7:32:02 AM1/30/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Old description:

> This is a tracking ticket of things that we can remove when we drop
> Python 2 compatibility in Django 2.0. Please edit the description of the

New description:

* ~~Remove Field.creation_counter (replace by metaclass `__prepare__`

namespace)~~ (see comment:95)


* ~~`django.test.utils.reset_warning_registry()`~~
* ~~Replace `errno` checks by `IOError` subclasses defined by
[https://www.python.org/dev/peps/pep-3151/ PEP 3151]~~
[https://github.com/django/django/pull/7915 PR]
* ~~`django.utils.glob`~~
* ~~`django.utils.cookies.SimpleCookie`~~ (remains for Python 3.4
compatibility)
* ~~`django.test.mock`~~
* ~~Replace `tempfile.mkdtemp` + remove with `tempfile.TemporaryDirectory`
context manager~~
* ~~Replace `io.open()` by a plain `open()`~~
* ~~Evaluate need for `assertRegex`, `assertRaisesRegex` in tests. Some
usage is merely to account for differences in messages between Python 2
and 3.~~
* ~~`re.U`, `re.UNICODE` (default behavior of Python 3)~~ -
[https://github.com/django/django/pull/7879 PR 7879]

--

Comment (by Tim Graham):

I also looked briefly at models field and manager usage of
`creation_counter` but it wasn't obvious if the `__prepare__()` approach
was feasible or if it would be simpler. I think we can defer that task for
now.

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:96>

Django

unread,
Jan 30, 2017, 8:14:42 AM1/30/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"c688336ebcc1bddc65f2d48e15b981b6caa7ef1a" c688336e]:
{{{
#!CommitTicketReference repository=""
revision="c688336ebcc1bddc65f2d48e15b981b6caa7ef1a"
Refs #23919 -- Assumed request COOKIES and META are str
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:97>

Django

unread,
Jan 30, 2017, 9:05:32 AM1/30/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Claude Paroz <claude@…>):

In [changeset:"52138b1fd08f80fe98def7e22a9693415b4f7744" 52138b1f]:
{{{
#!CommitTicketReference repository=""
revision="52138b1fd08f80fe98def7e22a9693415b4f7744"
Refs #23919 -- Removed usage of obsolete SafeBytes class

The class will be removed as part of #27753.


Thanks Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:98>

Django

unread,
Jan 31, 2017, 6:31:25 PM1/31/17
to django-...@googlegroups.com
#23919: Cleanups for when we drop Python 2 compatibility
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (Other) | Version:
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"84126f2789542b7dfe68ac6cb3a088e3a072db0d" 84126f27]:
{{{
#!CommitTicketReference repository=""
revision="84126f2789542b7dfe68ac6cb3a088e3a072db0d"
Refs #23919 -- Removed unneeded code in force_text().

Unneeded since 7b2f2e74adb36a4334e83130f6abc2f79d395235.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23919#comment:99>

It is loading more messages.
0 new messages