Drop unicode prefix

It is no longer required in Python 3 because strings are by default
unicode strings.

Change-Id: I0269ce5f4be61133a7244bb2fc386dc5f2ec736c
This commit is contained in:
Takashi Kajinami 2024-09-30 15:03:18 +09:00
parent be1481de61
commit d06457bccb
10 changed files with 41 additions and 41 deletions

View File

@ -61,7 +61,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'2010-present, OpenStack Foundation'
copyright = '2010-present, OpenStack Foundation'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/heat'
@ -99,7 +99,7 @@ pygments_style = 'native'
# -- Options for man page output ----------------------------------------------
# Grouping the document tree for man pages.
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual'
# -- Options for HTML output --------------------------------------------------
@ -185,8 +185,8 @@ htmlhelp_basename = 'heatdoc'
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'Heat.tex', u'OpenStack Orchestration API Documentation',
u'OpenStack Foundation', 'manual'),
('index', 'Heat.tex', 'OpenStack Orchestration API Documentation',
'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of

View File

@ -128,7 +128,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'(c) 2012- Heat Developers'
copyright = '(c) 2012- Heat Developers'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -274,8 +274,8 @@ htmlhelp_basename = 'Heatdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual])
latex_documents = [
('index', 'doc-heat.tex', u'Heat Documentation',
u'Heat Developers', 'manual'),
('index', 'doc-heat.tex', 'Heat Documentation',
'Heat Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@ -313,26 +313,26 @@ latex_elements = {
# (source start file, name, description, authors, manual section).
man_pages = [
('man/heat-api', 'heat-api',
u'REST API service to the heat project.',
[u'Heat Developers'], 1),
'REST API service to the heat project.',
['Heat Developers'], 1),
('man/heat-api-cfn', 'heat-api-cfn',
u'CloudFormation compatible API service to the heat project.',
[u'Heat Developers'], 1),
'CloudFormation compatible API service to the heat project.',
['Heat Developers'], 1),
('man/heat-db-setup', 'heat-db-setup',
u'Command line utility to setup the Heat database',
[u'Heat Developers'], 1),
'Command line utility to setup the Heat database',
['Heat Developers'], 1),
('man/heat-engine', 'heat-engine',
u'Service which performs the actions from the API calls made by the user',
[u'Heat Developers'], 1),
'Service which performs the actions from the API calls made by the user',
['Heat Developers'], 1),
('man/heat-keystone-setup-domain', 'heat-keystone-setup-domain',
u'Script which sets up a keystone domain for heat users and projects',
[u'Heat Developers'], 1),
'Script which sets up a keystone domain for heat users and projects',
['Heat Developers'], 1),
('man/heat-manage', 'heat-manage',
u'Script which helps manage specific database operations',
[u'Heat Developers'], 1),
'Script which helps manage specific database operations',
['Heat Developers'], 1),
('man/heat-status', 'heat-status',
u'Script to check status of Heat deployment.',
[u'Heat Developers'], 1),
'Script to check status of Heat deployment.',
['Heat Developers'], 1),
]
@ -346,8 +346,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'Heat', u'Heat Documentation',
u'Heat Developers', 'Heat', 'One line description of project.',
('index', 'Heat', 'Heat Documentation',
'Heat Developers', 'Heat', 'One line description of project.',
'Miscellaneous'),
]

View File

@ -172,7 +172,7 @@ class ResourcePages(rst.Directive):
# Ignore title generated for list items
if title != '*':
title = nodes.term('', title)
ref = nodes.reference('', u'\xb6')
ref = nodes.reference('', '\xb6')
ref['classes'] = ['headerlink']
ref['refid'] = id
title.append(ref)

View File

