Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Feature/convert to py3 #250

Merged
merged 35 commits into from
Sep 27, 2019
Merged

Feature/convert to py3 #250

merged 35 commits into from
Sep 27, 2019

Conversation

alwa-nordic
Copy link
Contributor

No description provided.

kenr and others added 29 commits June 19, 2019 15:39
This is work in progress
There is a rather arbitrary decision make in this change that PEMs are
represented in bytes. It was selected in the interest of keeping
conversions to a minimum. Both bytes and str are good candidated for
representing PEM, which consists only of ascii chars.
Python's types.NoneType is no longer available, and it was not used
anyway.
The test will still not complete due to changes in interal apis.
The new pc_ble_driver_py module with py3 support is SDv5 based.
The alternative is to instead .decode('ascii') the result from get_sk,
but since everyting is ascii, bytes is a suitable (as intended) type
that can actually be safer in case PEM files cannot contain non-ascii
values.
struct.pack in Python 3 returns bytes which gives ints when iterated
over.
This way, importing nordicsemi works without changes to PYTHONPATH.
bihanssen
bihanssen previously approved these changes Sep 25, 2019
Copy link
Contributor

@bihanssen bihanssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good as far as I can see. Nice job!

Copy link
Contributor

@kenr kenr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@alwa-nordic alwa-nordic merged commit 809c9bf into master Sep 27, 2019
@alwa-nordic alwa-nordic deleted the feature/convert-to-py3 branch October 16, 2019 10:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants