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

staticx: Rework code for PyInstaller pre-5.10 #237

Merged
merged 2 commits into from
Apr 16, 2023

Conversation

JonathonReinhart
Copy link
Owner

Where #236 adapted the new API to the old API with if pre_510 checks, this takes the opposite approach: Use the new API, and add an adapter class to adapt the old API to the new.

Benefits:

  • No more if pre_510 checks in the middle of processing code.
  • Removing the legacy behavior becomes trivial: delete the adapter.

Tested:

git clean -fdx test/
pip install pyinstaller==5.9
./test/run_all.sh

git clean -fdx test/
pip install pyinstaller==5.10
./test/run_all.sh

Where #236 adapted the new API to the old API with "if pre_510" checks,
this takes the opposite approach: Use the new API, and add an adapter
class to adapt the old API to the new.

Benefits:
- No more "if pre_510" checks in the middle of processing code.
- Removing the legacy behavior becomes trivial: delete the adapter.

Tested:
- git clean -fdx test/
- pip install pyinstaller==5.9
- ./test/run_all.sh
- pip install pyinstaller==5.10
- ./test/run_all.sh
@JonathonReinhart JonathonReinhart merged commit 31135fa into master Apr 16, 2023
@JonathonReinhart JonathonReinhart deleted the pyinstaller510-updates branch April 16, 2023 06:37
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.

1 participant