Skip to content

Gracefully handle code which has been imported from a zipfile#456

Merged
theskumar merged 1 commit intotheskumar:mainfrom
samwyma:main
Apr 17, 2023
Merged

Gracefully handle code which has been imported from a zipfile#456
theskumar merged 1 commit intotheskumar:mainfrom
samwyma:main

Conversation

@samwyma
Copy link
Copy Markdown
Contributor

@samwyma samwyma commented Apr 10, 2023

I encountered this issue when loading my codebase into Spark via the --py-file option. Basically, if a file in a zip archive tries to call load_dotenv(), and that file is then imported, it will cause an error. Hopefully the test cases are self-explanatory!

@theskumar
Copy link
Copy Markdown
Owner

Thanks you @samwyma for this patch and a comprehensive test case.

@theskumar theskumar merged commit 137bc3d into theskumar:main Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants