-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix deprecation issues with older Python code #296
Conversation
tools/python/mbed_os_tools/test/host_tests_conn_proxy/conn_primitive_fastmodel.py
Show resolved
Hide resolved
@multiplemonomials any ideas?
|
Hmm, I think this is an issue with the "detect code" of the Nucleo H5 board not being known to Mbed, not anything to do with Python deprecation. Taking a look, you might need to update the DEFAULT_PLATFORM_DB dict in mbed-os/tools/python/mbed_os_tools/detect/platform_database.py |
Aha, I did not know about this database. I fill the numbers and it is OK now. |
Summary of changes
As @JohnK1987 discovered, the Mbed OS Python packages currently have some issues with newer python versions, in particular Python 3.12 and 3.13. 3.12 removed a number of legacy packages, such as
imp
,pkg_resources
, andoptparse
. For the most part, thembed_tools
package (being developed only a few years ago), is free of these issues, but the older python packages (which are mainly used for running tests) had a fair amount of issues that needed to be fixed.With the changes in this PR, I am now able to run all the Python tests successfully using Python 3.13!
As part of this, I also ended up removing the mbed-greentea package. It had several of its own deprecation issues, and it seems to be entirely composed of either legacy names for stuff in
mbed_os_tools.test
or exact duplicates of files & tests from that package.Impact of changes
Python scripts no longer error our on Python >= 3.12
Migration actions required
Documentation
Pull request type
Test results