[patch] __repr__ for RegexURLPattern not unicode safe
An instance of RegexURLPattern is returned by the url() function, which can be used as an argument to patterns() for the URLConf. The url arguments for regex and name could contain unicode. However, the __repr__ function handle this data as bytestring and could raise a UnicodeDecodeError: 'ascii' codec can't decode byte. RegexURLResolver should be affected too.
Change History
(5)
| Easy pickings: |
unset
|
| Needs tests: |
set
|
| Triage Stage: |
Unreviewed → Accepted
|
| Triage Stage: |
Accepted → Ready for checkin
|
| Resolution: |
→ fixed
|
| Status: |
new → closed
|
Patch that adds smart_str to the repr() function.