Closed hroncok closed 2 weeks ago
E AssertionError: assert 'pathlib.Path.resolve' in 'Like :meth:`~pathlib._local.Path.resolve`, but async.\n\nMake the path absolute, resolving all symlinks on the way and also\nnormalizing it.\n'
This failure is easy to understand for me.
The rest, not so much.
Interesting, I don't remember the KI changes in the alpha! Maybe worth bisecting to figure out what exactly changed?
Let me restest with a6... 625 passed, 77 skipped in 9.85s
Working on git bisest ...
I bisected and KI seems to be failing due to PEP 667 (specifically https://github.com/python/cpython/pull/115153). Which kind of makes sense because we stuff KI protection metadata in weird function places, but I'm still surprised.
The Pathlib module name thing is https://github.com/python/cpython/commit/d8d94911e2393bd30ca58a32b33d792307fdc00d
OK, so KI is cause this no longer works: Before:
>>> import sys
>>> def g():
... print(sys._getframe(1).f_locals)
...
>>> def f():
... locals()["name"] = True
... g()
...
>>> f()
{'name': True}
>>> exit()
Now:
>>> import sys
>>> def g():
... print(sys._getframe(1).f_locals)
...
>>> def f():
... locals()["name"] = True
... g()
...
>>> f()
{}
>>> exit()
This is documented so we just need to fix this. I think one way would be to assign to sys._getframe().f_locals
instead of locals()
.
Hello. After https://github.com/python-trio/trio/pull/2959 I still see the following test failures with Python 3.13.0b1: