[issue29045] Outdated C api doc about Windows error

New submission from Xiang Zhang:
https://docs.python.org/3.7/c-api/exceptions.html#c.PyErr_SetFromWindowsErrW... it stills refers to PyErr_SetFromWindowsErrWithFilenameObject but this function doesn't exist since Py3.4. I didn't find when and why it's deleted.
And https://docs.python.org/3.4/c-api/exceptions.html#c.PyErr_SetFromWindowsErr raises OSError instead of WindowsError.
---------- assignee: docs@python components: Documentation messages: 283814 nosy: docs@python, xiang.zhang priority: normal severity: normal status: open title: Outdated C api doc about Windows error versions: Python 3.5, Python 3.6, Python 3.7
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue29045 _______________________________________

Eryk Sun added the comment:
PyErr_SetFromWindowsErrWithFilenameObject was never implemented. See issue 11210.
Since 3.3 WindowsError is simply an alias for OSError. See PEP 3151.
---------- nosy: +eryksun
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue29045 _______________________________________

Xiang Zhang added the comment:
PyErr_SetFromWindowsErrWithFilenameObject was never implemented. See issue 11210.
Since 3.3 WindowsError is simply an alias for OSError. See PEP 3151.
Ohh, thanks for the info. I don't find the implementation in 2.7 either.
---------- versions: +Python 2.7
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue29045 _______________________________________

Eryk Sun eryksun@gmail.com added the comment:
The documentation still has two references to PyErr_SetFromWindowsErrWithFilenameObject, which is not a defined function in the C API.
https://docs.python.org/3.10/c-api/exceptions.html#c.PyErr_SetFromWindowsErr...
---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> enhancement versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue29045 _______________________________________
participants (2)
-
Eryk Sun
-
Xiang Zhang