From cf80176a3e34d6c7e9073bfa49c25a382c53cbd56d08ce851b9c90383f8980c2 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 28 Jul 2025 05:06:39 +0000 Subject: [PATCH] - Update to 7.3.2: * Fixing #288 default get value error when using box_dots * Fixing #275 default_box_create_on_get is ignored with from_yaml * Fixing #285 Infinite Recursion when accessing non existent list index in a DefaultBox with box_dots * Fixing #281 consistent error message about missing YAML parser * Removing support for Python 3.8 as it is EOL OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-box?expand=0&rev=21 --- .gitattributes | 23 ++++ .gitignore | 1 + 7.2.0.tar.gz | 3 + 7.3.2.tar.gz | 3 + python-python-box.changes | 230 ++++++++++++++++++++++++++++++++++++++ python-python-box.spec | 69 ++++++++++++ 6 files changed, 329 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 7.2.0.tar.gz create mode 100644 7.3.2.tar.gz create mode 100644 python-python-box.changes create mode 100644 python-python-box.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/7.2.0.tar.gz b/7.2.0.tar.gz new file mode 100644 index 0000000..7576a39 --- /dev/null +++ b/7.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae403d70dfe4260397906da4ab8e98f6bb11240e44cdda43c6d23d30115f4ef3 +size 87699 diff --git a/7.3.2.tar.gz b/7.3.2.tar.gz new file mode 100644 index 0000000..53d79e2 --- /dev/null +++ b/7.3.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e36006ee9e1e6a11ad6258831a2f7b4260f3113188ebfe482a47f8df69427194 +size 88125 diff --git a/python-python-box.changes b/python-python-box.changes new file mode 100644 index 0000000..6fa20fe --- /dev/null +++ b/python-python-box.changes @@ -0,0 +1,230 @@ +------------------------------------------------------------------- +Mon Jul 28 05:05:37 UTC 2025 - Steve Kowalik + +- Update to 7.3.2: + * Fixing #288 default get value error when using box_dots + * Fixing #275 default_box_create_on_get is ignored with from_yaml + * Fixing #285 Infinite Recursion when accessing non existent list index in + a DefaultBox with box_dots + * Fixing #281 consistent error message about missing YAML parser + * Removing support for Python 3.8 as it is EOL + +------------------------------------------------------------------- +Thu Jun 20 12:50:45 UTC 2024 - Dirk Müller + +- update to 7.2.0: + * Adding #266 support for accessing nested items in BoxList + using numpy-style tuple indexing (thanks to Bit0r) + * Adding tests and Cython releases for Python 3.12 + * Fixing #251 support for circular references in lists (thanks + to Muspi Merol) + * Fixing #261 altering all __repr__ methods so that subclassing + will output the correct class name (thanks to Gabriel Tkacz) + * Fixing #267 Fix type 'int' not iterable (thanks to YISH) + +------------------------------------------------------------------- +Fri Dec 15 21:31:47 UTC 2023 - Dirk Müller + +- update to 7.1.1: + * Fixing Cython optimized build deployments for linux + * Adding #255 defer ipython import for large import speed + improvements (thanks to Eric Prestat) + * Adding testing for Python 3.12 + * Fixing #253 merge_update box list merge types not populated + to sub dictionaries (thanks to lei wang) + * Fixing #257 Two test failures due to arguments having + incorrect types (thanks to Michał Górny) + * Fixing stub files to match latest code signatures + * Removing #251 support for circular references in lists + * Removing support for Python 3.7 as it is EOL + * Switching off of poetry due to multiple build issues + * Adding #169 default functions with the box_instance and key + parameter (thanks to Коптев Роман Викторович) + * Adding #170 Be able to initialize with a flattened dict - by + using DDBox (thanks to Ash A.) + * Adding #192 box_dots treats all keys with periods in them as + separate keys (thanks to Rexbard) + * Adding #211 support for properties and setters in subclasses + * Adding #226 namespace to track changes to the box + * Adding #236 iPython detection to prevent adding attribute + lookup words + * Adding #238 allow ``|`` and ``+`` for frozen boxes + * Adding new DDBox class (Default Dots Box) that is a subclass + of SBox + * Fixing #235 how ``|`` and ``+`` updates were performed for + right operations + * Fixing #234 typos + * Fixing no implicit optionals with type hinting + +------------------------------------------------------------------- +Wed Nov 9 18:38:35 UTC 2022 - Yogalakshmi Arunachalam + +- Update to 6.1.0 + * Adding Python 3.11 support + * Adding #195 box_from_string function (thanks to Marcelo Huerta) + * Changing the deprecated toml package with modern tomllib, tomli and tomli-w usage (thanks to Michał Górny) + * Fixing mypy __ior__ type (thanks to Jacob Hayes) + * Fixing line endings with a pre-commit update + * Fixing BoxList was using old style of super in internal code usage + +------------------------------------------------------------------- +Fri Jun 17 12:20:56 UTC 2022 - Markéta Machová + +- Update to 6.0.2 + * Adding Cython support to greatly speed up normal Box operations on supported systems + * Adding #196 support for sliceable boxes + * Changing #208 __repr__ to produce eval-able text + * Removing support for ruamel.yaml < 0.17 + +------------------------------------------------------------------- +Wed Dec 8 09:55:04 UTC 2021 - pgajdos@suse.com + +- version update to 5.4.1 + Version 5.4.1 + ------------- + * Fixing #205 setdefault behavior with box_dots (thanks to Ivan Pepelnjak) + Version 5.4.0 + ------------- + * Adding py.typed for mypy support (thanks to Dominic) + * Adding testing for Python 3.10-dev + * Fixing #189 by adding mappings for mypy + * Fixing setdefault behavior with box_dots (thanks to ipcoder) + * Changing #193 how magic methods are handled with default_box (thanks to Rexbard) + Version 5.3.0 + ------------- + * Adding support for functions to box_recast (thanks to Jacob Hayes) + * Adding #181 support for extending or adding new items to list during `merge_update` (thanks to Marcos Dione) + * Fixing maintain stacktrace cause for BoxKeyError and BoxValueError (thanks to Jacob Hayes) + * Fixing #177 that emtpy yaml files raised errors instead of returning empty objects (thanks to Tim Schwenke) + * Fixing #171 that `popitems` wasn't first checking if box was frozen (thanks to Varun Madiath) + * Changing all files to LF line endings + * Removing duplicate `box_recast` calls (thanks to Jacob Hayes) + * Removing coveralls code coverage, due to repeated issues with service + Version 5.2.0 + ------------- + * Adding checks for frozen boxes to `pop`, `popitem` and `clear` (thanks to Varun Madiath) + * Fixing requirements-test.txt (thanks to Fabian Affolter) + * Fixing Flake8 conflicts with black (thanks to Varun Madiath) + * Fixing coveralls update (thanks to Varun Madiath) + Version 5.1.1 + ------------- + * Adding testing for Python 3.9 + * Fixing #165 `box_dots` to work with `default_box` + +------------------------------------------------------------------- +Wed Aug 5 15:02:55 UTC 2020 - Marketa Calabkova + +- Update to 5.1.0 + * Adding `dotted` option for `items` function (thanks to ipcoder) + * Fixing bug in box.set_default where value is dictionary, return the internal value and not detached temporary (thanks to Noam Graetz) + * Removing warnings on import if optional libraries are missing + Version 5.0.1 + ------------- + * Fixing default box saving internal method calls and restricted options (thanks to Marcelo Huerta) + Version 5.0.0 + ------------- + * Adding support for msgpack converters `to_msgpack` and `from_msgpack` + * Adding support for comparision of `Box` to other boxes or dicts via the `-` sub operator #144 (thanks to Hitz) + * Adding support to `|` union boxes like will come default in Python 3.9 from PEP 0584 + * Adding `mypy` type checking, `black` formatting and other checks on commit + * Adding new parameter `box_class` for cleaner inheritance #148 (thanks to David Aronchick) + * Adding `dotted` option for `keys` method to return box_dots style keys (thanks to ipcoder) + * Fixing box_dots to properly delete items from lists + * Fixing box_dots to properly find items with dots in their key + * Fixing that recast of subclassses of `Box` or `BoxList` were not fed box properties (thanks to Alexander Kapustin) + * Changing that sub boxes are always created to properly propagate settings and copy objects #150 (thanks to ipcoder) + * Changing that default_box will not raise key errors on `pop` #67 (thanks to Patrock) + * Changing `to_csv` and `from_csv` to have same string and filename options as all other transforms + * Changing back to no required external imports, instead have extra requires like [all] (thanks to wim glenn) + * Changing from putting all details in README.rst to a github wiki at https://github.com/cdgriffith/Box/wiki + * Changing `BoxList.box_class` to be stored in `BoxList.box_options` dict as `box_class` + * Changing `del` will raise `BoxKeyError`, subclass of both `KeyError` and `BoxError` + * Removing support for single level circular references + * Removing readthedocs generation + * Removing overrides for `keys`, `values` and `items` which will return views again + Version 4.2.3 + ------------- + * Fixing README.md example #149 (thanks to J Alan Brogan) + * Changing `protected_keys` to remove magic methods from dict #146 (thanks to Krishna Penukonda) + * Changing that due to `default_box` fix, `pop` or `del` no longer raise BoxKeyErrors on missing items (UNCAUGHT BUG) + +------------------------------------------------------------------- +Fri Mar 20 13:38:43 UTC 2020 - pgajdos@suse.com + +- version update to 4.2.2 + Version 4.2.2 + ------------- + * Fixing `default_box` doesn't first look for safe attributes before falling back to default (thanks to Pymancer) + * Changing from TravisCI to Github Actions + Version 4.2.1 + ------------- + * Fixing uncaught print statement (thanks to Bruno Rocha) + * Fixing old references to `box_it_up` in the documentation + Version 4.2.0 + ------------- + * Adding optimizations for speed ups to creation and inserts + * Adding internal record of safe attributes for faster lookups, increases memory footprint for speed (thanks to Jonas Irgens Kylling) + * Adding all additional methods specific to `Box` as protected keys + * Fixing `merge_update` from incorrectly calling `__setattr__` which was causing a huge slowdown (thanks to Jonas Irgens Kylling) + * Fixing `copy` and `__copy__` not copying box options + Version 4.1.0 + ------------- + * Adding support for list traversal with `box_dots` (thanks to Lei) + * Adding `BoxWarning` class to allow for the clean suppression of warnings + * Fixing default_box_attr to accept items that evaluate to `None` (thanks to Wenbo Zhao and Yordan Ivanov) + * Fixing `BoxList` to properly send internal box options down into new lists + * Fixing issues with conversion and camel killer boxes not being set properly on insert + * Changing default_box to set objects in box on lookup + * Changing `camel_killer` to convert items on insert, which will change the keys when converted back to dict unlike before + * Fallback to `PyYAML` if `ruamel.yaml` is not detected (thanks to wim glenn) + * Removing official support for `pypy` as it's pickling behavior is not the same as CPython + * Removing internal __box_heritage as it was no longer needed due to behavior update + Version 4.0.4 + ------------- + * Fixing `get` to return None when not using default box (thanks to Jeremiah Lowin) + * Fixing non-string keys breaking when box_dots is enabled (thanks to Marcelo Huerta) + Version 4.0.2 + ------------- + * Fixing converters to properly pass through new box arguments (thanks to Marcelo Huerta) + Version 4.0.1 + ------------- + * Fixing setup.py for release + * Fixing documentation link + Version 4.0.0 + ------------- + * Adding support for retrieving items via dot notation in keys + * Adding `box_from_file` helper function + * Adding merge_update that acts like previous Box magic update + * Adding support to `+` boxes together + * Adding default_box now can support expanding on `None` placeholders (thanks to Harun Tuncay and Jeremiah Lowin) + * Adding ability to recast specified fields (thanks to Steven McGrath) + * Adding to_csv and from_csv capability for BoxList objects (thanks to Jiuli Gao) + * Changing layout of project to be more object specific + * Changing update to act like normal dict update + * Changing to 120 line character limit + * Changing how `safe_attr` handles unsafe characters + * Changing all exceptions to be bases of BoxError so can always be caught with that base exception + * Changing delete to also access converted keys (thanks to iordanivanov) + * Changing from `PyYAML` to `ruamel.yaml` as default yaml import, aka yaml version default is 1.2 instead of 1.1 + * Removing `ordered_box` as Python 3.6+ is ordered by default + * Removing `BoxObject` in favor of it being another module + +------------------------------------------------------------------- +Tue Sep 10 11:31:49 UTC 2019 - Tomáš Chvátal + +- Update to 3.4.3: + * Fixing propagation of box options when adding a new list via setdefault (thanks to Stretch) + * Fixing update does not keep box_intact_types (thanks to pwwang) + * Fixing update to operate the same way as a normal dictionary (thanks to Craig Quiter) + * Fixing deepcopy not copying box options (thanks to Nikolay Stanishev) + +------------------------------------------------------------------- +Mon Jul 22 13:23:17 UTC 2019 - Tomáš Chvátal + +- Update to 3.4.2: + * Adding license, changes and authors files to source distribution + +------------------------------------------------------------------- +Wed Jun 19 11:39:32 UTC 2019 - Thomas Bechtold + +- Initial packaging (version 3.4.1) diff --git a/python-python-box.spec b/python-python-box.spec new file mode 100644 index 0000000..4c8d964 --- /dev/null +++ b/python-python-box.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-python-box +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-python-box +Version: 7.3.2 +Release: 0 +Summary: Advanced Python dictionaries with dot notation access +License: MIT +URL: https://github.com/cdgriffith/Box +Source: https://github.com/cdgriffith/Box/archive/%{version}.tar.gz +BuildRequires: %{python_module base >= 3.9} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module msgpack >= 1.0.0} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module ruamel.yaml >= 0.17} +BuildRequires: %{python_module toml >= 0.10.2} +# /SECTION +Suggests: python-msgpack >= 1.0.0 +Suggests: python-ruamel.yaml >= 0.17 +%if %{python_version_nodots} < 311 +Suggests: python-toml >= 0.10.2 +%endif +%python_subpackages + +%description +Advanced Python dictionaries with dot notation access + +%prep +%setup -q -n Box-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export PYTHONPATH='.' +%pytest_arch -k 'not test_to_yaml_ruamel' + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/box +%{python_sitelib}/python_box-%{version}.dist-info + +%changelog