Skip to content

Update python requirements #14780

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

Merged
merged 4 commits into from
Jun 30, 2021
Merged

Conversation

Patater
Copy link
Contributor

@Patater Patater commented Jun 16, 2021

Summary of changes

Update Python dependencies to newer versions to get important updates for them.

Impact of changes

Not yet known.

Migration actions required

Not yet known.

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 added the release-type: patch Indentifies a PR as containing just a patch label Jun 16, 2021
@ciarmcom
Copy link
Member

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

@@ -1,16 +1,16 @@
colorama==0.3.9
urllib3[secure]==1.24.2
urllib3[secure]>=1.26.5
prettytable==0.7.2
Copy link
Collaborator

Choose a reason for hiding this comment

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

It is not linked with this PR :-)
But I often have issues with that prettytable requirement...
It is not in line with pyOCD: 'prettytable>=2.0,<3.0',
https://github.com/pyocd/pyOCD/blob/master/setup.py#L74

Maybe we can relax the version number here ?
Thx

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 need the higher version to get security fixes, so we can't relax. We can update pyOCD.

Copy link
Collaborator

Choose a reason for hiding this comment

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

pyOCD requests a higher version...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK. This should work fine then. We are going to use >= rather than ==.

Copy link
Contributor Author

@Patater Patater Jun 16, 2021

Choose a reason for hiding this comment

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

I followed up on our CI failure with the newer prettytable. We had pinned mbed-os-tools's requirement on prettytable as documented in a previous commit:

If we want to update prettytable, we need to drop Python 2.7 and 3.5 support.

    Latest release of `PrettyTable` (2.0.0) removed support for Python 2.7
    and 3.5 and is causing CI failures. We are still supporting those
    versions in mbed-os-tools. Therefore pin `PrettyTable` to 1.0.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we drop Python 2.7 and 3.5 (which are deprecated), could we also add cysecuretools? This package is needed by CYTFM_064B0S2_4343W (and one or two other Cypress targets if I remember correctly). We didn't add it because it only supports Python 3.6 and above.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to drop 2.7 and 3.5 (I thought 2.7 was already no supported).

Copy link
Contributor Author

@Patater Patater Jun 16, 2021

Choose a reason for hiding this comment

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

Dropping python2.7 will involve coordinated changes to many repos (mbed-os-tools, icetea, mbed-ls. I'll file an issue for doing this separately, including updating prettytable.

@Patater Patater force-pushed the update-python-requirements branch from c077dcd to e02465b Compare June 16, 2021 09:54
0xc0170
0xc0170 previously approved these changes Jun 16, 2021
@Patater Patater force-pushed the update-python-requirements branch from bd90609 to 7d647bd Compare June 16, 2021 10:42
@mergify mergify bot dismissed 0xc0170’s stale review June 16, 2021 10:43

Pull request has been modified.

@ciarmcom ciarmcom requested a review from a team June 16, 2021 11:00
@ciarmcom
Copy link
Member

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

@ciarmcom
Copy link
Member

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

@Patater Patater marked this pull request as ready for review June 16, 2021 13:54
@Patater Patater force-pushed the update-python-requirements branch from 7d647bd to 5c835cb Compare June 16, 2021 13:56
@Patater
Copy link
Contributor Author

Patater commented Jun 16, 2021

Removed prettytable update, as it requires dropping Python 2.7 and 3.5 across many repos. Filed #14784

@Patater Patater changed the title Update python requirements WIP Update python requirements Jun 16, 2021
0xc0170
0xc0170 previously approved these changes Jun 29, 2021
Patater added 4 commits June 30, 2021 09:12
As we depend on the cryptography library, and the pip version that comes
with Ubuntu Focal isn't new enough to avoid the following error about a
rust compiler and pre-built wheels, ensure Travis uses an up-to-date
pip.

    error: can't find Rust compiler

    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

    To update pip, run:

        pip install --upgrade pip
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.
Update versions of urllib3, PyYAML, jinja2, cryptography.
@Patater Patater force-pushed the update-python-requirements branch from 5c835cb to 9b09cdd Compare June 30, 2021 08:13
@mergify mergify bot dismissed stale reviews from rwalton-arm, LDong-Arm, and 0xc0170 June 30, 2021 08:13

Pull request has been modified.

@Patater
Copy link
Contributor Author

Patater commented Jun 30, 2021

CI started

@mergify mergify bot added needs: CI and removed needs: work labels Jun 30, 2021
@mbed-ci
Copy link

mbed-ci commented Jun 30, 2021

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

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

@ciarmcom ciarmcom removed the stale Stale Pull Request label Jun 30, 2021
@Patater Patater changed the title WIP Update python requirements Update python requirements Jun 30, 2021
@Patater Patater requested a review from 0xc0170 June 30, 2021 14:06
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.

8 participants