Skip to content

Conversation

@dom96
Copy link
Contributor

@dom96 dom96 commented Nov 14, 2025

Wrangler would output "Ignoring duplicate module" for each .txt file inside python_modules. This PR fixes this.

Turns out that this was happening because parseRules adds some default rules.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bug fix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not in v3

Test Plan

$ pnpm build -F wrangler
$ node /Users/dominik/repos/workers-sdk/packages/wrangler/wrangler-dist/cli.js dev

Before:

▲ [WARNING] Ignoring duplicate module: webtypy-0.1.7.dist-info/top_level.txt (text)
Attaching additional modules:
┌─────────────────────┬──────┬─────────────┐
│ Name                │ Type │ Size        │
├─────────────────────┼──────┼─────────────┤
│ Vendored Modules    │      │ 8941.49 KiB │
├─────────────────────┼──────┼─────────────┤
│ Total (383 modules) │      │ 8941.49 KiB │
└─────────────────────┴──────┴─────────────┘

After:

Attaching additional modules:
┌─────────────────────┬──────┬─────────────┐
│ Name                │ Type │ Size        │
├─────────────────────┼──────┼─────────────┤
│ Vendored Modules    │      │ 8941.49 KiB │
├─────────────────────┼──────┼─────────────┤
│ Total (383 modules) │      │ 8941.49 KiB │
└─────────────────────┴──────┴─────────────┘

@dom96 dom96 requested a review from a team as a code owner November 14, 2025 16:52
@changeset-bot
Copy link

changeset-bot bot commented Nov 14, 2025

🦋 Changeset detected

Latest commit: 5268b77

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

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

@github-actions
Copy link
Contributor

Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the v3-maintenance branch with your changes. Thank you for helping us keep Wrangler v3 supported!

Depending on your changes, running git rebase --onto v3-maintenance main dominik/fix-duplicate-python-vendor-warnings might be a good starting point.

Notes:

  • your PR branch should be named v3-backport-11284
  • add the skip-v3-pr label to the current PR to stop this workflow from failing

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 14, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11284

wrangler

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

commit: 5268b77

@petebacondarwin petebacondarwin force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from c46c66f to 301e811 Compare November 17, 2025 15:15
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Nov 17, 2025
@petebacondarwin
Copy link
Contributor

Yeah calling parseRules() is a bit overkill here

@petebacondarwin petebacondarwin force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from 301e811 to c63160e Compare November 17, 2025 19:30
@dom96 dom96 force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from c63160e to d615b89 Compare November 18, 2025 10:34
@dom96 dom96 force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from d615b89 to 36e9db0 Compare November 26, 2025 17:24
@dom96
Copy link
Contributor Author

dom96 commented Nov 26, 2025

@petebacondarwin Rebased, hopefully now this is mergeable 🙏

@dom96 dom96 force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from 36e9db0 to 95e5823 Compare November 28, 2025 10:29
@petebacondarwin petebacondarwin force-pushed the dominik/fix-duplicate-python-vendor-warnings branch from 95e5823 to 5268b77 Compare November 28, 2025 11:57
@petebacondarwin petebacondarwin added the skip-v3-pr Skip validation of presence of a v3 backport PR label Nov 28, 2025
@dom96 dom96 merged commit 695fa25 into main Nov 28, 2025
39 of 44 checks passed
@dom96 dom96 deleted the dominik/fix-duplicate-python-vendor-warnings branch November 28, 2025 15:06
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-v3-pr Skip validation of presence of a v3 backport PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants