Compare commits

...

8 Commits

Author SHA1 Message Date
Yasufumi Ogawa
754f6df5a7 Drop six support
This update is to drop all of six support to move

Closes-bug: #1900389

Change-Id: Ia6c61751203e98d432344dc9a52fe65bdb062af0
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2020-11-01 18:43:00 +00:00
Zuul
727493c7bf Merge "Remove six.moves.urllib" 2020-10-31 16:02:38 +00:00
LiangLu
6bdb64f464 Modify the description of the command --help
The description of the "openstack vnf package artifact download --help"
command is incorrect.Modify VNF Package or VNFD data to VNF Package
artifact file data.

Change-Id: Ib70efb7eefdb6eacea24dec67bb4ff996b6178d3
Closes-Bug: #1901103
2020-10-28 02:54:27 -04:00
wu.chunyang
cfbc810bdc Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
they are not needed during installation.

Change-Id: Ibc511139dca54a68b85b6d6731f491534fc1a909
2020-10-23 14:11:25 +08:00
Yasufumi Ogawa
8e2f5f854e Add py38 as a runtime in tox.ini
Drop py37 and add py38 for the latest python runtimes [1], although it
had to be updated in victoria.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html

Change-Id: I48642a703d6d1fe8be3055ee5a48eaafd0a18067
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2020-10-19 07:21:18 +00:00
wangzihao
97f0903242 Remove six.moves.urllib
Remove six.moves.urllib replace with python3 urllib.

Change-Id: Ifd9d1dadfdc78ab7ef21bb648f71ca0e62830264
2020-09-23 19:33:29 +08:00
b69220634f Add Python3 wallaby unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for wallaby.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Id16db69d4df0115f3bc22d6d867727ff270e583f
2020-09-16 22:01:05 +00:00
e628157a7d Update master for stable/victoria
Add file to the reno documentation build to show release notes for
stable/victoria.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/victoria.

Change-Id: I8136cb5c1422833a95b38e4e0545863ceb9a287e
Sem-Ver: feature
2020-09-16 22:01:03 +00:00
17 changed files with 39 additions and 55 deletions

View File

@@ -2,6 +2,6 @@
templates:
- check-requirements
- openstack-lower-constraints-jobs
- openstack-python3-victoria-jobs
- openstack-python3-wallaby-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@@ -10,15 +10,12 @@ deprecation==1.0
dogpile.cache==0.6.2
extras==1.0.0
fixtures==3.0.0
flake8==2.5.5
hacking==0.12.0
iso8601==0.1.11
jmespath==0.9.0
jsonpatch==1.16
jsonpointer==1.13
keystoneauth1==3.4.0
linecache2==1.0.0
mccabe==0.2.1
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0
@@ -35,10 +32,8 @@ oslo.log==3.36.0
oslo.serialization==2.18.0
oslo.utils==3.40.0
pbr==2.0.0
pep8==1.5.7
positional==1.2.1
prettytable==0.7.2
pyflakes==0.8.1
pyinotify==0.9.6
pyparsing==2.1.0
pyperclip==1.5.27
@@ -53,7 +48,6 @@ requests-mock==1.2.0
requestsexceptions==1.2.0
rfc3986==0.3.1
simplejson==3.5.1
six==1.10.0
stestr==2.0.0
stevedore==1.20.0
testtools==2.2.0

View File

@@ -7,6 +7,7 @@ Contents:
:maxdepth: 2
unreleased
victoria
ussuri
train
stein

View File

@@ -0,0 +1,6 @@
=============================
Victoria Series Release Notes
=============================
.. release-notes::
:branch: stable/victoria

View File

@@ -8,7 +8,6 @@ netaddr>=0.7.18 # BSD
requests>=2.14.2 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
simplejson>=3.5.1 # MIT
six>=1.10.0 # MIT
stevedore>=1.20.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
oslo.i18n>=3.15.3 # Apache-2.0

View File

@@ -28,7 +28,6 @@ ATOM_LINK_NOTATION = "{%s}link" % ATOM_NAMESPACE
TYPE_BOOL = "bool"
TYPE_INT = "int"
TYPE_LONG = "long"
TYPE_FLOAT = "float"
TYPE_LIST = "list"
TYPE_DICT = "dict"

View File

@@ -18,7 +18,6 @@ from xml.etree import ElementTree as etree
from xml.parsers import expat
from oslo_serialization import jsonutils
import six
from tackerclient.common import constants
from tackerclient.common import exceptions as exception
@@ -26,9 +25,6 @@ from tackerclient.i18n import _
LOG = logging.getLogger(__name__)
if six.PY3:
long = int
class ActionDispatcher(object):
"""Maps method name to local methods through action name."""
@@ -58,7 +54,7 @@ class JSONDictSerializer(DictSerializer):
def default(self, data):
def sanitizer(obj):
return six.text_type(obj)
return str(obj)
return jsonutils.dumps(data, default=sanitizer)
@@ -93,7 +89,7 @@ class XMLDictSerializer(DictSerializer):
root_key = constants.VIRTUAL_ROOT_KEY
root_value = None
else:
link_keys = [k for k in six.iterkeys(data) or []
link_keys = [k for k in data.keys() or []
if k.endswith('_links')]
if link_keys:
links = data.pop(link_keys[0], None)
@@ -183,10 +179,6 @@ class XMLDictSerializer(DictSerializer):
result.set(
constants.TYPE_ATTR,
constants.TYPE_INT)
elif isinstance(data, long):
result.set(
constants.TYPE_ATTR,
constants.TYPE_LONG)
elif isinstance(data, float):
result.set(
constants.TYPE_ATTR,
@@ -194,7 +186,7 @@ class XMLDictSerializer(DictSerializer):
LOG.debug("Data %(data)s type is %(type)s",
{'data': data,
'type': type(data)})
result.text = six.text_type(data)
result.text = str(data)
return result
def _create_link_nodes(self, xml_doc, links):
@@ -323,8 +315,6 @@ class XMLDeserializer(TextDeserializer):
lambda x: x.lower() == 'true',
constants.TYPE_INT:
lambda x: int(x),
constants.TYPE_LONG:
lambda x: long(x),
constants.TYPE_FLOAT:
lambda x: float(x)}
if attrType and attrType in converters:

View File

@@ -24,7 +24,6 @@ import os
from oslo_log import versionutils
from oslo_utils import encodeutils
from oslo_utils import importutils
import six
from tackerclient.common import exceptions
from tackerclient.i18n import _
@@ -141,7 +140,7 @@ def http_log_resp(_logger, resp, body):
def _safe_encode_without_obj(data):
if isinstance(data, six.string_types):
if isinstance(data, str):
return encodeutils.safe_encode(data)
return data

View File

@@ -434,9 +434,9 @@ class DownloadVnfPackageArtifact(command.Command):
parser.add_argument(
"--file",
metavar="<FILE>",
help=_("Local file to save downloaded VNF Package or VNFD data. "
"If this is not specified and there is no redirection "
"then data will not be saved.")
help=_("Local file to save downloaded VNF Package artifact "
"file data. If this is not specified and "
"there is no redirection then data will not be saved.")
)
return parser

View File

@@ -25,6 +25,10 @@ import itertools
import logging
import os
import sys
from urllib import parse as urlparse
from cliff import app
from cliff import commandmanager
from keystoneclient.auth.identity import v2 as v2_auth
from keystoneclient.auth.identity import v3 as v3_auth
@@ -32,10 +36,6 @@ from keystoneclient import discover
from keystoneclient import exceptions as ks_exc
from keystoneclient import session
from oslo_utils import encodeutils
import six.moves.urllib.parse as urlparse
from cliff import app
from cliff import commandmanager
from tackerclient.common import clientmanager
from tackerclient.common import command as openstack_command

View File

@@ -23,7 +23,6 @@ from cliff.formatters import table
from cliff import lister
from cliff import show
from oslo_serialization import jsonutils
import six
from tackerclient.common._i18n import _
from tackerclient.common import command
@@ -354,8 +353,7 @@ class TackerCommandMeta(abc.ABCMeta):
name, bases, cls_dict)
@six.add_metaclass(TackerCommandMeta)
class TackerCommand(command.OpenStackCommand):
class TackerCommand(command.OpenStackCommand, metaclass=TackerCommandMeta):
api = 'nfv-orchestration'
values_specs = []

