Porting Neutron to Python 3

Registered by Cyril Roelandt on 2015-04-13

Neutron should be ported to Python 3.4.

Blueprint information

Status:
Complete
Approver:
Kyle Mestery
Priority:
Medium
Drafter:
Cyril Roelandt
Direction:
Approved
Assignee:
Cyril Roelandt
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 7.0.0
Started by
Kyle Mestery on 2015-06-02
Completed by
Kyle Mestery on 2015-09-04

Related branches

Sprints

Whiteboard

Sept 1(armax): at this pace, it's unlikely this will be complete by the end of the week.

Gerrit topic: https://review.openstack.org/#q,topic:bp/neutron-python3,n,z

Addressed by: https://review.openstack.org/172962
    Add a "Porting to Python 3" spec

Addressed by: https://review.openstack.org/181277
    Allow users to run 'tox -epy34'

Addressed by: https://review.openstack.org/184066
    Python3: use six.iteritems() instead of dict.iteritems()

Addressed by: https://review.openstack.org/184216
    Python 3: Use six.moves.range

Addressed by: https://review.openstack.org/184469
    Python 3: do not index a dict_values object

Addressed by: https://review.openstack.org/184482
    Python 3: use six.string_types instead of basestring

Gerrit topic: https://review.openstack.org/#q,topic:bug/1430394,n,z

Addressed by: https://review.openstack.org/185072
    Merge branch 'master' into neutron-pecan

Gerrit topic: https://review.openstack.org/#q,topic:bug/1428424,n,z

Addressed by: https://review.openstack.org/186708
    Fix indentation errors in tests

Addressed by: https://review.openstack.org/186709
    Get rid of contextlib.nested

Addressed by: https://review.openstack.org/189319
    Python3: Enable all working tests in tox.ini

Addressed by: https://review.openstack.org/189703
    Python 3: use next() instead of iterator.next()

Addressed by: https://review.openstack.org/190179
    Python3: do not use 'unicode'

Addressed by: https://review.openstack.org/191473
    Python3: use six.itervalues instead of dict.itervalues

Addressed by: https://review.openstack.org/192207
    Python3: do not change the size of a dict while iterating over it

Addressed by: https://review.openstack.org/192718
    Python 3: do not use cmp(), nor sorted(..., cmp=...)

Addressed by: https://review.openstack.org/193476
    Python3: do not use im_self/im_func

Addressed by: https://review.openstack.org/193524
    Python3: use dict.keys() instead of dict.iterkeys()

Addressed by: https://review.openstack.org/193559
    Python3: do not use '+' on dict_items objects

Addressed by: https://review.openstack.org/193572
    Python3: use itertools.zip instead of itertools.izip

Addressed by: https://review.openstack.org/194153
    Python3: do not use __builtin__

Addressed by: https://review.openstack.org/194207
    Python3: do not set Request.body to a text string

Gerrit topic: https://review.openstack.org/#q,topic:bug/1468998,n,z

Addressed by: https://review.openstack.org/196097
    Merge remote-tracking branch 'origin/master' into merge-qos

Gerrit topic: https://review.openstack.org/#q,topic:bug/1468828,n,z

Addressed by: https://review.openstack.org/196701
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/196920
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/197730
    Python3: do not use urllib.urlencode

Gerrit topic: https://review.openstack.org/#q,topic:bp/restructure-l2-agent,n,z

Addressed by: https://review.openstack.org/197751
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/198324
    Python 3: do not index dict_keys objects

Addressed by: https://review.openstack.org/198432
    Python3: do not add dict_values objects

Addressed by: https://review.openstack.org/199128
    Python3: cast the result of zip() to list

Addressed by: https://review.openstack.org/199611
    Python 3: do not compare int and NoneType

Addressed by: https://review.openstack.org/199924
    Python 3: Fix a TypeError in policy.py

Gerrit topic: https://review.openstack.org/#q,topic:bug/1472304,n,z

Addressed by: https://review.openstack.org/200163
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/200231
    Python 3: use a key to sort list of dictionaries

