We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfd17cc commit 878c1f7Copy full SHA for 878c1f7
src/sage/misc/sageinspect.py
@@ -224,7 +224,11 @@ def isclassinstance(obj):
224
return (not inspect.isclass(obj) and
225
hasattr(obj, '__class__') and
226
hasattr(obj.__class__, '__module__') and
227
- obj.__class__.__module__ not in builtin_mods)
+ obj.__class__.__module__ not in builtin_mods and
228
+ # Starting with Cython 3, Cython's builtin types have __module__ set
229
+ # to the shared module names like _cython_3_0_0.
230
+ not (isinstance(obj.__class__.__module__, str) and
231
+ obj.__class__.__module__.startswith('_cython_')))
232
233
234
# Parse strings of form "File: sage/rings/rational.pyx (starting at line 1080)"
0 commit comments