From bc852f9f58e09280c746c37373177dbd3ac5212c Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 27 Feb 2025 15:55:43 -0500 Subject: [PATCH 1/2] Re-add JsonObjectMeta to jsonobject package Removed in commit:ae870841a0a287988c221c01eda828cf634fb5f6, but jsonobject-couchdbkit references it: https://github.com/dimagi/couchdbkit/blob/1d81c9288ee1535cd521d187cfd258977c7f4663/couchdbkit/schema/base.py#L46 --- jsonobject/__init__.py | 3 ++- test/tests.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jsonobject/__init__.py b/jsonobject/__init__.py index 0349521..6930d88 100644 --- a/jsonobject/__init__.py +++ b/jsonobject/__init__.py @@ -1,3 +1,4 @@ +from .base import JsonObjectMeta from .containers import JsonArray from .properties import * from .api import JsonObject @@ -8,5 +9,5 @@ 'StringProperty', 'BooleanProperty', 'DateProperty', 'DateTimeProperty', 'TimeProperty', 'ObjectProperty', 'ListProperty', 'DictProperty', 'SetProperty', - 'JsonObject', 'JsonArray', + 'JsonObject', 'JsonObjectMeta', 'JsonArray', ] diff --git a/test/tests.py b/test/tests.py index ffbfd1d..02b5d8a 100644 --- a/test/tests.py +++ b/test/tests.py @@ -1,5 +1,6 @@ from copy import deepcopy import unittest +import jsonobject from jsonobject import * from jsonobject.exceptions import ( BadValueError, @@ -429,6 +430,10 @@ class Foo(JsonObject): foo = Foo() self.assertIsInstance(foo.bar, Bar) + def test_module_has_jsonobjectmeta(self): + # regression test + self.assertIsInstance(jsonobject.JsonObjectMeta, type) + class TestJsonArray(unittest.TestCase): From de0ef07284810e66a4eec8fcb8719c8dae5c33d4 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 27 Feb 2025 16:07:49 -0500 Subject: [PATCH 2/2] Bump version to 2.3.1 --- CHANGES.md | 8 ++++++++ jsonobject/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 7295df3..513f172 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,14 @@ No significant changes since the last release +## 2.3.1 + +| Released on | Released by | +|-------------|---------------| +| 2025-02-27 | @millerdev | + +- Restore `jsonobject.JsonObjectMeta` + ## 2.3.0 | Released on | Released by | diff --git a/jsonobject/__init__.py b/jsonobject/__init__.py index 6930d88..18174b9 100644 --- a/jsonobject/__init__.py +++ b/jsonobject/__init__.py @@ -3,7 +3,7 @@ from .properties import * from .api import JsonObject -__version__ = '2.3.0' +__version__ = '2.3.1' __all__ = [ 'IntegerProperty', 'FloatProperty', 'DecimalProperty', 'StringProperty', 'BooleanProperty',