Skip to content
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.11 breaks pytest integration #519

Open
hynek opened this issue Apr 12, 2023 · 3 comments
Open

Python 3.11 breaks pytest integration #519

hynek opened this issue Apr 12, 2023 · 3 comments

Comments

@hynek
Copy link

hynek commented Apr 12, 2023

Currently pdbpp's integration with pytest is broken: it pops into the debugger but there's no working prompt and I there's no way out unless pytest runs with -s. The good news is that pip install --use-pep517 'pdbpp @ git+https://github.com/pdbpp/pdbpp.git@master' fixes it.

The bad news is that the test suite is broken all across the board (except Python 2, lolol) and riddled with AttributeError: module 'py' has no attribute 'code' (plus possibly more). See e.g. https://github.com/pdbpp/pdbpp/actions/runs/4119851001

I suppose there's been bigger internal changes at pytest, but is there anyone left with enough time and expertise to make pdbp++ work again? It would be a pity to lose it like this, none of the alternatives come even close…

@minusf
Copy link

minusf commented Apr 14, 2023

just ran into this. alternatively what are the older versions we could pin for pytest to keep it working? is this a python 3.11 vs 3.10 issue or pytest + pdbpp combo?

@jugmac00
Copy link
Contributor

pytest vendored some parts of pylib I think with version 7. So, if pytest is installed and also another library which relies on parts of pylib which pytest has not vendored, it will break. pytest's vendored pylib shadows the regularly installed pylib package.

So, pytest < 7 would probably help, but I am not sure whether pytest 6 was already py311 compatible.

This is certainly no longterm solution.

@mdmintz
Copy link

mdmintz commented Apr 16, 2023

In the meantime, you can try using https://pypi.org/project/pdbp/ (pdbp, not pdbpp)

pdbp fixes issues with pdbpp and changes some configuration defaults (eg. sticky mode is now the default mode). To activate, put import pdbp into an __init__.py file (or similar) after installing pdbp. I've been using it with seleniumbase.

Hopefully those fixes can get ported back into pdbpp once it starts getting maintained again, with new releases on PyPI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants