<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Include/bytesobject.h, branch misc-acks-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>Cut disused recode_encoding logic in _PyBytes_DecodeEscape. (GH-16013)</title>
<updated>2019-09-12T18:12:22+00:00</updated>
<author>
<name>Greg Price</name>
<email>gnprice@gmail.com</email>
</author>
<published>2019-09-12T18:12:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=3a4f66707e824ef3a8384827590ebaa6ca463dc0'/>
<id>3a4f66707e824ef3a8384827590ebaa6ca463dc0</id>
<content type='text'>
All call sites pass NULL for `recode_encoding`, so this path is
completely untested.  That's been true since before Python 3.0.
It adds significant complexity to this logic, so it's best to
take it out.

All call sites now have a literal NULL, and that's been true since
commit 768921cf3 eliminated a conditional (`foo ? bar : NULL`) at
the call site in Python/ast.c where we're parsing a bytes literal.
But even before then, that condition `foo` had been a constant
since unadorned string literals started meaning Unicode, in commit
572dbf8f1 aka v3.0a1~1035 .

The `unicode` parameter is already unused, so mark it as unused too.
The code that acted on it was also taken out before Python 3.0, in
commit 8d30cc014 aka v3.0a1~1031 .

The function (PyBytes_DecodeEscape) is exposed in the API, but it's
never been documented.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All call sites pass NULL for `recode_encoding`, so this path is
completely untested.  That's been true since before Python 3.0.
It adds significant complexity to this logic, so it's best to
take it out.

All call sites now have a literal NULL, and that's been true since
commit 768921cf3 eliminated a conditional (`foo ? bar : NULL`) at
the call site in Python/ast.c where we're parsing a bytes literal.
But even before then, that condition `foo` had been a constant
since unadorned string literals started meaning Unicode, in commit
572dbf8f1 aka v3.0a1~1035 .

The `unicode` parameter is already unused, so mark it as unused too.
The code that acted on it was also taken out before Python 3.0, in
commit 8d30cc014 aka v3.0a1~1031 .

The function (PyBytes_DecodeEscape) is exposed in the API, but it's
never been documented.
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-32150: Expand tabs to spaces in C files. (#4583)</title>
<updated>2017-11-28T15:56:10+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2017-11-28T15:56:10+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=598ceae876ff4a23072e59945597e945583de4ab'/>
<id>598ceae876ff4a23072e59945597e945583de4ab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #29058: All stable API extensions added after Python 3.2 are now</title>
<updated>2016-12-27T12:57:39+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2016-12-27T12:57:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=34d0ac8027e23609e24588735b37b8d5a55f7223'/>
<id>34d0ac8027e23609e24588735b37b8d5a55f7223</id>
<content type='text'>
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
the minimum Python version supporting this API.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
the minimum Python version supporting this API.
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue 28128: Print out better error/warning messages for invalid string escapes. Backport to 3.6.</title>
<updated>2016-10-31T18:46:26+00:00</updated>
<author>
<name>Eric V. Smith</name>
<email>eric@trueblade.com</email>
</author>
<published>2016-10-31T18:46:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5646648678295a44aa82636c6e92826651baf33a'/>
<id>5646648678295a44aa82636c6e92826651baf33a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #27895:  Spelling fixes (Contributed by Ville Skyttä).</title>
<updated>2016-08-30T17:47:49+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2016-08-30T17:47:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=15f44ab043b37c064d6891c7864205fed9fb0dd1'/>
<id>15f44ab043b37c064d6891c7864205fed9fb0dd1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Issue #15984: Merge PyUnicode doc from 3.5</title>
<updated>2016-04-15T02:27:11+00:00</updated>
<author>
<name>Martin Panter</name>
<email>vadmium+py@gmail.com</email>
</author>
<published>2016-04-15T02:27:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=cda80940ed444d01beed797dcd86c207f11104bc'/>
<id>cda80940ed444d01beed797dcd86c207f11104bc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc</title>
<updated>2016-04-15T02:14:19+00:00</updated>
<author>
<name>Martin Panter</name>
<email>vadmium+py@gmail.com</email>
</author>
<published>2016-04-15T02:14:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6245cb3c015a5b9febef4d6ef30d3acfc762a79d'/>
<id>6245cb3c015a5b9febef4d6ef30d3acfc762a79d</id>
<content type='text'>
This affects documentation, code comments, and a debugging messages.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This affects documentation, code comments, and a debugging messages.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add _PyBytesWriter_Resize() function</title>
<updated>2015-10-14T11:56:47+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-10-14T11:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=c5c3ba4becf98b37b4dd92333c144b0d95faef03'/>
<id>c5c3ba4becf98b37b4dd92333c144b0d95faef03</id>
<content type='text'>
This function gives a control to the buffer size without using min_size.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function gives a control to the buffer size without using min_size.
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize bytes.fromhex() and bytearray.fromhex()</title>
<updated>2015-10-14T09:25:33+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-10-14T09:25:33+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=2bf8993db966256d564d87865ceddf0e33c02500'/>
<id>2bf8993db966256d564d87865ceddf0e33c02500</id>
<content type='text'>
Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
between 2x and 3.5x faster. Changes:

* Use a fast-path working on a char* string for ASCII string
* Use a slow-path for non-ASCII string
* Replace slow hex_digit_to_int() function with a O(1) lookup in
  _PyLong_DigitValue precomputed table
* Use _PyBytesWriter API to handle the buffer
* Add unit tests to check the error position in error messages
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
between 2x and 3.5x faster. Changes:

* Use a fast-path working on a char* string for ASCII string
* Use a slow-path for non-ASCII string
* Replace slow hex_digit_to_int() function with a O(1) lookup in
  _PyLong_DigitValue precomputed table
* Use _PyBytesWriter API to handle the buffer
* Add unit tests to check the error position in error messages
</pre>
</div>
</content>
</entry>
<entry>
<title>Optimize bytearray % args</title>
<updated>2015-10-14T07:56:53+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>victor.stinner@gmail.com</email>
</author>
<published>2015-10-14T07:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=772b2b09f279fdcb01bbd703735d35bd02dd8ec1'/>
<id>772b2b09f279fdcb01bbd703735d35bd02dd8ec1</id>
<content type='text'>
Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to
create work directly on bytearray objects.

* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
  outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
  bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
  _PyBytesWriter, to create a bytearray buffer instead of a bytes buffer

Most formatting operations are now between 2.5 and 5 times faster.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue #25399: Don't create temporary bytes objects: modify _PyBytes_Format() to
create work directly on bytearray objects.

* Rename _PyBytes_Format() to _PyBytes_FormatEx() just in case if something
  outside CPython uses it
* _PyBytes_FormatEx() now uses (char*, Py_ssize_t) for the input string, so
  bytearray_format() doesn't need tot create a temporary input bytes object
* Add use_bytearray parameter to _PyBytes_FormatEx() which is passed to
  _PyBytesWriter, to create a bytearray buffer instead of a bytes buffer

Most formatting operations are now between 2.5 and 5 times faster.
</pre>
</div>
</content>
</entry>
</feed>
