Skip to content

Update e2b_charts dependencies for numpy 2 support#193

Merged
mishushakov merged 13 commits intomainfrom
mishushakov/update-e2b-charts
Mar 11, 2026
Merged

Update e2b_charts dependencies for numpy 2 support#193
mishushakov merged 13 commits intomainfrom
mishushakov/update-e2b-charts

Conversation

@mishushakov
Copy link
Member

@mishushakov mishushakov commented Feb 9, 2026

Summary

  • Relaxes numpy constraint from ^1.26.4 to >=1.26.4 to allow numpy 2.x compatibility
  • Bumps matplotlib, pydantic, pytest, and python-dotenv to latest versions
  • Regenerates poetry.lock

Test plan

  • Run poetry install in chart_data_extractor/ and verify resolution
  • Run poetry run pytest to ensure tests pass

🤖 Generated with Claude Code


Note

Medium Risk
Upgrades core numeric/plotting dependencies (notably numpy 2.x and matplotlib 3.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-charts to newer dependency versions, including moving to numpy 2.x, bumping matplotlib, pydantic, pytest, and python-dotenv, and regenerating poetry.lock accordingly.

Adjusts pie chart angle extraction in charts/pie.py to coerce wedge.theta1/theta2 to float before Decimal arithmetic, improving compatibility with updated Matplotlib/NumPy numeric types.

Adds a Changeset marking @e2b/data-extractor for a major release due to the dependency updates.

Written by Cursor Bugbot for commit f8e8c04. This will update automatically on new commits. Configure here.

- 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>
@mishushakov
Copy link
Member Author

mishushakov commented Feb 9, 2026

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>
mishushakov and others added 3 commits February 9, 2026 16:00
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 and others added 5 commits March 11, 2026 16:39
- 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>
Copy link

@cursor cursor bot left a 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>
@mishushakov
Copy link
Member Author

@cursor update PR description

@cursor
Copy link

cursor bot commented Mar 11, 2026

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 pass

Changes:

  1. Clarified numpy upgrade is a breaking change (1.x → 2.x)
  2. Listed specific version bumps for all dependencies
  3. Documented the pie chart fix for numpy 2.x compatibility
  4. Noted the changeset is correctly marked as major

Should I create a file with this description, or do you want to copy it to update the PR on GitHub?

Open in Web Open in Cursor 

@mishushakov mishushakov merged commit b6ac8ad into main Mar 11, 2026
19 of 20 checks passed
@mishushakov mishushakov deleted the mishushakov/update-e2b-charts branch March 11, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants