- version update to 1.7.0 * [Feature] #845: Env vars explicitly supplied to sudo (via its env kwarg) are now explicitly preserved via sudo’s --preserve-env argument. Patch courtesy of Benno Rice. * [Feature] #793: Add a new tasks.ignore_unknown_help config option for users who hand their tasks centrally-defined argument help dictionaries; it defaults to False but such users may set it to True to avoid exceptions. Thanks to @Allu2 for the report. * [Support]: Switch our continuous integration service from Travis-CI to Circle-CI, plus related and necessary updates to various administrative config files, management tasks and metadata. Including but not limited to: * Enhanced PyPI-level metadata/links * Split out tool config data from setup.cfg * Enhance execution & coverage of unit vs integration tests under CI * [Support] #803: Upgrade our vendored PyYAML from 3.11 to 5.4.1; this should both supply a number of security fixes, and address problems loading project-level YAML config files under Python 3.10. Fix via Andreas Rammhold. * [Support]: Switch to using yaml.safe_load for loading config files. This avoids some warnings under newer PyYAML versions and is also, in a shocking twist, more secure. - do not require python-mock for build, testsuite is not run - modified patches % 0001-Make-test-fallback-to-system-modules-when-vendorized.patch (refreshed) - deleted patches - fix-yaml-loader.patch (upstreamed) OBS-URL: https://build.opensuse.org/request/show/974913 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-invoke?expand=0&rev=29
93 lines
2.8 KiB
Diff
93 lines
2.8 KiB
Diff
From 4cd025415f0ef2c1d72bf4832051971c1e7eef8b Mon Sep 17 00:00:00 2001
|
|
From: Athmane Madjoudj <athmane@fedoraproject.org>
|
|
Date: Fri, 11 May 2018 19:47:18 +0100
|
|
Subject: [PATCH] Make test fallback to system modules when vendorized one are
|
|
not available
|
|
|
|
---
|
|
tests/_util.py | 5 ++++-
|
|
tests/concurrency.py | 5 ++++-
|
|
tests/conftest.py | 6 +++++-
|
|
tests/executor.py | 5 ++++-
|
|
tests/runners.py | 5 ++++-
|
|
tests/watchers.py | 5 ++++-
|
|
6 files changed, 25 insertions(+), 6 deletions(-)
|
|
|
|
Index: invoke-1.7.0/tests/_util.py
|
|
===================================================================
|
|
--- invoke-1.7.0.orig/tests/_util.py
|
|
+++ invoke-1.7.0/tests/_util.py
|
|
@@ -8,7 +8,10 @@ except ImportError:
|
|
termios = None
|
|
from contextlib import contextmanager
|
|
|
|
-from invoke.vendor.six import BytesIO, b, wraps
|
|
+try:
|
|
+ from invoke.vendor.six import BytesIO, b, wraps
|
|
+except ImportError:
|
|
+ from six import BytesIO, b, wraps
|
|
|
|
from mock import patch, Mock
|
|
from pytest import skip
|
|
Index: invoke-1.7.0/tests/concurrency.py
|
|
===================================================================
|
|
--- invoke-1.7.0.orig/tests/concurrency.py
|
|
+++ invoke-1.7.0/tests/concurrency.py
|
|
@@ -1,4 +1,7 @@
|
|
-from invoke.vendor.six.moves.queue import Queue
|
|
+try:
|
|
+ from invoke.vendor.six.moves.queue import Queue
|
|
+except ImportError:
|
|
+ from six.moves.queue import Queue
|
|
|
|
from invoke.util import ExceptionWrapper, ExceptionHandlingThread as EHThread
|
|
|
|
Index: invoke-1.7.0/tests/conftest.py
|
|
===================================================================
|
|
--- invoke-1.7.0.orig/tests/conftest.py
|
|
+++ invoke-1.7.0/tests/conftest.py
|
|
@@ -3,7 +3,11 @@ import os
|
|
import sys
|
|
import termios
|
|
|
|
-from invoke.vendor.six import iteritems
|
|
+try:
|
|
+ from invoke.vendor.six import iteritems
|
|
+except ImportError:
|
|
+ from six import iteritems
|
|
+
|
|
import pytest
|
|
from mock import patch
|
|
|
|
Index: invoke-1.7.0/tests/runners.py
|
|
===================================================================
|
|
--- invoke-1.7.0.orig/tests/runners.py
|
|
+++ invoke-1.7.0/tests/runners.py
|
|
@@ -9,7 +9,10 @@ import types
|
|
from io import BytesIO
|
|
from itertools import chain, repeat
|
|
|
|
-from invoke.vendor.six import StringIO, b, PY2, iteritems
|
|
+try:
|
|
+ from invoke.vendor.six import StringIO, b, PY2, iteritems
|
|
+except ImportError:
|
|
+ from six import StringIO, b, PY2, iteritems
|
|
|
|
from pytest import raises, skip
|
|
from pytest_relaxed import trap
|
|
Index: invoke-1.7.0/tests/watchers.py
|
|
===================================================================
|
|
--- invoke-1.7.0.orig/tests/watchers.py
|
|
+++ invoke-1.7.0/tests/watchers.py
|
|
@@ -1,6 +1,9 @@
|
|
from threading import Thread, Event
|
|
|
|
-from invoke.vendor.six.moves.queue import Queue, Empty
|
|
+try:
|
|
+ from invoke.vendor.six.moves.queue import Queue, Empty
|
|
+except:
|
|
+ from six.moves.queue import Queue, Empty
|
|
|
|
from invoke import Responder, FailingResponder, ResponseNotAccepted
|
|
|