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
AVRO-2577: Fix Bare Excepts #665
AVRO-2577: Fix Bare Excepts #665
Conversation
e979f1c
to
5c2442d
Compare
lang/py/test/test_schema.py
Outdated
@@ -408,15 +408,14 @@ def test_parse(self): | |||
for example in EXAMPLES: | |||
try: | |||
schema.parse(example.schema_string) | |||
except (schema.AvroException, schema.SchemaParseException): |
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.
@Fokko I could use some guidance here -- I believe this test is more correct than it was in the previous implementation, but it is now failing on a test case with schema
{"type": "long", "logicalType": "date"}
The implementation allows this to pass on line 921 where it falls back to the primitive type if the logical type doesn't match any earlier condition.
Should we raise an exception whenever a logicalType is specified if it doesn't match the expected primitive?
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.
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.
Thanks, @nandorKollar. I've opened AVRO-2580 for this and will address that issue first to avoid mixing contexts in this PR.
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.
Sounds good to me, thanks!
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.
That change is in #668. Please take a look if you get the chance.
f2501fb
to
de97081
Compare
de97081
to
dda3a33
Compare
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
* AVRO-2577: Fix Bare Excepts * AVRO-2577: Don't Count Failure as Success
Jira
Tests
Commits
Documentation