-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
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' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough
Jenkins CI Test : ❌ FAILEDBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
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.
cacc434
to
14d4ee3
Compare
Updated to dodge the limitations of the Mbed CLI 1 requirements parser. |
Pull request has been modified.
CI started |
@Patater, thank you for your changes. |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
Test results
Reviewers