-
Notifications
You must be signed in to change notification settings - Fork 752
Min
/MaxSupportedVersion
and IsSupportedVersion
on PythonEngine
#1798
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,10 @@ public static string PythonPath | |
} | ||
} | ||
|
||
public static Version MinSupportedVersion => new(3, 7); | ||
public static Version MaxSupportedVersion => new(3, 10, int.MaxValue, int.MaxValue); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe something more "readable", like 999 instead of maxint? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought of that, but it won't work if there are builds of Python that use build number not as patch (e.g. patch .4), but in a Windows manner like .19041.365, or maybe do What do you think? |
||
public static bool IsSupportedVersion(Version version) => version >= MinSupportedVersion && version <= MaxSupportedVersion; | ||
|
||
public static string Version | ||
{ | ||
get { return Marshal.PtrToStringAnsi(Runtime.Py_GetVersion()); } | ||
|
Uh oh!
There was an error while loading. Please reload this page.