]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-107913: Fix possible losses of OSError error codes (GH-107930) (#108523)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 26 Aug 2023 23:24:40 +0000 (16:24 -0700)
committerGitHub <noreply@github.com>
Sat, 26 Aug 2023 23:24:40 +0000 (01:24 +0200)
commit3e2030371723e5fb7c9ccbe83cd980ce69cabc1a
tree16a5ba8999b1440a494153cd76e5a71a779ebb28
parentbbdd8895a5aced4cd4e66a5c6e3471636f28df6b
[3.12] gh-107913: Fix possible losses of OSError error codes (GH-107930) (#108523)

gh-107913: Fix possible losses of OSError error codes (GH-107930)

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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
17 files changed:
Misc/NEWS.d/next/Library/2023-08-14-11-18-13.gh-issue-107913.4ooY6i.rst [new file with mode: 0644]
Modules/_cursesmodule.c
Modules/_io/fileio.c
Modules/_io/winconsoleio.c
Modules/_localemodule.c
Modules/_multiprocessing/semaphore.c
Modules/_ssl.c
Modules/faulthandler.c
Modules/fcntlmodule.c
Modules/getpath.c
Modules/mmapmodule.c
Modules/overlapped.c
Modules/posixmodule.c
Modules/selectmodule.c
Modules/socketmodule.c
Objects/unicodeobject.c
Python/fileutils.c