#27795 closed Cleanup/optimization (fixed)
Audit force_text invocations
| Reported by: | Claude Paroz | Owned by: | Claude Paroz | 
|---|---|---|---|
| Component: | Utilities | Version: | dev | 
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no | 
| Needs tests: | no | Patch needs improvement: | no | 
| Easy pickings: | no | UI/UX: | no | 
Description
django.utils.encoding.force_text is called many times in Django code for several use cases:
- force the evaluation of a lazy string
 - convert bytes or a bytestring (PY2) to str
 - convert an object to its string representation
 
A global audit is needed to clean that usage, also considering that Python 3 native strings are more wildly used.
I'm working on it currently.
Change History (40)
comment:1 by , 9 years ago
comment:39 by , 6 years ago
| Resolution: | → fixed | 
|---|---|
| Status: | assigned → closed | 
I think this is mostly done now.
  Note:
 See   TracTickets
 for help on using tickets.
    
In ccfd1295: