<p>osmith <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Drop python2 support (again)<br><br>Re-apply reverted commit Iabda95073faa2191fd117e9637e0858c589e9d9e<br>("Drop python2 support"), but with additional changes to make the<br>scripts actually work with python3 and to make it build without python2.<br><br>I have verified, that the contrib/jenkins.sh scripts of all Osmocom<br>repositories (with their python3 patches on top) are working with this<br>patch and that all Osmocom repositories with the python3 patches build<br>in OBS (tested in own namespace).<br><br>All related patches for changing from python2 to 3 in other repositories<br>must be merged shortly after this one, as soon as the build slaves were<br>(automatically) updated to have the new osmo-python-tests installed:<br>https://gerrit.osmocom.org/q/topic:drop-py2<br><br>New fixes:<br>* osmopy/obscvty.py: verify: fix compare<br>  Comparing maps in python3 does not work the same as in python2. Convert<br>  them to lists first, so the compare works as intended again.<br>  Fix error:<br>          File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestvty.py", line 57, in test_history<br>        assert(self.vty.w_verify(test_str, [t1]))<br> AssertionError<br>* osmopy/obscvty.py: use enc/dec with send/recv<br>  Fix error:<br>         self.socket.send("%s\r" % request)<br>  TypeError: a bytes-like object is required, not 'str'<br>* scripts/osmotestconfig.py: use encode() before writing to file<br>  Fix error:<br> File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestconfig.py", line 91, in copy_config<br>            tmpfile.write(open(config).read())<br>    File "/usr/lib/python3.5/tempfile.py", line 622, in func_wrapper<br>            return func(*args, **kwargs)<br>  TypeError: a bytes-like object is required, not 'str'<br>* debian/control: add --buildsystem=pybuild. Otherwise "--with python3"<br>  is ignored and the build fails if python2 is not installed, with:<br>         Can't exec "pyversions": No such file or directory at /usr/[...]/python_distutils.pm line 120.<br><br>Related: OS#2819<br>Change-Id: I3ffc3519bf6c22536a49dad7a966188ddad351a7<br>---<br>M contrib/jenkins.sh<br>M debian/control<br>M debian/rules<br>M osmopy/__init__.py<br>M osmopy/obscvty.py<br>M osmopy/osmo_interact/__init__.py<br>M osmopy/osmo_interact/common.py<br>M osmopy/osmoutil.py<br>M scripts/osmodumpdoc.py<br>M scripts/osmotestconfig.py<br>M scripts/osmotestvty.py<br>M setup.py<br>D tests/test_py2.py<br>13 files changed, 28 insertions(+), 77 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/40/16540/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540">change 16540</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: python/osmo-python-tests </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3ffc3519bf6c22536a49dad7a966188ddad351a7 </div>
<div style="display:none"> Gerrit-Change-Number: 16540 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>