<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Lib/test/test_struct.py, branch 2.3</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_struct.py?h=2.3</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Lib/test/test_struct.py?h=2.3'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2003-03-20T18:32:13Z</updated>
<entry>
<title>SF bug 705836: struct.pack of floats in non-native endian order</title>
<updated>2003-03-20T18:32:13Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2003-03-20T18:32:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d50ade68ec240ea8ea12604809d8c70985263dce'/>
<id>urn:sha1:d50ade68ec240ea8ea12604809d8c70985263dce</id>
<content type='text'>
pack_float, pack_double, save_float:  All the routines for creating
IEEE-format packed representations of floats and doubles simply ignored
that rounding can (in rare cases) propagate out of a long string of
1 bits.  At worst, the end-off carry can (by mistake) interfere with
the exponent value, and then unpacking yields a result wrong by a factor
of 2.  In less severe cases, it can end up losing more low-order bits
than intended, or fail to catch overflow *caused* by rounding.

Bugfix candidate, but I already backported this to 2.2.

In 2.3, this code remains in severe need of refactoring.
</content>
</entry>
<entry>
<title>Get rid of many apply() calls.</title>
<updated>2003-02-27T20:14:51Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2003-02-27T20:14:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=68468eba635570400f607e140425a222018e56f9'/>
<id>urn:sha1:68468eba635570400f607e140425a222018e56f9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Get rid of relative imports in all unittests.  Now anything that</title>
<updated>2002-07-23T19:04:11Z</updated>
<author>
<name>Barry Warsaw</name>
<email>barry@python.org</email>
</author>
<published>2002-07-23T19:04:11Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=04f357cffef6d764f2f0ff2671dabde75ec250d1'/>
<id>urn:sha1:04f357cffef6d764f2f0ff2671dabde75ec250d1</id>
<content type='text'>
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
</content>
</entry>
<entry>
<title>The 'p' (Pascal string) pack code acts unreasonably when the string size</title>
<updated>2001-09-15T02:35:15Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-09-15T02:35:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0891ac017dd02f9c592c40940dff6b050523be00'/>
<id>urn:sha1:0891ac017dd02f9c592c40940dff6b050523be00</id>
<content type='text'>
and count exceed 255.  Changed to preserve as much of the string as
possible (instead of count%256 characters).
</content>
</entry>
<entry>
<title>Added "i" and "l" to the list of std-mode struct codes that don't range-</title>
<updated>2001-06-18T22:27:39Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-18T22:27:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=3eec38af37d4593a6ce7a406de3b20d6c2b322f2'/>
<id>urn:sha1:3eec38af37d4593a6ce7a406de3b20d6c2b322f2</id>
<content type='text'>
check correctly on pack().  While these were checking OK on my 32-bit box,
Mark Favas reported failures on a 64-bit box (alas, easy to believe).
</content>
</entry>
<entry>
<title>Generalize the new qQ std-mode tests to all int codes (bBhHiIlLqQ).</title>
<updated>2001-06-13T22:45:27Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-13T22:45:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=17e17d440644f780e793466b47ca354459a8d68a'/>
<id>urn:sha1:17e17d440644f780e793466b47ca354459a8d68a</id>
<content type='text'>
Unfortunately, the std-mode bBhHIL codes don't do any range-checking; if
and when some of those get fixed, remove their letters from the
IntTester.BUGGY_RANGE_CHECK string.  In the meantime, a msg saying that
range-tests are getting skipped is printed to stdout whenever one is
skipped.
</content>
</entry>
<entry>
<title>The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.</title>
<updated>2001-06-13T01:26:35Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-13T01:26:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=da9c5b35a3ee5fc5bc1d1c64e04bfa8c5bf35886'/>
<id>urn:sha1:da9c5b35a3ee5fc5bc1d1c64e04bfa8c5bf35886</id>
<content type='text'>
Repaired that, and added appropriate tests for it to test_struct.py.
</content>
</entry>
<entry>
<title>Added q/Q standard (x-platform 8-byte ints) mode in struct module.</title>
<updated>2001-06-12T01:22:22Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-12T01:22:22Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7a3bfc3a472dafc42d20845389eb79db8af0b046'/>
<id>urn:sha1:7a3bfc3a472dafc42d20845389eb79db8af0b046</id>
<content type='text'>
This completes the q/Q project.

longobject.c _PyLong_AsByteArray:  The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.

test_struct.py:  This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.

NEWS:  Added brief dict news while I was at it.
</content>
</entry>
<entry>
<title>Renamed some stuff to tell the truth about what it does.</title>
<updated>2001-06-10T23:52:59Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-10T23:52:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c533edceb1c028f7af8cd6fea3962316e24a562a'/>
<id>urn:sha1:c533edceb1c028f7af8cd6fea3962316e24a562a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial support for 'q' and 'Q' struct format codes:  for now, only in</title>
<updated>2001-06-10T23:40:19Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-06-10T23:40:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7b9542a3f747787aedf056ddaef99e4469777aa9'/>
<id>urn:sha1:7b9542a3f747787aedf056ddaef99e4469777aa9</id>
<content type='text'>
native mode, and only when config #defines HAVE_LONG_LONG.  Standard mode
will eventually treat them as 8-byte ints across all platforms, but that
likely requires a new set of routines in longobject.c first (while
sizeof(long) &gt;= 4 is guaranteed by C, there's nothing in C we can rely
on x-platform to hold 8 bytes of int, so we'll have to roll our own;
I'm thinking of a simple pair of conversion functions, Python long
to/from sized vector of unsigned bytes; that may be useful for GMP
conversions too; std q/Q would call them with size fixed at 8).

test_struct.py:  In addition to adding some native-mode 'q' and 'Q' tests,
got rid of unused code, and repaired a non-portable assumption about
native sizeof(short) (it isn't 2 on some Cray boxes).

libstruct.tex:  In addition to adding a bit of 'q'/'Q' docs (more needed
later), removed an erroneous footnote about 'I' behavior.
</content>
</entry>
</feed>
