Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create binary wheels with mypyc #242

Merged
merged 5 commits into from
Nov 27, 2024
Merged

Create binary wheels with mypyc #242

merged 5 commits into from
Nov 27, 2024

Conversation

hukkin
Copy link
Owner

@hukkin hukkin commented Nov 26, 2024

Based on @ofek's (who I'll add as co-author) PR #165.

This creates mypyc binary wheels while keeping flit_core as default build backend (which was my concern earlier #165 (comment)). CI switches to setuptools only for creating binary wheels. The idea is to keep flit_core as default until Python 3.11 EOL date, after which TOML parser bootstrapping is no longer a concern.

User visible changes here are:

  • slightly different TypeError messages from binary wheels (with mypyc we lose control over the exact message)
  • TOMLDecodeError shows as tomli._parser.TOMLDecodeError: in tracebacks instead of tomli.TOMLDecodeError:. The hack that changes the exception's __module__ is not accepted by mypyc
  • type[DEPRECATED_DEFAULT] shows in TOMLDecodeError's type hint

The changes seem acceptable to me.

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (443a0c1) to head (6dd93ff).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #242   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          527       529    +2     
  Branches        97        97           
=========================================
+ Hits           527       529    +2     

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

@hukkin
Copy link
Owner Author

hukkin commented Nov 26, 2024

I think this needs protection against stack overflow (inline arrays and tables).

@hukkin hukkin merged commit 149547d into master Nov 27, 2024
36 checks passed
@hukkin hukkin deleted the mypyc2 branch November 27, 2024 16:56
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.

1 participant