-
Notifications
You must be signed in to change notification settings - Fork 10
Pin python dependencies to an API version, remove pyocd dependency #158
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
Conversation
setup.py
Outdated
"pyOCD!=0.13.0" | ||
"six==1.*", | ||
"pyserial==3.*", | ||
"pyOCD>=0.13.1,<0.14.0" |
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.
is there coming breaking changes to pyocd?
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.
The 0.14.0
already released breaking changes. My understanding was the implementation inside mbed-flasher
used the 0.13.x API. But if it works with 0.14.x I can adjust the range!
Plus as far as semantic versions go, the minor number is what dictates API compatibility, so I just pinned that one.
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.
In Mbed OS we currently pin the pyocd version because it is not pinned here and can cause breakages. I'm now being asked to update the version within Mbed OS to version 0.16.x due to new target support: ARMmbed/mbed-os#9481 (comment)
Do you actively use pyocd to flash? Would it be possible to make it an optional dependency like we currently do in mbed-os-tools:
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 are not using pyocd actively yet, in fact pyocd integration is broken in master 😄. but we have near future plans to start using pyocd also in CI so this PR is just fine for now if its okay for you. We have to think about if it could be optionally but lets pin it first..
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.
If pyocd is broken in master, do you mind if I either:
- Remove the pyocd implementation
- Make the imports conditional? So if Pyocd isn't present, it'll just print an error saying you need to install it? (we do this in mbed-os-tools, link above)
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.
- Remove the pyocd implementation
This is okay with me. According to https://github.com/ARMmbed/isgtesting-arch/pull/24 we will be working on pyOCD integration on mbed-flasher branch.
Wherever pyocd is used, the imports are wrapped in try/except blocks and an error code returned. It seems as though it is already and optional dependency, so I'm removing the hard requirement.
I've removed pyocd from the dependency list, please let me know if you need anymore changes. I've updated my first comment with more information on why removing the pyocd dependency without modifying the rest of the code base seems to be ok. |
Anything blocking this? |
Status
READY
Migrations
NO
Description
Pin all of the python dependencies to at least the latest major version to ensure stability.
Edit: Also remove pyocd as a dependency. Wherever pyocdis used, the imports are wrapped in try/except blocks and an error code returned. It seems as though it is already an optional dependency, so I'm removing the hard requirement.
Related PRs
#157
ARMmbed/icetea#73
ARMmbed/mbed-os-tools#62
ARMmbed/mbed-os#9389