-
-
Notifications
You must be signed in to change notification settings - Fork 313
Add tblib to fix parallel test runner crashes on Selenium exceptions #5297
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Free review on us!CodeRabbit is offering free reviews until Wed Dec 17 2025 to showcase some of the refinements we've made. Comment |
Co-authored-by: DonnieBLT <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses test execution issues by adding the tblib (traceback library) package as a dev dependency. The purpose is to fix crashes that occur when running Django tests with the --parallel flag, specifically when Selenium tests fail with unpicklable exception tracebacks. Django's parallel test runner uses multiprocessing to distribute tests across worker processes, and tblib enables proper serialization of complex tracebacks (like those from Selenium exceptions) so they can be sent back to the main process for reporting.
Key Changes:
- Added
tblib = "^3.0.0"to the Poetry dev dependencies inpyproject.toml
|
@copilot update poetry lock file |
Co-authored-by: DonnieBLT <[email protected]>
Django's parallel test runner crashes with
TypeError: cannot pickle 'traceback' objectwhen Selenium tests fail because Selenium exception tracebacks contain unpicklable objects like WebDriver instances.Changes
tblib = "^3.0.0"to dev dependencies inpyproject.tomlpoetry.lockto include tblib 3.2.2 with proper hash verificationTechnical Details
When using
--parallel, Django's test runner spawns worker processes via multiprocessing. Failed test exceptions must be pickled to communicate back to the main process. Without tblib, complex tracebacks (particularly from Selenium's TimeoutException) cannot be serialized, crashing the entire suite instead of reporting the failure.Django detects tblib automatically and uses it to serialize tracebacks. This is the official Django recommendation (see error message from PR #5295).
Impact
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.