Skip to content
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

Merged
merged 3 commits into from
Aug 29, 2023
Merged

Conversation

Julian-O
Copy link
Contributor

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.

[Note to reviewers: This should be a straightforward one, but heads up that I am expecting the next PR to be a doozy.

Copy link
Member

@misl6 misl6 left a 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?

'Kivy.dmg',
cwd=cwd
)
except urllib.Error:
Copy link
Member

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.

Copy link
Contributor Author

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. :-(

Comment on lines 50 to 51
f'https://kivy.org/downloads/'
f'{current_kivy_vers}/Kivy.dmg',
Copy link
Member

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?

Copy link
Contributor Author

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.
@Julian-O
Copy link
Contributor Author

Changes made.

Test failed due to:

Integration (apple-silicon-m1, 3.9.7)
The self-hosted runner: apple-silicon-humongous-avocet lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

Doesn't sound like me. Could you please trigger it again?

Copy link
Member

@misl6 misl6 left a 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)

@Julian-O
Copy link
Contributor Author

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.

@misl6 misl6 merged commit 236b22a into kivy:master Aug 29, 2023
14 checks passed
@Julian-O Julian-O deleted the buildops_cb_d branch September 11, 2023 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants