-
Notifications
You must be signed in to change notification settings - Fork 72
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
Behavior of processContents="lax" changed #298
Comments
I downgraded to version 1.10.0 and behavior was as expected, so only 1.11.0 is anomalous. |
Hi, In v1.10.0 this check was: if not isinstance(obj, MutableSequence) or not obj:
raise XMLSchemaValueError("Wrong data format, a not empty list required: %r." % obj) now it is: if not isinstance(obj, MutableSequence):
msg = "The first argument must be a sequence, {} provided"
raise XMLSchemaTypeError(msg.format(type(obj)))
elif not obj:
raise XMLSchemaValueError("The first argument is an empty sequence") So a string shouldn't be accepted also in v1.10.0. Probably something goes wrong in another changed part. The version of elementpath is the same in both cases? Are you in condition of providing a sample (at least an object that has to be encoded to XML that produces the error)? |
A minimalist test is not reproducing the problem. I will have to explore what else is causing a difference between v1.10.0 and v1.11.0. |
The differences between v1.10.0 and v1.11.0 are mainly on error strings, revisited for translation. About encoding the only commit that could be involved with this the one related to the changes introduced to fix encoding of +/-inf and nan values (PR #295). Try to move back before and on that commit, to verify if this can be the cause of the problem. |
I now have sample code that runs without exception with v1.10.0 but fails with v1.11.0. This was run with Python 3.9.
|
It's the TypeError added to JsonMLConverter that is not intercepted and silenced like a ValueError. I will produce a fix ASAP. Thank you! |
There is also an error in |
- Fix for issue #298 - Protect converter calls in iter_decode()/iter_encode() from unexpected TypeError/ValueError exceptions. These errors are converted to validation errors in coherence with other cases.
It should be fixed with v1.11.1. Best regards |
My application ran successfully. Thanks for the fix! |
Behavior changed unexpectedly in xmlschema with regard to
<xs:any processContents="lax"/>
. In version 1.08, it worked as expected if the "foreign" schema was not found--no errors were produced. However, after updating to version 1.11, it throws an exception.In debugging, it was determined that the str in question is the label of an element in an included schema.
Was this an intended change? Is there a work-around?
The text was updated successfully, but these errors were encountered: