<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cpython.git/Python/fileutils.c, branch v3.11.15</title>
<subtitle>https://github.com/python/cpython.git</subtitle>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/'/>
<entry>
<title>[3.11] gh-107913: Fix possible losses of OSError error codes (GH-107930) (GH-108524)</title>
<updated>2023-08-27T12:18:58Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2023-08-27T12:18:58Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=b9fc5363997c0cbb78a8d654f9bf6cac1fc056df'/>
<id>b9fc5363997c0cbb78a8d654f9bf6cac1fc056df</id>
<content type='text'>
Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
(cherry picked from commit 2b15536fa94d07e9e286826c23507402313ec7f4)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Functions like PyErr_SetFromErrno() and SetFromWindowsErr() should be
called immediately after using the C API which sets errno or the Windows
error code.
(cherry picked from commit 2b15536fa94d07e9e286826c23507402313ec7f4)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.11] gh-106242: Fix path truncation in os.path.normpath (GH-106816) (#107982)</title>
<updated>2023-08-15T17:07:52Z</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@python.org</email>
</author>
<published>2023-08-15T17:07:52Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=ccf81e1088c25a9f4464e478dc3b5c03ed7ee63b'/>
<id>ccf81e1088c25a9f4464e478dc3b5c03ed7ee63b</id>
<content type='text'>
Co-authored-by: Finn Womack &lt;flan313@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Finn Womack &lt;flan313@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.11] gh-102281: Fix potential nullptr dereference + use of uninitia… (#103040)</title>
<updated>2023-03-25T23:35:00Z</updated>
<author>
<name>Max Bachmann</name>
<email>kontakt@maxbachmann.de</email>
</author>
<published>2023-03-25T23:35:00Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=b28f919007439b48a1d00d54134d7b020a683cda'/>
<id>b28f919007439b48a1d00d54134d7b020a683cda</id>
<content type='text'>
[3.11] gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282)
(cherry picked from commit afa6092ee4260bacf7bc11905466e4c3f8556cbb)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[3.11] gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282)
(cherry picked from commit afa6092ee4260bacf7bc11905466e4c3f8556cbb)</pre>
</div>
</content>
</entry>
<entry>
<title>[3.11] gh-95174: Handle missing dup() and constants in WASI (GH-95229) (GH-95272)</title>
<updated>2022-07-31T15:39:41Z</updated>
<author>
<name>Christian Heimes</name>
<email>christian@python.org</email>
</author>
<published>2022-07-31T15:39:41Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=db13c0c1b8bc8c15d920a94ca008aabea4037697'/>
<id>db13c0c1b8bc8c15d920a94ca008aabea4037697</id>
<content type='text'>
Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Christian Heimes &lt;christian@python.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>gh-91731: Replace Py_BUILD_ASSERT() with static_assert() (#91730)</title>
<updated>2022-04-20T17:26:40Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2022-04-20T17:26:40Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=7cdaf87ec50f76c934ba651256484c4624b84ef2'/>
<id>7cdaf87ec50f76c934ba651256484c4624b84ef2</id>
<content type='text'>
Python 3.11 now uses C11 standard which adds static_assert()
to &lt;assert.h&gt;.

* In pytime.c, replace Py_BUILD_ASSERT() with preprocessor checks on
  SIZEOF_TIME_T with #error.
* On macOS, py_mach_timebase_info() now accepts timebase members with
  the same size than _PyTime_t.
* py_get_monotonic_clock() now saturates GetTickCount64() to
  _PyTime_MAX: GetTickCount64() is unsigned, whereas _PyTime_t is
  signed.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python 3.11 now uses C11 standard which adds static_assert()
to &lt;assert.h&gt;.

* In pytime.c, replace Py_BUILD_ASSERT() with preprocessor checks on
  SIZEOF_TIME_T with #error.
* On macOS, py_mach_timebase_info() now accepts timebase members with
  the same size than _PyTime_t.
* py_get_monotonic_clock() now saturates GetTickCount64() to
  _PyTime_MAX: GetTickCount64() is unsigned, whereas _PyTime_t is
  signed.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-47000: Add `locale.getencoding()` (GH-32068)</title>
<updated>2022-04-09T00:54:54Z</updated>
<author>
<name>Inada Naoki</name>
<email>songofacandy@gmail.com</email>
</author>
<published>2022-04-09T00:54:54Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=677320348728ce058fa3579017e985af74a236d4'/>
<id>677320348728ce058fa3579017e985af74a236d4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-47260: Fix os.closerange() potentially being a no-op in a seccomp sandbox (GH-32418)</title>
<updated>2022-04-08T17:40:39Z</updated>
<author>
<name>Alexey Izbyshev</name>
<email>izbyshev@ispras.ru</email>
</author>
<published>2022-04-08T17:40:39Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=1c8b3b5d66a629258f1db16939b996264a8b9c37'/>
<id>1c8b3b5d66a629258f1db16939b996264a8b9c37</id>
<content type='text'>
_Py_closerange() currently assumes that close_range() closes
all file descriptors even if it returns an error (other than ENOSYS).
This assumption can be wrong on Linux if a seccomp sandbox denies
the underlying syscall, pretending that it returns EPERM or EACCES.
In this case _Py_closerange() won't close any descriptors at all,
which in the worst case can be a security issue.

Fix this by falling back to other methods in case of any close_range()
error. Note that fallbacks will not be triggered on any problems with
closing individual file descriptors because close_range() is documented
to ignore such errors on both Linux[1] and FreeBSD[2].

[1] https://man7.org/linux/man-pages/man2/close_range.2.html
[2] https://www.freebsd.org/cgi/man.cgi?query=close_range&amp;sektion=2</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
_Py_closerange() currently assumes that close_range() closes
all file descriptors even if it returns an error (other than ENOSYS).
This assumption can be wrong on Linux if a seccomp sandbox denies
the underlying syscall, pretending that it returns EPERM or EACCES.
In this case _Py_closerange() won't close any descriptors at all,
which in the worst case can be a security issue.

Fix this by falling back to other methods in case of any close_range()
error. Note that fallbacks will not be triggered on any problems with
closing individual file descriptors because close_range() is documented
to ignore such errors on both Linux[1] and FreeBSD[2].

[1] https://man7.org/linux/man-pages/man2/close_range.2.html
[2] https://www.freebsd.org/cgi/man.cgi?query=close_range&amp;sektion=2</pre>
</div>
</content>
</entry>
<entry>
<title>Remove trailing spaces (GH-31695)</title>
<updated>2022-03-05T15:47:00Z</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2022-03-05T15:47:00Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=6927632492cbad86a250aa006c1847e03b03e70b'/>
<id>6927632492cbad86a250aa006c1847e03b03e70b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)</title>
<updated>2022-01-13T23:35:42Z</updated>
<author>
<name>neonene</name>
<email>53406459+neonene@users.noreply.github.com</email>
</author>
<published>2022-01-13T23:35:42Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1'/>
<id>d4e64cd4b0ea431d4e371f9b0a25f6b75a069dc1</id>
<content type='text'>
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-46217: Revert use of Windows constant that is newer than what we support (GH-30473)</title>
<updated>2022-01-08T00:06:53Z</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@python.org</email>
</author>
<published>2022-01-08T00:06:53Z</published>
<link rel='alternate' type='text/html' href='http://service.techsat.com/oss-git/cpython.git/commit/?id=d81182b8ec3b1593daf241d44757a9fa68fd14cc'/>
<id>d81182b8ec3b1593daf241d44757a9fa68fd14cc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
