Opened 14 years ago
Closed 14 years ago
#15795 closed Bug (fixed)
[patch] __repr__ for RegexURLPattern not unicode safe
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | 1.3 |
Severity: | Normal | Keywords: | debug unicode |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
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.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | urlresolvers-r16022.diff added |
---|
comment:1 by , 14 years ago
Easy pickings: | unset |
---|---|
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Easy pickings: | set |
---|
comment:3 by , 14 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Patch that adds smart_str to the repr() function.