Repository navigation
Remove unused cgitb import from live imaging example (Python 3.13) - #70
Open
kasparovabi wants to merge 2 commits into
Open
kasparovabi wants to merge 2 commits into
kasparovabi wants to merge 2 commits into
Conversation
cgitb was removed from the standard library in Python 3.13 (PEP 594), so the example stopped at import with ModuleNotFoundError. The imported name was never used; enable="Off" further down is a keyword argument to Client.scan.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
examples/live_imaging/taking_an_image_every_minute.pystarts withfrom cgitb import enable.cgitbwas removed from the standard library in Python 3.13 (PEP 594, What's New in 3.13), and the package declares 3.13 support inpyproject.toml, so on 3.13 the example stops before it reachesdeapi:The imported name is never used. The
enable="Off"on line 40 is the keyword argument ofClient.scan, so the import can go without a replacement.ModuleNotFoundError: No module named 'cgitb'at line 14deapi/simulated_server/initialize_server.py 13240, prints "Taking image 1..5 of 10", exit 0On 3.12 the import still works but raises a
DeprecationWarningthat names 3.13 as the removal release.The docs build uses Python 3.11, so the gallery itself was not affected. I added a
docfragment inupcoming_changes/.Happy to adjust this or close it if it does not fit the project.