-
Notifications
You must be signed in to change notification settings - Fork 202
Update e2b_charts dependencies for numpy 2 support #193
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
- 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>
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
| 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)))), |
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.
numpy 2.x removed implicit conversion from numpy.float32 to Decimal, so wrapping with float() first resolves it
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 upgrades include major-version jumps (
numpy2.x,matplotlib3.10,pytest8) and raise the minimum Python version to 3.11, which can cause runtime or compatibility issues despite small code changes.Overview
Updates
e2b-chartsto target Python^3.11and bumps core dependencies to newer major/minor versions, includingnumpy2.x,matplotlib3.10.x,pydantic2.9.x, and dev tooling (pytest8.x,python-dotenv1.2.x). Thepoetry.lockis regenerated accordingly (including added/removed transitive deps and updated constraints).Adjusts pie chart extraction in
charts/pie.pyto coerce wedge angles (theta1/theta2) throughfloatbeforeDecimalarithmetic, likely to avoid type incompatibilities with updated matplotlib/numpy versions. Adds a changeset marking@e2b/data-extractorfor a minor release due to dependency updates.Written by Cursor Bugbot for commit d4eee4a. This will update automatically on new commits. Configure here.