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

print_exception: rewrite deprecated code #5405

Open
anki-code opened this issue May 11, 2024 · 3 comments
Open

print_exception: rewrite deprecated code #5405

anki-code opened this issue May 11, 2024 · 3 comments

Comments

@anki-code
Copy link
Member

anki-code commented May 11, 2024

We have this line:

xonsh/xonsh/tools.py

Lines 1056 to 1058 in 55b341d

sys.last_type, sys.last_value, sys.last_traceback = exc_info

But https://docs.python.org/3/library/sys.html:

These three variables are deprecated;
sys.last_type
sys.last_value
sys.last_traceback
Use sys.last_exc instead. They hold the legacy representation of sys.last_exc, as returned from exc_info() above.

We also have related issue with this code: #5408

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@kulkarniniraj
Copy link

I have a fix ready but can't test it. python xonsh-in-docker.py gives me error that xonsh:latest cannot be pulled.

@anki-code
Copy link
Member Author

anki-code commented May 11, 2024

hi @kulkarniniraj! That's cool! PR is welcome! Try docker run --rm -it xonsh/xonsh:slim xonsh or use xonsh-install to install xonsh in isolated environment.

@kulkarniniraj
Copy link

Thanks @anki-code. Turns out problem was with python 3.6. Once I passed 3.12 to xonsh-in-docker.py, it built docker image.

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

No branches or pull requests

2 participants