From c16482e8eab14794bcbe5793e9fcabe47cb53a33 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mar 17 2019 21:36:14 +0000 Subject: update to latest upstream (stable) release Resolves: rhbz#1560538 Version: 2.19.1-1 --- diff --git a/.gitignore b/.gitignore index 1a3bc86..1d5d866 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1 @@ -/marshmallow-a8b33850c74975250fa81308ce3aa4868128d3ba.tar.gz -/marshmallow-ea1def94e8dc534a1cd0da4aa6756d25cd2762ca.tar.gz -/marshmallow-2.8.0.tar.gz -/marshmallow-2.9.0.tar.gz -/marshmallow-2.10.0.tar.gz -/marshmallow-2.10.1.tar.gz -/marshmallow-2.10.3.tar.gz -/marshmallow-2.10.4.tar.gz -/marshmallow-2.10.5.tar.gz -/marshmallow-2.11.1.tar.gz -/ordered_set.patch -/CVE-2018-17175.patch +/marshmallow-*.tar.gz diff --git a/CVE-2018-17175.patch b/CVE-2018-17175.patch deleted file mode 100644 index dfe92e4..0000000 --- a/CVE-2018-17175.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Naur marshmallow-2.11.1.orig/marshmallow/schema.py marshmallow-2.11.1/marshmallow/schema.py ---- marshmallow-2.11.1.orig/marshmallow/schema.py 2017-01-08 22:23:48.000000000 +0100 -+++ marshmallow-2.11.1/marshmallow/schema.py 2018-09-21 14:20:06.756913165 +0200 -@@ -324,7 +324,7 @@ - """ - pass - -- def __init__(self, extra=None, only=(), exclude=(), prefix='', strict=None, -+ def __init__(self, extra=None, only=None, exclude=(), prefix='', strict=None, - many=False, context=None, load_only=(), dump_only=(), - partial=False): - # copy declared fields from metaclass -@@ -692,7 +692,7 @@ - - def _normalize_nested_options(self): - """Apply then flatten nested schema options""" -- if self.only: -+ if self.only is not None: - # Apply the only option to nested fields. - self.__apply_nested_option('only', self.only) - # Remove the child field names from the only option. -@@ -725,7 +725,7 @@ - - def _update_fields(self, obj=None, many=False): - """Update fields based on the passed in object.""" -- if self.only: -+ if self.only is not None: - # Return only fields specified in only option - if self.opts.fields: - field_names = self.set_class(self.opts.fields) & self.set_class(self.only) -diff -Naur marshmallow-2.11.1.orig/tests/test_schema.py marshmallow-2.11.1/tests/test_schema.py ---- marshmallow-2.11.1.orig/tests/test_schema.py 2017-01-08 22:23:48.000000000 +0100 -+++ marshmallow-2.11.1/tests/test_schema.py 2018-09-21 14:20:06.758913124 +0200 -@@ -884,6 +884,12 @@ - sch = MySchema(only=('baz', )) - assert sch.dump({'foo': 42}).data == {} - -+def test_only_empty(): -+ class MySchema(Schema): -+ foo = fields.Field() -+ -+ sch = MySchema(only=()) -+ assert 'foo' not in sch.dump({'foo': 'bar'}) - - def test_nested_only_and_exclude(): - class Inner(Schema): diff --git a/python-marshmallow-2.19.0-ordered_set.patch b/python-marshmallow-2.19.0-ordered_set.patch new file mode 100644 index 0000000..da5212c --- /dev/null +++ b/python-marshmallow-2.19.0-ordered_set.patch @@ -0,0 +1,13 @@ +diff --git a/src/marshmallow/schema.py b/src/marshmallow/schema.py +index acf728f..e0a7cae 100644 +--- a/src/marshmallow/schema.py ++++ b/src/marshmallow/schema.py +@@ -16,7 +16,7 @@ from marshmallow import base, fields, utils, class_registry, marshalling + from marshmallow.compat import (with_metaclass, iteritems, text_type, + binary_type, Mapping, OrderedDict) + from marshmallow.exceptions import ValidationError +-from marshmallow.orderedset import OrderedSet ++from ordered_set import OrderedSet + from marshmallow.decorators import (PRE_DUMP, POST_DUMP, PRE_LOAD, POST_LOAD, + VALIDATES, VALIDATES_SCHEMA) + from marshmallow.utils import missing diff --git a/python-marshmallow-2.19.0-versionwarning-disable.patch b/python-marshmallow-2.19.0-versionwarning-disable.patch new file mode 100644 index 0000000..8eecfeb --- /dev/null +++ b/python-marshmallow-2.19.0-versionwarning-disable.patch @@ -0,0 +1,32 @@ +diff --git a/docs/conf.py b/docs/conf.py +index 2cb5a10..520c101 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -35,7 +35,6 @@ extensions = [ + 'sphinx.ext.viewcode', + 'alabaster', + 'sphinx_issues', +- 'versionwarning.extension', + ] + + primary_domain = 'py' +@@ -101,19 +100,3 @@ html_sidebars = { + '**': ['about.html', 'donate.html', 'useful-links.html', + 'localtoc.html', 'relations.html', 'searchbox.html'] + } +- +-# sphinx-version-warning config +-versionwarning_messages = { +- 'latest': 'This document is for the development version. For the stable version documentation, see here.', +- 'stable': 'This document is for the latest stable release. For the 3.0 pre-release documentation, see here.', +- '3.0': 'This document is for the latest 3.0 pre-release. For the 2.x documentation, see here.', +- '2.x-line': 'This document is for the 2.x release branch. For the 3.0 pre-release documentation, see here.', +-} +-# Show warning at top of page +-versionwarning_body_selector = 'div.document' +-# For debugging locally +-# versionwarning_project_version = '3.0' +- +-# https://docs.readthedocs.io/en/latest/guides/adding-custom-css.html +-def setup(app): +- app.add_stylesheet('css/versionwarning.css') diff --git a/python-marshmallow.spec b/python-marshmallow.spec index 2a38e28..0572d26 100644 --- a/python-marshmallow.spec +++ b/python-marshmallow.spec @@ -5,14 +5,14 @@ %global _docdir_fmt %{name} Name: python-%{modname} -Version: 2.11.1 -Release: 10%{?dist} +Version: 2.19.1 +Release: 1%{?dist} Summary: Python library for converting complex datatypes to and from primitive types License: MIT URL: http://marshmallow.readthedocs.org/ Source0: https://github.com/marshmallow-code/marshmallow/archive/%{version}/%{modname}-%{version}.tar.gz -Patch0: ordered_set.patch -Patch1: CVE-2018-17175.patch +Patch0: python-marshmallow-2.19.0-ordered_set.patch +Patch1: python-marshmallow-2.19.0-versionwarning-disable.patch BuildArch: noarch @@ -82,9 +82,7 @@ Python 3 version. %endif %prep -%setup -n %{modname}-%{version} -%patch0 -p1 -%patch1 -p1 +%autosetup -n %{modname}-%{version} -p1 # remove bundled library # instead of orderedsett we patch code to usu python-ordered-set @@ -137,6 +135,9 @@ rm -rf html/{.buildinfo,.doctrees} %changelog +* Sun Mar 17 2019 Pavel Raiskup - 2.19.1-1 +- new upstream release + * Sat Feb 02 2019 Fedora Release Engineering - 2.11.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 1fe7f66..14c9cc9 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (marshmallow-2.11.1.tar.gz) = daf0623af43a835b4841a5ea3b2277805873f86ca4138caa50522b2419314c62b6535dace1e16c6a03462ec9dda79aa7223c29865914302b65a337efb3a44798 -SHA512 (ordered_set.patch) = 86e3f9b1f643121b13c46b2302e7eb05399a90515fff5ee1430431550085116921a175498e29f2e35e2d6f3a737fb761713001a60f9f9e9812c7ccf49fe6500e -SHA512 (CVE-2018-17175.patch) = d414414518eec7d72f1eec9969c85d98d4a865ca06315dc55b929ed8532f567ac54e1149378b4cf0c05028202e59d3b600f979799631ccf50a2f7f0e2df8b534 +SHA512 (marshmallow-2.19.1.tar.gz) = 72435a54a102e0243d4c0d972f0338c5efebbd72f5cfb67d32e88e0778051acb5b39e712e28d5f19d2c97f5d96ed6e4d21897a948af8d5f114760606484c6b8e