Opened 10 years ago

Last modified 2 years ago

#23919 closed Cleanup/optimization

Cleanups for when we drop Python 2 compatibility — at Version 6

Reported by: Tim Graham Owned by: nobody
Component: Core (Other) Version:
Severity: Normal Keywords:
Cc: cmawebsite@…, Tom Forbes Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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.

Change History (6)

comment:1 by Wojtek Ruszczewski, 10 years ago

Various nonlocal workarounds (example).

comment:2 by Collin Anderson, 10 years ago

Description: modified (diff)

comment:3 by Tim Graham, 10 years ago

Description: modified (diff)

comment:4 by Anssi Kääriäinen, 10 years ago

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.

comment:5 by Collin Anderson, 10 years ago

Description: modified (diff)

comment:6 by Tim Graham, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top