Skip to content

fix: allow stdlib imports from sub modules, reject relative imports#390

Merged
hholb merged 1 commit into
devfrom
hholb/fix-app-validation
Mar 9, 2026
Merged

fix: allow stdlib imports from sub modules, reject relative imports#390
hholb merged 1 commit into
devfrom
hholb/fix-app-validation

Conversation

@hholb

@hholb hholb commented Mar 9, 2026

Copy link
Copy Markdown
Member

Resolves: #389

Overview

This PR tweaks the modal app validation logic to allow imports from stdlib sub-modules in the from of import urllib.requests and from urllib.requests import ...

I also added explicit checks to reject relative imports like import .mymodule and from ..mymodule import ...

Testing

Some new unit tests!

@hholb hholb marked this pull request as ready for review March 9, 2026 17:59
@hholb hholb merged commit 4c5a799 into dev Mar 9, 2026
1 check passed
@hholb hholb deleted the hholb/fix-app-validation branch March 9, 2026 18:11
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.

bug: Modal App validation rejects from urllib.request import urlretrieve

2 participants