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

Python reference equality changed to value equality #13077

Merged
merged 1 commit into from
Jun 8, 2020

Conversation

pea-pod
Copy link
Contributor

@pea-pod pea-pod commented Jun 7, 2020

Summary of changes

In tools/config/__init__.py a reference comparison (is) was used to compare a variable with a string literal, but a value comparison (==) should be used instead.

This shows up as a python warning during compilation. Python documentation is here for the obsolete Python 2.7, the minimum supported version (by the Python foundation) 3.5, and the latest 3.9.

Impact of changes

This will remove the warning emitted during compilation with the cli (and probably elsewhere).

This should fix any potential issues if cpython and friends decide to change how string caching works.

Migration actions required

None.

Documentation

None.


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom requested review from a team June 7, 2020 23:00
@ciarmcom
Copy link
Member

ciarmcom commented Jun 7, 2020

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

@mergify mergify bot added needs: CI and removed needs: review labels Jun 8, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 8, 2020

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 8, 2020

Test run: SUCCESS

Summary: 6 of 6 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Jun 8, 2020
@0xc0170 0xc0170 merged commit a28e809 into ARMmbed:master Jun 8, 2020
@mergify mergify bot removed the ready for merge label Jun 8, 2020
@mergify
Copy link

mergify bot commented Jun 8, 2020

This PR does not contain release version label after merging.

@mergify mergify bot added the release version missing When PR does not contain release version, bot should label it and we fix it afterwards label Jun 8, 2020
@0xc0170 0xc0170 removed the release version missing When PR does not contain release version, bot should label it and we fix it afterwards label Jun 8, 2020
@adbridge adbridge added release-version: 6.1.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants