Skip to content

Updates Python JS interop docs - adds import_from_javascript#28395

Open
mikenomitch wants to merge 1 commit intoproductionfrom
nomitch/python-js-interop
Open

Updates Python JS interop docs - adds import_from_javascript#28395
mikenomitch wants to merge 1 commit intoproductionfrom
nomitch/python-js-interop

Conversation

@mikenomitch
Copy link
Contributor

Summary

Clarifies JS interop for Python

@github-actions github-actions bot added product:workers Related to Workers product product:workflows Workflows: https://developers.cloudflare.com/workflows/ size/s labels Feb 17, 2026
@github-actions
Copy link
Contributor

This PR requires additional review attention because it affects the following areas:

Redirects

This PR changes current filenames or deletes current files. Make sure you have redirects set up to cover the following paths:

  • /workers/languages/python/ffi/

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/public/__redirects @cloudflare/content-engineering, @cloudflare/pcx-technical-writing
/src/content/compatibility-flags/ @irvinebroque, @mikenomitch, @GregBrimble, @cloudflare/pcx-technical-writing
/src/content/docs/workers/ @cloudflare/workers-docs, @GregBrimble, @irvinebroque, @mikenomitch, @korinne, @WalshyDev, @cloudflare/deploy-config, @cloudflare/pcx-technical-writing, @cloudflare/wrangler, @mattietk, @cloudflare/dev-plat-leads
/src/content/docs/workflows/ @elithrar, @celso, @mia303, @jonesphillip, @cloudflare/pcx-technical-writing

@elithrar
Copy link
Collaborator

/bonk thoroughly review this PR. strongly prefer suggestions via the gh CLI vs. making changes.

Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Review Summary

This is a solid PR that renames ffi.mdxjavascript-interop.mdx, updates all internal cross-references, adds a redirect, and introduces documentation for the import_from_javascript API. The changes are well-structured and I confirmed there are no stale references to the old /workers/languages/python/ffi/ path remaining anywhere in the repo.

What looks good

  • Redirect is correctly set up: /workers/languages/python/ffi//workers/languages/python/javascript-interop/ 301
  • All internal links to the old FFI page have been updated across 6 files (basics, index, packages, compatibility flag, workflows bindings)
  • Heading anchor update in bindings.mdx (#use-bindings-from-python-workers) correctly matches the new heading text in javascript-interop.mdx
  • No stale references — I grep'd the entire repo on the PR branch and confirmed zero remaining references to python/ffi
  • The import_from_javascript API is consistent with its existing usage in src/content/docs/workers/runtime-apis/bindings/index.mdx
  • Heading levels are correct (H2 → H3 → H2, no skips)
  • MDX syntax is clean, no unescaped special characters

Issues found (see inline comments)

  1. [nit] Missing description frontmatter — the page title changed but still has no description field (pre-existing, but worth adding since the page is being overhauled)
  2. [suggestion] The first import_from_javascript code example could be tightened — address is used but never defined
  3. [nit, pre-existing] "see out the" typo on line 107 — since the surrounding content is being touched, this is a good opportunity to fix it
  4. [nit, pre-existing] [here] link text on line 20 violates the style guide — same opportunity to fix

Other observations (not blocking)

  • The JSONC trailing comma additions in basics.mdx, javascript-interop.mdx, and bindings.mdx are valid JSONC inside <WranglerConfig> blocks — these are fine
  • The create_batch line-wrapping change in bindings.mdx is a pure formatting improvement and renders the same

Copy link
Contributor

@ask-bonk ask-bonk bot left a comment

Choose a reason for hiding this comment

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

Inline suggestions below.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 17, 2026

Additional nit (pre-existing): Line 107 of javascript-interop.mdx has a typo: "see out the" should be "see the" or "check out the":

For more details, see out the documentation on pyodide.ffi.to_js

This was present in the original ffi.mdx but since the page is being overhauled, it would be a good opportunity to fix it.

@ask-bonk
Copy link
Contributor

ask-bonk bot commented Feb 17, 2026

Review complete. Here is a summary of what I found:

Review of PR #28395

Overall: This is a clean, well-executed PR. The rename from ffi.mdx to javascript-interop.mdx is done correctly, the redirect is in place, all 6 cross-referencing files have been updated, and there are zero stale references to the old path in the repo.

What I verified

  • Redirect: /workers/languages/python/ffi//workers/languages/python/javascript-interop/ 301 -- correct
  • Zero stale references: grep'd the entire repo on the PR branch for python/ffi -- none remain
  • Anchor update: bindings.mdx references #use-bindings-from-python-workers which matches the new heading exactly
  • import_from_javascript API: consistent with existing usage in workers/runtime-apis/bindings/index.mdx
  • Module names: cloudflare:workers, cloudflare:sockets, cloudflare:vectorize are all valid Workers runtime modules
  • MDX syntax: no unescaped special characters, heading levels are sequential, code block languages are valid
  • JSONC trailing commas: valid inside <WranglerConfig> blocks

Suggestions submitted (3 inline + 1 comment)

  1. Missing description frontmatter on the renamed page (nit, good for SEO)
  2. Undefined address variable in the cloudflare:sockets code example -- could confuse copy-paste readers
  3. "here" link text on line 20 -- violates style guide (pre-existing)
  4. "see out the" typo on line 107 -- should be "check out the" or "refer to the" (pre-existing)

github run

@mikenomitch mikenomitch force-pushed the nomitch/python-js-interop branch from 66cd113 to f6e9f32 Compare February 17, 2026 20:28
@mikenomitch mikenomitch enabled auto-merge (squash) February 17, 2026 20:28
@mikenomitch mikenomitch disabled auto-merge February 17, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:workers Related to Workers product product:workflows Workflows: https://developers.cloudflare.com/workflows/ size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

Comments