Update e2b_charts dependencies for numpy 2 support#193
Merged
mishushakov merged 13 commits intomainfrom Mar 11, 2026
Merged
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>
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
jakubno
reviewed
Feb 15, 2026
jakubno
approved these changes
Feb 18, 2026
- Bump numpy from >=1.26.4 to ^2.2.6 (last 2.x supporting Python 3.10) - Fix numpy 2.x Decimal conversion in pie chart (wrap with float()) - Format pie.py per ruff - Update .tool-versions to Python 3.12 and Poetry 2.1.1 - Update charts_tests.yml to read versions from .tool-versions - Regenerate poetry.lock Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Member
Author
|
@cursor update PR description |
|
Updated PR description: ## Summary
- Upgrades numpy from `^1.26.4` to `^2.2.6` (breaking change - requires numpy 2.x)
- Bumps matplotlib to `^3.10.3`, pydantic to `^2.9.1`, pytest to `^8.3.5`, and python-dotenv to `^1.2.1`
- Fixes pie chart angle extraction in `charts/pie.py` to handle numpy 2.x's removal of implicit conversion from numpy.float32 to Decimal by wrapping `wedge.theta1` and `wedge.theta2` with `float()` before `Decimal()` conversion
- Regenerates poetry.lock with numpy 2.x dependencies
- Changeset marked as **major** release due to breaking numpy version requirement change
## Test plan
- [x] Run `poetry install` in `chart_data_extractor/` and verify resolution
- [x] Run `poetry run pytest` to ensure tests passChanges:
Should I create a file with this description, or do you want to copy it to update the PR on GitHub? |
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
Upgrades core numeric/plotting dependencies (notably
numpy2.x andmatplotlib3.10), which can introduce subtle runtime/ABI and rendering behavior changes. Lockfile regeneration and updated Python/version markers may affect dependency resolution across environments.Overview
Updates
e2b-chartsto newer dependency versions, including moving tonumpy2.x, bumpingmatplotlib,pydantic,pytest, andpython-dotenv, and regeneratingpoetry.lockaccordingly.Adjusts pie chart angle extraction in
charts/pie.pyto coercewedge.theta1/theta2tofloatbeforeDecimalarithmetic, improving compatibility with updated Matplotlib/NumPy numeric types.Adds a Changeset marking
@e2b/data-extractorfor a major release due to the dependency updates.Written by Cursor Bugbot for commit f8e8c04. This will update automatically on new commits. Configure here.