diff --git a/pyproject.toml b/pyproject.toml index e11ba6a..281d3e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ build-backend = "scikit_build_core.build" requires = [ "scikit-build-core >=0.9.3", - "nanobind >=2.7", + "nanobind >=2.15", "pcpp", # stubgen uses @override :/ diff --git a/stubgen/stubgen.py b/stubgen/stubgen.py index 442afff..60fb0db 100644 --- a/stubgen/stubgen.py +++ b/stubgen/stubgen.py @@ -1,6 +1,5 @@ import argparse import importlib -import os import sys from collections.abc import Callable from pathlib import Path @@ -27,7 +26,7 @@ def put_function(self, if (name and fn_module and fn_module != self.module.__name__ and parent is not None): - self.import_object(fn_module, name=None) + self.bind(fn_module, name=None) rhs = f"{fn_module}.{fn.__qualname__}" if type(fn) is staticmethod: rhs = f"staticmethod({rhs})" @@ -61,7 +60,6 @@ def main(): sys.path.extend(cast("list[str]", args.python_path or [])) - os.environ["ISLPY_NO_DOWNCAST_DEPRECATION"] = "1" mod = importlib.import_module(cast("str", args.module)) for fname in cast("list[str]", args.exec or []): execdict = {"__name__": "islpy._monkeypatch"}