Skip to content

Allow wcmatch 12 in the Python SDK - #2167

Open
itzzdev09 wants to merge 1 commit into
e2b-dev:mainfrom
itzzdev09:python-sdk-allow-wcmatch-12
Open

itzzdev09 wants to merge 1 commit into
e2b-dev:mainfrom
itzzdev09:python-sdk-allow-wcmatch-12

Conversation

@itzzdev09

@itzzdev09 itzzdev09 commented Nov 22, 2026 •

Copy link
Copy Markdown

The Python SDK pins wcmatch>=10.1,<12. wcmatch 12.0 came out on 3 Nov, so e2b can't be installed next to packages that require it.

The SDK only calls wcmatch.glob.glob(src, flags=GLOBSTAR | DOTMATCH, root_dir=...) in e2b/template/utils.py. wcmatch 12's breaking changes are limited to EXTGLOB/EXTMATCH inverse groups (!(...)), and those flags aren't used here. This raises the cap to <13. uv.lock changes only in the requires-dist specifier (uv lock --check passes), and there's a patch changeset for @e2b/python-sdk.

Tests: pytest tests/shared/template (including test_get_all_files_in_path.py) on Python 3.12: 200 passed / 2 skipped with both wcmatch 11.2 and 12.0.


Devin Review

@cla-bot

cla-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @itzzdev09 on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check'

@changeset-bot

changeset-bot Bot commented Nov 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eb0c208

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

This PR includes changesets to release 2 packages
Name Type
@e2b/python-sdk Patch
@e2b/code-interpreter-python 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T14:11:32.967782Z eb0c208 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TASTE.md review: complies — 0 violations. The PR only widens the wcmatch cap to <13 (pyproject.toml + uv.lock specifier) and adds a patch changeset; it touches no public SDK surface, so none of T-1–T-74 (parity, API shape, types, errors, config, docstrings) apply.

Written by Devin

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

{ name = "rich", specifier = ">=14.0.0" },
{ name = "typing-extensions", specifier = ">=4.10.0" },
{ name = "wcmatch", specifier = ">=10.1,<12" },
{ name = "wcmatch", specifier = ">=10.1,<13" },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Stale locks block Python workspace installs

After the cap changes, uv sync --locked rejects the Desktop and Code Interpreter workspaces. Both locks still record <12 for the local Python SDK, so dependency installation fails before either test suite starts.

Learn more

Both the Desktop workspace and the Code Interpreter workspace reference the checked-out Python SDK, not a published release. Each keeps its own copy of the local SDK’s requirements in its Desktop lock or Code Interpreter lock. The SDK test workflow triggers both jobs for this metadata change. The Desktop dependency install and Code Interpreter dependency install use --locked, which rejects changes to recorded package requirements even when the selected dependency version still satisfies the new range.

Example: Code Interpreter’s lock still selects wcmatch 11.0.1, which fits <13. Its recorded requirement remains <12, so the locked install fails before pytest runs.

Recommended fix: Run uv lock in both extension workspaces and commit the updated lockfiles. Check each workspace with its existing uv sync --locked --package command.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

dependencies = [
"python-dateutil>=2.8.2",
"wcmatch>=10.1,<12",
"wcmatch>=10.1,<13",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Extra files in Windows template uploads

On Windows, wcmatch 12 matches both input.txt and İnput.txt when a template copy names only input.txt. Both files enter the upload archive.

Learn more

TemplateBuilder.copy stores the source as provided. get_all_files_in_path passes it to wcmatch even when it is a literal filename. On Windows, wcmatch 11.2 compares lowercased literal components, while 12.0 and 12.0.4 match them with case-insensitive Python regular expressions. Those operations disagree for some Unicode characters, including the dotted capital I. The tar writer adds every returned file to the upload.

Example: Given directory entries input.txt and İnput.txt, matching the literal input.txt returned one entry on 11.2 and both entries on 12.0 and 12.0.4 in a simulated Windows listing using the SDK’s flags.

Recommended fix: Preserve literal path matching separately from wildcard matching or retain the previous cap until wcmatch preserves the former literal matching behavior. Add a Windows regression test that asserts that the template upload contains only the requested file.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

This branch has not been deployed

No deployments
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