Remove six

Change-Id: I1d6e583f41f95be7c2af232a2f22ee20fa83c4be
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane authored and Dr. Jens Harbott committed 2024-01-24 15:49:09 +01:00
1 parent 13f27bd15c
commit 69e21be288
7 files changed
+11 -18

No files matched your search

+2 -2
View File
@@ -15,10 +15,10 @@
import contextlib
import json
import os
import six.moves.urllib.parse as urlparse
import six.moves.urllib.request as urlreq
import sys
import traceback
import urllib.parse as urlparse
import urllib.request as urlreq
import pkg_resources
+2 -3
View File
@@ -26,13 +26,12 @@ updated to match the global requirements. Requirements not in the global
files will be dropped.
"""
import itertools
import optparse
import os
import os.path
import sys
import six
from openstack_requirements import project
from openstack_requirements import requirement
@@ -129,7 +128,7 @@ def _sync_requirements_file(
reference = source_reqs.get(req.package.lower())
if reference:
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:
# More in globals
changes.append(Change(ref[0].package, '', ref[1]))
+1 -2
View File
@@ -16,12 +16,11 @@
"""The project abstraction."""
import collections
import configparser
import errno
import io
import os
from six.moves import configparser
from parsley import makeGrammar
from openstack_requirements import requirement
+4 -4
View File
@@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import six
import io
import sys
import textwrap
from unittest import mock
@@ -40,7 +40,7 @@ class SmokeTest(testtools.TestCase):
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.
self.project = self.useFixture(common.project_fixture)
capture = six.StringIO()
capture = io.StringIO()
update.main(['--source', global_env.root, self.project.root], capture)
reqs = common._file_to_list(self.project.req_file)
# ensure various updates take
@@ -155,7 +155,7 @@ class UpdateTest(testtools.TestCase):
actions = update._process_project(
common.project_project, common.global_reqs, None, None, None,
False)
capture = six.StringIO()
capture = io.StringIO()
project.write(
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
@@ -186,7 +186,7 @@ Updated %(project)s/test-requirements.txt:
actions = update._process_project(
common.project_project, common.global_reqs, None, None, None,
False)
capture = six.StringIO()
capture = io.StringIO()
project.write(
common.project_project, actions, capture, True, True)
expected = ("""Syncing %(project)s/requirements.txt
-4
View File
@@ -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
Parsley>=1.2 # MIT
six>=1.10.0 # MIT
packaging!=20.5,!=20.6,!=20.7,>=16.5 # Apache-2.0
requests>=2.14.2 # Apache-2.0
PyYAML>=3.12 # MIT
+1 -2
View File
@@ -1,11 +1,10 @@
#!/usr/bin/env python
import configparser
import importlib
import re
import sys
import six.moves.configparser as configparser
def main():
errors = 0
+1 -1
View File
@@ -35,8 +35,8 @@ checked.
import argparse
import datetime
import json
import six.moves.urllib.request as urlreq
import sys
import urllib.request as urlreq
import pkg_resources