Skip to content

native lazy imports with PEP810 - #172

Draft
benedikt-bartscher wants to merge 3 commits into
scientific-python:mainfrom
benedikt-bartscher:add-native-python-3.15-support
Draft

native lazy imports with PEP810#172
benedikt-bartscher wants to merge 3 commits into
scientific-python:mainfrom
benedikt-bartscher:add-native-python-3.15-support

Conversation

@benedikt-bartscher

Copy link
Copy Markdown
Contributor

No description provided.

@stefanv stefanv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, @benedikt-bartscher. This PR looks roughly right to me, but with lazy loading the devil often lies in the details. Presumably, this is an AI assisted contribution; have you tested it exhaustively?

I also noted some AI-flavor text in the README, and asked if you would mind editing that down to be a bit more parsable.

Comment thread README.md

### Native lazy imports on Python 3.15+

Python 3.15 introduced native lazy imports

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could you please edit this paragraph to be more concise and readable?

@benedikt-bartscher

Copy link
Copy Markdown
Contributor Author

Hi @stefanv thanks for your review. Yes, this is written with AI contribution. I have tested it in some big projects, which we are using on a daily basis.

I will keep polishing the PR over the weekend.

@benedikt-bartscher
benedikt-bartscher marked this pull request as draft September 4, 2026 07:09
@stefanv

stefanv commented Sep 10, 2026

Copy link
Copy Markdown
Member

@benedikt-bartscher I'll probably put out a new release soon, in case you're interested in getting this in.

@stefanv

stefanv commented Sep 10, 2026

Copy link
Copy Markdown
Member

As a curiosity, do you know of an advantage of this approach? My intuition is that it should be "safer", but it would be helpful to have a concrete example.

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.27%. Comparing base (bdcafab) to head (b439cd6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
+ Coverage   96.72%   97.27%   +0.55%     
==========================================
  Files           1        1              
  Lines         122      147      +25     
  Branches       23       29       +6     
==========================================
+ Hits          118      143      +25     
  Misses          1        1              
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 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.

@benedikt-bartscher
benedikt-bartscher force-pushed the add-native-python-3.15-support branch from c795182 to b439cd6 Compare September 11, 2026 14:52
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