15
0
Files
python-dogpile.cache/python-dogpile.cache.spec

74 lines
2.3 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-dogpile.cache
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%global skip_python2 1
%global skip_python36 1
Name: python-dogpile.cache
- Update to 1.1.1: - Fixed regression where the serialization and deserialization functions could be inadvertently turned into instance methods with an unexpected argument signature, namely when pickle.dumps and pickle.loads are the pure Python version as is the case in pypy. - Reworked the means by which values are serialized and deserialized from backends, and provided for custom serialization of values. Added the CacheRegion.serializer and CacheRegion.deserializer parameters which may be set to any serializer. - Serialization and deserialization now take place within the CacheRegion so that backends may now assume string values in all cases. This simplifies the existing backends and also makes custom backends easier to write and maintain. - Additionally, the serializer is now applied to the user-defined value portion of the CachedValue and not to the metadata or other portions of CachedValue object itself, so the serialized portion is effectively a "payload" within the larger CachedValue structure that is passed as part of the larger string format. The overall format is a separate JSON of the cached value metadata, followed by the serialized form. This allows for end-user serialization schemes that are hardwired to the values themselves without the need to serialize dogpile's internal structures as well. - Existing custom backends should continue to work without issue; they now have the option to forego any separate serialization steps, and can also subclass a new backend BytesBackend that marks them as a backend that only deals with bytes coming in and out; all internal serialization logic from such a backend can be removed. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=60
2020-11-25 14:12:34 +00:00
Version: 1.1.1
Release: 0
- Update to 1.1.1: - Fixed regression where the serialization and deserialization functions could be inadvertently turned into instance methods with an unexpected argument signature, namely when pickle.dumps and pickle.loads are the pure Python version as is the case in pypy. - Reworked the means by which values are serialized and deserialized from backends, and provided for custom serialization of values. Added the CacheRegion.serializer and CacheRegion.deserializer parameters which may be set to any serializer. - Serialization and deserialization now take place within the CacheRegion so that backends may now assume string values in all cases. This simplifies the existing backends and also makes custom backends easier to write and maintain. - Additionally, the serializer is now applied to the user-defined value portion of the CachedValue and not to the metadata or other portions of CachedValue object itself, so the serialized portion is effectively a "payload" within the larger CachedValue structure that is passed as part of the larger string format. The overall format is a separate JSON of the cached value metadata, followed by the serialized form. This allows for end-user serialization schemes that are hardwired to the values themselves without the need to serialize dogpile's internal structures as well. - Existing custom backends should continue to work without issue; they now have the option to forego any separate serialization steps, and can also subclass a new backend BytesBackend that marks them as a backend that only deals with bytes coming in and out; all internal serialization logic from such a backend can be removed. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=60
2020-11-25 14:12:34 +00:00
%define modname dogpile.cache
%define modver 1_1_1
Summary: A caching front-end based on the Dogpile lock
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/sqlalchemy/dogpile.cache
- Update to 1.1.1: - Fixed regression where the serialization and deserialization functions could be inadvertently turned into instance methods with an unexpected argument signature, namely when pickle.dumps and pickle.loads are the pure Python version as is the case in pypy. - Reworked the means by which values are serialized and deserialized from backends, and provided for custom serialization of values. Added the CacheRegion.serializer and CacheRegion.deserializer parameters which may be set to any serializer. - Serialization and deserialization now take place within the CacheRegion so that backends may now assume string values in all cases. This simplifies the existing backends and also makes custom backends easier to write and maintain. - Additionally, the serializer is now applied to the user-defined value portion of the CachedValue and not to the metadata or other portions of CachedValue object itself, so the serialized portion is effectively a "payload" within the larger CachedValue structure that is passed as part of the larger string format. The overall format is a separate JSON of the cached value metadata, followed by the serialized form. This allows for end-user serialization schemes that are hardwired to the values themselves without the need to serialize dogpile's internal structures as well. - Existing custom backends should continue to work without issue; they now have the option to forego any separate serialization steps, and can also subclass a new backend BytesBackend that marks them as a backend that only deals with bytes coming in and out; all internal serialization logic from such a backend can be removed. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=60
2020-11-25 14:12:34 +00:00
Source: https://github.com/sqlalchemy/%{modname}/archive/rel_%{modver}.tar.gz#/%{modname}-%{version}.tar.gz
BuildRequires: %{python_module Mako}
- Update to 1.1.1: - Fixed regression where the serialization and deserialization functions could be inadvertently turned into instance methods with an unexpected argument signature, namely when pickle.dumps and pickle.loads are the pure Python version as is the case in pypy. - Reworked the means by which values are serialized and deserialized from backends, and provided for custom serialization of values. Added the CacheRegion.serializer and CacheRegion.deserializer parameters which may be set to any serializer. - Serialization and deserialization now take place within the CacheRegion so that backends may now assume string values in all cases. This simplifies the existing backends and also makes custom backends easier to write and maintain. - Additionally, the serializer is now applied to the user-defined value portion of the CachedValue and not to the metadata or other portions of CachedValue object itself, so the serialized portion is effectively a "payload" within the larger CachedValue structure that is passed as part of the larger string format. The overall format is a separate JSON of the cached value metadata, followed by the serialized form. This allows for end-user serialization schemes that are hardwired to the values themselves without the need to serialize dogpile's internal structures as well. - Existing custom backends should continue to work without issue; they now have the option to forego any separate serialization steps, and can also subclass a new backend BytesBackend that marks them as a backend that only deals with bytes coming in and out; all internal serialization logic from such a backend can be removed. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=60
2020-11-25 14:12:34 +00:00
BuildRequires: %{python_module dbm}
BuildRequires: %{python_module decorator >= 4.0.0}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest >= 5}
BuildRequires: %{python_module setuptools}
BuildRequires: python3-stevedore
Requires: python-decorator >= 4.0.0
BuildRequires: %{python_module six}
Requires: python-six
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Provides: python-dogpile.core = %{version}
Obsoletes: python-dogpile.core < 0.4.1
BuildArch: noarch
%python_subpackages
%description
A caching API built around the concept of a "dogpile lock", which allows
continued access to an expiring data value while a single thread generates a
new value.
%prep
- Update to 1.1.1: - Fixed regression where the serialization and deserialization functions could be inadvertently turned into instance methods with an unexpected argument signature, namely when pickle.dumps and pickle.loads are the pure Python version as is the case in pypy. - Reworked the means by which values are serialized and deserialized from backends, and provided for custom serialization of values. Added the CacheRegion.serializer and CacheRegion.deserializer parameters which may be set to any serializer. - Serialization and deserialization now take place within the CacheRegion so that backends may now assume string values in all cases. This simplifies the existing backends and also makes custom backends easier to write and maintain. - Additionally, the serializer is now applied to the user-defined value portion of the CachedValue and not to the metadata or other portions of CachedValue object itself, so the serialized portion is effectively a "payload" within the larger CachedValue structure that is passed as part of the larger string format. The overall format is a separate JSON of the cached value metadata, followed by the serialized form. This allows for end-user serialization schemes that are hardwired to the values themselves without the need to serialize dogpile's internal structures as well. - Existing custom backends should continue to work without issue; they now have the option to forego any separate serialization steps, and can also subclass a new backend BytesBackend that marks them as a backend that only deals with bytes coming in and out; all internal serialization logic from such a backend can be removed. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=60
2020-11-25 14:12:34 +00:00
%setup -q -n %{modname}-rel_%{modver}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/dogpile
%{python_sitelib}/dogpile.cache-%{version}-py%{python_version}.egg-info
%changelog