Skip to content

Commit d06457b

Browse files
committed
Drop unicode prefix
It is no longer required in Python 3 because strings are by default unicode strings. Change-Id: I0269ce5f4be61133a7244bb2fc386dc5f2ec736c
1 parent be1481d commit d06457b

File tree

10 files changed

+41
-41
lines changed

10 files changed

+41
-41
lines changed

api-ref/source/conf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
master_doc = 'index'
6262

6363
# General information about the project.
64-
copyright = u'2010-present, OpenStack Foundation'
64+
copyright = '2010-present, OpenStack Foundation'
6565

6666
# openstackdocstheme options
6767
openstackdocs_repo_name = 'openstack/heat'
@@ -99,7 +99,7 @@
9999
# -- Options for man page output ----------------------------------------------
100100

101101
# Grouping the document tree for man pages.
102-
# List of tuples 'sourcefile', 'target', u'title', u'Authors name', 'manual'
102+
# List of tuples 'sourcefile', 'target', 'title', 'Authors name', 'manual'
103103

104104

105105
# -- Options for HTML output --------------------------------------------------
@@ -185,8 +185,8 @@
185185
# (source start file, target name, title, author, documentclass
186186
# [howto/manual]).
187187
latex_documents = [
188-
('index', 'Heat.tex', u'OpenStack Orchestration API Documentation',
189-
u'OpenStack Foundation', 'manual'),
188+
('index', 'Heat.tex', 'OpenStack Orchestration API Documentation',
189+
'OpenStack Foundation', 'manual'),
190190
]
191191

192192
# The name of an image file (relative to this directory) to place at the top of

doc/source/conf.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
master_doc = 'index'
129129

130130
# General information about the project.
131-
copyright = u'(c) 2012- Heat Developers'
131+
copyright = '(c) 2012- Heat Developers'
132132

133133
# The language for content autogenerated by Sphinx. Refer to documentation
134134
# for a list of supported languages.
@@ -274,8 +274,8 @@
274274
# Grouping the document tree into LaTeX files. List of tuples
275275
# (source start file, target name, title, author, documentclass [howto/manual])
276276
latex_documents = [
277-
('index', 'doc-heat.tex', u'Heat Documentation',
278-
u'Heat Developers', 'manual'),
277+
('index', 'doc-heat.tex', 'Heat Documentation',
278+
'Heat Developers', 'manual'),
279279
]
280280

281281
# The name of an image file (relative to this directory) to place at the top of
@@ -313,26 +313,26 @@
313313
# (source start file, name, description, authors, manual section).
314314
man_pages = [
315315
('man/heat-api', 'heat-api',
316-
u'REST API service to the heat project.',
317-
[u'Heat Developers'], 1),
316+
'REST API service to the heat project.',
317+
['Heat Developers'], 1),
318318
('man/heat-api-cfn', 'heat-api-cfn',
319-
u'CloudFormation compatible API service to the heat project.',
320-
[u'Heat Developers'], 1),
319+
'CloudFormation compatible API service to the heat project.',
320+
['Heat Developers'], 1),
321321
('man/heat-db-setup', 'heat-db-setup',
322-
u'Command line utility to setup the Heat database',
323-
[u'Heat Developers'], 1),
322+
'Command line utility to setup the Heat database',
323+
['Heat Developers'], 1),
324324
('man/heat-engine', 'heat-engine',
325-
u'Service which performs the actions from the API calls made by the user',
326-
[u'Heat Developers'], 1),
325+
'Service which performs the actions from the API calls made by the user',
326+
['Heat Developers'], 1),
327327
('man/heat-keystone-setup-domain', 'heat-keystone-setup-domain',
328-
u'Script which sets up a keystone domain for heat users and projects',
329-
[u'Heat Developers'], 1),
328+
'Script which sets up a keystone domain for heat users and projects',
329+
['Heat Developers'], 1),
330330
('man/heat-manage', 'heat-manage',
331-
u'Script which helps manage specific database operations',
332-
[u'Heat Developers'], 1),
331+
'Script which helps manage specific database operations',
332+
['Heat Developers'], 1),
333333
('man/heat-status', 'heat-status',
334-
u'Script to check status of Heat deployment.',
335-
[u'Heat Developers'], 1),
334+
'Script to check status of Heat deployment.',
335+
['Heat Developers'], 1),
336336

337337
]
338338

