Licensing.parse: Raise ExpressionParseError instead of ParseError#36
Conversation
ExpressionParseError is a subclass of both ParseError and ExpressionError. This allows the user to do `except ParseError` as they had done before, and nothing will break. If the user does `except ExpressionError`, the ParseErrors will now also be caught. The advantage of doing this is that `except ExpressionError` now catches all exceptions coming out of this method. This is therefore a breaking change. Signed-off-by: Carmen Bianca Bakker <carmen@carmenbianca.eu>
Signed-off-by: Carmen Bianca Bakker <carmen@carmenbianca.eu>
|
This Python 3.6 test is broken: https://travis-ci.org/nexB/license-expression/jobs/535835832 Not sure why, but The Python 2 tests are also broken because I use |
|
@carmenbianca Thank you ++ As for the Pyenv issue, sounds like the pyenv version on macOS is old... and your forced usage of Python 3 idioms brought that issue to light! The solution would be to update pyenv to the latest version as part of CI run. |
Signed-off-by: Carmen Bianca Bakker <carmen@carmenbianca.eu>
|
I have changed the code to be compatible with Python 2.7 I unfortunately do not know how to solve the pyenv issue. |
|
Sounds like we are affected by travis-ci/travis-ci#9929 |
|
@carmenbianca while @Abhishek-Dev09 is working out a way yo get Azure pipelines for proper testing on Scancode (that we can then reuse here too), I am merging this anyway as this should not be held by these issues. |
|
Thank you ++ |
Fixes #35.
I also removed the
except TypeErrorstatement inside of the method. It didn't appear to do much that I could see. It didn't light up any tests when I removed it, either.