mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-42599: Remove useless PyModule_GetWarningsModule() (GH-23691)
Removed PyModule_GetWarningsModule() which is useless due to the _warnings module was converted to a builtin module in 2.6.
This commit is contained in:
parent
b6d98c10ff
commit
0f91f586ae
3 changed files with 5 additions and 11 deletions
|
@ -1534,9 +1534,6 @@ PyErr_WriteUnraisable(PyObject *obj)
|
|||
}
|
||||
|
||||
|
||||
extern PyObject *PyModule_GetWarningsModule(void);
|
||||
|
||||
|
||||
void
|
||||
PyErr_SyntaxLocation(const char *filename, int lineno)
|
||||
{
|
||||
|
|
|
@ -97,14 +97,6 @@ _Py_IsFinalizing(void)
|
|||
int (*_PyOS_mystrnicmp_hack)(const char *, const char *, Py_ssize_t) = \
|
||||
PyOS_mystrnicmp; /* Python/pystrcmp.o */
|
||||
|
||||
/* PyModule_GetWarningsModule is no longer necessary as of 2.6
|
||||
since _warnings is builtin. This API should not be used. */
|
||||
PyObject *
|
||||
PyModule_GetWarningsModule(void)
|
||||
{
|
||||
return PyImport_ImportModule("warnings");
|
||||
}
|
||||
|
||||
|
||||
/* APIs to access the initialization flags
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue