[Python-modules-commits] [txwinrm] 06/09: merge patched into master

Christopher Stuart Hoskin mans0954 at moszumanska.debian.org
Fri Oct 27 20:01:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

mans0954 pushed a commit to branch master
in repository txwinrm.

commit ab8823122be9fa668aa5d55ddbc04ad9beb81190
Merge: fd6dc5b 94b6467
Author: Christopher Hoskin <mans0954 at debian.org>
Date:   Fri Oct 27 20:53:59 2017 +0100

    merge patched into master

 .gitignore                                         |   1 +
 debian/.git-dpm                                    |   6 +-
 ...lls-pykerberos-kerberos-we-want-the-defau.patch |   4 +-
 debian/patches/0002-Fix-tests.patch                |   4 +-
 debian/patches/0003-Wecutil-Argument-Bug.patch     |   2 +-
 setup.py                                           |   4 +-
 txwinrm/SessionManager.py                          |  80 +++++++---
 txwinrm/WinRMClient.py                             | 173 +++++++++++++--------
 txwinrm/krb5.py                                    |  60 ++-----
 txwinrm/request/enum_shells.xml                    |  18 +++
 txwinrm/request/pull_shells.xml                    |  34 ++++
 txwinrm/shell.py                                   | 159 +++++++++++++++----
 txwinrm/twisted_utils.py                           |  53 +++++++
 txwinrm/util.py                                    |  32 ++--
 txwinrm/winrs.py                                   |   6 +-
 15 files changed, 445 insertions(+), 191 deletions(-)

diff --cc debian/.git-dpm
index 15e513e,0000000..b6bc163
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,11 -1,0 +1,11 @@@
 +# see git-dpm(1) from git-dpm package
- 6fd99141ba98be37f3643bf8055126b409cdf7c3
- 6fd99141ba98be37f3643bf8055126b409cdf7c3
- 725ae9c1a9a2e5be561af17bc361181305870603
++94b646767b2e5c9ef3194192e4e69bfae970b9e7
++94b646767b2e5c9ef3194192e4e69bfae970b9e7
++c09dc177d5c1be1d8f43c1869a7ecaba6a941eed
 +c09dc177d5c1be1d8f43c1869a7ecaba6a941eed
 +txwinrm_1.3.3.orig.tar.gz
 +0c4f3ab7dd941d91c0be2766578bbe5e84f19000
 +295591
 +debianTag="debian/%e%v"
 +patchedTag="patched/%e%v"
 +upstreamTag="upstream/%e%u"
diff --cc debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
index f9bc784,0000000..3faf0d3
mode 100644,000000..100644
--- a/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
+++ b/debian/patches/0001-Upstream-calls-pykerberos-kerberos-we-want-the-defau.patch
@@@ -1,22 -1,0 +1,22 @@@
- From 6cfcd1856b5d1ecb511771601ea2ef4ab1035802 Mon Sep 17 00:00:00 2001
++From b89968cbc6d9f579e40575c95a019db4421ca3a8 Mon Sep 17 00:00:00 2001
 +From: Christopher Hoskin <christopher.hoskin at gmail.com>
 +Date: Fri, 29 Jul 2016 21:43:39 +0100
 +Subject: Upstream calls pykerberos kerberos, we want the default name
 +
 +---
 + setup.py | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/setup.py b/setup.py
