-
Notifications
You must be signed in to change notification settings - Fork 474
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
Packaging fails when using type aliases with explicit type
#4007
Comments
type
Notably, this doesn't seem to fail if you just do |
This happens because Upgrade to a higher Py version will happen through serious-python. |
Thanks, that's helpful and also explains why I am running into various other SyntaxError issues like with As a suggestion, maybe the build command can provide a warning if the current Python version is > than the one used in packaging? |
Nice suggestion. |
Is there anything I could do to help upgrade serious-python to Python 3.12.3+? I'd gladly submit a PR because I need this. |
This may be addressed by flet-dev/serious-python#109. There are number of dependent PRs in Kivy/kivy-ios and python-for-android that need to be tested, merged, and added to serious-python in order to unblock this. |
Duplicate Check
Describe the bug
When packaging a Flet app (e.g. via
flet build macos
), type aliases seem to cause build failures (but works fine when running withflet run
). On smaller applications, this is flagged in verbose mode as a syntax error, but in larger applications (seemingly defined as ones with many dependencies even if no real logic), this fails opaquely.Example error in smaller application:
Example error in larger application:
Code sample
Running
flet build macos -vv
on simple Hello World app.Failing:
Works:
Both work when running via
flet run
The only difference between smaller vs larger app re the missing error logs is the amount of requirements in requirements.txt. Small app has few to no requirements where the large app has many (even though the app remains just hello world).
To reproduce
Run
flet create hello_world
and add a type alias declaration to main.py (or any file). Then runflet build macos -vv
.Operating System
macOS - M1 Pro
Operating system details
Sonoma 14.5
Flet version
0.24.1
Python version
Running Python 3.12.3
Regression
I'm not sure / I don't know
The text was updated successfully, but these errors were encountered: