(name)
| 12 | |
| 13 | |
| 14 | def import_warns_freethreaded(name): |
| 15 | if name not in sys.modules and not env.sys_is_gil_enabled(): |
| 16 | with pytest.warns( |
| 17 | RuntimeWarning, match=f"has been enabled to load module '{name}'" |
| 18 | ): |
| 19 | return importlib.import_module(name) |
| 20 | |
| 21 | return importlib.import_module(name) |
| 22 | |
| 23 | |
| 24 | exo_planet_c_api = import_warns_freethreaded("exo_planet_c_api") |