Skip to content
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

bug: Python Executor - Standard Library lookup missing "zlib" #5225

Open
lukeod opened this issue Feb 6, 2025 · 0 comments
Open

bug: Python Executor - Standard Library lookup missing "zlib" #5225

lukeod opened this issue Feb 6, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@lukeod
Copy link

lukeod commented Feb 6, 2025

Describe the bug

Python scripts that have:

import zlib

Error when deploying, as "uv" is trying to fetch it using pip. This is part of the python standard library, so this errors out.

https://docs.python.org/3/library/zlib.html

It seems it just needs to be added to /backend/parsers/windmill-parser-py-imports/src/lib.rs const STDIMPORTS, which seems to be a static list of imports.

For python3.10+, it would probably be better to populate this list dynamically. This method returns a list of standard lib module names - sys.stdlib_module_names. It might prevent future issues as new modules get added to the standard library. For instance "tomllib" was added in 3.11 and is also missing from the list.

To reproduce

  1. Create a new script using Python
  2. Import zlib
  3. Attempt to save/publish

Expected behavior

It should correctly identify zlib as a standard lib, and not attempt to source from pip repo.

Screenshots

No response

Browser information

No response

Application version

CE v1.457.0-1-g8a446a658

Additional Context

No response

@lukeod lukeod added the bug Something isn't working label Feb 6, 2025
@pyranota pyranota self-assigned this Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants