Skip to content

fix: add cwd to sys.path for functions yaml #12

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

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented Dec 7, 2022

Allow import of relative files in main.py by adding the cwd to the sys.path. Otherwise getting /__/functions.yaml will raise an exception that imports could not be found.

There's probably a better way to do this but my python foo is a little rusty.

Closes #92

Allow import of relative files in `main.py` by adding the cwd to the sys.path
@Salakar Salakar changed the title Add cwd to sys.path fix: add cwd to sys.path for functions yaml Jun 5, 2023
@Salakar Salakar merged commit 7025457 into firebase:main Jun 5, 2023
@mai-nakagawa
Copy link

Any plan to release the fix? Am looking forward to it.

@cowst
Copy link

cowst commented Oct 26, 2023

when will this be released?

@s3i7h
Copy link

s3i7h commented Jul 4, 2024

For anyone wondering about when it's released, this change was included in the 0.1.0 → 0.1.1 release. c.f.

https://github.com/firebase/firebase-functions-python/compare/0.1.0..0.1.1#diff-611b247b57681d9d9ee07c513e69142e351232e407dda23ddbad53c44a64f5f5

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.

No Module Named when Referencing local packages (folders)
5 participants