<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Lib/test, branch main</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>gh-103606: Improve error message from logging.config.FileConfig (GH-103628)</title>
<updated>2023-05-18T04:20:47+00:00</updated>
<author>
<name>Prince Roshan</name>
<email>princekrroshan01@gmail.com</email>
</author>
<published>2023-05-18T04:20:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=152227b569c3a9b87fe0483706f704762ced6d75'/>
<id>152227b569c3a9b87fe0483706f704762ced6d75</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-104555: Runtime-checkable protocols: Don't let previous calls to `isinstance()` influence whether `issubclass()` raises an exception (#104559)</title>
<updated>2023-05-17T23:43:12+00:00</updated>
<author>
<name>Alex Waygood</name>
<email>Alex.Waygood@Gmail.com</email>
</author>
<published>2023-05-17T23:43:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=b27fe67f3c643e174c3619b669228ef34b6d87ee'/>
<id>b27fe67f3c643e174c3619b669228ef34b6d87ee</id>
<content type='text'>
Co-authored-by: Carl Meyer &lt;carl@oddbird.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Carl Meyer &lt;carl@oddbird.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>typing: Add more tests for TypeVar (#104571)</title>
<updated>2023-05-17T13:08:21+00:00</updated>
<author>
<name>Jelle Zijlstra</name>
<email>jelle.zijlstra@gmail.com</email>
</author>
<published>2023-05-17T13:08:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=26931944dd8abd6554249239344fa62b789b9028'/>
<id>26931944dd8abd6554249239344fa62b789b9028</id>
<content type='text'>
During the PEP 695 implementation at one point I made
TypeVar.__name__ return garbage, and all of test_typing passed.
So I decided to add a few more tests. In the process I discovered
a minor incompatibility from the C implementation of TypeVar:
empty constraints were returned as None instead of an empty tuple.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During the PEP 695 implementation at one point I made
TypeVar.__name__ return garbage, and all of test_typing passed.
So I decided to add a few more tests. In the process I discovered
a minor incompatibility from the C implementation of TypeVar:
empty constraints were returned as None instead of an empty tuple.
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-104572: Improve error messages for invalid constructs in PEP 695 contexts (#104573)</title>
<updated>2023-05-17T13:05:42+00:00</updated>
<author>
<name>Jelle Zijlstra</name>
<email>jelle.zijlstra@gmail.com</email>
</author>
<published>2023-05-17T13:05:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=97db2f3e07bf7d56750e215e4f32653bf3867ef8'/>
<id>97db2f3e07bf7d56750e215e4f32653bf3867ef8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-102153: Start stripping C0 control and space chars in `urlsplit` (#102508)</title>
<updated>2023-05-17T08:49:20+00:00</updated>
<author>
<name>Illia Volochii</name>
<email>illia.volochii@gmail.com</email>
</author>
<published>2023-05-17T08:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=2f630e1ce18ad2e07428296532a68b11dc66ad10'/>
<id>2f630e1ce18ad2e07428296532a68b11dc66ad10</id>
<content type='text'>
`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit #25595.

This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/#url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).

---------

Co-authored-by: Gregory P. Smith [Google] &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`urllib.parse.urlsplit` has already been respecting the WHATWG spec a bit #25595.

This adds more sanitizing to respect the "Remove any leading C0 control or space from input" [rule](https://url.spec.whatwg.org/#url-parsing:~:text=Remove%20any%20leading%20and%20trailing%20C0%20control%20or%20space%20from%20input.) in response to [CVE-2023-24329](https://nvd.nist.gov/vuln/detail/CVE-2023-24329).

---------

Co-authored-by: Gregory P. Smith [Google] &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-75367: Fix data descriptor detection in inspect.getattr_static (#104517)</title>
<updated>2023-05-16T17:34:44+00:00</updated>
<author>
<name>Furkan Onder</name>
<email>furkanonder@protonmail.com</email>
</author>
<published>2023-05-16T17:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=5e9f471e7db30893fb3f42681f17fdcdb70069ee'/>
<id>5e9f471e7db30893fb3f42681f17fdcdb70069ee</id>
<content type='text'>
Co-authored-by: Carl Meyer &lt;carl@oddbird.net&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Carl Meyer &lt;carl@oddbird.net&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-104555: Fix isinstance() and issubclass() for runtime-checkable protocols that use PEP 695 (#104556)</title>
<updated>2023-05-16T16:38:10+00:00</updated>
<author>
<name>Alex Waygood</name>
<email>Alex.Waygood@Gmail.com</email>
</author>
<published>2023-05-16T16:38:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1163782868454287ca9ac170aaebca4beeb83192'/>
<id>1163782868454287ca9ac170aaebca4beeb83192</id>
<content type='text'>
Fixes #104555</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #104555</pre>
</div>
</content>
</entry>
<entry>
<title>gh-103865: add monitoring support to LOAD_SUPER_ATTR (#103866)</title>
<updated>2023-05-16T16:29:00+00:00</updated>
<author>
<name>Carl Meyer</name>
<email>carl@oddbird.net</email>
</author>
<published>2023-05-16T16:29:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f40890b124a330b589c8093127be1274e15dbd7f'/>
<id>f40890b124a330b589c8093127be1274e15dbd7f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>gh-103861: Fix Zip64 extensions not being properly applied in some cases (#103863)</title>
<updated>2023-05-16T07:43:44+00:00</updated>
<author>
<name>Carey Metcalfe</name>
<email>carey@cmetcalfe.ca</email>
</author>
<published>2023-05-16T07:43:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=798bcaa1eb01de7db9ff1881a3088603ad09b096'/>
<id>798bcaa1eb01de7db9ff1881a3088603ad09b096</id>
<content type='text'>
Fix Zip64 extensions not being properly applied in some cases:

Fixes an issue where adding a small file to a `ZipFile`
object while forcing zip64 extensions causes an extra Zip64 record to be
added to the zip, but doesn't update the `min_version` or file sizes in
the primary central directory header.

Also fixed an edge case in checking if zip64 extensions are required:

This fixes an issue where if data requiring zip64 extensions was added
to an unseekable stream without specifying `force_zip64=True`, zip64
extensions would not be used and a RuntimeError would not be raised when
closing the file (even though the size would be known at that point).
This would result in successfully writing corrupt zip files.

Deciding if zip64 extensions are required outside of the `FileHeader`
function means that both `FileHeader` and `_ZipWriteFile` will always be
in sync. Previously, the `FileHeader` function could enable zip64
extensions without propagating that decision to the `_ZipWriteFile`
class, which would then not correctly write the data descriptor record
or check for errors on close.

If anyone is actually using `ZipInfo.FileHeader` as a public API without
explicitly passing True or False in for zip64, their own code may still be
susceptible to that kind of bug unless they make a similar change to
where the zip64 decision happens.

Fixes #103861

---------

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix Zip64 extensions not being properly applied in some cases:

Fixes an issue where adding a small file to a `ZipFile`
object while forcing zip64 extensions causes an extra Zip64 record to be
added to the zip, but doesn't update the `min_version` or file sizes in
the primary central directory header.

Also fixed an edge case in checking if zip64 extensions are required:

This fixes an issue where if data requiring zip64 extensions was added
to an unseekable stream without specifying `force_zip64=True`, zip64
extensions would not be used and a RuntimeError would not be raised when
closing the file (even though the size would be known at that point).
This would result in successfully writing corrupt zip files.

Deciding if zip64 extensions are required outside of the `FileHeader`
function means that both `FileHeader` and `_ZipWriteFile` will always be
in sync. Previously, the `FileHeader` function could enable zip64
extensions without propagating that decision to the `_ZipWriteFile`
class, which would then not correctly write the data descriptor record
or check for errors on close.

If anyone is actually using `ZipInfo.FileHeader` as a public API without
explicitly passing True or False in for zip64, their own code may still be
susceptible to that kind of bug unless they make a similar change to
where the zip64 decision happens.

Fixes #103861

---------

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-69152: add method get_proxy_response_headers to HTTPConnection class (#104248)</title>
<updated>2023-05-16T06:20:30+00:00</updated>
<author>
<name>Alexey Namyotkin</name>
<email>62434915+nametkin@users.noreply.github.com</email>
</author>
<published>2023-05-16T06:20:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=85ec192ac4b000d4e47df6123b65eacbd1fdccfa'/>
<id>85ec192ac4b000d4e47df6123b65eacbd1fdccfa</id>
<content type='text'>
Add http.client.HTTPConnection method get_proxy_response_headers() - this is a followup to https://github.com/python/cpython/pull/26152 which added it as a non-public attribute. This way we don't pre-compute a headers dictionary that most users will never access. The new method is properly public and documented and triggers full proxy header parsing into a dict only when actually called.

---------

Co-authored-by: blurb-it[bot] &lt;43283697+blurb-it[bot]@users.noreply.github.com&gt;
Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add http.client.HTTPConnection method get_proxy_response_headers() - this is a followup to https://github.com/python/cpython/pull/26152 which added it as a non-public attribute. This way we don't pre-compute a headers dictionary that most users will never access. The new method is properly public and documented and triggers full proxy header parsing into a dict only when actually called.

---------

Co-authored-by: blurb-it[bot] &lt;43283697+blurb-it[bot]@users.noreply.github.com&gt;
Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
</feed>
