-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3.13 #79
Comments
@15r10nk please can you take a look? |
The main problem is that the show_caches=True argument has no effect any more. This should be solvable. I submitted a bug report because the documentation looks not complete. |
Thank you! |
@15r10nk I'm having another issue on Python 3.13, maybe more related to inline-snapshot: tests/test_end_to_end.py:121: in <module>
snapshots_signatures = snapshot({(
.venvs/3.13/lib/python3.13/site-packages/inline_snapshot/_inline_snapshot.py:644: in __call__
return self.func(*args, **kwargs)
.venvs/3.13/lib/python3.13/site-packages/inline_snapshot/_inline_snapshot.py:691: in snapshot
expr = Source.executing(frame)
.venvs/3.13/lib/python3.13/site-packages/executing/executing.py:283: in executing
assert_(new_stmts <= stmts)
.venvs/3.13/lib/python3.13/site-packages/executing/executing.py:80: in assert_
raise AssertionError(str(message))
E AssertionError Should I open a new issue on inline-snapshot? Let me know |
That sounds like a concerning failure in import inspect
import executing
def snapshot(*_args, **_kwargs):
frame = inspect.currentframe().f_back
executing.Source.executing(frame) and see if you still get the same error. |
Interesting, I think you are right here. Is your example reproducible with this feature branch? If yes, I would like to reproduce it myself (just point me to your commit) |
@15r10nk if you're addressing to me: git clone https://github.com/mkdocstrings/python
cd python
git checkout end-to-end-tests
uv venv --python 3.13
uv pip install -e .
uv pip install -r devdeps.txt
. .venv/bin/activate
python -m pytest tests -c config/pytest.ini -n auto @alexmojaki thanks for your help! |
Interesting, if I move the snapshot variables in another module, the error disappears ( |
@pawamoy I think I'm missing something:
I use the commit 45c10d1048bb90b25e8b72bb863504d9bf46cae8 of your branch. I think you are also not using the 3.13 feature branch of executing. It is probably luck that executing is still able to find the |
@15r10nk try commit 2771f35 instead, sorry, I pushed to the branch in the mean time.
I am definitely not, as I wasn't aware there was such a branch to test 😄 |
This is the problem: import inspect
import executing
def snapshot(*_args):
frame = inspect.currentframe().f_back
executing.Source.executing(frame)
def external(v):
pass
snapshot(external(''))
{'': external} I used pysource-minimize to minimize the code from your test down to this 😃. The good thing is that it is not a problem in the new 3.13 branch any more. @alexmojaki is it ok to ignore this? executing should never throw exceptions but return |
@15r10nk thank you so much, awesome to hear this is already fixed :) pysource-minimize is really an amazing tool! |
ipython/ipython#14303
The text was updated successfully, but these errors were encountered: