Skip to content

Use Python 3.15 lazy import#295

Merged
hukkin merged 5 commits into
hukkin:masterfrom
vstinner:lazy_import_simple
Apr 10, 2026
Merged

Use Python 3.15 lazy import#295
hukkin merged 5 commits into
hukkin:masterfrom
vstinner:lazy_import_simple

Conversation

@vstinner

@vstinner vstinner commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Use Python 3.15 lazy imports to only load regular expressions when needed: to parse numbers, datetime or localtime.

Use Python 3.15 lazy imports to only load regular expressions when
needed: to parse numbers, datetime or localtime.
@codecov

codecov Bot commented Apr 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bbca44b) to head (f34eac1).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #295   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          535       536    +1     
  Branches       100       100           
=========================================
+ Hits           535       536    +1     

☔ 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.

Comment thread src/tomli/_parser.py
Comment thread src/tomli/_parser.py Outdated
Comment thread src/tomli/_parser.py Outdated
@hukkin

hukkin commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Sorry for the commit noise! I moved the dunder name above imports to match the style used in tomli.__init__ (and recommended by PEP 8).

This looks good, thanks!

The macOS x86_64 issue is unrelated. I think it may have something to do with last week's mypy/mypyc release (v1.20.0). I made an attempt to fix it here but no success yet. I'll have to continue later. (Or maybe someone else knows what's wrong and can help?)

@hukkin hukkin merged commit b7e1bcc into hukkin:master Apr 10, 2026
35 of 40 checks passed
@vstinner vstinner deleted the lazy_import_simple branch April 10, 2026 12:09
@vstinner

Copy link
Copy Markdown
Contributor Author

Thanks for the merge :-)

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