Skip to content

Implements support for python_modules for packages in Python Workers #9905

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

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

dom96
Copy link
Contributor

@dom96 dom96 commented Jul 9, 2025

Fixes EW-9326

We don't want the vendored packages to live in src/vendor anymore, instead we want them to be similar to node_modules. This PR implements this but retains support for src/vendor for now, with an error being thrown if both directories are present.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: not a public facing feature
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: beta product

Test Plan

$ pnpm run test --filter wrangler -- -t "should print vendor modules correctly in table" src/__tests__/deploy.test.ts

@dom96 dom96 requested a review from a team as a code owner July 9, 2025 16:09
Copy link

changeset-bot bot commented Jul 9, 2025

🦋 Changeset detected

Latest commit: 703d498

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jul 9, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@9905

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@9905

miniflare

npm i https://pkg.pr.new/miniflare@9905

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@9905

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@9905

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@9905

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@9905

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@9905

wrangler

npm i https://pkg.pr.new/wrangler@9905

commit: 703d498

@dom96 dom96 force-pushed the dominik/python-modules-dir branch from 75e914e to 9a5126f Compare July 9, 2025 16:34
@dom96 dom96 force-pushed the dominik/python-modules-dir branch 2 times, most recently from 3663186 to 1384b66 Compare July 10, 2025 10:01
@dom96 dom96 force-pushed the dominik/python-modules-dir branch 3 times, most recently from c0dac42 to 2320dec Compare July 14, 2025 14:52
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 14, 2025
@dom96 dom96 force-pushed the dominik/python-modules-dir branch from 2320dec to 703d498 Compare July 14, 2025 16:17
@dom96 dom96 merged commit 4ba9f25 into main Jul 14, 2025
30 checks passed
@dom96 dom96 deleted the dominik/python-modules-dir branch July 14, 2025 17:05
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants