Skip to content

Update e2b_charts dependencies for numpy 2 support#193

Open
mishushakov wants to merge 8 commits intomainfrom
mishushakov/update-e2b-charts
Open

Update e2b_charts dependencies for numpy 2 support#193
mishushakov wants to merge 8 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
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_extractor to require Python ^3.11 and bumps core deps to newer major versions (notably numpy 2.x and matplotlib 3.10), along with dev tooling updates (pytest, python-dotenv), and regenerates poetry.lock accordingly.

Adjusts pie chart extraction to compute wedge angles by explicitly casting wedge.theta1/theta2 to float before creating Decimals, improving compatibility with newer matplotlib/numpy numeric types. Adds a changeset marking @e2b/data-extractor as a minor release for the dependency updates.

Written by Cursor Bugbot for commit b609343. 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>
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.

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>
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)))),
Copy link
Member Author

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

numpy = "^1.26.4"
matplotlib = "^3.9.2"
pydantic = "^2.8.2"
numpy = "^2.3.5"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't this be breaking?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean in terms of backwards compatibility? it shouldn't be breaking anything - CI runs on older Python version right now

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