@@ -346,8 +346,8 @@
346346
# (source start file, target name, title, author,
347347
# dir menu entry, description, category)
348348
texinfo_documents = [
349-
('index', 'Heat', u'Heat Documentation',
350-
u'Heat Developers', 'Heat', 'One line description of project.',
349+
('index', 'Heat', 'Heat Documentation',
350+
'Heat Developers', 'Heat', 'One line description of project.',
351351
'Miscellaneous'),
352352
]
353353

doc/source/ext/resources.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _prop_section(self, parent, title, id_pattern):
172172
# Ignore title generated for list items
173173
if title != '*':
174174
title = nodes.term('', title)
175-
ref = nodes.reference('', u'\xb6')
175+
ref = nodes.reference('', '\xb6')
176176
ref['classes'] = ['headerlink']
177177
ref['refid'] = id
178178
title.append(ref)

heat/common/context.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def clients(self):
139139
return self._clients
140140

141141
def to_dict(self):
142-
user_idt = u'{user} {project}'.format(user=self.user_id or '-',
143-
project=self.project_id or '-')
142+
user_idt = '{user} {project}'.format(user=self.user_id or '-',
143+
project=self.project_id or '-')
144144

145145
return {'auth_token': self.auth_token,
146146
'username': self.username,

heat/common/template_format.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def represent_ordered_dict(self, data):
4444
return self.represent_dict(data.items())
4545

4646

47-
yaml_loader.add_constructor(u'tag:yaml.org,2002:str',
47+
yaml_loader.add_constructor('tag:yaml.org,2002:str',
4848
yaml_loader._construct_yaml_str)
4949
# Unquoted dates like 2013-05-23 in yaml files get loaded as objects of type
5050
# datetime.data which causes problems in API layer when being processed by
5151
# openstack.common.jsonutils. Therefore, make unicode string out of timestamps
5252
# until jsonutils can handle dates.
53-
yaml_loader.add_constructor(u'tag:yaml.org,2002:timestamp',
53+
yaml_loader.add_constructor('tag:yaml.org,2002:timestamp',
5454
yaml_loader._construct_yaml_str)
5555

5656
yaml_dumper.add_representer(collections.OrderedDict,

heat/engine/check_resource.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def _retrigger_new_traversal(self, cnxt, current_traversal, is_update,
109109
self.retrigger_check_resource(cnxt, rsrc_id, latest_stack)
110110

111111
def _handle_stack_timeout(self, cnxt, stack):
112-
failure_reason = u'Timed out'
112+
failure_reason = 'Timed out'
113113
stack.mark_failed(failure_reason)
114114

115115
def _handle_resource_replacement(self, cnxt,
@@ -179,7 +179,7 @@ def _do_check_resource(self, cnxt, current_traversal, tmpl, resource_data,
179179
stack, reason)
180180
except scheduler.Timeout:
181181
self._handle_resource_failure(cnxt, is_update, rsrc.id,
182-
stack, u'Timed out')
182+
stack, 'Timed out')
183183
except CancelOperation:
184184
# Stack is already marked FAILED, so we just need to retrigger
185185
# in case a new traversal has started and is waiting on us.

heat/engine/constraints.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def desc():
294294
yield self.description
295295
yield self._str()
296296

297-
return u'\n'.join(desc())
297+
return '\n'.join(desc())
298298

299299
def validate(self, value, schema=None, context=None):
300300
if not self._is_valid(value, schema, context):

heat/engine/resources/openstack/heat/instance_group.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ def _resolve_attribute(self, name):
446446
"""
447447
if name == self.INSTANCE_LIST:
448448
def listify(ips):
449-
return u','.join(ips) or None
449+
return ','.join(ips) or None
450450

451451
try:
452452
output = self.get_output(name)

heat/engine/sync_point.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def update_input_data(context, entity_id, current_traversal,
7272

7373

7474
def str_pack_tuple(t):
75-
return u'tuple:' + str(tuple(t))
75+
return 'tuple:' + str(tuple(t))
7676

7777

7878
def _str_unpack_tuple(s):
@@ -83,7 +83,7 @@ def _str_unpack_tuple(s):
8383
def _deserialize(d):
8484
d2 = {}
8585
for k, v in d.items():
86-
if isinstance(k, str) and k.startswith(u'tuple:('):
86+
if isinstance(k, str) and k.startswith('tuple:('):
8787
k = _str_unpack_tuple(k)
8888
if isinstance(v, dict):
8989
v = _deserialize(v)

releasenotes/source/conf.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
master_doc = 'index'
6060

6161
# General information about the project.
62-
copyright = u'2015, Heat Developers'
62+
copyright = '2015, Heat Developers'
6363

6464
# Release notes are version independent, no need to set version and release
6565
release = ''
@@ -191,8 +191,8 @@
191191
# (source start file, target name, title,
192192
# author, documentclass [howto, manual, or own class]).
193193
latex_documents = [
194-
('index', 'HeatReleaseNotes.tex', u'Heat Release Notes Documentation',
195-
u'Heat Developers', 'manual'),
194+
('index', 'HeatReleaseNotes.tex', 'Heat Release Notes Documentation',
195+
'Heat Developers', 'manual'),
196196
]
197197

198198
# The name of an image file (relative to this directory) to place at the top of
@@ -221,8 +221,8 @@
221221
# One entry per manual page. List of tuples
222222
# (source start file, name, description, authors, manual section).
223223
man_pages = [
224-
('index', 'heatreleasenotes', u'Heat Release Notes Documentation',
225-
[u'Heat Developers'], 1)
224+
('index', 'heatreleasenotes', 'Heat Release Notes Documentation',
225+
['Heat Developers'], 1)
226226
]
227227

228228
# If true, show URL addresses after external links.
@@ -235,8 +235,8 @@
235235
# (source start file, target name, title, author,
236236
# dir menu entry, description, category)
237237
texinfo_documents = [
238-
('index', 'HeatReleaseNotes', u'Heat Release Notes Documentation',
239-
u'Heat Developers', 'HeatReleaseNotes',
238+
('index', 'HeatReleaseNotes', 'Heat Release Notes Documentation',
239+
'Heat Developers', 'HeatReleaseNotes',
240240
'One line description of project.',
241241
'Miscellaneous'),
242242
]

0 commit comments

Comments
 (0)