- index 28b475e..9ee7008 100755
++index d18113d..5cb59ed 100755
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -29,7 +29,7 @@ setup_kwargs = dict(
 + 
 + try:
 +     from setuptools import setup
 +-    setup_kwargs['install_requires'] = ['twisted', 'kerberos', 'pyOpenSSL']
 ++    setup_kwargs['install_requires'] = ['twisted', 'pykerberos', 'pyOpenSSL']
 +     try:
 +         import argparse
 +         if False:
diff --cc debian/patches/0002-Fix-tests.patch
index 10bf07c,0000000..20ea48e
mode 100644,000000..100644
--- a/debian/patches/0002-Fix-tests.patch
+++ b/debian/patches/0002-Fix-tests.patch
@@@ -1,122 -1,0 +1,122 @@@
- From e8f92a5cbc1aeababcb43e40ea71433c74c19177 Mon Sep 17 00:00:00 2001
++From 369d76ed7198d0b5490875862f5954ad726b68c4 Mon Sep 17 00:00:00 2001
 +From: Christopher Hoskin <christopher.hoskin at gmail.com>
 +Date: Fri, 29 Jul 2016 21:46:55 +0100
 +Subject: Fix tests
 +
 +---
 + setup.py                   |  1 +
 + txwinrm/enumerate.py       |  8 ++++----
 + txwinrm/test/test_shell.py | 12 ++++++++----
 + 3 files changed, 13 insertions(+), 8 deletions(-)
 +
 +diff --git a/setup.py b/setup.py
- index 9ee7008..71f9c1b 100755
++index 5cb59ed..55c199f 100755
 +--- a/setup.py
 ++++ b/setup.py
 +@@ -20,6 +20,7 @@ setup_kwargs = dict(
 +     url='https://github.com/zenoss/txwinrm',
 +     packages=['txwinrm', 'txwinrm.request'],
 +     package_data={'txwinrm.request': ['*.xml']},
 ++    test_suite='txwinrm.test',
 +     scripts=[
 +         'scripts/winrm',
 +         'scripts/winrs',
 +diff --git a/txwinrm/enumerate.py b/txwinrm/enumerate.py
 +index 8e379cb..78b3d50 100755
 +--- a/txwinrm/enumerate.py
 ++++ b/txwinrm/enumerate.py
 +@@ -325,7 +325,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
 +         This implementation saves the text from the buffer. Then it resets and
 +         truncates the buffer.
 +         """
 +-        self._text = self._buffer.getvalue()
 ++        self._text = self._buffer.getvalue().decode('utf-8')
 +         self._reset_truncate()
 + 
 +     def characters(self, content):
 +@@ -335,7 +335,7 @@ class TextBufferingContentHandler(sax.handler.ContentHandler):
 + 
 +         This implementation writes to the buffer.
 +         """
 +-        self._buffer.write(content)
 ++        self._buffer.write(content.encode('utf-8'))
 + 
 +     def _reset_truncate(self):
 +         self._buffer.reset()
 +@@ -599,7 +599,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
 +         This instance manipulates the tag stack, creating a new instance if
 +         it's length is 1. Saves value as None if the nil attribute is present.
 +         """
 +-        log.debug('ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
 ++        log.debug(u'ItemsContentHandler startElementNS {0} v="{1}" t="{2}" {3}'
 +                   .format(name, self._value, self._text_buffer.text,
 +                           self._tag_stack))
 +         tag = create_tag_comparer(name)
 +@@ -624,7 +624,7 @@ class ItemsContentHandler(sax.handler.ContentHandler):
 +         the text as a date and saves it for later use when the properties
 +         element is closed.
 +         """
 +-        log.debug('ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
 ++        log.debug(u'ItemsContentHandler endElementNS {0} v="{1}" t="{2}" {3}'
 +                   .format(name, self._value, self._text_buffer.text,
 +                           self._tag_stack))
 +         tag = create_tag_comparer(name)
 +diff --git a/txwinrm/test/test_shell.py b/txwinrm/test/test_shell.py
 +index 245a187..7210ea4 100644
 +--- a/txwinrm/test/test_shell.py
 ++++ b/txwinrm/test/test_shell.py
 +@@ -16,6 +16,7 @@ from .tools import create_get_elem_func
 + from ..shell import _build_command_line_elem, _stripped_lines, \
 +     _find_shell_id, _find_command_id, _find_stream, _find_exit_code, \
 +     CommandResponse, SingleShotCommand, LongRunningCommand, Typeperf
 ++from ..util import EtreeRequestSender, ConnectionInfo
 + 
 + DATADIR = os.path.join(
 +     os.path.dirname(os.path.abspath(__file__)), "data_shell")
 +@@ -36,6 +37,7 @@ class FakeRequestSender(object):
 + 
 +     hostname = 'fake_host'
 +     _receive_resp = 'receive_resp_01.xml'
 ++    _conn_info = ConnectionInfo("10.30.50.34", "kerberos", "rbooth at SOLUTIONS.LOC", "", "http", 5985, "Keep-Alive", "/home/zenoss/rbooth.keytab", '')
 + 
 +     def send_request(self, request_template_name, **kwargs):
 +         elem = None
 +@@ -50,8 +52,10 @@ class FakeRequestSender(object):
 +             elem = get_elem(self._receive_resp)
 +             self._receive_resp = 'receive_resp_02.xml'
 + 
 +-        return defer.succeed(elem)
 ++        return defer.returnValue(elem)
 + 
 ++    def close_connections(self):
 ++        return defer.succeed(None)
 + 
 + class TestBuildCommandLineElem(unittest.TestCase):
 + 
 +@@ -148,7 +152,7 @@ class TestSingleShotCommand(unittest.TestCase):
 + 
 +     @defer.inlineCallbacks
 +     def test_run_command(self):
 +-        command = SingleShotCommand(FakeRequestSender())
 ++        command = SingleShotCommand(EtreeRequestSender(FakeRequestSender()))
 +         cmd_response = yield command.run_command('foo')
 +         self.assertEqual(cmd_response.exit_code, 0)
 +         self.assertEqual(cmd_response.stderr, [])
 +@@ -163,7 +167,7 @@ class TestSingleShotCommand(unittest.TestCase):
 + class TestLongRunningCommand(unittest.TestCase):
 + 
 +     def setUp(self):
 +-        self._command = LongRunningCommand(FakeRequestSender())
 ++        self._command = LongRunningCommand(EtreeRequestSender(FakeRequestSender()))
 + 
 +     def tearDown(self):
 +         self._command = None
 +@@ -202,7 +206,7 @@ class TestLongRunningCommand(unittest.TestCase):
 + class TestTypeperf(unittest.TestCase):
 + 
 +     def setUp(self):
 +-        self._command = Typeperf(LongRunningCommand(FakeRequestSender()))
 ++        self._command = Typeperf(LongRunningCommand(EtreeRequestSender(FakeRequestSender())))
 + 
 +     def tearDown(self):
 +         self._command = None
diff --cc debian/patches/0003-Wecutil-Argument-Bug.patch
index 8456dc8,0000000..3ca4c95
mode 100644,000000..100644
--- a/debian/patches/0003-Wecutil-Argument-Bug.patch
+++ b/debian/patches/0003-Wecutil-Argument-Bug.patch
@@@ -1,27 -1,0 +1,27 @@@
- From 6fd99141ba98be37f3643bf8055126b409cdf7c3 Mon Sep 17 00:00:00 2001
++From 94b646767b2e5c9ef3194192e4e69bfae970b9e7 Mon Sep 17 00:00:00 2001
 +From: Christopher Hoskin <christopher.hoskin at gmail.com>
 +Date: Sat, 30 Jul 2016 09:47:09 +0100
 +Subject: Wecutil Argument Bug
 +
 +Bug: https://github.com/zenoss/txwinrm/issues/82
 +Forwarded: https://github.com/zenoss/txwinrm/pull/109
 +Last-Update: 2017-02-25
 +---
 + txwinrm/wecutil.py | 4 ++--
 + 1 file changed, 2 insertions(+), 2 deletions(-)
 +
 +diff --git a/txwinrm/wecutil.py b/txwinrm/wecutil.py
 +index e456e14..557bd53 100644
 +--- a/txwinrm/wecutil.py
 ++++ b/txwinrm/wecutil.py
 +@@ -90,8 +90,8 @@ class WecutilStrategy(object):
 + class WecUtility(app.ConfigDrivenUtility):
 + 
 +     def add_args(self, parser):
 +-        parser.add_argument("--path", "-p", default='Application')
 +-        parser.add_argument("--select", "-s", default='*')
 ++        parser.add_argument("--path", "-t", default='Application')
 ++        parser.add_argument("--select", "-l", default='*')
 +         parser.add_argument("--num-pulls", "-n", type=int, default=2)
 + 
 +     def check_args(self, args):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/txwinrm.git



More information about the Python-modules-commits mailing list