If we run the tools (create-directories or check-all-candidacies) under python3 they'll fail with silly errors (like[1]). This is because we have a number of assumptions they we'll be running under python2 like: - pickle.protocol: we done specify one so if we write a pickle file from python3 we can't read it in python2. - urllib and urlparse: those modules change paths in python 2 or 3 so use the six helpers to get the bits we want. - Explicitly write files in binary format - Various str vs bytes issues - dict().keys() returns dict_keys under python3 explictly cast that to list() After addressing these issues we can run the tools under either python2 or python3. To make this easy to check create explicit ven2 and venv3 test environments, leaving all other testenvs to use the system default. [1] http://paste.openstack.org/show/593823/ Change-Id: I20334a52500847c810b486c9c8b108e75a5d6303
9.0 KiB
9.0 KiB