Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pytest-console-scripts for
openSUSE:Factory checked in at 2022-03-18 16:42:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-console-scripts (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-console-scripts.new.25692
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-console-scripts"
Fri Mar 18 16:42:17 2022 rev:9 rq:962569 version:1.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-console-scripts/python-pytest-console-scripts.changes
2021-12-18 20:30:56.202265557 +0100
+++
/work/SRC/openSUSE:Factory/.python-pytest-console-scripts.new.25692/python-pytest-console-scripts.changes
2022-03-18 16:42:25.717193884 +0100
@@ -1,0 +2,9 @@
+Fri Mar 18 04:14:59 UTC 2022 - Steve Kowalik <[email protected]>
+
+- Update to 1.3:
+ * Add a note on manual result printing to README - #50
+ * Bump Python version to 3.6 - fix #51
+- Add patch remove-mock.patch:
+ * Remove use of mock.
+
+-------------------------------------------------------------------
Old:
----
pytest-console-scripts-1.2.1.tar.gz
New:
----
pytest-console-scripts-1.3.tar.gz
remove-mock.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-console-scripts.spec ++++++
--- /var/tmp/diff_new_pack.NzOySS/_old 2022-03-18 16:42:26.153194196 +0100
+++ /var/tmp/diff_new_pack.NzOySS/_new 2022-03-18 16:42:26.157194199 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-console-scripts
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,22 +19,21 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pytest-console-scripts
-Version: 1.2.1
+Version: 1.3
Release: 0
Summary: Pytest plugin for testing console scripts
License: MIT
URL: https://github.com/kvas-it/pytest-console-scripts
Source:
https://files.pythonhosted.org/packages/source/p/pytest-console-scripts/pytest-console-scripts-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM gh#kvas-it/pytest-console-scripts#53
+Patch0: remove-mock.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-mock >= 2.0.0
Requires: python-pytest >= 4.0.0
BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module mock >= 2.0.0}
BuildRequires: %{python_module pytest >= 4.0.0}
-BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module virtualenv >= 20}
# /SECTION
++++++ pytest-console-scripts-1.2.1.tar.gz -> pytest-console-scripts-1.3.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-console-scripts-1.2.1/PKG-INFO
new/pytest-console-scripts-1.3/PKG-INFO
--- old/pytest-console-scripts-1.2.1/PKG-INFO 2021-09-28 22:40:23.000000000
+0200
+++ new/pytest-console-scripts-1.3/PKG-INFO 2022-02-23 22:20:51.366633400
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-console-scripts
-Version: 1.2.1
+Version: 1.3
Summary: Pytest plugin for testing console scripts
Home-page: https://github.com/kvas-it/pytest-console-scripts
Author: Vasily Kuznetsov
@@ -24,7 +24,7 @@
Requirements
------------
- - Python 3.5+, or PyPy3,
+ - Python 3.6+, or PyPy3,
- Pytest 4.0 or newer.
Installation
@@ -148,14 +148,18 @@
It's also possible to disable it just for one script run:
- ret = script_runner.run('foobar', print_result=False)
+ result = script_runner.run('foobar', print_result=False)
When printing of script run results is disabled, script output won't be
- visisble even when the test fails. Unfortunately there's no easy way
to print
- it only if the test fails because by the time a script run completes
we don't
- yet know whether the test will fail or not. In any case, with this
option and
- capturing control we can configure what output gets displayed so it
should be
- possible to get to the bottom of things.
+ visisble even when the test fails. Unfortunately there's no automatic
way to
+ print it only if the test fails because by the time a script run
completes we
+ don't know whether the test will fail or not. It's possible to do it
manually
+ from the test by using:
+
+ result.print()
+
+ This, combined with `--hide-run-results` or `print_result=False` can
be used to
+ only print interesting run results when capturing is off.
Package installation and testing during development
---------------------------------------------------
@@ -221,12 +225,13 @@
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-console-scripts-1.2.1/README.md
new/pytest-console-scripts-1.3/README.md
--- old/pytest-console-scripts-1.2.1/README.md 2021-04-26 20:10:06.000000000
+0200
+++ new/pytest-console-scripts-1.3/README.md 2022-02-23 21:47:44.000000000
+0100
@@ -14,7 +14,7 @@
Requirements
------------
-- Python 3.5+, or PyPy3,
+- Python 3.6+, or PyPy3,
- Pytest 4.0 or newer.
Installation
@@ -138,14 +138,18 @@
It's also possible to disable it just for one script run:
- ret = script_runner.run('foobar', print_result=False)
+ result = script_runner.run('foobar', print_result=False)
When printing of script run results is disabled, script output won't be
-visisble even when the test fails. Unfortunately there's no easy way to print
-it only if the test fails because by the time a script run completes we don't
-yet know whether the test will fail or not. In any case, with this option and
-capturing control we can configure what output gets displayed so it should be
-possible to get to the bottom of things.
+visisble even when the test fails. Unfortunately there's no automatic way to
+print it only if the test fails because by the time a script run completes we
+don't know whether the test will fail or not. It's possible to do it manually
+from the test by using:
+
+ result.print()
+
+This, combined with `--hide-run-results` or `print_result=False` can be used to
+only print interesting run results when capturing is off.
Package installation and testing during development
---------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-console-scripts-1.2.1/pytest_console_scripts.egg-info/PKG-INFO
new/pytest-console-scripts-1.3/pytest_console_scripts.egg-info/PKG-INFO
--- old/pytest-console-scripts-1.2.1/pytest_console_scripts.egg-info/PKG-INFO
2021-09-28 22:40:22.000000000 +0200
+++ new/pytest-console-scripts-1.3/pytest_console_scripts.egg-info/PKG-INFO
2022-02-23 22:20:51.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-console-scripts
-Version: 1.2.1
+Version: 1.3
Summary: Pytest plugin for testing console scripts
Home-page: https://github.com/kvas-it/pytest-console-scripts
Author: Vasily Kuznetsov
@@ -24,7 +24,7 @@
Requirements
------------
- - Python 3.5+, or PyPy3,
+ - Python 3.6+, or PyPy3,
- Pytest 4.0 or newer.
Installation
@@ -148,14 +148,18 @@
It's also possible to disable it just for one script run:
- ret = script_runner.run('foobar', print_result=False)
+ result = script_runner.run('foobar', print_result=False)
When printing of script run results is disabled, script output won't be
- visisble even when the test fails. Unfortunately there's no easy way
to print
- it only if the test fails because by the time a script run completes
we don't
- yet know whether the test will fail or not. In any case, with this
option and
- capturing control we can configure what output gets displayed so it
should be
- possible to get to the bottom of things.
+ visisble even when the test fails. Unfortunately there's no automatic
way to
+ print it only if the test fails because by the time a script run
completes we
+ don't know whether the test will fail or not. It's possible to do it
manually
+ from the test by using:
+
+ result.print()
+
+ This, combined with `--hide-run-results` or `print_result=False` can
be used to
+ only print interesting run results when capturing is off.
Package installation and testing during development
---------------------------------------------------
@@ -221,12 +225,13 @@
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
+Requires-Python: >=3.6
Description-Content-Type: text/markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-console-scripts-1.2.1/pytest_console_scripts.py
new/pytest-console-scripts-1.3/pytest_console_scripts.py
--- old/pytest-console-scripts-1.2.1/pytest_console_scripts.py 2021-09-28
21:52:37.000000000 +0200
+++ new/pytest-console-scripts-1.3/pytest_console_scripts.py 2022-01-06
16:05:28.000000000 +0100
@@ -113,9 +113,12 @@
self.stdout = stdout
self.stderr = stderr
if print_result:
- print('# Script return code:', returncode)
- print('# Script stdout:', stdout, sep='\n')
- print('# Script stderr:', stderr, sep='\n')
+ self.print()
+
+ def print(self):
+ print('# Script return code:', self.returncode)
+ print('# Script stdout:', self.stdout, sep='\n')
+ print('# Script stderr:', self.stderr, sep='\n')
class ScriptRunner(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-console-scripts-1.2.1/setup.py
new/pytest-console-scripts-1.3/setup.py
--- old/pytest-console-scripts-1.2.1/setup.py 2021-09-28 22:37:38.000000000
+0200
+++ new/pytest-console-scripts-1.3/setup.py 2022-02-23 21:47:35.000000000
+0100
@@ -22,6 +22,7 @@
long_description_content_type='text/markdown',
py_modules=['pytest_console_scripts'],
install_requires=['pytest>=4.0.0', 'mock>=2.0.0'],
+ python_requires='>=3.6',
setup_requires=['setuptools-scm'],
classifiers=[
'Development Status :: 4 - Beta',
@@ -30,10 +31,10 @@
'Topic :: Software Development :: Testing',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
+ 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pytest-console-scripts-1.2.1/tests/test_run_scripts.py
new/pytest-console-scripts-1.3/tests/test_run_scripts.py
--- old/pytest-console-scripts-1.2.1/tests/test_run_scripts.py 2021-09-28
21:52:37.000000000 +0200
+++ new/pytest-console-scripts-1.3/tests/test_run_scripts.py 2022-01-06
16:05:28.000000000 +0100
@@ -91,10 +91,15 @@
# function is easy_install so we use it here.
try:
- result = script_runner.run('easy_install', '-h')
+ path = script_runner._locate_script('easy_install')
+ if os.path.join('.pyenv', 'shims') in path:
+ # We have a shell wrapper from pyenv instead of real easy_install.
+ return
except FileNotFoundError:
- # No easy install. Just skip.
+ # No easy_install. We skip the test.
return
+
+ result = script_runner.run('easy_install', '-h')
assert result.success
assert '--verbose' in result.stdout
++++++ remove-mock.patch ++++++
>From 0c2218a456372e64e8cf11afc8c65ce858670fc7 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Thu, 17 Mar 2022 15:54:59 +1100
Subject: [PATCH] Remove use of external mock
As of Python 3.3, mock has been included in the standard library, and in
fact, the test code makes use of that fact. However, the main plugin did
not, so remove its usage, and drop it from setup.py. Also clean up the
definition of StreamMock to boot.
---
pytest_console_scripts.py | 11 ++---------
setup.py | 2 +-
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/pytest_console_scripts.py b/pytest_console_scripts.py
index 7dca21d..822b8d6 100644
--- a/pytest_console_scripts.py
+++ b/pytest_console_scripts.py
@@ -9,17 +9,10 @@
import sys
import traceback
-import mock
+from unittest import mock
import pytest
-if sys.version_info.major == 2:
- # We can't use io.StringIO for mocking stdout/stderr in Python 2
- # because printing byte strings to it triggers unicode errors and
- # there's code in stdlib that does that (e.g. traceback module).
- import StringIO
- StreamMock = StringIO.StringIO
-else:
- StreamMock = io.StringIO
+StreamMock = io.StringIO
def pytest_addoption(parser):
diff --git a/setup.py b/setup.py
index 7bbbced..e0bdcf8 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ def read(fname):
long_description=read('README.md'),
long_description_content_type='text/markdown',
py_modules=['pytest_console_scripts'],
- install_requires=['pytest>=4.0.0', 'mock>=2.0.0'],
+ install_requires=['pytest>=4.0.0'],
python_requires='>=3.6',
setup_requires=['setuptools-scm'],
classifiers=[