-
Notifications
You must be signed in to change notification settings - Fork 504
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
Move checkbin and download to use buildops. #1671
Conversation
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.
HI @Julian-O !
I've found an issue + a potential improvement, can you take care of it?
buildozer/targets/osx.py
Outdated
'Kivy.dmg', | ||
cwd=cwd | ||
) | ||
except urllib.Error: |
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.
Does urllib.Error
exists?
These: https://github.com/python/cpython/blob/3.11/Lib/urllib/error.py are the valid errors that urllib
can raise.
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.
Will fix. This one annoys me because I deliberately set up an prototype to see what errors actually got raised, and then I managed to write it down wrong. And static code analysis didn't save me. :-(
buildozer/targets/osx.py
Outdated
f'https://kivy.org/downloads/' | ||
f'{current_kivy_vers}/Kivy.dmg', |
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.
Minor: Can we improve the readability by avoiding the string slicing?
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.
The full string went over the 79/80 character line limit, so I split it in two.
Would putting them in parenthesis and adding them together help?
I will go back to breaking the line length rules for now, so this minor issue isn't blocking us.
This is part of a larger refactoring to simplify the Buildozer class. * Remove checkbin() and download() methods (plus some definitions only used by download(). * Migrates all references to use the Buildops equivalents. * Migrate shelling out to "curl" to use download instead. Note: The Buildops versions have completely different implementations to the original Buildozer ones, but the semantics are the same. New versions are more platform-independent, expected to be faster and don't use deprecated library calls.
558b0ca
to
11a7055
Compare
Changes made. Test failed due to:
Doesn't sound like me. Could you please trigger it again? |
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.
LGTM. Thank you!
(re-triggered the CI jobs, and let's wait a completion, but I do not expect a failure due to your changes)
Take your time! The next PR isn't ready yet. Tests are passing on my machine but giving cryptic compiler errors on the CI build, and I am at wit's end. |
This is part of a larger refactoring to simplify the Buildozer class.
Note: The Buildops versions have completely different implementations to the original Buildozer ones, but the semantics are the same. New versions are more platform-independent, expected to be faster and don't use deprecated library calls.
[Note to reviewers: This should be a straightforward one, but heads up that I am expecting the next PR to be a doozy.