PyXB Changelog

What's new in PyXB 1.2.1

Dec 18, 2012
  • Key features of the release:
  • Full support for mixed content schema through a new method orderedContent on complex binding instances and flags that control when that list affects document generation. See Influencing Element and Mixed Content Order. This is particularly relevant to XHTML.
  • Immediate validation of values assigned to plural elements.
  • A first step to providing finer control of validation, using ValidationConfig
  • The following reported defects/enhancements have been addressed:
  • Validate pyxb.BIND at point of use.
  • Issues with renamed element (most of which were mis-use of pyxb.BIND).
  • Support for default and fixed values in elements.
  • Support for mixed content.
  • Provide an example based on a help-forum thread to show how to take advantage of PyXB 1.2.x improved diagnostics.
  • Improve interpretation of Python native type values when used in element constructors.
  • Add ECMA-376 (Office Open XML) as an optional bundle.
  • Fix invalid error when an all model group had minOccurs=0.
  • Add Dublin Core to the standard bundles.
  • Allow control of element order in generated documents.
  • Include wildcard elements in content

New in PyXB 1.2.0 (Nov 8, 2012)

  • Use of an advanced content model which provides more accurate validation and :ref:`much better diagnostics ` when validation fails.
  • Elimination of support for Python 2.4 and 2.5 (necessary to ease the path to a future Python3 implementation of PyXB).
  • Complete rework of the exceptions that normally arise when using binding instances. These exceptions now provide information through attributes rather than a text message.
  • Improved diagnostics.
  • Correct handling of schema where greedy processing fails.
  • Elements and attributes in generated bindings are emitted in a deterministic order sorted by schema and location within schema, to ensure deterministic processing and reduce variation between bindings when generation is repeated.
  • Make documentation annotations from schema available as documentation strings for the generated complex type bindings.
  • Update OpenGIS bindings to `use W3C XLink schema

New in PyXB 1.1.5 (Nov 2, 2012)

  • The standard Python logging module is now used.
  • The potential for changing binding style support has been removed.
  • PyPI/setuptools support has been fixed (again).
  • Unit test setup/teardown has been reviewed.
  • utf-8 is now used in all PyXB source files.
  • Preserve namespace mappings in deep-cloned instances.
  • Fix problems revealed by cython and pyflakes.
  • User contributions from Jon Foster, with the exception of windows test scripts, have been incorporated.
  • Correct issues in generator function to retrieve command line.
  • Restore content of ExtraContentError exception.
  • Warn rather than abort when apparently redundant schema are included.

New in PyXB 1.1.3 (Sep 10, 2011)

  • General cleanup, finish up a few previously unsupported datatypes.
  • Correct extension of a simple type with enumeration restrictions.
  • Use the Python string type as the basis for xs:hexBinary.
  • Support + in PYXB_ARCHIVE_PATH like the documentation says.
  • Correct exception reference.
  • Correct handling of the ur-type.
  • Automatically provide an xsi:type attribute when the schema uses the ur-type.
  • Implement xs:base64binary.
  • Fix pickling and URI path issues on Windows.
  • Correct extensions that involve wildcards.
  • Do a better job resolving circular dependencies, and don’t try to write two namespace groups to the same binding file.
  • Add a bundle for Security Assertion Markup Language.
  • Avoid overwrite of Python built-in constants, including None, True, and False.

New in PyXB 1.1.2 (Sep 10, 2011)

  • Complete replacement of the model group portion of the content model. The NFA-to-DFA approach is gone. The resulting system does a better job in less space and significantly faster: 30% faster on the standard tmsxtvd test, orders of magnitude on documents with large sequences of optional elements.
  • Note: A couple unit tests fail due to incidental reasons that will be addressed when fixing
  • Also, the architecture documentation for the validation portion of the content model is completely out of date.
  • Handle sequences of optional elements more effectively.
  • Correct multi-step attribute restriction/extension.
  • Support prefix rewrite for schema location URIs.
  • Fix syntax error generating wildcard namespace constraints.
  • Support whitespace validation bypass in simple type definitions.

New in PyXB 1.1.1 (Sep 10, 2011)

  • Major feature is significantly improved ability to determine what content is not acceptable to the validating parser, and where it can be found in the document. See Locating Invalid Content.
  • Also, using keyword parameters in binding instance constructors will now raise an ExtraContentError in the case where the keyword does not correspond to the PyXB-generated identifier associated with an attribute or element of the class being instantiated.
  • Eliminate complaints about reference to deprecated sha module in Python 2.6.
  • Fix assorted problems with mixtures of –binding-root, –module-prefix, and –write-for-customization.
  • Eliminate unnecessary attempts to download schema for builtin namespaces.
  • Avoid assertion failure when provided schema location’s content looks a little, but not enough, like a schema document.
  • References to declarations in other namespaces are now calculated locally to the module, rather than cached under the expectation the name is valid everywhere.
  • Imposed consistency on behavior when document root element is not recognized.
  • Partial implementation of improved error data stored in exceptions.
  • Detect invalid keywords in instance constructor calls.

New in PyXB 1.1.0 (Sep 10, 2011)

  • Mostly nit-picky things, but some changed interface, so we’re starting a new beta series.
  • Make handling of invalid xsi:type attributes more robust. #56
  • Use validation flags to control validation (what a novel concept). #57
  • Fix improper generation of content within elements marked as xsi:nil. #58
  • Provide mechanism to control default handling of xsi:type attributes in instance documents. #60
  • Fix bug where constraining facets were not inherited when deriving simple types by restriction.

New in PyXB 1.0.0 (Sep 10, 2011)

  • Nobody seems to have found anything critical for a while, and it does what I want it to, so we’ll let this thing run free.
  • Replace a reference to a non-existent variable with something that works.
  • Consistently validate instances created from documents no matter which parser is used.
  • Support caching message references in WSDL SOAP faults.

New in PyXB 0.7.3 (Sep 10, 2011)

  • A few bug fixes (one major), a couple new features, and separation of the various components to allow a smaller distribution.
  • Fixed a circular reference in the DFA state classes that caused memory bloat in long-running processes. #49
  • When PyXB renames an XML element or attribute due to a collision with a reserved word, it will write a warning, and at runtime will raise an exception if an attempt is made to assign to the original name. #50, #51
  • Support for pattern restrictions for string-based simple types. #47
  • Split distribution into multiple files to reduce download size:
  • PyXB-base-@[email protected] – Complete release, nothing pre-built
  • PyXB-doc-@[email protected] – Overlay with pre-built documentation
  • PyXB-common-@[email protected] – Overlay with XHTML bindings
  • PyXB-opengis-@[email protected] – Overlay with OpenGIS bindings
  • PyXB-wsspat-@[email protected] – Overlay with WS-* bindings
  • PyXB-full-@[email protected] – Complete release with all overlays

New in PyXB 0.7.2 (Sep 10, 2011)

  • Primarily to fix a problem with chameleon schemas, but also a couple other minor issues.
  • References to QNames with absent namespaces in chameleon schema included into schema with a target namespace could not be resolved.
  • Documentation content was not correctly sanitized for use within a Python docstring.
  • Elements with complex types with simple content that derived from string could not be marked as nil.

New in PyXB 0.7.1 (Sep 10, 2011)

  • Restored the ability to dump copies of all schemas retrieved from a remote location, so you can review them.
  • Fixed assorted problems with simple types constructed by list and union.
  • Provide link from content values to the element binding that was used to store them. Useful for quickly identifying the owner element when generating a valid child sequence for conversion to DOM.
  • Fix validation of attributes with union types.
  • Enumeration fixes: Only generate class-level constants for enumerations that restrict a string representation (not double, float, etc). Verify enumerations work correctly on list and union constructions. Duplicate the class-level constants for enumerations that are defined in union member types.
  • Provide a facility to simplify the automatic creation of an instance of the appropriate type when storing values into an element. Makes life with anonymous local elements a lot easier.
  • Enhance management of namespace prefixes by allowing a system-wide default in BindingDOMSupport and by inferring the base name of the module as the default prefix for namespaces defined in imported bindings.
  • Provided crude facility to bypass validation when generating and parsing documents.
  • Re-arrange the help for pyxbgen’s arguments, and add a script to automatically generate the Sphinx tables for it.
  • Support bundles of related schemas/namespaces, currently wssplat (for WS-*) and opengis (Geographic Information Systems).
  • Got the user-level documentation back up to where it might actually help somebody.

New in PyXB 0.7.0 (Sep 10, 2011)

  • This release is identical to 0.5.2 except that the binding interface has completely changed. All examples have been updated; the documentation will be updated later.
  • Note that the code in PyXB itself has not changed, and is not going to change. However, properties produce an interface more natural to most Python programs, so that has become the default style. See the –binding-style parameter to pyxbgen if you want to change this.
  • Change the method of accessing elements and attributes in bindings from accessor methods (e.g., elt.attr(), elt.setAttr()) to properties (e.g., elt.attr).

New in PyXB 0.5.2 (Sep 10, 2011)

  • Mostly changes to namespaces in support of profiles and application schemas which extend other namespaces with special components, or have their own copies of somebody else’s schemas, etc. See the pyxbgen private/public namespace switches.
  • Presence of nested choice model groups caused the plurality calculations to be wrong: some elements were dropped from the model, others were treated as lists when only one instance would be permitted.
  • Content accessor would return wrong value for elements with simple type of list variety.
  • Corrected handling of attributes when deriving complex types by restriction.
  • Added a source module for XML namespace (http://www.w3.org/XML/1998/namespace) with bindings linked to the built-in component model.
  • Fix inadequacies in namespace archive management.
  • This is expected to be the last release in 0.5.x. 0.7.0 should follow soon thereafter, and only contain the change of default binding style from accessor to property.