← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1456955] Re: tox -epep8 fails due to tox picking python 3.x

 

Reviewed:  https://review.openstack.org/282590
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=05583d14966a366f0d37753b81c8f72c87126348
Submitter: Jenkins
Branch:    master

commit 05583d14966a366f0d37753b81c8f72c87126348
Author: Sean Dague <sean@xxxxxxxxx>
Date:   Fri Feb 19 21:10:42 2016 -0500

    always use python2.7 for pep8
    
    pep8 doesn't work with python3 on our codebase. If someone is on a
    platform that defaults to python => python3, pep8 won't work for
    them. This is actually really easy to fix with a single line in tox.
    
    Change-Id: I7a888e4f7cc828638a9d61d2249a854ba1f3cb7b
    Closes-Bug: #1456955


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1456955

Title:
  tox -epep8 fails due to tox picking python 3.x

Status in Designate:
  Fix Released
Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) liberty series:
  New

Bug description:
  karlsone@workstation:~/projects/dnsaas/designate$ tox -epep8
  pep8 create: /home/karlsone/projects/dnsaas/designate/.tox/pep8
  pep8 installdeps: -r/home/karlsone/projects/dnsaas/designate/requirements.txt, -r/home/karlsone/projects/dnsaas/designate/test-requirements.txt
  pep8 develop-inst: /home/karlsone/projects/dnsaas/designate
  pep8 runtests: PYTHONHASHSEED='0'
  pep8 runtests: commands[0] | flake8
  Traceback (most recent call last):
    File ".tox/pep8/bin/flake8", line 9, in <module>
      load_entry_point('flake8==2.1.0', 'console_scripts', 'flake8')()
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/flake8/main.py", line 24, in main
      flake8_style = get_style_guide(parse_argv=True, config_file=DEFAULT_CONFIG)
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/flake8/engine.py", line 79, in get_style_guide
      kwargs['parser'], options_hooks = get_parser()
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/flake8/engine.py", line 53, in get_parser
      parser_hook(parser)
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/hacking/core.py", line 146, in add_options
      factory = pbr.util.resolve_name(local_check_fact)
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/pbr/util.py", line 171, in resolve_name
      ret = __import__('.'.join(module_name), fromlist=[attr_name])
    File "/home/karlsone/projects/dnsaas/designate/designate/__init__.py", line 16, in <module>
      import eventlet
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/__init__.py", line 10, in <module>
      from eventlet import convenience
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/convenience.py", line 6, in <module>
      from eventlet.green import socket
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/green/socket.py", line 17, in <module>
      from eventlet.support import greendns
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/support/greendns.py", line 54, in <module>
      socket=_socket_nodns)
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/patcher.py", line 119, in import_patched
      *additional_modules + tuple(kw_additional_modules.items()))
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/eventlet/patcher.py", line 93, in inject
      module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/dns/resolver.py", line 32, in <module>
      import dns.flags
    File "/home/karlsone/projects/dnsaas/designate/.tox/pep8/lib/python3.4/site-packages/dns/flags.py", line 51, in <module>
      _by_value = dict([(y, x) for x, y in _by_text.iteritems()])
  AttributeError: 'dict' object has no attribute 'iteritems'
  ERROR: InvocationError: '/home/karlsone/projects/dnsaas/designate/.tox/pep8/bin/flake8'
  ____________________________________________________________________________________________________________________________________ summary _____________________________________________________________________________________________________________________________________
  ERROR:   pep8: commands failed

To manage notifications about this bug go to:
https://bugs.launchpad.net/designate/+bug/1456955/+subscriptions