aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/import.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-07-12 08:57:10 +0300
committerGitHub <noreply@github.com>2023-07-12 08:57:10 +0300
commitbe1b968dc1e63c3c68e161ddc5a05eb064833440 (patch)
tree8689ba9f656854b83bf24b82de4fc471437a51ab /Python/import.c
parente8ab0096a583184fe24dfbc39eff70d270c8e6f4 (diff)
downloadcpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.tar.gz
cpython-be1b968dc1e63c3c68e161ddc5a05eb064833440.zip
gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 7ce89cdf9a9..3e52a4e4eb1 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -2878,7 +2878,7 @@ PyImport_ImportModuleLevelObject(PyObject *name, PyObject *globals,
}
else {
PyObject *path;
- if (_PyObject_LookupAttr(mod, &_Py_ID(__path__), &path) < 0) {
+ if (PyObject_GetOptionalAttr(mod, &_Py_ID(__path__), &path) < 0) {
goto error;
}
if (path) {