← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1813361] [NEW] disco: python37 unittest/tox support

 

Public bug reported:

cloud-init's xenial toxenv falls over on tip of master 7a4696596bbcccfedf5c6b6e25ad684ef30d9cea
in Ubuntu Disco python37 environments. Some of the tox dependencies like httpretty are exhibiting issues with python3.7

Make "all the tox things" work on Disco

type of errors seen running tox -r -e xenial on Disco

======================================================================
ERROR: tests.unittests.test_datasource.test_openstack.TestOpenStackDataSource.test_wb__crawl_metadata_does_not_persist
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 1055, in wrapper
    return test(*args, **kw)
  File "/home/ubuntu/cloud-init/tests/unittests/test_datasource/test_openstack.py", line 395, in test_wb__crawl_metadata_does_not_persist
    _register_uris(self.VERSION, EC2_FILES, EC2_META, OS_FILES)
  File "/home/ubuntu/cloud-init/tests/unittests/test_datasource/test_openstack.py", line 126, in _register_uris
    body=get_request_callback)
  File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 938, in register_uri
    match_querystring)
  File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 760, in __init__
    self.info = URIInfo.from_uri(uri, entries)
  File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 730, in from_uri
    result = urlsplit(uri)
  File "/usr/lib/python3.7/urllib/parse.py", line 400, in urlsplit
    url, scheme, _coerce_result = _coerce_args(url, scheme)
  File "/usr/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
    return _decode_args(args) + (_encode_result,)
  File "/usr/lib/python3.7/urllib/parse.py", line 107, in _decode_args
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
  File "/usr/lib/python3.7/urllib/parse.py", line 107, in <genexpr>
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 're.Pattern' object has no attribute 'decode'

----------------------------------------------------------------------

Also of note: python27 interpreter isn't available on Disco, so we need
to allow tox to skip py27 env if not present.

** Affects: cloud-init
     Importance: Undecided
     Assignee: Chad Smith (chad.smith)
         Status: In Progress

** Changed in: cloud-init
       Status: New => In Progress

** Changed in: cloud-init
     Assignee: (unassigned) => Chad Smith (chad.smith)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1813361

Title:
  disco: python37 unittest/tox support

Status in cloud-init:
  In Progress

Bug description:
  cloud-init's xenial toxenv falls over on tip of master 7a4696596bbcccfedf5c6b6e25ad684ef30d9cea
  in Ubuntu Disco python37 environments. Some of the tox dependencies like httpretty are exhibiting issues with python3.7

  Make "all the tox things" work on Disco

  type of errors seen running tox -r -e xenial on Disco

  ======================================================================
  ERROR: tests.unittests.test_datasource.test_openstack.TestOpenStackDataSource.test_wb__crawl_metadata_does_not_persist
  ----------------------------------------------------------------------
  Traceback (most recent call last):
    File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 1055, in wrapper
      return test(*args, **kw)
    File "/home/ubuntu/cloud-init/tests/unittests/test_datasource/test_openstack.py", line 395, in test_wb__crawl_metadata_does_not_persist
      _register_uris(self.VERSION, EC2_FILES, EC2_META, OS_FILES)
    File "/home/ubuntu/cloud-init/tests/unittests/test_datasource/test_openstack.py", line 126, in _register_uris
      body=get_request_callback)
    File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 938, in register_uri
      match_querystring)
    File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 760, in __init__
      self.info = URIInfo.from_uri(uri, entries)
    File "/home/ubuntu/cloud-init/.tox/xenial/lib/python3.7/site-packages/httpretty/core.py", line 730, in from_uri
      result = urlsplit(uri)
    File "/usr/lib/python3.7/urllib/parse.py", line 400, in urlsplit
      url, scheme, _coerce_result = _coerce_args(url, scheme)
    File "/usr/lib/python3.7/urllib/parse.py", line 123, in _coerce_args
      return _decode_args(args) + (_encode_result,)
    File "/usr/lib/python3.7/urllib/parse.py", line 107, in _decode_args
      return tuple(x.decode(encoding, errors) if x else '' for x in args)
    File "/usr/lib/python3.7/urllib/parse.py", line 107, in <genexpr>
      return tuple(x.decode(encoding, errors) if x else '' for x in args)
  AttributeError: 're.Pattern' object has no attribute 'decode'

  ----------------------------------------------------------------------

  Also of note: python27 interpreter isn't available on Disco, so we
  need to allow tox to skip py27 env if not present.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1813361/+subscriptions


Follow ups