diff --git a/doc/source/conf.py b/doc/source/conf.py index 834bf69a..97e76bc1 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -45,8 +45,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'oslo.versionedobjects' -copyright = u'2014, OpenStack Foundation' +project = 'oslo.versionedobjects' +copyright = '2014, OpenStack Foundation' source_tree = 'https://opendev.org/openstack/%s' % project # If true, '()' will be appended to :func: etc. cross-reference text. @@ -84,6 +84,6 @@ htmlhelp_basename = '%sdoc' % project latex_documents = [ ('index', '%s.tex' % project, - u'%s Documentation' % project, - u'OpenStack Foundation', 'manual'), + '%s Documentation' % project, + 'OpenStack Foundation', 'manual'), ] diff --git a/oslo_versionedobjects/tests/test_fields.py b/oslo_versionedobjects/tests/test_fields.py index 0b2ea9d9..0c92c676 100644 --- a/oslo_versionedobjects/tests/test_fields.py +++ b/oslo_versionedobjects/tests/test_fields.py @@ -283,7 +283,7 @@ class TestUUID(TestField): ('da66a411-af0e-4829-9b67-475017ddz152', 'da66a411-af0e-4829-9b67-475017ddz152'), ('fake_uuid', 'fake_uuid'), - (u'fake_uāid', u'fake_uāid'), + ('fake_uāid', 'fake_uāid'), (b'fake_u\xe1id'.decode('latin_1'), b'fake_u\xe1id'.decode('latin_1')), ('1', '1'), diff --git a/oslo_versionedobjects/tests/test_objects.py b/oslo_versionedobjects/tests/test_objects.py index 0b21f504..961baae8 100644 --- a/oslo_versionedobjects/tests/test_objects.py +++ b/oslo_versionedobjects/tests/test_objects.py @@ -849,7 +849,7 @@ class _TestObject(object): self.assertRaises(ValueError, fail) def test_object_dict_syntax(self): - obj = MyObj(foo=123, bar=u'text') + obj = MyObj(foo=123, bar='text') self.assertEqual(obj['foo'], 123) self.assertIn('bar', obj) self.assertNotIn('missing', obj) @@ -858,11 +858,11 @@ class _TestObject(object): self.assertEqual(sorted(obj.keys()), ['bar', 'foo']) self.assertEqual(sorted(obj.values(), key=str), - [123, u'text']) + [123, 'text']) self.assertEqual(sorted(obj.items()), - [('bar', u'text'), ('foo', 123)]) + [('bar', 'text'), ('foo', 123)]) self.assertEqual(dict(obj), - {'foo': 123, 'bar': u'text'}) + {'foo': 123, 'bar': 'text'}) def test_non_dict_remotable(self): @base.VersionedObjectRegistry.register @@ -1195,7 +1195,7 @@ class _TestObject(object): self.assertEqual('MySensitiveObj(data=)', repr(obj2)) def test_obj_repr_unicode(self): - obj = MyObj(bar=u'\u0191\u01A1\u01A1') + obj = MyObj(bar='\u0191\u01A1\u01A1') # verify the unicode string has been encoded as ASCII if on python 2 self.assertEqual("MyObj(bar='\u0191\u01A1\u01A1',foo=," "missing=,mutable_default=,readonly=," diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index cdeb821d..c4bd4964 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -58,8 +58,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'oslo.versionedobjects Release Notes' -copyright = u'2016, oslo.versionedobjects Developers' +project = 'oslo.versionedobjects Release Notes' +copyright = '2016, oslo.versionedobjects Developers' # Release notes do not need a version in the title, they span # multiple versions. @@ -206,8 +206,8 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'oslo.versionedobjectsReleaseNotes.tex', - u'oslo.versionedobjects Release Notes Documentation', - u'oslo.versionedobjects Developers', 'manual'), + 'oslo.versionedobjects Release Notes Documentation', + 'oslo.versionedobjects Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -237,8 +237,8 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'oslo.versionedobjectsReleaseNotes', - u'oslo.versionedobjects Release Notes Documentation', - [u'oslo.versionedobjects Developers'], 1) + 'oslo.versionedobjects Release Notes Documentation', + ['oslo.versionedobjects Developers'], 1) ] # If true, show URL addresses after external links. @@ -252,8 +252,8 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'oslo.versionedobjectsReleaseNotes', - u'oslo.versionedobjects Release Notes Documentation', - u'oslo.versionedobjects Developers', 'oslo.versionedobjectsReleaseNotes', + 'oslo.versionedobjects Release Notes Documentation', + 'oslo.versionedobjects Developers', 'oslo.versionedobjectsReleaseNotes', 'One line description of project.', 'Miscellaneous'), ]