View File

@@ -13,7 +13,8 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import six.moves.urllib.parse as urlparse
from urllib import parse as urlparse
from tackerclient.common import exceptions

View File

@@ -20,7 +20,6 @@ from unittest import mock
import ddt
from oslo_utils.fixture import uuidsentinel
import six
from tackerclient.common import exceptions
from tackerclient.osc import utils as tacker_osc_utils
@@ -448,7 +447,7 @@ class TestTerminateVnfLcm(TestVnfLcm):
"delete vnf instance %(id)s"
% {'timeout': 15, 'id': vnf_instance['id']})
self.assertIn(expected_message, six.text_type(result))
self.assertIn(expected_message, str(result))
self.assertNotCalled(mock_delete)
def test_terminate_no_options(self):

View File

@@ -14,15 +14,14 @@
# under the License.
#
from unittest import mock
import urllib
import contextlib
import fixtures
import six
import six.moves.urllib.parse as urlparse
import io
import sys
import testtools
from unittest import mock
import urllib
from urllib import parse as urlparse
from tackerclient.common import constants
from tackerclient.common import exceptions
@@ -40,7 +39,7 @@ ENDURL = 'localurl'
@contextlib.contextmanager
def capture_std_streams():
fake_stdout, fake_stderr = six.StringIO(), six.StringIO()
fake_stdout, fake_stderr = io.StringIO(), io.StringIO()
stdout, stderr = sys.stdout, sys.stderr
try:
sys.stdout, sys.stderr = fake_stdout, fake_stderr
@@ -317,7 +316,7 @@ class CLITestV10Base(testtools.TestCase):
args.append("--tag")
for tag in tags:
args.append(tag)
if isinstance(tag, six.string_types):
if isinstance(tag, str):
tag = urllib.quote(tag.encode('utf-8'))
if query:
query += "&tag=" + tag
@@ -414,7 +413,7 @@ class CLITestV10Base(testtools.TestCase):
args.append("--tag")
for tag in tags:
args.append(tag)
if isinstance(tag, six.string_types):
if isinstance(tag, str):
tag = urllib.quote(tag.encode('utf-8'))
if query:
query += "&tag=" + tag

View File

@@ -14,18 +14,17 @@
# under the License.
import argparse
import fixtures
import io
import logging
import os
import re
from unittest import mock
import six
import sys
import fixtures
from keystoneclient import session
import testtools
from testtools import matchers
from unittest import mock
from keystoneclient import session
from tackerclient.common import clientmanager
from tackerclient import shell as openstack_shell
@@ -63,8 +62,8 @@ class ShellTest(testtools.TestCase):
clean_env = {}
_old_env, os.environ = os.environ, clean_env.copy()
try:
sys.stdout = six.StringIO()
sys.stderr = six.StringIO()
sys.stdout = io.StringIO()
sys.stderr = io.StringIO()
_shell = openstack_shell.TackerShell(DEFAULT_API_VERSION)
_shell.run(argstr.split())
except SystemExit:

View File

@@ -19,7 +19,7 @@ import logging
import time
import requests
import six.moves.urllib.parse as urlparse
from urllib import parse as urlparse
from tackerclient import client
from tackerclient.common import constants

View File

@@ -1,5 +1,5 @@
[tox]
envlist = py37,py36,pep8,docs
envlist = py38,py36,pep8,docs
minversion = 3.1.1
skipsdist = True
ignore_basepython_conflict = True