forked from pool/python-atom
- Update to 0.11.0:
* Fix ruff config by @MatthieuDartiailh in #209 * Add FixedTuple member enforcing a given number of items by @MatthieuDartiailh in #211 * Fix memory leak in pickle creation by @MatthieuDartiailh in #213 * 3.13 support by @MatthieuDartiailh in #214 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-atom?expand=0&rev=28
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -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
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
atom-0.10.4.tar.gz
Normal file
3
atom-0.10.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e493fbcf7b58e7e991d5bdabb4b8d5ed5be2c2a36a21ca892dee8db3086a155
|
||||
size 169802
|
||||
3
atom-0.10.5.tar.gz
Normal file
3
atom-0.10.5.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f5b8d617eaed71d97c5b79a78f8f531355cf7c45b135648265bfb3964050ec8a
|
||||
size 170194
|
||||
3
atom-0.11.0.tar.gz
Normal file
3
atom-0.11.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ab93fc3cc7b6a078253b116e9f6235d2913eb9bb49adbc31a258e1017f2aee0
|
||||
size 170872
|
||||
203
python-atom.changes
Normal file
203
python-atom.changes
Normal file
@@ -0,0 +1,203 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 29 05:21:28 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.11.0:
|
||||
* Fix ruff config by @MatthieuDartiailh in #209
|
||||
* Add FixedTuple member enforcing a given number of items by
|
||||
@MatthieuDartiailh in #211
|
||||
* Fix memory leak in pickle creation by @MatthieuDartiailh in #213
|
||||
* 3.13 support by @MatthieuDartiailh in #214
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 22 10:26:48 UTC 2024 - Frantisek Simorda <frantisek.simorda@suse.com>
|
||||
|
||||
- Update to 0.10.5:
|
||||
* fix ruff config
|
||||
* Merge pull request #209 from nucleic/ruff-fixes
|
||||
* ci: do not build oldest python on macos
|
||||
* Fix memory leak in pickle creation (#213)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 30 12:02:18 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.10.4:
|
||||
* allow unions in TypeVar bound PR #207
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 5 09:46:45 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.10.3:
|
||||
* fix a an issue when using add_member to override an existing
|
||||
membe
|
||||
* fix a memory leak caused by Dict, Defaultdict and Set members
|
||||
* add support for Python 3.12 PR #200
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 1 07:56:44 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons as it requires python >= 3.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 9 19:28:45 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.10.0:
|
||||
* AtomMeta: create the class only once all members have been
|
||||
customized
|
||||
This allows to use ``__init_subclass__`` since previously the
|
||||
``__atom_members__`` was not set when ``__init_subclass__``
|
||||
was called
|
||||
* illustrate the use of ``__init_subclass__`` to customize
|
||||
pickling
|
||||
* refactor the metaclass to make it easier to reason about
|
||||
* add a ``DefaultDict`` member which enforce the value to be a
|
||||
dictionary and use a factory for missing keys. The factory
|
||||
is set at the member level and a normal dict can be provided
|
||||
as value. When possible the factory is deduced from the member
|
||||
used for validation.
|
||||
* infer the use of ``DefaultDict`` from a
|
||||
``collections.defaultdict`` annotation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 16 16:47:35 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.1:
|
||||
* fix generation of Value member from union containing
|
||||
object/Any PR #198
|
||||
* fix setdefault method of atomdict to return the actually
|
||||
stored item PR #197
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 1 13:53:30 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.9.0:
|
||||
* fix the generation of Subclass from type annotations PR #193
|
||||
* move getstate and setstate implementation to C and allow to
|
||||
customize the condition under which a member value is
|
||||
pickled. PR #182
|
||||
* Customization is used to only pickle member value whose
|
||||
state can be restored (for example Constant is not
|
||||
pickled). Whether a member is pickled can be customized
|
||||
using a method prefixed with ``_getstate_`` on an Atom
|
||||
subclass.
|
||||
* use the Typed member when a type annotation resolve to a
|
||||
single type whose metaclass does not implement a custom
|
||||
``__instancecheck__`` PR #185
|
||||
* generate Tuple member for tuple[] annotations.
|
||||
The content of the tuple is typed check only if it is a
|
||||
1-tuple or variable-length tuple. PR #184
|
||||
* fix the resolution order of members in the presence of
|
||||
multiple inheritance with a common base class PR
|
||||
* Due to the above changes, adding a member after the class
|
||||
definition requires more work than before. As a
|
||||
consequence a new helper function ``add_member`` has
|
||||
been added.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 15 23:21:26 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 0.8.2
|
||||
* fix handling of Union in annotation based class definition PR
|
||||
#177
|
||||
- Release 0.8.1
|
||||
* add support for Python 3.11 PR #166
|
||||
- Release 0.8.0
|
||||
* This release introduced a new way to declare atom object based
|
||||
on type annotations.
|
||||
* emit warnings when a magic method points to an undefined member
|
||||
PR #139 #149
|
||||
* use isort, black and flake8 to ensure a consistent coding style
|
||||
PR #141
|
||||
* base the version number on the most recent git tag using
|
||||
setuptools-scm PR #141
|
||||
* make the setup compatible with PEP 517 and PEP 621 compliant PR
|
||||
#141 #162 Pip should be used for development install in place
|
||||
of directly calling setup.py
|
||||
+ fix handling of _SpecialGenericAlias (typing.Sequence, ...)
|
||||
when used inside an Instance member PR #151
|
||||
* add a ChangeDict TypedDict to help annotate observers PR #133
|
||||
* add several keyword argument to the AtomMeta metaclass PR #133
|
||||
- enable_weakrefs: allow to have weak references to an Atom
|
||||
object without having to add the slot by hand. False by
|
||||
default.
|
||||
- use_annotations: generate members from type annotations.
|
||||
Str-like annotations are not supported but allowed when an
|
||||
actual member is provided as default value. True by default.
|
||||
- type_containers: in conjunction with use_annotations
|
||||
determine to what depth to type the content of a container.
|
||||
The default is 1 meaning that list[int] will use List(Int())
|
||||
but list[list[int]] will use List(List()).
|
||||
* allow specifying which change events are emitted when adding
|
||||
static observers PR #155
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 6 15:03:50 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 0.7.0:
|
||||
* allow to use any subscribed type in Typed and Instance. Optional and Union are
|
||||
analyzed to extract the tuple of types to validate. The presence of NoneType in
|
||||
the tuple will make the member optional. For container types (list, dict, set, etc)
|
||||
the content types is not used beyond static type validation. PR #136 #140
|
||||
Note however that this usage of Optional and Union breaks static analyzer currently,
|
||||
while things deriving from an actual type will work as expected (List[int], list[int],
|
||||
Iterable[int])
|
||||
* make the factory argument of Typed, Instance and their forwarded version
|
||||
keyword only. PR #123
|
||||
* add a keyword-only argument to Typed, Instance and their forwarded
|
||||
version: ``optional``. When set to False, this will cause those members to
|
||||
reject None as a valid value. The default value, None, will resolve to True
|
||||
if there is no provided way to build a default value. PR #123 # 131
|
||||
This is backward incompatible since previously None was always a valid value.
|
||||
* the Instance and Typed variants of the Validate enum have been renamed to
|
||||
OptionalInstance, OptionalTyped and new Instance and Typed variant describing
|
||||
the validation behavior for the member with optional=False have been added. PR #123
|
||||
* consistently use Instance to wrap types passed to containers. PR #123
|
||||
For containers, Instance members used for validation are created with
|
||||
optional=False by default. This is backward incompatible since None was always
|
||||
a valid value previously.
|
||||
* add strict argument to FloatRange. PR #124
|
||||
* allow to specify the type of ReadOnly and Constant. PR #128
|
||||
The validation is done using the Instance validator. The change for ReadOnly
|
||||
is backward incompatible since the type or tuple of type is the first argument
|
||||
in place of the default value. Specifying the default value by keyword is both
|
||||
forward and backward compatible.
|
||||
* use python stdlib IntEnum instead of the custom one in atom PR #122
|
||||
* remove the custom atom.IntEnum PR #122
|
||||
* add and distribute type hints PR #122 #132
|
||||
This allows static type checkers to resolve the values behind a member.
|
||||
* drop official support for Python 3.6 and add support for Python 3.10
|
||||
- Stop building on Python 3.6 which is no longer supported
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 5 04:57:37 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.6.0:
|
||||
* Add support for Python 3.9 and remove deprecated members.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 27 05:05:29 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.5.2:
|
||||
* make comparison used in C safe (fix bug introduced in 0.5.0) PR #107
|
||||
* fix bug in using atomlist from C PR #102
|
||||
* clarify Unicode deprecation warning PR #102
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 7 02:46:58 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.5.0:
|
||||
* drop Python 2 support PR #83
|
||||
* use cppy to write the c++ extension PR #83
|
||||
* add c++ implememtation of AtomDict PR #93
|
||||
* add a Set member PR #93
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 6 12:58:53 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 0.4.3:
|
||||
* Remove dependency on future which was slowing down import time
|
||||
- Switch to github tarball for tests and license
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 15 15:31:15 UTC 2018 - toddrme2178@gmail.com
|
||||
|
||||
- Initial version
|
||||
68
python-atom.spec
Normal file
68
python-atom.spec
Normal file
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# spec file for package python-atom
|
||||
#
|
||||
# Copyright (c) 2024 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-atom
|
||||
Version: 0.11.0
|
||||
Release: 0
|
||||
Summary: Memory efficient Python objects
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/nucleic/atom
|
||||
Source: https://files.pythonhosted.org/packages/source/a/atom/atom-%{version}.tar.gz
|
||||
BuildRequires: %{python_module cppy >= 1.2.0}
|
||||
BuildRequires: %{python_module devel >= 3.10}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools >= 61.2}
|
||||
BuildRequires: %{python_module setuptools_scm >= 3.4.3}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: c++_compiler
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if 0%{?python_version_nodots} < 311
|
||||
Requires: python-typing-extensions
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Atom is a framework for creating memory efficient Python objects with
|
||||
enhanced features such as dynamic initialization, validation, and
|
||||
change notification for object attributes. It provides the default
|
||||
model binding behaviour for the Enaml UI framework.
|
||||
|
||||
%prep
|
||||
%setup -q -n atom-%{version}
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
|
||||
%check
|
||||
%pytest_arch
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitearch}/atom
|
||||
%{python_sitearch}/atom-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user