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

Python3 fixes #11231

Merged
merged 1 commit into from Aug 15, 2019

Conversation

@OPpuolitaival
Copy link
Contributor

commented Aug 15, 2019

Description

Fix some python scripts to work with python 3.x

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

@OPpuolitaival OPpuolitaival requested review from JuhPuur, 0xc0170 and adbridge Aug 15, 2019

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 15, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@ciarmcom ciarmcom requested review from ARMmbed/mbed-os-maintainers Aug 15, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

@OPpuolitaival, thank you for your changes.
@ARMmbed/mbed-os-tools @ARMmbed/mbed-os-maintainers please review.

@adbridge
Copy link
Contributor

left a comment

I'm not yet familiar with python3 syntax but as far as I can tell this looks ok

@@ -331,7 +331,7 @@ def is_target_supported(cls, target_name):

@classmethod
def all_supported_targets(cls):
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)]
return [t for t in list(TARGET_MAP) if cls.is_target_supported(t)]

This comment has been minimized.

Copy link
@teetak01

teetak01 Aug 15, 2019

Contributor

Should this still be list(TARGET_MAP.keys()) for python2 compatibility?

Just wondering if that works still the same.

This comment has been minimized.

Copy link
@OPpuolitaival

OPpuolitaival Aug 15, 2019

Author Contributor

@teetak01 "list(TARGET_MAP.keys())" and "list(TARGET_MAP)" output is excatly same in both python versions 3.x and 2.7.x

This comment has been minimized.

Copy link
@OPpuolitaival

OPpuolitaival Aug 15, 2019

Author Contributor

Reference if you want to read: https://python-future.org/compatible_idioms.html

This comment has been minimized.

Copy link
@teetak01

teetak01 Aug 15, 2019

Contributor

Looks to fine. Also tested myself a bit between those.

@mbed-ci

This comment has been minimized.

Copy link

commented Aug 15, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 3
Build artifacts

@adbridge adbridge merged commit 0056d8e into ARMmbed:master Aug 15, 2019

25 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8516 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8464B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.