test_devtools_error_handling.py fails on Python 3.11
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Thank you so much for helping improve the quality of Dash!
We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.
Describe your context
Please provide us your environment, so we can easily reproduce the issue.
- replace the result of
pip list | grep dashbelow
dash 2.14.1 ~/github.com/plotly/dash
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
dash-testing-stub 0.0.2
Describe the bug
I'm following the instructions on https://github.com/plotly/dash/blob/dev/CONTRIBUTING.md, and runningpytest tests/integration/devtools/test_devtools_error_handling.py on Python 3.11, and the test fails due to missing traceback:
> assert "in update_output" in error0
E assert 'in update_output' in '<!doctype html>\n<html lang=en>\n <head>\n <title>Exception: Special 2 clicks exception\n // Werkzeug Debugger</title>\n <link rel="stylesheet" href="?__debugger__=yes&cmd=resource&f=style.css">\n <link rel="shortcut icon"\n href="?__debugger__=yes&cmd=resource&f=console.png">\n <script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script>\n <script>\n var CONSOLE_MODE = false,\n EVALEX = true,\n EVALEX_TRUSTED = true,\n SECRET = "Qcq5G0KKmhgH01zx3BBl";\n </script>\n </head>\n <body style="background-color: #fff">\n <div class="debugger">\n<h1>Exception</h1>\n<div class="detail">\n <p class="errormsg">Exception: Special 2 clicks exception\n</p>\n</div>\n<h2 class="traceback">Traceback <em>(most recent call last)</em></h2>\n<div class="traceback noframe-traceback">\n <h3></h3>\n <ul></ul>\n <blockquote>Exception: Special 2 clicks exception\n</blockquote>\n</div>\n\n<div class="plain">\n <p>\n This is the Copy/Paste friendly version of the traceback.\n </p>\n <textarea cols="50" rows="10" name="code" readonly>Exception: Special 2 clicks exception\n</textarea>\n</div>\n<div class="explanation">\n The debugger caught an exception in your WSGI application. You can now\n look at the traceback which led to the error. <span class="nojavascript">\n If you enable JavaScript you can also use additional features such as code\n execution (if the evalex feature is enabled), automatic pasting of the\n exceptions and much more.</span>\n</div>\n <div class="footer">\n Brought to you by <strong class="arthur">DON\'T PANIC</strong>, your\n friendly Werkzeug powered traceback interpreter.\n </div>\n </div>\n\n <div class="pin-prompt">\n <div class="inner">\n <h3>Console Locked</h3>\n <p>\n The console is locked and needs to be unlocked by entering the PIN.\n You can find the PIN printed out on the standard output of your\n shell that runs the server.\n <form>\n <p>PIN:\n <input type=text name=pin size=14>\n <input type=submit name=btn value="Confirm Pin">\n </form>\n </div>\n </div>\n </body>\n</html>\n\n<!--\n\nException: Special 2 clicks exception\n\n\n-->\n'
I tested it on Python 3.10 and it worked fine.
Expected behavior
The test should pass on Python 3.11 too.
It appears dash works mostly fine on Python 3.11, but it's not officially declared? Plus this test fails.
Regarding the failure, maybe this comment is relevant? https://github.com/pallets/werkzeug/pull/2640#issuecomment-1503454090:
It's actually not sufficient right now for Python 3.11's new traceback features.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running pytest tests/integration/devtools/test_devtools_error_handling.py under Python 3.11 and compare its traceback output with Python 3.10. Inspect the failing test and the referenced Werkzeug traceback behavior; done means the test passes on Python 3.11 while preserving the expected error details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100