Accepting request 1060481 from devel:languages:python

- update to 1.0.1:
  * Drop support for Python versions less than 3.7 (including Python 2).
- drop remove-nose.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/1060481
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jmespath?expand=0&rev=20
This commit is contained in:
Dominique Leuenberger 2023-01-24 18:42:28 +00:00 committed by Git OBS Bridge
commit 522f19e530
5 changed files with 16 additions and 47 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:999b0ef13b798cf04de5451a51201d63a6feaf07c3fdcfbab4e5bca2b4ac653e
size 81860

BIN
jmespath-1.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Sep 17 15:41:47 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.0.1:
* Drop support for Python versions less than 3.7 (including Python 2).
- drop remove-nose.patch (upstream)
-------------------------------------------------------------------
Mon Sep 27 03:03:07 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-jmespath
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,18 +16,18 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?!python_module:%define python_module() python3-%{**}}
Name: python-jmespath
Version: 0.10.0
Version: 1.0.1
Release: 0
Summary: Python module for declarative JSON document element extraction
License: MIT
URL: https://github.com/jmespath/jmespath.py
Source: https://github.com/jmespath/jmespath.py/archive/refs/tags/%{version}.tar.gz#/jmespath-%{version}.tar.gz
Patch0: remove-nose.patch
# Testing
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module ply >= 3.4}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module simplejson}
BuildRequires: fdupes
@ -71,8 +71,7 @@ The * can also be used for hash types:
The expression: foo.*.name will return ["one", "two"].
%prep
%setup -q -n jmespath.py-%{version}
%autopatch -p1
%autosetup -p1 -n jmespath.py-%{version}
%build
%python_build
@ -84,11 +83,8 @@ mv %{buildroot}%{_bindir}/jp.py %{buildroot}%{_bindir}/jp
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%if 0%{?suse_version} > 1500
# hangs on python 3.8 with pytest
%pyunittest discover -v
%else
%python_exec setup.py test
%endif
%post
%python_install_alternative jp

View File

@ -1,34 +0,0 @@
Index: jmespath.py-0.10.0/extra/test_hypothesis.py
===================================================================
--- jmespath.py-0.10.0.orig/extra/test_hypothesis.py
+++ jmespath.py-0.10.0/extra/test_hypothesis.py
@@ -6,7 +6,6 @@ import os
import sys
import numbers
-from nose.plugins.skip import SkipTest
from hypothesis import given, settings, assume, HealthCheck
import hypothesis.strategies as st
Index: jmespath.py-0.10.0/tests/test_compliance.py
===================================================================
--- jmespath.py-0.10.0.orig/tests/test_compliance.py
+++ jmespath.py-0.10.0/tests/test_compliance.py
@@ -3,8 +3,6 @@ from pprint import pformat
from tests import OrderedDict
from tests import json
-from nose.tools import assert_equal
-
from jmespath.visitor import Options
@@ -80,7 +78,7 @@ def _test_expression(given, expression,
actual_repr, pformat(parsed.parsed),
json.dumps(given, indent=4)))
error_msg = error_msg.replace(r'\n', '\n')
- assert_equal(actual, expected, error_msg)
+ assert actual == expected, error_msg
def _test_error_expression(given, expression, error, filename):