Skip to content

Commit

Permalink
Update to release v1.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
brunato committed Mar 28, 2019
1 parent a0ca1eb commit 66dcdf2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
CHANGELOG
*********

`v1.1.6`_ (2019-03-28)
======================
* Fixes for XSD datatypes
* Minor fixes after a first test run with Python v3.8a3

`v1.1.5`_ (2019-02-23)
======================
* Differentiated unordered XPath gregorian types from ordered types for XSD
Expand Down Expand Up @@ -69,8 +74,7 @@ CHANGELOG
======================
* Added n.10 XPath 2.0 functions for strings
* Fix README.rst for right rendering in PyPI
* Added ElementPathMissingContextError exception for a correct
handling of static context evaluation
* Added ElementPathMissingContextError exception for a correct handling of static context evaluation

`v1.0.4`_ (2018-03-27)
======================
Expand Down Expand Up @@ -111,3 +115,4 @@ handling of static context evaluation
.. _v1.1.3: https://github.com/brunato/elementpath/compare/v1.1.2...v1.1.3
.. _v1.1.4: https://github.com/brunato/elementpath/compare/v1.1.3...v1.1.4
.. _v1.1.5: https://github.com/brunato/elementpath/compare/v1.1.4...v1.1.5
.. _v1.1.6: https://github.com/brunato/elementpath/compare/v1.1.5...v1.1.6
4 changes: 2 additions & 2 deletions elementpath/xpath2_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class XPath2Parser(XPath1Parser):
:param schema: the schema proxy class or instance to use for types, attributes and elements lookups. \
If an `AbstractSchemaProxy` subclass is provided then a schema proxy instance is built without the \
optional argument, that involves a mapping of only XSD builtin types. If it's not provided the \
XPath 2.0 \schema's related expressions cannot be used.
XPath 2.0 schema's related expressions cannot be used.
:param base_uri: an absolute URI maybe provided, used when necessary in the resolution of relative URIs.
:param compatibility_mode: if set to `True` the parser instance works with XPath 1.0 compatibility rules.
"""
Expand Down Expand Up @@ -503,7 +503,7 @@ def select(self, context=None):
@method('instance', bp=60)
@method('treat', bp=61)
def led(self, left):
self.parser.advance('of' if self.symbol is 'instance' else 'as')
self.parser.advance('of' if self.symbol == 'instance' else 'as')
if not self.parser.next_is_sequence_type_token():
self.parser.next_token.wrong_syntax()
self[:] = left, self.parser.expression(rbp=self.rbp)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_schema_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ def test_instance_of_expression(self):
# Test cases from https://www.w3.org/TR/xpath20/#id-instance-of
self.check_value("5 instance of xs:integer", True)
self.check_value("5 instance of xs:decimal", True)
self.check_value("9.0 instance of xs:integer", False if xmlschema.__version__ >= '1.0.8' else True)
self.check_value("9.0 instance of xs:integer",
False if [int(n) for n in xmlschema.__version__.split('.')] >= [1, 0, 8] else True)
self.check_value("(5, 6) instance of xs:integer+", True)
self.check_value(". instance of element()", True, context)

Expand Down

0 comments on commit 66dcdf2

Please sign in to comment.