[New-bugs-announce] [issue1268] array unittest problems with UCS4 build

Christian Heimes report at bugs.python.org
Fri Oct 12 05:10:48 CEST 2007

New submission from Christian Heimes:

The array module is using a different typecode for unicode array
depending on UCS2 or UCS4:

#define Py_UNICODE_SIZE 4

#if Py_UNICODE_SIZE >= 4

#define PyArr_UNI 'w'
#define PyArr_UNISTR "w"
#define PyArr_UNI 'u'
#define PyArr_UNISTR "u"

It's causing a bunch of unit test to fail which depend on 'u' as the
type code for an unicode array. I don't see the benefit from specifying
an alternative typecode for wide unicode arrays. It may be useful to
have an additional typecode that fails for UCS-2 builds.

My patch keeps 'u' in every build and adds 'w' as an alias for 'u' in
UCS-4 builds only. It also introduces the new module variable typecodes
which is a unicode string containing all valid typecodes.

components: Extension Modules
files: py3k_array_typecode.patch
messages: 56353
nosy: tiran
severity: normal
status: open
title: array unittest problems with UCS4 build
versions: Python 3.0

Tracker <report at bugs.python.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: py3k_array_typecode.patch
Type: text/x-diff
Size: 8188 bytes
Desc: not available
Url : http://mail.python.org/pipermail/new-bugs-announce/attachments/20071012/ea9165dd/attachment-0001.patch 

More information about the New-bugs-announce mailing list