Update e2b_charts dependencies for numpy 2 support#193
Open
mishushakov wants to merge 8 commits intomainfrom
Open
Update e2b_charts dependencies for numpy 2 support#193mishushakov wants to merge 8 commits intomainfrom
mishushakov wants to merge 8 commits intomainfrom
Conversation
- Change numpy from ^1.26.4 to >=1.26.4 to allow numpy 2.x - Bump matplotlib to ^3.10.3, pydantic to ^2.9.1 - Bump dev deps: pytest to ^8.3.5, python-dotenv to ^1.2.1 - Regenerate poetry.lock Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Member
Author
|
Test run, but I think I will explicitly update it to numpy v2 to see if it's not breaking the chart extraction (since our other PR requires numpy 2) |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
numpy ^2.3.5 requires Python >=3.11; bumping to ^3.13 per project needs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
numpy.float32 no longer implicitly converts to Decimal in numpy 2.x. Wrap with float() before passing to Decimal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mishushakov
commented
Feb 9, 2026
| pie_data = PieData( | ||
| label=wedge.get_label(), | ||
| angle=abs(dynamic_round(Decimal(wedge.theta2) - Decimal(wedge.theta1))), | ||
| angle=abs(dynamic_round(Decimal(float(wedge.theta2)) - Decimal(float(wedge.theta1)))), |
Member
Author
There was a problem hiding this comment.
numpy 2.x removed implicit conversion from numpy.float32 to Decimal, so wrapping with float() first resolves it
jakubno
reviewed
Feb 15, 2026
| numpy = "^1.26.4" | ||
| matplotlib = "^3.9.2" | ||
| pydantic = "^2.8.2" | ||
| numpy = "^2.3.5" |
Member
Author
There was a problem hiding this comment.
you mean in terms of backwards compatibility? it shouldn't be breaking anything - CI runs on older Python version right now
jakubno
approved these changes
Feb 18, 2026
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.
Summary
^1.26.4to>=1.26.4to allow numpy 2.x compatibilityTest plan
poetry installinchart_data_extractor/and verify resolutionpoetry run pytestto ensure tests pass🤖 Generated with Claude Code
Note
Medium Risk
Dependency and runtime version upgrades (Python, NumPy, Matplotlib, Pydantic) can introduce subtle behavior/API changes across chart extraction. The code change is small, but combined with major-version bumps warrants extra test coverage on supported environments.
Overview
Updates
chart_data_extractorto require Python^3.11and bumps core deps to newer major versions (notablynumpy2.x andmatplotlib3.10), along with dev tooling updates (pytest,python-dotenv), and regeneratespoetry.lockaccordingly.Adjusts pie chart extraction to compute wedge angles by explicitly casting
wedge.theta1/theta2tofloatbefore creatingDecimals, improving compatibility with newermatplotlib/numpynumeric types. Adds a changeset marking@e2b/data-extractoras a minor release for the dependency updates.Written by Cursor Bugbot for commit b609343. This will update automatically on new commits. Configure here.