-
Notifications
You must be signed in to change notification settings - Fork 25
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
Update SPMT to Python 3.10 - PEP498 Literal String Interpolation #60
Conversation
8769b26
to
77db4eb
Compare
Fix spec file
b8a4597
to
23f0e44
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some changes needed, see inline comments.
Also, the timeThis
function in src/misc.py
needs updating as newer versions of python no longer have the time.clock()
function:
Index: src/misc.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/misc.py b/src/misc.py
--- a/src/misc.py
+++ b/src/misc.py
@@ -491,9 +491,9 @@
def timeThis(function, *args):
try:
- start = time.clock()
+ start = time.time()
val = function(*args)
- end = time.clock()
+ end = time.time()
return val, (end - start)
except Exception:
return None, None
Fixed all review suggestions. Thanks for those catches! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7d6a69d
i've tested as much as I can using this PR with the changes suggested. without a dedicated test framework this is the best we can do.
6423c0b Bump python to 3.10 (Liquid369) Pull request description: This will update our GitHub actions to use Python 3.10 instead of the current version 3.7. Python EOL's are intended 5 years after their release date. Python 3.7 was released in June 2018. Therefore the EOL was June 2023. As it is now 2024, we are bumping to Python 3.10 for wider compatibility and support. Note: Windows failure is from PyQt lib which will be/is updated in #60 ACKs for top commit: Fuzzbawls: ACK 6423c0b Tree-SHA512: 2206fdb9490a99c3133d8fa067bfe5c873aeff38164e0304d170bdcc57ed80c9e363884ca01549e94d09f4e3dafa83495cc911e4bc572692eb99b26b014f8830
This pull request is updating the entire codebase to PEP 498 standards using fstrings.
This PEP proposed a new syntax for formatting strings that is more concise, readable, and less error-prone compared to other string formatting methods like str.format() or % formatting. F-strings allow you to embed expressions inside string literals by prefixing the string with f or F and enclosing the expressions within curly braces {}.
I have updated every file to this standard and tested that our application is still functioning.
We have in this the added PyQt version bumped to
5.15.10
Then we have also set wheel and setup tools to specific versions to avoid any of our dependancies with setup.py warnings on depreciation coming.
There is a small update in the spmt.py that is not the fstrings, but for testing purposes I needed to convert the splash sizing into an integer to load. This can be removed for a different fix, or whichever.