Change in ...osmo-python-tests[master]: Drop python2 support (again)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Wed Dec 11 11:28:55 UTC 2019


Hello Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540

to look at the new patch set (#2).

Change subject: Drop python2 support (again)
......................................................................

Drop python2 support (again)

Re-apply reverted commit Iabda95073faa2191fd117e9637e0858c589e9d9e
("Drop python2 support"), but with additional changes to make the
scripts actually work with python3 and to make it build without python2.

I have verified, that the contrib/jenkins.sh scripts of all Osmocom
repositories (with their python3 patches on top) are working with this
patch and that all Osmocom repositories with the python3 patches build
in OBS (tested in own namespace).

All related patches for changing from python2 to 3 in other repositories
must be merged shortly after this one, as soon as the build slaves were
(automatically) updated to have the new osmo-python-tests installed:
https://gerrit.osmocom.org/q/topic:drop-py2

New fixes:
* osmopy/obscvty.py: verify: fix compare
  Comparing maps in python3 does not work the same as in python2. Convert
  them to lists first, so the compare works as intended again.
  Fix error:
	  File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestvty.py", line 57, in test_history
	    assert(self.vty.w_verify(test_str, [t1]))
	AssertionError
* osmopy/obscvty.py: use enc/dec with send/recv
  Fix error:
		self.socket.send("%s\r" % request)
	TypeError: a bytes-like object is required, not 'str'
* scripts/osmotestconfig.py: use encode() before writing to file
  Fix error:
	File "/home/user/code/osmo-dev/src/osmo-python-tests/scripts/osmotestconfig.py", line 91, in copy_config
		tmpfile.write(open(config).read())
	File "/usr/lib/python3.5/tempfile.py", line 622, in func_wrapper
		return func(*args, **kwargs)
	TypeError: a bytes-like object is required, not 'str'
* debian/control: add --buildsystem=pybuild. Otherwise "--with python3"
  is ignored and the build fails if python2 is not installed, with:
  	Can't exec "pyversions": No such file or directory at /usr/[...]/python_distutils.pm line 120.

Related: OS#2819
Change-Id: I3ffc3519bf6c22536a49dad7a966188ddad351a7
---
M contrib/jenkins.sh
M debian/control
M debian/rules
M osmopy/__init__.py
M osmopy/obscvty.py
M osmopy/osmo_interact/__init__.py
M osmopy/osmo_interact/common.py
M osmopy/osmoutil.py
M scripts/osmodumpdoc.py
M scripts/osmotestconfig.py
M scripts/osmotestvty.py
M setup.py
D tests/test_py2.py
13 files changed, 28 insertions(+), 77 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/40/16540/2
-- 
To view, visit https://gerrit.osmocom.org/c/python/osmo-python-tests/+/16540
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Change-Id: I3ffc3519bf6c22536a49dad7a966188ddad351a7
Gerrit-Change-Number: 16540
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191211/b00f0f1c/attachment.htm>


More information about the gerrit-log mailing list