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

fix fastapi app path to module conversion on Windows #5858

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

sharon-wang
Copy link
Member

@sharon-wang sharon-wang commented Dec 24, 2024

Summary

Release Notes

New Features

  • N/A

Bug Fixes

QA Notes

Running fastapi_example.py with the App Launcher should now work on Windows.

PR Testing

@:apps

Windows Test Results 🎉

image

Copy link

github-actions bot commented Dec 24, 2024

E2E Tests 🚀  ?
This PR will run tests tagged with: @critical @apps

@sharon-wang sharon-wang marked this pull request as ready for review December 24, 2024 23:17
@sharon-wang sharon-wang requested a review from seeM December 24, 2024 23:17
seeM
seeM previously approved these changes Jan 2, 2025
Copy link
Contributor

@seeM seeM left a comment

Choose a reason for hiding this comment

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

LGTM! Out of curiosity, why didn't path.sep work on Windows?

@sharon-wang
Copy link
Member Author

LGTM! Out of curiosity, why didn't path.sep work on Windows?

Ah yeah, the relativeDir path seems to use UNIX path separators even on Windows 🤷 could be that the path library might be normalizing the path separator?

Example

  • relativeDir: workspaces/python_apps/fastapi_example
  • path.sep on Windows: \
  • relativeDir.split('\\') === ['workspaces/python_apps/fastapi_example'], since the path separator \ isn't found in the string workspaces/python_apps/fastapi_example

@sharon-wang sharon-wang force-pushed the bugfix/fastapi-path-split-windows branch from 99d4574 to 111d6a9 Compare January 8, 2025 19:10
@sharon-wang sharon-wang merged commit f576f53 into main Jan 8, 2025
27 of 28 checks passed
@sharon-wang sharon-wang deleted the bugfix/fastapi-path-split-windows branch January 8, 2025 20:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants