File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,8 @@ Importing Modules
349349
350350.. c:function:: PyObject* PyImport_GetLazyImportsFilter()
351351
352- Gets the current lazy imports filter. Returns a :term:`strong reference`.
352+ Return a :term:`strong reference` to the current lazy imports filter,
353+ or ``NULL`` if none exists. This function always succeeds.
353354
354355 .. versionadded:: next
355356
Original file line number Diff line number Diff line change @@ -4802,7 +4802,9 @@ PyImport_SetLazyImportsFilter(PyObject *filter)
48024802 return 0 ;
48034803}
48044804
4805- /* Gets the lazy imports filter. Returns a new reference. */
4805+ /* Return a strong reference to the current lazy imports filter
4806+ * or NULL if none exists. This function always succeeds.
4807+ */
48064808PyObject *
48074809PyImport_GetLazyImportsFilter (void )
48084810{
Original file line number Diff line number Diff line change @@ -2815,6 +2815,7 @@ sys_get_lazy_imports_filter_impl(PyObject *module)
28152815{
28162816 PyObject * filter = PyImport_GetLazyImportsFilter ();
28172817 if (filter == NULL ) {
2818+ assert (!PyErr_Occurred ());
28182819 Py_RETURN_NONE ;
28192820 }
28202821 return filter ;
You can’t perform that action at this time.
0 commit comments