Conversation
IPython 9 changed its color and debugger APIs: - color_scheme_table.active_colors was removed (now uses themes) - print_stack_entry() no longer accepts context= parameter Add _NoColors fallback class and _get_colors() helper method to handle the color API change gracefully. Wrap print_stack_entry() call in try/except to handle the removed parameter. Also relax IPython version constraint from ==8.18.1 to >=8.18.1,<10 to allow users to use IPython 9. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Like I said in the other PR, I don't think there's any reason to keep support for IPython 8, so this should just be simplified for IPython 9+ only in my opinion. |
|
Also, I think this PR fully disables colors in IPython 9+ -- which is not what we want ( |
Address PR review comments: - Drop IPython 8 support, require IPython >=9.0.0 - Remove _NoColors fallback that was disabling colors - Use IPython 9's theme API with Token types for proper coloring Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
IPython 9 requires Python 3.11+, so update: - pyproject.toml: requires-python = ">=3.11" - CI workflows: remove Python 3.9 and 3.10 from test matrix Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
Co-Authored-By: Claude (global.anthropic.claude-opus-4-5-20251101-v1:0) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds IPython 9 compatibility to ChatDBG by updating the color formatting API calls to use IPython 9's new theming system, which resolves the AttributeError with color_scheme_table that was breaking ChatDBG with IPython 9.x.
Changes:
- Replaced
color_scheme_table.active_colorswithself.theme.format()API using pygments Token types - Removed the deprecated
context=parameter fromprint_stack_entry()calls - Updated minimum IPython requirement from 8.18.1 to >=9.0.0 and minimum Python requirement from 3.9 to 3.11
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/chatdbg/chatdbg_pdb.py | Updated color formatting to use IPython 9's theme.format() API with pygments Token types and removed context parameter from print_stack_entry() |
| pyproject.toml | Updated IPython requirement to >=9.0.0 and Python requirement to >=3.11 to align with IPython 9's requirements |
| .github/workflows/sanity.yml | Removed Python 3.9 and 3.10 from test matrix to align with new minimum Python version |
| .github/workflows/code-quality.yml | Removed Python 3.9 and 3.10 from test matrix to align with new minimum Python version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nicovank
left a comment
There was a problem hiding this comment.
Tested, seems to work 👍
Co-authored-by: Emery Berger <emeryberger@users.noreply.github.com>
|
@claude Fix this CI failure
|
|
Claude finished @emeryberger's task in 1m 34s —— View job CI Failure Analysis Complete
The ProblemThe failing workflow is the "Claude Code Review" action, which is blocking because it was triggered by a bot ( Why I Can't Fix ThisI cannot modify this configuration because:
How to Fix ItThe Claude Code Action needs to be configured to allow bot actors. You'll need to add the If you're using the action in a workflow file that's not visible to me (possibly in a default branch or repository settings), add: - uses: anthropics/claude-code-action@v1
with:
allowed_bots: '*' # Allow all bots
# ... other configurationOr for more security, allow only the claude bot: allowed_bots: 'claude[bot]'Alternatively, if the Claude Code Action is configured through repository settings or the GitHub App installation settings, you may need to update it through the GitHub UI. NoteThe other CI workflows (Sanity and Code quality) are passing successfully - this issue is specific to the Claude Code Review action being triggered by bot commits (like my previous commit that moved the pygments import to the top of the file). |
Summary
Fixes #62 - ChatDBG breaks with latest IPython
This PR adds support for IPython 9.x by:
self.theme.format()API withTokentypes (from pygments) for proper colored outputcontext=parameter fromprint_stack_entry()calls (removed in IPython 9)Test plan
chatdbg -c continueshould work,whycommand should return correct diagnosis🤖 Generated with Claude Code