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

_cppyy_backend.py causes error in python 3.11 #18

Open
tdubose opened this issue Nov 15, 2023 · 4 comments
Open

_cppyy_backend.py causes error in python 3.11 #18

tdubose opened this issue Nov 15, 2023 · 4 comments

Comments

@tdubose
Copy link

tdubose commented Nov 15, 2023

In python 3.11 file.open("rU") (_cppyy_backend.py:95) cling/python/cppyy_backend/_cppyy_generator.py:95 causes an error. Removal of the U solves this issue without apparent side effects.

@wlav
Copy link
Owner

wlav commented Nov 15, 2023

What/where is _cppyy_backend.py?

@tdubose
Copy link
Author

tdubose commented Nov 15, 2023

Apologies, I meant
cling/python/cppyy_backend/_cppyy_generator.py

@vanguard737
Copy link

FWIW, I just got bit by this one on 3.12. Workaround was just to muck around with my conda venv like so; not pretty but it did the trick:

sed -ibak s/"rU"/"r"/ $CONDA_PREFIX/lib/python3.12/site-packages/cppyy_backend/_cppyy_generator.py

Long thread below. tl;dr Looks like 'rU' has been deprecated since python 3.3, and was outright removed in ~3.10:

python/cpython#81511

@wlav
Copy link
Owner

wlav commented Aug 19, 2024

Thanks for reviving this one. :) Removed. (The generator code was contributed and doesn't have good test coverage.)

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

3 participants