Benjamin Peterson benja...@python.org added the comment:
Done in r78027.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
___
Python-bugs-list mailing
Barry A. Warsaw ba...@python.org added the comment:
Really trivial back port of r68805 from trunk.
--
assignee: - benjamin.peterson
components: +Interpreter Core -Library (Lib)
keywords: +needs review
resolution: accepted -
stage: - patch review
status: closed - open
type: feature
Barry A. Warsaw ba...@python.org added the comment:
release blocker for 2.6.5
--
priority: - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Why backport? Isn't this a new feature?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
Barry A. Warsaw ba...@python.org added the comment:
Maybe not. It's arguably a bug that adding unicode_literals breaks keyword
arguments. Guido seems to (mostly) agree that it's a bug we just never got
around to fixing.
http://www.mail-archive.com/python-...@python.org/msg45346.html
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The patch looks good now.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
___
Benjamin Peterson benja...@python.org added the comment:
Thanks for the reviews! Applied in r68805.
--
resolution: - accepted
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The patch works when the unicode contains only ascii, but crashes with
the following input:
def f(hehe): return 42
...
f(**{u'hehe': 1})
42
f(**{u'héhé': 1})
Segmentation fault
The two PyString_AsString(keyword) calls are now wrong
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Sorry, but _PyUnicode_AsDefaultEncodedString returns either a borrowed
reference (if
errors==NULL) or a new reference (if errors!=NULL).
In either case it's wrong to DECREF the string when you simply take the
buffer's
address:
Changes by Benjamin Peterson benja...@python.org:
--
keywords: +patch
Added file: http://bugs.python.org/file12782/unicode_kwds.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4978
___
11 matches
Mail list logo