@ -139,7 +139,7 @@ class RequestContext(context.RequestContext):
return self._clients
def to_dict(self):
user_idt = u'{user} {project}'.format(user=self.user_id or '-',
user_idt = '{user} {project}'.format(user=self.user_id or '-',
project=self.project_id or '-')
return {'auth_token': self.auth_token,

View File

@ -44,13 +44,13 @@ class yaml_dumper(_yaml_dumper_base):
return self.represent_dict(data.items())
yaml_loader.add_constructor(u'tag:yaml.org,2002:str',
yaml_loader.add_constructor('tag:yaml.org,2002:str',
yaml_loader._construct_yaml_str)
# Unquoted dates like 2013-05-23 in yaml files get loaded as objects of type
# datetime.data which causes problems in API layer when being processed by
# openstack.common.jsonutils. Therefore, make unicode string out of timestamps
# until jsonutils can handle dates.
yaml_loader.add_constructor(u'tag:yaml.org,2002:timestamp',
yaml_loader.add_constructor('tag:yaml.org,2002:timestamp',
yaml_loader._construct_yaml_str)
yaml_dumper.add_representer(collections.OrderedDict,

View File

@ -109,7 +109,7 @@ class CheckResource(object):
self.retrigger_check_resource(cnxt, rsrc_id, latest_stack)
def _handle_stack_timeout(self, cnxt, stack):
failure_reason = u'Timed out'
failure_reason = 'Timed out'
stack.mark_failed(failure_reason)
def _handle_resource_replacement(self, cnxt,
@ -179,7 +179,7 @@ class CheckResource(object):
stack, reason)
except scheduler.Timeout:
self._handle_resource_failure(cnxt, is_update, rsrc.id,
stack, u'Timed out')
stack, 'Timed out')
except CancelOperation:
# Stack is already marked FAILED, so we just need to retrigger
# in case a new traversal has started and is waiting on us.

View File

@ -294,7 +294,7 @@ class Constraint(collections.abc.Mapping):
yield self.description
yield self._str()
return u'\n'.join(desc())
return '\n'.join(desc())
def validate(self, value, schema=None, context=None):
if not self._is_valid(value, schema, context):

View File

@ -446,7 +446,7 @@ class InstanceGroup(stack_resource.StackResource):
"""
if name == self.INSTANCE_LIST:
def listify(ips):
return u','.join(ips) or None
return ','.join(ips) or None
try:
output = self.get_output(name)

View File

@ -72,7 +72,7 @@ def update_input_data(context, entity_id, current_traversal,
def str_pack_tuple(t):
return u'tuple:' + str(tuple(t))
return 'tuple:' + str(tuple(t))
def _str_unpack_tuple(s):
@ -83,7 +83,7 @@ def _str_unpack_tuple(s):
def _deserialize(d):
d2 = {}
for k, v in d.items():
if isinstance(k, str) and k.startswith(u'tuple:('):
if isinstance(k, str) and k.startswith('tuple:('):
k = _str_unpack_tuple(k)
if isinstance(v, dict):
v = _deserialize(v)

View File

@ -59,7 +59,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'2015, Heat Developers'
copyright = '2015, Heat Developers'
# Release notes are version independent, no need to set version and release
release = ''
@ -191,8 +191,8 @@ htmlhelp_basename = 'HeatReleaseNotesdoc'
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'HeatReleaseNotes.tex', u'Heat Release Notes Documentation',
u'Heat Developers', 'manual'),
('index', 'HeatReleaseNotes.tex', 'Heat Release Notes Documentation',
'Heat Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@ -221,8 +221,8 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'heatreleasenotes', u'Heat Release Notes Documentation',
[u'Heat Developers'], 1)
('index', 'heatreleasenotes', 'Heat Release Notes Documentation',
['Heat Developers'], 1)
]
# If true, show URL addresses after external links.
@ -235,8 +235,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'HeatReleaseNotes', u'Heat Release Notes Documentation',
u'Heat Developers', 'HeatReleaseNotes',
('index', 'HeatReleaseNotes', 'Heat Release Notes Documentation',
'Heat Developers', 'HeatReleaseNotes',
'One line description of project.',
'Miscellaneous'),
]