Skip to content

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

Merged
merged 2 commits into from
Feb 14, 2019

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Jan 28, 2019

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

setup.py Outdated
"pyOCD!=0.13.0"
"six==1.*",
"pyserial==3.*",
"pyOCD>=0.13.1,<0.14.0"
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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:

Copy link
Contributor

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..

Copy link
Contributor Author

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)

Copy link
Contributor

@RomanSaveljev RomanSaveljev Feb 12, 2019

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.

@bridadan bridadan changed the title Pin python dependencies to an API version Pin python dependencies to an API version, remove pyocd dependency Feb 13, 2019
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.
@bridadan
Copy link
Contributor Author

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.

@bridadan
Copy link
Contributor Author

Anything blocking this?

@RomanSaveljev RomanSaveljev merged commit d0059c7 into ARMmbed:master Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants