Closed barbacbd closed 2 years ago
This has the potential to mess with some older versions of this software. I think that this is the appropriate way to handle sentences though.
There's been much argument about this feature, and it seems the community doesn't want it, even though I mostly agree with you. See some of the older issues.
The semantics of the check
flag have been muddied in the back and forth. What it means now is:
check=True
will cause parsing to fail if there's no checksum provided. So really, this arg should be called 'require_checksum=True` (and since the checksum comes last, this also validates that you received a complete message and not a partial line)Many messages can take a varying number of parameters, so if there is no checksum, and some parameters are cut off, this is up to the constructor of the message type to validate and error, and not the main parser.
@Knio I only looked at the open issues and it appears that the latest was #128. It seemed like an easy enough fix. I am a bit surprised that the community does not want full validation by default. But if the community wants it then that is what they get ! = )
** Checked is changed from False to True. The default should probably be set to ensure that the sentences are valid rather than just parsing the data for no reason.
** Altered the tests that require checked to be False so that the failures and/or checks actually happen.
128