Skip to content

Process pth files in python_modules#6687

Merged
hoodmane merged 1 commit intomainfrom
python-modules-process-pth-files
Apr 30, 2026
Merged

Process pth files in python_modules#6687
hoodmane merged 1 commit intomainfrom
python-modules-process-pth-files

Conversation

@hoodmane
Copy link
Copy Markdown
Contributor

Some packages rely on this behavior. I also want to use it in workers-runtime-sdk to implement entropy hooks.

@hoodmane hoodmane requested review from a team as code owners April 28, 2026 19:03
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 28, 2026

UnknownError: ProviderInitError

github run

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented Apr 28, 2026

@hoodmane Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

Copy link
Copy Markdown
Contributor

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Makes sense. Thanks!

However, this might introduce some change in existing workers using pth file as well. Do you think we need a compat flag?

Copy link
Copy Markdown
Contributor

@dom96 dom96 left a comment

Choose a reason for hiding this comment

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

See comment and also I agree with @ryanking13 about possible need for compat flag here

Comment thread src/workerd/server/tests/python/pth-file/extra_module.py
@hoodmane hoodmane force-pushed the python-modules-process-pth-files branch from 20d82fc to 30df106 Compare April 29, 2026 17:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.56%. Comparing base (1f09441) to head (2b23217).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6687   +/-   ##
=======================================
  Coverage   66.55%   66.56%           
=======================================
  Files         402      402           
  Lines      115890   115890           
  Branches    19405    19405           
=======================================
+ Hits        77131    77138    +7     
+ Misses      27188    27181    -7     
  Partials    11571    11571           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hoodmane hoodmane force-pushed the python-modules-process-pth-files branch from 30df106 to 95dad0a Compare April 29, 2026 18:51
@hoodmane
Copy link
Copy Markdown
Contributor Author

Okay added compat date.

@hoodmane hoodmane force-pushed the python-modules-process-pth-files branch 3 times, most recently from 75bff82 to 1725f3c Compare April 29, 2026 19:34
hoodmane added a commit to hoodmane/workers-py that referenced this pull request Apr 29, 2026
…m workerd

Import it in a pth file. Will take effect once cloudflare/workerd#6687 is merged
and the compat flag is turned on.
hoodmane added a commit to hoodmane/workers-py that referenced this pull request Apr 29, 2026
…m workerd

Import it in a pth file. Will take effect once cloudflare/workerd#6687 is merged
and the compat flag is turned on.
Some packages rely on this behavior. I also want to use it in
workers-runtime-sdk to implement entropy hooks.
@hoodmane hoodmane force-pushed the python-modules-process-pth-files branch from 1725f3c to 2b23217 Compare April 29, 2026 21:26
@hoodmane hoodmane merged commit 628b230 into main Apr 30, 2026
23 checks passed
@hoodmane hoodmane deleted the python-modules-process-pth-files branch April 30, 2026 00:29
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.

4 participants