<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git, branch v3.10.7</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>Python 3.10.7</title>
<updated>2022-09-05T13:00:02+00:00</updated>
<author>
<name>Pablo Galindo</name>
<email>pablogsal@gmail.com</email>
</author>
<published>2022-09-05T12:02:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6cc6b13308b3202270ea7ac0ee776762a66f6a2f'/>
<id>6cc6b13308b3202270ea7ac0ee776762a66f6a2f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.10] gh-84095: Fill documentation gap regarding user-defined objects. (GH-… (GH-96576)</title>
<updated>2022-09-05T07:21:22+00:00</updated>
<author>
<name>Vinay Sajip</name>
<email>vinay_sajip@yahoo.co.uk</email>
</author>
<published>2022-09-05T07:21:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=e13f49a0bc253f1b8939fd505547986183761768'/>
<id>e13f49a0bc253f1b8939fd505547986183761768</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Docs: alphabetically order sqlite3.Cursor attrs (GH-96565)</title>
<updated>2022-09-04T21:41:13+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-04T21:41:13+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=f5a784729cb7a75630f569ec522e3b9435718a76'/>
<id>f5a784729cb7a75630f569ec522e3b9435718a76</id>
<content type='text'>
(cherry picked from commit 9e5568578234f0ecd003247c8a2deaeb69976b4b)

Co-authored-by: Erlend E. Aasland &lt;erlend.aasland@protonmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 9e5568578234f0ecd003247c8a2deaeb69976b4b)

Co-authored-by: Erlend E. Aasland &lt;erlend.aasland@protonmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.10] gh-95778: Correctly pre-check for int-to-str conversion (GH-96537) (#96563)</title>
<updated>2022-09-04T16:54:56+00:00</updated>
<author>
<name>Gregory P. Smith</name>
<email>greg@krypto.org</email>
</author>
<published>2022-09-04T16:54:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=eace09e63ed7978dbdfeb1ae537fac505e6b5b0e'/>
<id>eace09e63ed7978dbdfeb1ae537fac505e6b5b0e</id>
<content type='text'>
Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) &lt;= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} &lt; \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} &gt; \frac{10}{3} &gt; \log_2(10).$$
So
$$2^{L(s-1)} &gt; 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

&lt;!-- gh-issue-number: gh-95778 --&gt;
* Issue: gh-95778
&lt;!-- /gh-issue-number --&gt;

Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;
(cherry picked from commit b126196838bbaf5f4d35120e0e6bcde435b0b480)

Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) &lt;= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} &lt; \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} &gt; \frac{10}{3} &gt; \log_2(10).$$
So
$$2^{L(s-1)} &gt; 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

&lt;!-- gh-issue-number: gh-95778 --&gt;
* Issue: gh-95778
&lt;!-- /gh-issue-number --&gt;

Co-authored-by: Gregory P. Smith [Google LLC] &lt;greg@krypto.org&gt;
(cherry picked from commit b126196838bbaf5f4d35120e0e6bcde435b0b480)

Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-68163: Correct conversion of Rational instances to float (GH-25619) (GH-96557)</title>
<updated>2022-09-04T12:40:24+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-04T12:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=4dea99f18eeef15a6d69236146793c801d12c329'/>
<id>4dea99f18eeef15a6d69236146793c801d12c329</id>
<content type='text'>
* gh-68163: Correct conversion of Rational instances to float

Also document that numerator/denominator properties are instances of Integral.

Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;
(cherry picked from commit 8464b754c4168586b99e2135ccd2567e025625a9)

Co-authored-by: Sergey B Kirpichev &lt;skirpichev@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gh-68163: Correct conversion of Rational instances to float

Also document that numerator/denominator properties are instances of Integral.

Co-authored-by: Mark Dickinson &lt;dickinsm@gmail.com&gt;
(cherry picked from commit 8464b754c4168586b99e2135ccd2567e025625a9)

Co-authored-by: Sergey B Kirpichev &lt;skirpichev@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-95778: remove unneeded doc note on float.as_integer_ratio (GH-96553)</title>
<updated>2022-09-04T07:12:34+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-04T07:12:34+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=3a56a938f375f17f39baeb4b1529793dd0eb79b8'/>
<id>3a56a938f375f17f39baeb4b1529793dd0eb79b8</id>
<content type='text'>
Per mdickinson@'s comment on the main branch PR.
(cherry picked from commit 69bb83c2bf254f92491d527ccec1ff41897add56)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Per mdickinson@'s comment on the main branch PR.
(cherry picked from commit 69bb83c2bf254f92491d527ccec1ff41897add56)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>doc typo: spell limitation (GH-96542)</title>
<updated>2022-09-04T06:30:11+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-04T06:30:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=76d710512479a15966d00f70f722270ab884f44f'/>
<id>76d710512479a15966d00f70f722270ab884f44f</id>
<content type='text'>
(cherry picked from commit af6359dd5c5e20adec12501aaa6074716c316e41)

Co-authored-by: Mehrdad Moradizadeh &lt;mhrddmoradii@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit af6359dd5c5e20adec12501aaa6074716c316e41)

Co-authored-by: Mehrdad Moradizadeh &lt;mhrddmoradii@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.10] gh-90195: Unset logger disabled flag when configuring it. (GH-96530) (GH-96533)</title>
<updated>2022-09-03T14:10:04+00:00</updated>
<author>
<name>Vinay Sajip</name>
<email>vinay_sajip@yahoo.co.uk</email>
</author>
<published>2022-09-03T14:10:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=c3dbbc88da38668c27231323cb6dd40813596f7f'/>
<id>c3dbbc88da38668c27231323cb6dd40813596f7f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[3.10] gh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527) (GH-96529)</title>
<updated>2022-09-03T12:17:07+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-03T12:17:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=7b163f88b6739eda69be461981cb433375984c02'/>
<id>7b163f88b6739eda69be461981cb433375984c02</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-75500: Update idlelib/help.html  (GH-96523)</title>
<updated>2022-09-03T07:59:15+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-09-03T07:59:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=9fe9b9c45751e3b140482c8409e36959fab81c4a'/>
<id>9fe9b9c45751e3b140482c8409e36959fab81c4a</id>
<content type='text'>
(cherry picked from commit 837ce6460d6554e9d7a847951ca5108ac6926ee5)

Co-authored-by: Terry Jan Reedy &lt;tjreedy@udel.edu&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 837ce6460d6554e9d7a847951ca5108ac6926ee5)

Co-authored-by: Terry Jan Reedy &lt;tjreedy@udel.edu&gt;</pre>
</div>
</content>
</entry>
</feed>
