From eb091502aff2a8a8c48907c609a2eae5998201cb Mon Sep 17 00:00:00 2001 From: Dan Ballance Date: Wed, 19 Oct 2016 08:49:45 +0100 Subject: [PATCH 1/2] Convert HALCodec.load to use kwargs for additional parameters. --- hal_codec/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hal_codec/__init__.py b/hal_codec/__init__.py index 034e8c0..67c6a08 100644 --- a/hal_codec/__init__.py +++ b/hal_codec/__init__.py @@ -214,10 +214,11 @@ def dump(self, document, indent=False, **kwargs): data = _document_to_primative(document) return force_bytes(json.dumps(data, **options)) - def load(self, bytes, base_url=None): + def load(self, bytes, **kwargs): """ Takes a bytestring and returns a document. """ + base_url = kwargs.get('base_url', None) try: data = json.loads(bytes.decode('utf-8')) except ValueError as exc: From 2a0be83a2ca90e36636911e5ef1e6bd8d3b56165 Mon Sep 17 00:00:00 2001 From: Dan Ballance Date: Wed, 19 Oct 2016 10:38:42 +0100 Subject: [PATCH 2/2] Version bump to 1.0.1 --- hal_codec/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hal_codec/__init__.py b/hal_codec/__init__.py index 67c6a08..35a3bae 100644 --- a/hal_codec/__init__.py +++ b/hal_codec/__init__.py @@ -8,7 +8,7 @@ import uritemplate -__version__ = "1.0.0" +__version__ = "1.0.1" def _get_string(item, key):