Skip to content

Conversation

krzkuc1985
Copy link

@krzkuc1985 krzkuc1985 commented Sep 29, 2025

Description

This Pull Request (PR) focuses on enhancing compatibility with Python 3 across the project's tooling, primarily resolving issues that prevent scripts from running correctly in a Python 3 environment. The changes primarily involve fixing syntax and function calls that are deprecated or changed in Python 3 compared to Python 2.

Key changes include:

1. Python 3 Compatibility Enhancements:

  • Initial automated syntax migration using futurize -1 -w . for syntax cleanup towards Python 3 compatibility.
  • Manual replacement of long with int for Python 3 compatibility, as long was removed in Python 3.
  • Improvements in binary handling functions to ensure proper operation under Python 3.
  • Escaped backslashes in regex patterns for proper matching and handling in Python 3's string literals.

2. Tooling and Script Fixes:

  • Changed Python invocation in tools to be version-neutral.
  • Corrected indentation and formatting in the combine_bin function within gen_appbin_user.py.

3. Version Update:

  • Updated the project version to 3.0.7.

This work is part of a broader effort to ensure the project's tools and scripts function correctly and reliably in a modern Python 3 environment.

Related

This PR addresses and fixes one of the compatibility issues reported in:

  • Fixes part of gen_appbin.py fails with Python 3 #375
  • The changes, particularly the enhancements to binary handling and syntax migration, resolve issues where scripts like gen_appbin.py failed when executed with Python 3.

Testing

The changes were tested thoroughly by:

  • Executing the modified tools and scripts in both Python 2 and Python 3 environments.
  • Verification of correct execution and output was confirmed on both versions, ensuring that the compatibility fixes for Python 3 did not introduce regressions in Python 2.

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