Skip to content

Commit 2d4bdcc

Browse files
committed
Document ImportCycleError and PyExc_ImportCycleError.
1 parent ac80f2d commit 2d4bdcc

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/c-api/exceptions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,8 @@ Exception types
11081108
* :exc:`FloatingPointError`
11091109
* * .. c:var:: PyObject *PyExc_GeneratorExit
11101110
* :exc:`GeneratorExit`
1111+
* * .. c:var:: PyObject *PyExc_ImportCycleError
1112+
* :exc:`ImportCycleError`
11111113
* * .. c:var:: PyObject *PyExc_ImportError
11121114
* :exc:`ImportError`
11131115
* * .. c:var:: PyObject *PyExc_IndentationError

Doc/library/exceptions.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ The following exceptions are the exceptions that are usually raised.
266266

267267
.. versionadded:: 3.6
268268

269+
.. exception:: ImportCycleError
270+
271+
A subclass of :exc:`ImportError` which is raised when a lazy import fails
272+
because it (directly or indirectly) tries to import itself.
273+
274+
.. versionadded:: 3.15
269275

270276
.. exception:: IndexError
271277

0 commit comments

Comments
 (0)