Addressed by: https://review.openstack.org/200553
    Python 3: do not use types.ClassType

Addressed by: https://review.openstack.org/200757
    Bump mock to 1.1.1

Gerrit topic: https://review.openstack.org/#q,topic:bug/1472458,n,z

Addressed by: https://review.openstack.org/201131
    Merge remote-tracking branch 'origin/master' into merge-branch

Gerrit topic: https://review.openstack.org/#q,topic:py34-routes-fail,n,z

Addressed by: https://review.openstack.org/200971
    Disable python3 tests failing due to Routes < 2.0

Addressed by: https://review.openstack.org/202497
    Python 3: Wrap map() in a list call

Addressed by: https://review.openstack.org/202964
    Python3: Do not compare NoneType and integers

Addressed by: https://review.openstack.org/203184
    Python 3: fix test_provider_configuration

Addressed by: https://review.openstack.org/203690
    Python 3: fix neutron.tests.unit.agent.dhcp.test_agent

Addressed by: https://review.openstack.org/203691
    Python 3: fix neutron.tests.unit.agent.linux.test_async_process

Addressed by: https://review.openstack.org/204599
    Python 3: enable more tests

Addressed by: https://review.openstack.org/204791
    Python3: set webob.Response.text instead of webob.Response.body

Addressed by: https://review.openstack.org/204792
    Python 3: use a hash to sort dictionaries

Addressed by: https://review.openstack.org/204967
    Python3: pass bytes to binascii.crc32

Addressed by: https://review.openstack.org/205068
    Python 3: enable test_metering_plugin

Addressed by: https://review.openstack.org/205450
    Enable py34 tests for pluggable ipam backend

Addressed by: https://review.openstack.org/205539
    Python 3: fix test_dhcp

Addressed by: https://review.openstack.org/205551
    Python 3: fix test_attributes

Addressed by: https://review.openstack.org/205568
    Python 3: do not index dict_values objects

Addressed by: https://review.openstack.org/205606
    Python 3: fix test_context

Addressed by: https://review.openstack.org/206570
    Python 3: fix test_n1kv_plugin

Addressed by: https://review.openstack.org/206991
    Python 3: compare response.body to bytes in namespace_proxy test

Addressed by: https://review.openstack.org/206993
    Python 3: hmac requires bytes key/msg

Addressed by: https://review.openstack.org/205314
    bp/neutron-python3.

Addressed by: https://review.openstack.org/207314
    Python 3: Use '//' instead of '/'

Gerrit topic: https://review.openstack.org/#q,topic:bug/1478512,n,z

Addressed by: https://review.openstack.org/207903
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/208405
    Python 3: Fix test_security_groups_db

Addressed by: https://review.openstack.org/208848
    Python 3: encode or decode i/o data of Popen.communicate()

Addressed by: https://review.openstack.org/205294
    Replaces print with print() for py 2/3 compatibility

Addressed by: https://review.openstack.org/208946
    _get_dvr_sync_data: Return a list, rather than dict_values for python3

Addressed by: https://review.openstack.org/209031
    Python 3: fix test_ovs_tunnel

Addressed by: https://review.openstack.org/209428
    Python 3: convert dict_keys object to list

Addressed by: https://review.openstack.org/210732
    Python 3: encode unicode response bodies

Addressed by: https://review.openstack.org/210746
    Python 3: specify a bytes to an argument for a format type 's' of struct.pack()

Gerrit topic: https://review.openstack.org/#q,topic:bug/1374473,n,z

Addressed by: https://review.openstack.org/211492
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/213128
    Python 3: fix test_utils

Addressed by: https://review.openstack.org/215539
    Python 3: use __code__ instead of func_code

Addressed by: https://review.openstack.org/215554
    Python 3: do not do "assertFalse(filter(...))"

Addressed by: https://review.openstack.org/215563
    Python 3: fix test_ovs_tunnel

Gerrit topic: https://review.openstack.org/#q,topic:bug/1487598,n,z

