Closed stephendpmurphy closed 3 years ago
Confirmed, you are probably using a python release before 3.9 - I used a 3.8.5 in WSL2, no problems with a 3.9.1 under Windows.
This is due to the use of the type hint in https://github.com/pyocd/pyOCD/blob/5a835e1017182975a11a4caddd83332f74b75fa4/pyocd/subcommands/pack_cmd.py#L48
That specific syntax for set (set[str]
Generic Alias Type) has been introduced in Python 3.9.
As the main readme states 3.6 or above, this should be replaced with just set
(or maybe use a TypeVar?).
This seems to be the only instance of set[str]
, but I'm not sure whether other similar hints are elsewhere in the code, so I'm not making a PR for this.
Whoops! That would be my fault. 😬 The type annotations used in pyocd should be compatible with 3.6+. However, I'm still getting used to using type annotations and type checking with Python, so I'm bound to make mistakes. I'll fix it right away. It should be replaced with Set[str]
, using typing.Set
.
Also need to extend the GitHub Actions workflow to compile all the pyocd code, so language incompatibilities with earlier versions of Python can be detected.
Thanks for reporting this!
Ahh, thanks for the responses guys. I've updated to Python3.9.4 and was able to build and test my changes successfully :+1:
Thanks!
Hello :wave:
I am attempting to make some contributions to the project but I can't seem to get the install from source to work. I am building from the master branch via:
The installation runs no problem, however when I execute
pyocd
I get the following error.