Compare commits
1 Commits
Author | SHA256 | Date | |
---|---|---|---|
1897d5f031 |
72
pytest-fixtures-pr171-remove-mock.patch
Normal file
72
pytest-fixtures-pr171-remove-mock.patch
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
diff --git a/pytest-shutil/pytest_shutil/run.py b/pytest-shutil/pytest_shutil/run.py
|
||||||
|
index c5b421d..7d46aea 100644
|
||||||
|
--- a/pytest-shutil/pytest_shutil/run.py
|
||||||
|
+++ b/pytest-shutil/pytest_shutil/run.py
|
||||||
|
@@ -11,7 +11,12 @@
|
||||||
|
from contextlib import closing
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
-from mock import patch
|
||||||
|
+try:
|
||||||
|
+ from unittest.mock import patch
|
||||||
|
+except ImportError:
|
||||||
|
+ # python 2
|
||||||
|
+ from mock import patch
|
||||||
|
+
|
||||||
|
import execnet
|
||||||
|
from six.moves import cPickle # @UnresolvedImport
|
||||||
|
|
||||||
|
diff --git a/pytest-shutil/setup.py b/pytest-shutil/setup.py
|
||||||
|
index 4126831..3513d3e 100644
|
||||||
|
--- a/pytest-shutil/setup.py
|
||||||
|
+++ b/pytest-shutil/setup.py
|
||||||
|
@@ -24,10 +24,11 @@
|
||||||
|
|
||||||
|
install_requires = ['six',
|
||||||
|
'execnet',
|
||||||
|
- 'contextlib2',
|
||||||
|
+ 'contextlib2;python_version<"3"',
|
||||||
|
'pytest',
|
||||||
|
- 'path.py',
|
||||||
|
- 'mock',
|
||||||
|
+ 'path; python_version >= "3.7"',
|
||||||
|
+ 'path.py; python_version < "3.7"',
|
||||||
|
+ 'mock; python_version<"3.3"',
|
||||||
|
'termcolor'
|
||||||
|
]
|
||||||
|
|
||||||
|
diff --git a/pytest-shutil/tests/integration/test_run_integration.py b/pytest-shutil/tests/integration/test_run_integration.py
|
||||||
|
index d92c9da..bf20f3a 100644
|
||||||
|
--- a/pytest-shutil/tests/integration/test_run_integration.py
|
||||||
|
+++ b/pytest-shutil/tests/integration/test_run_integration.py
|
||||||
|
@@ -8,7 +8,10 @@
|
||||||
|
import textwrap
|
||||||
|
from uuid import uuid4
|
||||||
|
|
||||||
|
-import mock
|
||||||
|
+try:
|
||||||
|
+ from unittest import mock
|
||||||
|
+except ImportError:
|
||||||
|
+ import mock
|
||||||
|
|
||||||
|
from pytest_shutil import run, workspace
|
||||||
|
from pytest_shutil.env import no_cov
|
||||||
|
diff --git a/pytest-shutil/tests/unit/test_run.py b/pytest-shutil/tests/unit/test_run.py
|
||||||
|
index 612d20d..c520e85 100644
|
||||||
|
--- a/pytest-shutil/tests/unit/test_run.py
|
||||||
|
+++ b/pytest-shutil/tests/unit/test_run.py
|
||||||
|
@@ -3,7 +3,13 @@
|
||||||
|
from subprocess import PIPE, STDOUT
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
-from mock import Mock, patch, sentinel, DEFAULT, call
|
||||||
|
+
|
||||||
|
+try:
|
||||||
|
+ from unittest.mock import Mock, patch, sentinel, DEFAULT, call
|
||||||
|
+except ImportError:
|
||||||
|
+ # python 2
|
||||||
|
+ from mock import Mock, patch, sentinel, DEFAULT, call
|
||||||
|
+
|
||||||
|
from six.moves import cPickle
|
||||||
|
|
||||||
|
from pytest_shutil import run
|
BIN
pytest-shutil-1.7.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
pytest-shutil-1.7.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
pytest-shutil-1.8.0.tar.gz
(Stored with Git LFS)
BIN
pytest-shutil-1.8.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
@@ -1,27 +1,3 @@
|
|||||||
-------------------------------------------------------------------
|
|
||||||
Mon Nov 4 11:05:21 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
|
||||||
|
|
||||||
- Remove not needed dep python-setuptools-git
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Tue Oct 22 06:08:51 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
|
||||||
|
|
||||||
- Update to 1.8.0:
|
|
||||||
* Drop support for Python 2 and <3.6, removing compatibility code.
|
|
||||||
* Use stdlib unittest.mock instead of mock package.
|
|
||||||
* Removed usage of path.py and path in favour of pathlib.
|
|
||||||
* Removed contextlib2 requirement.
|
|
||||||
* Fixed forcing color through termcolor.
|
|
||||||
- Drop patches, included upstream:
|
|
||||||
* pytest-fixtures-pr171-remove-mock.patch
|
|
||||||
* stop-using-imp.patch
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
|
||||||
Wed Jan 24 04:48:42 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
|
||||||
|
|
||||||
- Add patch stop-using-imp.patch:
|
|
||||||
* Use importlib and not imp.
|
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jun 10 11:50:04 UTC 2023 - ecsos <ecsos@opensuse.org>
|
Sat Jun 10 11:50:04 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-shutil
|
# spec file for package python-pytest-shutil
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,27 +16,50 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_without python2
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pytest-shutil
|
Name: python-pytest-shutil
|
||||||
Version: 1.8.0
|
Version: 1.7.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A goodie-bag of unix shell and environment tools for pytest
|
Summary: A goodie-bag of unix shell and environment tools for pytest
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/man-group/pytest-plugins
|
URL: https://github.com/manahl/pytest-plugins
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-shutil/pytest-shutil-%{version}.tar.gz
|
||||||
|
# PATCH-FEATURE-UPSTREAM pytest-fixtures-pr171-remove-mock.patch -- gh#man-group#pytest-plugins#171
|
||||||
|
Patch1: pytest-fixtures-pr171-remove-mock.patch
|
||||||
BuildRequires: %{python_module execnet}
|
BuildRequires: %{python_module execnet}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module path}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
|
BuildRequires: %{python_module setuptools-git}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: %{python_module termcolor}
|
BuildRequires: %{python_module termcolor}
|
||||||
BuildRequires: %{python_module wheel}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
%if %{with python2}
|
||||||
|
BuildRequires: python-contextlib2
|
||||||
|
BuildRequires: python-mock
|
||||||
|
BuildRequires: python-path.py
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} < 1550
|
||||||
|
BuildRequires: python3-path.py
|
||||||
|
%else
|
||||||
|
BuildRequires: %{python_module path}
|
||||||
|
%endif
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-execnet
|
Requires: python-execnet
|
||||||
|
%if 0%{suse_version} < 1550
|
||||||
|
Requires: python-path.py
|
||||||
|
%else
|
||||||
|
Requires: python-path
|
||||||
|
%endif
|
||||||
Requires: python-pytest
|
Requires: python-pytest
|
||||||
Requires: python-six
|
Requires: python-six
|
||||||
Requires: python-termcolor
|
Requires: python-termcolor
|
||||||
|
%ifpython2
|
||||||
|
Requires: python-contextlib2
|
||||||
|
Requires: python-mock
|
||||||
|
Requires: python-path.py
|
||||||
|
%endif
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -49,10 +72,10 @@ tools for automated tests.
|
|||||||
%autosetup -p2 -n pytest-shutil-%{version}
|
%autosetup -p2 -n pytest-shutil-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%pyproject_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -64,6 +87,6 @@ tools for automated tests.
|
|||||||
%doc README.md CHANGES.md
|
%doc README.md CHANGES.md
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/pytest_shutil
|
%{python_sitelib}/pytest_shutil
|
||||||
%{python_sitelib}/pytest_shutil-%{version}.dist-info
|
%{python_sitelib}/pytest_shutil-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user