Addressed by: https://review.openstack.org/218710
    Merge remote-tracking branch 'origin/master' into merge-branch

Addressed by: https://review.openstack.org/219389
    Enable most unit tests for py34 job

Addressed by: https://review.openstack.org/219593
    Python 3: do not use Exception.message

Addressed by: https://review.openstack.org/219606
    Python 3: do not try to sort dicts

Addressed by: https://review.openstack.org/219622
    Python 3: Fix neutron.tests.unit.agent.l3.test_agent

Addressed by: https://review.openstack.org/219682
    Python 3: fix neutron.tests.unit.api.v2.test_resource

Addressed by: https://review.openstack.org/219719
    Python3: hashlib.sha1 expects bytes

Gerrit topic: https://review.openstack.org/#q,topic:bug/1490832,n,z

Addressed by: https://review.openstack.org/219887
    Merge remote-tracking branch 'origin/master' into merge-master-into-pecan

Gerrit topic: https://review.openstack.org/#q,topic:bug/1478847,n,z

Addressed by: https://review.openstack.org/224334
    Merge remote-tracking branch 'origin/master' into merge-pecan-resolve-conflict

Gerrit topic: https://review.openstack.org/#q,topic:bug/1486039,n,z

Addressed by: https://review.openstack.org/224357
    Merge remote-tracking branch 'origin/master' into walnut

Addressed by: https://review.openstack.org/226655
    Increase test coverage for neutron/common/utils.py Related-blueprint: neutron-python3

Addressed by: https://review.openstack.org/229189
    Increase test coverage for neutron/common/utils.py

Gerrit topic: https://review.openstack.org/#q,topic:bug/1502148,n,z

Addressed by: https://review.openstack.org/231537
    Python 3: add classifiers

Gerrit topic: https://review.openstack.org/#q,topic:bug/1503415,n,z

Addressed by: https://review.openstack.org/231709
    Ensure to decode bytes or fail

Gerrit topic: https://review.openstack.org/#q,topic:bug/1491824,n,z

Addressed by: https://review.openstack.org/233652
    Python 3: fix bug/1491824

Gerrit topic: https://review.openstack.org/#q,topic:merge/release-tag,n,z

Addressed by: https://review.openstack.org/235300
    Merge tag '7.0.0'

Addressed by: https://review.openstack.org/250853
    Support Unicode request_id on Python 3

Addressed by: https://review.openstack.org/257200
    Support Unicode request_id on Python 3

Addressed by: https://review.openstack.org/270324
    Drop using urlparse module for python3

Addressed by: https://review.openstack.org/270326
    Do not use StringIO and cStringIO in python3

Addressed by: https://review.openstack.org/270339
    Python3: Fix using dictionary keys() as list

Addressed by: https://review.openstack.org/270651
    Python3: Add python3 support

Addressed by: https://review.openstack.org/272000
    Add hacking check rule for not use keys() as list

Addressed by: https://review.openstack.org/288382
    Fix Python 3 issues

Addressed by: https://review.openstack.org/288410
    py3: Use six.moves for import modules

Addressed by: https://review.openstack.org/288411
    py3: Replace dict.iteritems() with dict.items()

Addressed by: https://review.openstack.org/288412
    Add a whitelist of tests passing on Python 3

Addressed by: https://review.openstack.org/288413
    Port cert_parser to Python 3

Addressed by: https://review.openstack.org/288414
    Port test_agent and test_agent_api to Python 3

Addressed by: https://review.openstack.org/294377
    py35: Change error message

Addressed by: https://review.openstack.org/297080
    Port agent_manager to Python 3

Addressed by: https://review.openstack.org/308204
    Port more unit tests to Python 3

Addressed by: https://review.openstack.org/308221
    Port more service unit tests to Python 3

Addressed by: https://review.openstack.org/308234
    Port even more service tests to Python 3

Addressed by: https://review.openstack.org/308239
    Port test_db_loadbalancer to Python 3

Addressed by: https://review.openstack.org/308285
    Finish to port unit tests to Python 3

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.