Fix unit test failures on Python 3.13

This commit is contained in:
rdb
2024-12-14 15:25:03 +01:00
parent 46cf9c0507
commit e43dc87df5
2 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ get_owner() const {
PyObject *strong_ref;
int result = 0;
if (owner != nullptr) {
PyWeakref_GetRef(owner, &strong_ref);
result = PyWeakref_GetRef(owner, &strong_ref);
}
if (result > 0) {
return strong_ref;

View File

@@ -120,9 +120,10 @@ fnrgl = fnargle:FnargleLoader
sys.path = [str(tmp_path), platstdlib, stdlib]
Loader._loadedPythonFileTypes = False
loader = Loader()
# base parameter is only used for audio
loader = Loader(None)
if not Loader._loadedPythonFileTypes:
Loader._loadPythonFileTypes()
assert Loader._loadedPythonFileTypes
# Should be registered, not yet loaded