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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ matrix:
name: "tools-py35"
env: NAME=tools-py3.5
language: python
python: 3.5
python: 3.7
install:
# Install gcc
- source_pkg gcc
Expand All @@ -217,8 +217,7 @@ matrix:
hypothesis>=3,<4
coverage>=4.5,<5
"
- python -m pip install --upgrade pip==18.1
- python -m pip install --upgrade setuptools==40.4.3
- pip install --upgrade pip
- pip install -r requirements.txt
- pip list --verbose
script:
Expand All @@ -228,16 +227,6 @@ matrix:
- coverage run -a tools/project.py -S | sed -n '/^Total/p'
- coverage html

- <<: *pytools-vm
name: "tools-py36"
env: NAME=tools-py3.6
python: 3.6

- <<: *pytools-vm
name: "tools-py37"
env: NAME=tools-py3.7
python: 3.7

- &extended-vm
stage: "Pin validation"
name: "pinvalidate"
Expand All @@ -246,8 +235,7 @@ matrix:
python: 3.7
install:
# Install python modules
- python -m pip install --upgrade pip==18.1
- python -m pip install --upgrade setuptools==40.4.3
- pip install --upgrade pip
- pip install tabulate argparse
- pip list --verbose
# Fetch the base branch to compare against
Expand Down Expand Up @@ -302,8 +290,8 @@ matrix:
- &cmake-build-run-unittest
stage: "CMake"
name: "CMake unittest build"
env: NAME=cmake_unittest
install:
env: NAME=cmake_unittest
install:
# Hide Travis-preinstalled CMake
# The Travis-preinstalled CMake is unfortunately not installed via apt, so we
# can't replace it with an apt-supplied version very easily. Additionally, we
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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.

junit-xml==1.8
pyyaml==4.2b1
PyYAML>=5.4
jsonschema==2.6.0
future>=0.18.0,<1.0
six==1.12.0
mbed-cloud-sdk>=2.0.6,<2.1
requests>=2.20,<2.21
requests>=2.20,<3
idna>=2,<2.8
pyserial>=3,<=3.4
Jinja2>=2.10.1,<2.11
jinja2>=2.11.3
intelhex>=2.3.0,<3.0.0
mbed-ls>=1.5.1,<2.0
mbed-host-tests>=1.4.4,<2.0
Expand All @@ -26,6 +26,6 @@ cmsis-pack-manager>=0.2.3,<0.3.0
pywin32==224;platform_system=='Windows'
wmi==1.4.9;platform_system=='Windows'
psutil==5.6.6
cryptography>=2.5,<3
cryptography>=3.2,<4
Click>=7.0,<8
cbor>=1.0.0
4 changes: 2 additions & 2 deletions tools/cmake/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prettytable==0.7.2
future==0.16.0
Jinja2>=2.10.1,<2.11
future>=0.18.0,<1.0
jinja2>=2.11.3
intelhex>=2.3.0,<3.0.0