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: Allow newer prettytable with newer python #14940

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Jul 21, 2021

Summary of changes

This helps to allow installation of Mbed OS requirements into the same
Python environment as mbed-os-tools or mbed-os.

Impact of changes

None

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


0xc0170
0xc0170 previously approved these changes Jul 21, 2021
@Patater
Copy link
Contributor Author

Patater commented Jul 21, 2021

CI started

requirements.txt Outdated
@@ -1,6 +1,7 @@
colorama==0.3.9
urllib3[secure]>=1.26.5
prettytable==0.7.2
PrettyTable<=1.0.1; python_version < '3.6'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to handle version < 3.6? From b8388cd:

A few libraries we depend on no longer support old versions of Python
like 3.5 and 3.6. Remove testing for these old versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We haven't removed python 2 support, yet, so this covers there. Old python 3 doesn't necessarily need supporting, but there is no need to block it by requiring a prettytable version that has dropped support for that older python version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough

LDong-Arm
LDong-Arm previously approved these changes Jul 21, 2021
@mergify mergify bot added needs: work and removed needs: CI labels Jul 21, 2021
@mbed-ci
Copy link

mbed-ci commented Jul 21, 2021

Jenkins CI Test : ❌ FAILED

Build Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-cloud-example-ARM
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM
jenkins-ci/mbed-os-ci_build-greentea-ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_build-example-ARM
jenkins-ci/mbed-os-ci_build-example-GCC_ARM

@Patater
Copy link
Contributor Author

Patater commented Jul 21, 2021

CI seems to be failing on Mbed CLI 1 not being able to parse requirements.txt https://github.com/ARMmbed/mbed-cli/blob/master/mbed/mbed.py#L1024

Mbed CLI 1 parses the base requirements.txt and attempts to
automatically install missing python libraries for you. Unfortunately,
it's requirements parser is not as capable as the one shipping with pip.
In particular, we are unable to express different version of libraries
conditional on the version of Python being used.

    ---
    [mbed] ERROR: Unknown Error: Unsupported environment marker:  python_version < '3.6'

Remove the direct dependency on prettytable from requirements.txt, as
mbed-os-tools depends on prettytable and we can pick up the dependency
(as properly expressed conditionally on the Python version) from there,
without having to use the limited requirements parser in Mbed CLI 1.
This helps to allow installation of Mbed OS's Python requirements, when
CMake is used, into the same Python environment as mbed-os-tools. The
versions specified here are aligned with mbed-os-tools;
tools/cmake/requirements.txt depends on the same version of prettytable
as mbed-os-tools's requirements.txt.
@Patater
Copy link
Contributor Author

Patater commented Jul 21, 2021

Updated to dodge the limitations of the Mbed CLI 1 requirements parser.

@mergify mergify bot dismissed stale reviews from 0xc0170 and LDong-Arm July 21, 2021 12:58

Pull request has been modified.

@Patater
Copy link
Contributor Author

Patater commented Jul 21, 2021

CI started

@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Jul 21, 2021
@ciarmcom ciarmcom requested a review from a team July 21, 2021 13:00
@ciarmcom
Copy link
Member

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

@mbed-ci
Copy link

mbed-ci commented Jul 21, 2021

Jenkins CI Test : ✔️ SUCCESS

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@Patater Patater requested a review from LDong-Arm July 21, 2021 13:50
Copy link
Contributor

@LDong-Arm LDong-Arm left a comment

Choose a reason for hiding this comment

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

LGTM

@mbedmain mbedmain added Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Aug 18, 2021
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