Update to 7.0
Resolves: rhbz#1634210
This commit is contained in:
parent
b588e539a9
commit
704cf5318e
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@
|
|||||||
/click-6.3.tar.gz
|
/click-6.3.tar.gz
|
||||||
/click-6.6.tar.gz
|
/click-6.6.tar.gz
|
||||||
/click-6.7.tar.gz
|
/click-6.7.tar.gz
|
||||||
|
/click-7.0.tar.gz
|
||||||
|
|||||||
@ -1,21 +0,0 @@
|
|||||||
From 6e7951c511b8316a73d9a8d9c4cc130becd99e93 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Dangoor <adamdangoor@gmail.com>
|
|
||||||
Date: Mon, 31 Jul 2017 18:06:20 +0100
|
|
||||||
Subject: [PATCH 2/3] Add pytest option to not capture warnings
|
|
||||||
|
|
||||||
---
|
|
||||||
pytest.ini | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
create mode 100644 pytest.ini
|
|
||||||
|
|
||||||
diff --git a/pytest.ini b/pytest.ini
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..1ceab94
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/pytest.ini
|
|
||||||
@@ -0,0 +1,2 @@
|
|
||||||
+[pytest]
|
|
||||||
+addopts = -p no:warnings
|
|
||||||
--
|
|
||||||
2.14.2
|
|
||||||
|
|
||||||
@ -1,54 +0,0 @@
|
|||||||
From e6fb0fe8bc75e7931fe86e95442eec09b49caee7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Dangoor <adamdangoor@gmail.com>
|
|
||||||
Date: Mon, 31 Jul 2017 19:45:24 +0100
|
|
||||||
Subject: [PATCH 3/3] Catch and test pytest warning
|
|
||||||
|
|
||||||
---
|
|
||||||
pytest.ini | 2 --
|
|
||||||
tests/test_compat.py | 15 +++++++++++++--
|
|
||||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
|
||||||
delete mode 100644 pytest.ini
|
|
||||||
|
|
||||||
diff --git a/pytest.ini b/pytest.ini
|
|
||||||
deleted file mode 100644
|
|
||||||
index 1ceab94..0000000
|
|
||||||
--- a/pytest.ini
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,2 +0,0 @@
|
|
||||||
-[pytest]
|
|
||||||
-addopts = -p no:warnings
|
|
||||||
diff --git a/tests/test_compat.py b/tests/test_compat.py
|
|
||||||
index e4ecdc8..d86110a 100644
|
|
||||||
--- a/tests/test_compat.py
|
|
||||||
+++ b/tests/test_compat.py
|
|
||||||
@@ -1,3 +1,5 @@
|
|
||||||
+import pytest
|
|
||||||
+
|
|
||||||
import click
|
|
||||||
|
|
||||||
|
|
||||||
@@ -11,10 +13,19 @@ if click.__version__ >= '3.0':
|
|
||||||
def cli(foo):
|
|
||||||
click.echo(foo)
|
|
||||||
|
|
||||||
- result = runner.invoke(cli, ['--foo', 'wat'])
|
|
||||||
+ with pytest.warns(Warning) as records:
|
|
||||||
+ result = runner.invoke(cli, ['--foo', 'wat'])
|
|
||||||
+
|
|
||||||
+ [warning_record] = records
|
|
||||||
+ warning_message = str(warning_record.message)
|
|
||||||
+ assert 'Invoked legacy parameter callback' in warning_message
|
|
||||||
assert result.exit_code == 0
|
|
||||||
+ # Depending on the pytest version, the warning message may be
|
|
||||||
+ # in `result.output`.
|
|
||||||
+ #
|
|
||||||
+ # In pytest version 3.1 pytest started capturing warnings by default.
|
|
||||||
+ # See https://docs.pytest.org/en/latest/warnings.html#warnings-capture.
|
|
||||||
assert 'WAT' in result.output
|
|
||||||
- assert 'Invoked legacy parameter callback' in result.output
|
|
||||||
|
|
||||||
|
|
||||||
def test_bash_func_name():
|
|
||||||
--
|
|
||||||
2.14.2
|
|
||||||
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
%global pypi_name click
|
%global pypi_name click
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 6.7
|
Version: 7.0
|
||||||
Release: 9%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Simple wrapper around optparse for powerful command line utilities
|
Summary: Simple wrapper around optparse for powerful command line utilities
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -11,8 +11,6 @@ Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
|
|||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1500962
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1500962
|
||||||
# https://github.com/pallets/click/pull/838
|
# https://github.com/pallets/click/pull/838
|
||||||
Patch0: 0001-Remove-outdated-comment-about-Click-3.0.patch
|
Patch0: 0001-Remove-outdated-comment-about-Click-3.0.patch
|
||||||
Patch1: 0002-Add-pytest-option-to-not-capture-warnings.patch
|
|
||||||
Patch2: 0003-Catch-and-test-pytest-warning.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -72,18 +70,21 @@ py.test-%{python2_version} tests --tb=long --verbose
|
|||||||
py.test-%{python3_version} tests --tb=long --verbose
|
py.test-%{python3_version} tests --tb=long --verbose
|
||||||
|
|
||||||
%files -n python2-%{pypi_name}
|
%files -n python2-%{pypi_name}
|
||||||
%license LICENSE
|
%license LICENSE.rst
|
||||||
%doc README CHANGES
|
%doc README.rst CHANGES.rst
|
||||||
%{python2_sitelib}/%{pypi_name}-*.egg-info/
|
%{python2_sitelib}/Click-*.egg-info/
|
||||||
%{python2_sitelib}/%{pypi_name}/
|
%{python2_sitelib}/%{pypi_name}/
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-%{pypi_name}
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
||||||
%license LICENSE
|
%license LICENSE.rst
|
||||||
%doc README CHANGES
|
%doc README.rst CHANGES.rst
|
||||||
%{python3_sitelib}/%{pypi_name}-*.egg-info/
|
%{python3_sitelib}/Click-*.egg-info/
|
||||||
%{python3_sitelib}/%{pypi_name}/
|
%{python3_sitelib}/%{pypi_name}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 02 2018 Charalampos Stratakis <cstratak@redhat.com> - 7.0-1
|
||||||
|
- Update to 7.0
|
||||||
|
|
||||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-9
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.7-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
|||||||
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (click-6.7.tar.gz) = 0d582ec4ecf8e4cf9ce2b9eec9d150e047512e1ebdb709eb031599c8e4a9632121dbb809bc1cfe597dd0ba62a9b8a5663c6dfbe41d575a991d27bca6b26130db
|
SHA512 (click-7.0.tar.gz) = 7ed2bf677f4a56f120deb61318675679a8f09c152af618e8808d24a20cc8537b0691c18b0de2e25b814c59e34b47d6f4d71191856422fc3be206de7669d78f3a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user