<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/test/test_struct.py, branch benjamin-interp-initialize</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-30249: Improve struct.unpack_from() error messages (GH-6059)</title>
<updated>2018-03-10T18:58:52+00:00</updated>
<author>
<name>Xiang Zhang</name>
<email>angwerzx@126.com</email>
</author>
<published>2018-03-10T18:58:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c10b288f345aaef66d2c844924b9a576f9ea4f8b'/>
<id>c10b288f345aaef66d2c844924b9a576f9ea4f8b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bytes warnings in test_struct (added in bpo-29802). (#4068)</title>
<updated>2017-10-21T18:59:23+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-10-21T18:59:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=73c4708630f99b94c35476529748629fff1fc63e'/>
<id>73c4708630f99b94c35476529748629fff1fc63e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-21071: struct.Struct.format type is now str (#845)</title>
<updated>2017-06-23T13:11:12+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-06-23T13:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f87b85f80853c580b1c8bf78a51b0e9a25f6e1a7'/>
<id>f87b85f80853c580b1c8bf78a51b0e9a25f6e1a7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-30245: Fix possible overflow when organize struct.pack_into error message (#1682)</title>
<updated>2017-06-02T06:33:04+00:00</updated>
<author>
<name>Johan Liu</name>
<email>akira.lau@hotmail.com</email>
</author>
<published>2017-06-02T06:33:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=aead53b6ee27915de248b07de509529174aaad21'/>
<id>aead53b6ee27915de248b07de509529174aaad21</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29802: Fix reference counting in module-level struct functions (#1213)</title>
<updated>2017-04-20T18:19:31+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-04-20T18:19:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=40db90c1ce1a59d5f5f2894bb0ce32110000bf27'/>
<id>40db90c1ce1a59d5f5f2894bb0ce32110000bf27</id>
<content type='text'>
when pass arguments of wrong type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when pass arguments of wrong type.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-29649: Improve struct.pack_into() boundary error messages (#424)</title>
<updated>2017-04-04T10:46:25+00:00</updated>
<author>
<name>Andrew Nester</name>
<email>andrew.nester.dev@gmail.com</email>
</author>
<published>2017-04-04T10:46:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f78b119364b521307237a1484ba5f43f42300898'/>
<id>f78b119364b521307237a1484ba5f43f42300898</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename struct.unpack() 2nd parameter to "buffer"</title>
<updated>2017-02-02T13:24:16+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-02-02T13:24:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=c0f59ad1455a53b6a8a9f09620ae4283e4df9f26'/>
<id>c0f59ad1455a53b6a8a9f09620ae4283e4df9f26</id>
<content type='text'>
Issue #29300: Rename struct.unpack() second parameter from "inputstr" to
"buffer", and use the Py_buffer type.

Fix also unit tests on struct.unpack() which passed a Unicode string instead of
a bytes string as struct.unpack() second parameter. The purpose of
test_trailing_counter() is to test invalid format strings, not to test the
buffer parameter.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue #29300: Rename struct.unpack() second parameter from "inputstr" to
"buffer", and use the Py_buffer type.

Fix also unit tests on struct.unpack() which passed a Unicode string instead of
a bytes string as struct.unpack() second parameter. The purpose of
test_trailing_counter() is to test invalid format strings, not to test the
buffer parameter.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #29300: Convert _struct module to Argument Clinic</title>
<updated>2017-02-02T11:09:30+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2017-02-02T11:09:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3f2d10132d9835b1ebda3283643fbbfdb0851b91'/>
<id>3f2d10132d9835b1ebda3283643fbbfdb0851b91</id>
<content type='text'>
* The struct module now requires contiguous buffers.
* Convert most functions and methods of the _struct module to Argument Clinic
* Use "Py_buffer" type for the "buffer" argument. Argument Clinic is
  responsible to create and release the Py_buffer object.
* Use "PyStructObject *" type for self to avoid explicit conversions.
* Add an unit test on the _struct.Struct.unpack_from() method to test passing
  arguments as keywords.
* Rephrase docstrings.
* Rename "fmt" argument to "format" in docstrings and the documentation.

As a side effect, functions and methods which used METH_VARARGS calling
convention like struct.pack() now use the METH_FASTCALL calling convention
which avoids the creation of temporary tuple to pass positional arguments and
so is faster. For example, struct.pack("i", 1) becomes 1.56x faster (-36%)::

    $ ./python -m perf timeit \
        -s 'import struct; pack=struct.pack' 'pack("i", 1)' \
        --compare-to=../default-ref/python
    Median +- std dev: 119 ns +- 1 ns -&gt; 76.8 ns +- 0.4 ns: 1.56x faster (-36%)
    Significant (t=295.91)

Patch co-written with Serhiy Storchaka.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The struct module now requires contiguous buffers.
* Convert most functions and methods of the _struct module to Argument Clinic
* Use "Py_buffer" type for the "buffer" argument. Argument Clinic is
  responsible to create and release the Py_buffer object.
* Use "PyStructObject *" type for self to avoid explicit conversions.
* Add an unit test on the _struct.Struct.unpack_from() method to test passing
  arguments as keywords.
* Rephrase docstrings.
* Rename "fmt" argument to "format" in docstrings and the documentation.

As a side effect, functions and methods which used METH_VARARGS calling
convention like struct.pack() now use the METH_FASTCALL calling convention
which avoids the creation of temporary tuple to pass positional arguments and
so is faster. For example, struct.pack("i", 1) becomes 1.56x faster (-36%)::

    $ ./python -m perf timeit \
        -s 'import struct; pack=struct.pack' 'pack("i", 1)' \
        --compare-to=../default-ref/python
    Median +- std dev: 119 ns +- 1 ns -&gt; 76.8 ns +- 0.4 ns: 1.56x faster (-36%)
    Significant (t=295.91)

Patch co-written with Serhiy Storchaka.
</pre>
</div>
</content>
</entry>
<entry>
<title>require a long long data type (closes #27961)</title>
<updated>2016-09-06T00:44:18+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2016-09-06T00:44:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=ed4aa83ff77ff11059f64dab711adf35ce9d0e0f'/>
<id>ed4aa83ff77ff11059f64dab711adf35ce9d0e0f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #11734: Add support for IEEE 754 half-precision floats to the struct module. Original patch by Eli Stevens.</title>
<updated>2016-09-03T16:21:29+00:00</updated>
<author>
<name>Mark Dickinson</name>
<email>dickinsm@gmail.com</email>
</author>
<published>2016-09-03T16:21:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=7c4e409d075fdb923807513353b18a75a4520eba'/>
<id>7c4e409d075fdb923807513353b18a75a4520eba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
