Remove six
Change-Id: I1d6e583f41f95be7c2af232a2f22ee20fa83c4be Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
13f27bd15c
commit
69e21be288
@ -15,10 +15,10 @@
|
|||||||
import contextlib
|
import contextlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import six.moves.urllib.parse as urlparse
|
|
||||||
import six.moves.urllib.request as urlreq
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
import urllib.parse as urlparse
|
||||||
|
import urllib.request as urlreq
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
@ -26,13 +26,12 @@ updated to match the global requirements. Requirements not in the global
|
|||||||
files will be dropped.
|
files will be dropped.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import itertools
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import six
|
|
||||||
|
|
||||||
from openstack_requirements import project
|
from openstack_requirements import project
|
||||||
from openstack_requirements import requirement
|
from openstack_requirements import requirement
|
||||||
|
|
||||||
@ -129,7 +128,7 @@ def _sync_requirements_file(
|
|||||||
reference = source_reqs.get(req.package.lower())
|
reference = source_reqs.get(req.package.lower())
|
||||||
if reference:
|
if reference:
|
||||||
actual = dest_reqs.get(req.package.lower())
|
actual = dest_reqs.get(req.package.lower())
|
||||||
for req, ref in six.moves.zip_longest(actual, reference):
|
for req, ref in itertools.zip_longest(actual, reference):
|
||||||
if not req:
|
if not req:
|
||||||
# More in globals
|
# More in globals
|
||||||
changes.append(Change(ref[0].package, '', ref[1]))
|
changes.append(Change(ref[0].package, '', ref[1]))
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
"""The project abstraction."""
|
"""The project abstraction."""
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
import configparser
|
||||||
import errno
|
import errno
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from six.moves import configparser
|
|
||||||
|
|
||||||
from parsley import makeGrammar
|
from parsley import makeGrammar
|
||||||
|
|
||||||
from openstack_requirements import requirement
|
from openstack_requirements import requirement
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import six
|
import io
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
@ -40,7 +40,7 @@ class SmokeTest(testtools.TestCase):
|
|||||||
self.assertIn("jsonschema!=1.4.0,<2,>=1.0.0", global_reqs)
|
self.assertIn("jsonschema!=1.4.0,<2,>=1.0.0", global_reqs)
|
||||||
# And test the end to end call of update.py, UI and all.
|
# And test the end to end call of update.py, UI and all.
|
||||||
self.project = self.useFixture(common.project_fixture)
|
self.project = self.useFixture(common.project_fixture)
|
||||||
capture = six.StringIO()
|
capture = io.StringIO()
|
||||||
update.main(['--source', global_env.root, self.project.root], capture)
|
update.main(['--source', global_env.root, self.project.root], capture)
|
||||||
reqs = common._file_to_list(self.project.req_file)
|
reqs = common._file_to_list(self.project.req_file)
|
||||||
# ensure various updates take
|
# ensure various updates take
|
||||||
@ -155,7 +155,7 @@ class UpdateTest(testtools.TestCase):
|
|||||||
actions = update._process_project(
|
actions = update._process_project(
|
||||||
common.project_project, common.global_reqs, None, None, None,
|
common.project_project, common.global_reqs, None, None, None,
|
||||||
False)
|
False)
|
||||||
capture = six.StringIO()
|
capture = io.StringIO()
|
||||||
project.write(
|
project.write(
|
||||||
common.project_project, actions, capture, False, True)
|
common.project_project, actions, capture, False, True)
|
||||||
expected = ('Version change for: greenlet, SQLAlchemy, eventlet, PasteDeploy, routes, WebOb, wsgiref, boto, kombu, python-swiftclient, lxml, jsonschema, python-keystoneclient\n' # noqa
|
expected = ('Version change for: greenlet, SQLAlchemy, eventlet, PasteDeploy, routes, WebOb, wsgiref, boto, kombu, python-swiftclient, lxml, jsonschema, python-keystoneclient\n' # noqa
|
||||||
@ -186,7 +186,7 @@ Updated %(project)s/test-requirements.txt:
|
|||||||
actions = update._process_project(
|
actions = update._process_project(
|
||||||
common.project_project, common.global_reqs, None, None, None,
|
common.project_project, common.global_reqs, None, None, None,
|
||||||
False)
|
False)
|
||||||
capture = six.StringIO()
|
capture = io.StringIO()
|
||||||
project.write(
|
project.write(
|
||||||
common.project_project, actions, capture, True, True)
|
common.project_project, actions, capture, True, True)
|
||||||
expected = ("""Syncing %(project)s/requirements.txt
|
expected = ("""Syncing %(project)s/requirements.txt
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
Parsley>=1.2 # MIT
|
Parsley>=1.2 # MIT
|
||||||
six>=1.10.0 # MIT
|
|
||||||
packaging!=20.5,!=20.6,!=20.7,>=16.5 # Apache-2.0
|
packaging!=20.5,!=20.6,!=20.7,>=16.5 # Apache-2.0
|
||||||
requests>=2.14.2 # Apache-2.0
|
requests>=2.14.2 # Apache-2.0
|
||||||
PyYAML>=3.12 # MIT
|
PyYAML>=3.12 # MIT
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import configparser
|
||||||
import importlib
|
import importlib
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import six.moves.configparser as configparser
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
errors = 0
|
errors = 0
|
||||||
|
@ -35,8 +35,8 @@ checked.
|
|||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
import six.moves.urllib.request as urlreq
|
|
||||||
import sys
|
import sys
|
||||||
|
import urllib.request as urlreq
|
||||||
|
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user