You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
only accept byte for getarg('c') and unicode for getarg('C') #49749
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-04-02.00:34:27.194>created_at=<Date2009-03-17.12:58:17.303>labels= ['release-blocker']
title="only accept byte for getarg('c') and unicode for getarg('C')"updated_at=<Date2009-04-02.08:23:07.851>user='https://github.com/vstinner'
unicode methods center(), ljust(), rjust() use a callback (convert_uc)
to get an unicode character (unicode string of 1 character). If 'C' is
fixed, convert_uc() callback can be removed.
Activity
vstinner commentedon Mar 17, 2009
To avoid byte/character mixture, getarg('c') must only accept a byte
string of 1 byte and getarg('C') only an unicode string of 1
character.
Impacted methods:
accept byte anymore
object>.write_byte(char): don't accept unicode anymore
I tried runtests.sh: only the 3 bytes.{center,ljust,rjust} tests have
to be changed, all other tests are ok.
Related issues: bpo-3446, bpo-5391.
vstinner commentedon Mar 17, 2009
unicode methods center(), ljust(), rjust() use a callback (convert_uc)
to get an unicode character (unicode string of 1 character). If 'C' is
fixed, convert_uc() callback can be removed.
ocean-city commentedon Mar 31, 2009
Note: bpo-5391 and bpo-5410 are depends on this issue.
gpshead commentedon Apr 1, 2009
good catch. the patch looks correct to me.
benjaminp commentedon Apr 2, 2009
Fixed in r71013.
vstinner commentedon Apr 2, 2009
Ooops, I read converterr("a unicode character", ...), but it should be
converterr("an unicode character", ...) ;-)
Thanks benjamin.peterson, it will help other issues like bpo-5391 and
bpo-5410.