Accepting request 705391 from devel:languages:python

- Update to 4.7.0:
  * The :meth:`.pxssh.login` method now no longer requires a username if an ssh config is provided and will raise an error if neither are provided. (:ghpull:`562`).
  * The :meth:`.pxssh.login` method now supports providing your own ssh command via the cmd parameter. (:ghpull:`528`) (:ghpull:`563`).
  * :class:`.pxssh` now supports the use_poll parameter which is passed into :meth:`.pexpect.spawn` (:ghpull:`542`).
  * Minor bug fix with ssh_config. (:ghpull:`498`).
  * :meth:`.replwrap.run_command` now has async support via an async_ parameter. (:ghpull:`501`).
  * :meth:`.pexpect.spawn` will now read additional bytes if able up to a buffer limit. (:ghpull:`304`).
- Drop merged patch fix-test.patch

OBS-URL: https://build.opensuse.org/request/show/705391
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pexpect?expand=0&rev=28
This commit is contained in:
Dominique Leuenberger 2019-05-27 06:37:25 +00:00 committed by Git OBS Bridge
commit da9bfa7563
5 changed files with 21 additions and 35 deletions

View File

@ -1,27 +0,0 @@
https://github.com/pexpect/pexpect/pull/527
commit 5349569bcad4ab1685c9f2ec2a2c77a69cde4e48
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Tue Sep 4 13:57:43 2018 +0200
tests: ignore stderr from openssl
Without this patch, the test failed with openssl-1.0.2p
because 502 lines were captured with the extra lines being at the end:
140510355240592:error:02012020:system library:fflush:Broken pipe:bss_file.c:434:fflush()
140510355240592:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:436:
neither openssl-1.0.2j nor 1.1.0h needed this patch.
diff --git a/tests/test_expect.py b/tests/test_expect.py
index 795518a..2c74744 100755
--- a/tests/test_expect.py
+++ b/tests/test_expect.py
@@ -411,7 +411,7 @@ class ExpectTestCase (PexpectTestCase.PexpectTestCase):
def test_before_across_chunks(self):
# https://github.com/pexpect/pexpect/issues/478
child = pexpect.spawn(
- '''/bin/bash -c "openssl rand -base64 {} | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
+ '''/bin/bash -c "openssl rand -base64 {} 2>/dev/null | head -500 | nl --number-format=rz --number-width=5 2>&1 ; echo 'PATTERN!!!'"'''.format(1024 * 1024 * 2),
searchwindowsize=128
)
child.expect(['PATTERN'])

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a8e88259839571d1251d278476f3eec5db26deb73a70be5ed5dc5435e418aba
size 148966

3
pexpect-4.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e2c1fd0e6ee3a49b28f95d4b33bc389c89b20af6a1255906e90ff1262ce62eb
size 153747

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Sat May 25 09:06:04 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 4.7.0:
* The :meth:`.pxssh.login` method now no longer requires a username if an ssh config is provided and will raise an error if neither are provided. (:ghpull:`562`).
* The :meth:`.pxssh.login` method now supports providing your own ssh command via the cmd parameter. (:ghpull:`528`) (:ghpull:`563`).
* :class:`.pxssh` now supports the use_poll parameter which is passed into :meth:`.pexpect.spawn` (:ghpull:`542`).
* Minor bug fix with ssh_config. (:ghpull:`498`).
* :meth:`.replwrap.run_command` now has async support via an async_ parameter. (:ghpull:`501`).
* :meth:`.pexpect.spawn` will now read additional bytes if able up to a buffer limit. (:ghpull:`304`).
- Drop merged patch fix-test.patch
-------------------------------------------------------------------
Tue Dec 4 12:51:27 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pexpect
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,20 +18,21 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pexpect
Version: 4.6.0
Version: 4.7.0
Release: 0
Summary: Pure Python Expect-like module
License: ISC
Group: Development/Libraries/Python
URL: http://pexpect.readthedocs.org/en/latest/
Source: https://files.pythonhosted.org/packages/source/p/pexpect/pexpect-%{version}.tar.gz
Patch0: fix-test.patch
BuildRequires: %{python_module ptyprocess}
BuildRequires: %{python_module pytest}
BuildRequires: fdupes
# For man validation
BuildRequires: man
# For test command calls
# For bash validation
BuildRequires: bash
BuildRequires: openssl
BuildRequires: python-rpm-macros
Requires: python-ptyprocess
@ -44,7 +45,6 @@ controlling them; and responding to expected patterns in their output.
%prep
%setup -q -n pexpect-%{version}
%patch0 -p1
# Fix wrong-script-interpreter
find examples -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python||" {} \;
@ -59,7 +59,8 @@ find examples -type f -name "*.cgi" -exec sed -i "s|##!%{_bindir}/env python|##!
%check
export LANG=en_US.UTF-8
%python_expand py.test-%{$python_bin_suffix}
# test_bash https://github.com/pexpect/pexpect/issues/568
%pytest -k 'not test_bash'
%files %{python_files}
%license LICENSE