Skip to content

Drop support for Python < 3.10 - #127

Merged
gerlero merged 2 commits into
mainfrom
python
Nov 24, 2025
Merged

Drop support for Python < 3.10#127
gerlero merged 2 commits into
mainfrom
python

Conversation

@gerlero

@gerlero gerlero commented Nov 24, 2025

Copy link
Copy Markdown
Owner

No description provided.

@gerlero
gerlero requested a review from Copilot November 24, 2025 19:02
@gerlero
gerlero merged commit 54b1903 into main Nov 24, 2025
18 checks passed
@gerlero
gerlero deleted the python branch November 24, 2025 19:02
@codecov

codecov Bot commented Nov 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.13%. Comparing base (f0387e5) to head (65bbca9).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   75.71%   72.13%   -3.59%     
==========================================
  Files           6        6              
  Lines        1149      994     -155     
==========================================
- Hits          870      717     -153     
+ Misses        279      277       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR drops support for Python versions earlier than 3.10 and updates the codebase to use Python 3.10+ features. The main changes include:

  • Updated minimum Python version requirement from 3.8 to 3.10
  • Added strict=True parameter to zip() calls throughout the codebase (a feature introduced in Python 3.10)
  • Migrated Callable import from typing to collections.abc (recommended for Python 3.9+)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Removed Python 3.8 and 3.9 classifiers; updated requires-python to >=3.10
src/fronts/_semiinfinite.py Migrated Callable import from typing to collections.abc within TYPE_CHECKING block
symbolic/generate.py Added strict=True to zip() calls (contains a bug with infinite generator)
tests/test_rootfinding/test_bisect.py Added strict=True to zip() call for length validation
tests/test_rootfinding/checkobj.py Added strict=True to multiple zip() calls in assertion helpers
examples/1INFILTR/validation.py Added strict=True to zip() calls iterating over time series data
examples/1INFILTR/solve.py Added strict=True to zip() calls iterating over validation data
README.md Updated documentation to reflect Python 3.10 minimum requirement and refreshed example output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Comment thread symbolic/generate.py

deriv_names = [name for name, _ in zip(_derivative_names(var), range(3))]
deriv_names = [
name for name, _ in zip(_derivative_names(var), range(3), strict=True)

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

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

The strict=True parameter will cause a ValueError here. The _derivative_names(var) function is an infinite generator (it uses itertools.count(start=2)), while range(3) produces exactly 3 values. When using strict=True, Python checks that all iterables have the same length, and will raise an error because one iterator is infinite.

To fix this, either remove strict=True from this zip call (keeping it on line 76 where both iterables have length 3), or use itertools.islice(_derivative_names(var), 3) instead of zipping with range(3).

Suggested change
name for name, _ in zip(_derivative_names(var), range(3), strict=True)
name for name, _ in zip(itertools.islice(_derivative_names(var), 3), range(3))

Copilot uses AI. Check for mistakes.
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