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

Add support for Python3 #12

Open
user2684 opened this issue Aug 3, 2021 · 1 comment
Open

Add support for Python3 #12

user2684 opened this issue Aug 3, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@user2684
Copy link
Collaborator

user2684 commented Aug 3, 2021

Describe the solution you'd like
Switch to python3

@user2684 user2684 added the enhancement New feature or request label Aug 3, 2021
@user2684
Copy link
Collaborator Author

user2684 commented Aug 19, 2021

Requirements

  • Backwards compatibility with packages using python2
  • Interpretability of packages using different languages

Design

  • Python3 is added ON TOP of python2 within the SDK so to allow packages using python2 to continue working
  • A new folder called "python3" is added with the new code. To run a module code with python3, this has to be run with python3 -m sdk.python3.module.start
  • A new setting called "language" is added to the manifest (without changing the manifest schema). Docker entrypoint script searches for this value, If not present, python2 is used, if set the provided language is used (at this time only python3 but this opens up to other languages like go).

Other Changes

  • A few changes have been introduced for python3 SDK to deal with bytes to be decoded into strings
  • Resin raspbian based image (containing a too old version of python3. - 3.4) has been migrated to balena rpi-raspbian image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant