-
Notifications
You must be signed in to change notification settings - Fork 10
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
Minimum python version #12
Comments
I think we should not target anything below 3.9. Not sure how we should version this going forwards? Not sure I want to end up with multiple branches targeting different Python versions, and publish multiple NuGets for each Python version. We should try to make things simple. But what to do with e.g methods and functions added in 3.10? Should we wait until we target 3.10 as the minimum version? |
IMO it's best to have something like @available(iOS 9.0, *)
func useStackView() {
// use UIStackView
} and if #available(iOS 9.0, *) {
// use UIStackView
} else {
// show sad face emoji
} to determine different versions & generate types accordingly, if possible. |
I think we can use coconut: " Why use Coconut? Coconut is built to be useful. Coconut enhances the repertoire of Python programmers to include the tools of modern functional programming, in such a way that those tools are easy to use and immensely powerful; that is, Coconut does to functional programming what Python did to imperative programming. And Coconut code runs the same on any Python version, making the Python 2/3 split a thing of the past. Specifically, Coconut adds to Python built-in, syntactical support for:
and much more! |
@hlizard Coconut looks like a really nice project, but I don't think it's the right abstraction for Fable. Python 2 is out of the question anyways, and solving the Python 3 problem would only be replaced with a similar Coconut version problem. |
Just to add to the discussion, right now Fable python target compiles code that doesn't seem to load in python 3.9.7, providing this error message:
Stemming from from .types import FSharpRef, Record As far as I could search, it is from an error related to type annotation in conjunction with the @DataClass attributes that are put in the fable.core standard library for python, and it seems to trip the 3.9.7 parser. I don't know exactly in which release it starts to work, it does work on 3.11.2, and I vaguely remember seeing "fixed in 3.10" but I can't find the PEP nor the stackoverflow answer that pointed me there. For this reason, I'd suggest not mentioning python 3.9 or bumping this to a higher version in the readme of this repository. As for the bindings in this repository and which version of the python library to support, that seems to be a big can of worm, python seems to be evolving fast, some of my own code written few months back starts giving me deprecation warnings after doing a minor bump of the python version. |
Yes, agree. Removing support for Python 3.9 in Fable. Will update the readme |
What version will this be working starting from ?
I.e. in https://github.com/python/typeshed/blob/master/stdlib/uuid.pyi
there are separate type for version 3.7 and above and others. So, it's best to determine which this lib will support right away.
The text was updated successfully, but these errors were encountered: