<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_unicode.py, branch v2.2a3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_unicode.py?h=v2.2a3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_unicode.py?h=v2.2a3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2001-07-25T16:05:59Z</updated>
<entry>
<title>Fix for bug #444493: u'\U00010001' segfaults with current CVS on</title>
<updated>2001-07-25T16:05:59Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-07-25T16:05:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=80d1dd5f3b83c96c5c8e4a51417f1c748318de94'/>
<id>urn:sha1:80d1dd5f3b83c96c5c8e4a51417f1c748318de94</id>
<content type='text'>
wide builds.
</content>
</entry>
<entry>
<title>Make the unicode-escape and the UTF-16 codecs handle surrogates</title>
<updated>2001-07-20T17:39:11Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-07-20T17:39:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6c6bfb7c70d77b52354a6fd8c76de2cc641aa8fe'/>
<id>urn:sha1:6c6bfb7c70d77b52354a6fd8c76de2cc641aa8fe</id>
<content type='text'>
correctly and thus roundtrip-safe.

Some minor cleanups of the code.

Added tests for the roundtrip-safety.
</content>
</entry>
<entry>
<title>Encode surrogates in UTF-8 even for a wide Py_UNICODE.</title>
<updated>2001-06-27T06:28:56Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2001-06-27T06:28:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ce9b5a55e164f1128756478b6a2bb548abec1980'/>
<id>urn:sha1:ce9b5a55e164f1128756478b6a2bb548abec1980</id>
<content type='text'>
Implement sys.maxunicode.
Explicitly wrap around upper/lower computations for wide Py_UNICODE.
When decoding large characters with UTF-8, represent expected test
results using the \U notation.
</content>
</entry>
<entry>
<title>Get rid of the superstitious "~" in dict hashing's "i = (~hash) &amp; mask".</title>
<updated>2001-05-13T00:19:31Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-05-13T00:19:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2f228e75e4d5ac8c3eb4a6334dbc43243bff1095'/>
<id>urn:sha1:2f228e75e4d5ac8c3eb4a6334dbc43243bff1095</id>
<content type='text'>
The comment following used to say:
	/* We use ~hash instead of hash, as degenerate hash functions, such
	   as for ints &lt;sigh&gt;, can have lots of leading zeros. It's not
	   really a performance risk, but better safe than sorry.
	   12-Dec-00 tim:  so ~hash produces lots of leading ones instead --
	   what's the gain? */
That is, there was never a good reason for doing it.  And to the contrary,
as explained on Python-Dev last December, it tended to make the *sum*
(i + incr) &amp; mask (which is the first table index examined in case of
collison) the same "too often" across distinct hashes.

Changing to the simpler "i = hash &amp; mask" reduced the number of string-dict
collisions (== # number of times we go around the lookup for-loop) from about
6 million to 5 million during a full run of the test suite (these are
approximate because the test suite does some random stuff from run to run).
The number of collisions in non-string dicts also decreased, but not as
dramatically.

Note that this may, for a given dict, change the order (wrt previous
releases) of entries exposed by .keys(), .values() and .items().  A number
of std tests suffered bogus failures as a result.  For dicts keyed by
small ints, or (less so) by characters, the order is much more likely to be
in increasing order of key now; e.g.,

&gt;&gt;&gt; d = {}
&gt;&gt;&gt; for i in range(10):
...    d[i] = i
...
&gt;&gt;&gt; d
{0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9}
&gt;&gt;&gt;

Unfortunately. people may latch on to that in small examples and draw a
bogus conclusion.

test_support.py
    Moved test_extcall's sortdict() into test_support, made it stronger,
    and imported sortdict into other std tests that needed it.
test_unicode.py
    Excluced cp875 from the "roundtrip over range(128)" test, because
    cp875 doesn't have a well-defined inverse for unicode("?", "cp875").
    See Python-Dev for excruciating details.
Cookie.py
    Chaged various output functions to sort dicts before building
    strings from them.
test_extcall
    Fiddled the expected-result file.  This remains sensitive to native
    dict ordering, because, e.g., if there are multiple errors in a
    keyword-arg dict (and test_extcall sets up many cases like that), the
    specific error Python complains about first depends on native dict
    ordering.
</content>
</entry>
<entry>
<title>Fix for bug #417030: "print '%*s' fails for unicode string"</title>
<updated>2001-05-02T14:21:53Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-05-02T14:21:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=542fe56cb9ed36bd8af8bd5cbfba9cdc7f3514f0'/>
<id>urn:sha1:542fe56cb9ed36bd8af8bd5cbfba9cdc7f3514f0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Patch by Finn Bock to make test_unicode.py work for Jython.</title>
<updated>2001-02-10T14:09:31Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-02-10T14:09:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ef0a032883cadeb0dba7a6ff84025f7133b75b31'/>
<id>urn:sha1:ef0a032883cadeb0dba7a6ff84025f7133b75b31</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fixed .capitalize() method of Unicode objects to work like the</title>
<updated>2001-01-29T11:14:16Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-29T11:14:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fde66e1bcc4431a59f36bad0ca0dd7a848ce794b'/>
<id>urn:sha1:fde66e1bcc4431a59f36bad0ca0dd7a848ce794b</id>
<content type='text'>
corresponding string method. Added tests for this too.

Patch written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
<entry>
<title>Change verify() function to raise TestFailed, not AssertionError.</title>
<updated>2001-01-19T19:01:56Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-01-19T19:01:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a1374e429b2f9d94320ca1dc0475a845b99659de'/>
<id>urn:sha1:a1374e429b2f9d94320ca1dc0475a845b99659de</id>
<content type='text'>
(I realize that I didn't really test this, because all the tests
succeed, so verify() never raised an AssertionError -- but the test
suite still succeeds, so I'm not too worried.)
</content>
</entry>
<entry>
<title>Whitespace normalization.  Leaving tokenize_tests.py alone for now.</title>
<updated>2001-01-18T02:22:22Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-01-18T02:22:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791'/>
<id>urn:sha1:d2bf3b7ca6f702f54b8e81ea8d194fc116ac6791</id>
<content type='text'>
</content>
</entry>
<entry>
<title>This patch removes all uses of "assert" in the regression test suite</title>
<updated>2001-01-17T19:11:13Z</updated>
<author>
<name>Marc-André Lemburg</name>
<email>mal@egenix.com</email>
</author>
<published>2001-01-17T19:11:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e'/>
<id>urn:sha1:3661908a6ac75026e4504d9f62a6ac2e2fb2ec5e</id>
<content type='text'>
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.

Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
</content>
</entry>
</feed>
