Commit 17fc7bd4 authored by Thomas Goirand's avatar Thomas Goirand
Browse files

Merge tag '5.0.0' into debian/zed

oslo.serialization 5.0.0 release

meta:version: 5.0.0
meta:diff-start: -
meta:series: zed
meta:release-type: release
meta:pypi: yes
meta:first: yes
meta:release:Author: Elod Illes <elod.illes@est.tech>
meta:release:Commit: Elod Illes <elod.illes@est.tech>
meta:release:Change-Id: Ieca97a0b177a3274eef71ca22631f08d240c172b
meta:release:Code-Review+2: Hervé Beraud <herveberaud.pro@gmail.com>
meta:release:Code-Review+2: Elod Illes <elod.illes@est.tech>
meta:release:Workflow+1: Elod Illes <elod.illes@est.tech>
parents 0da8db1d dd2a8199
......@@ -2,7 +2,7 @@
templates:
- check-requirements
- lib-forward-testing-python3
- openstack-python3-yoga-jobs
- openstack-python3-zed-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
......@@ -43,8 +43,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'oslo.serialization'
copyright = u'2014, OpenStack Foundation'
project = 'oslo.serialization'
copyright = '2014, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
......@@ -74,6 +74,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'),
]
......@@ -227,17 +227,17 @@ class DateTimeHandler(object):
def serialize(self, dt):
dct = {
u'day': dt.day,
u'month': dt.month,
u'year': dt.year,
u'hour': dt.hour,
u'minute': dt.minute,
u'second': dt.second,
u'microsecond': dt.microsecond,
'day': dt.day,
'month': dt.month,
'year': dt.year,
'hour': dt.hour,
'minute': dt.minute,
'second': dt.second,
'microsecond': dt.microsecond,
}
if dt.tzinfo:
tz = dt.tzinfo.tzname(None)
dct[u'tz'] = tz
dct['tz'] = tz
return dumps(dct, registry=self._registry)
def deserialize(self, blob):
......@@ -365,9 +365,9 @@ class DateHandler(object):
def serialize(self, d):
dct = {
u'year': d.year,
u'month': d.month,
u'day': d.day,
'year': d.year,
'month': d.month,
'day': d.day,
}
return dumps(dct, registry=self._registry)
......
......@@ -23,27 +23,27 @@ class Base64Tests(test_base.BaseTestCase):
self.assertEqual(b'dGV4dA==',
base64.encode_as_bytes(b'text'))
self.assertEqual(b'dGV4dA==',
base64.encode_as_bytes(u'text'))
base64.encode_as_bytes('text'))
self.assertEqual(b'ZTrDqQ==',
base64.encode_as_bytes(u'e:\xe9'))
base64.encode_as_bytes('e:\xe9'))
self.assertEqual(b'ZTrp',
base64.encode_as_bytes(u'e:\xe9', encoding='latin1'))
base64.encode_as_bytes('e:\xe9', encoding='latin1'))
def test_encode_as_text(self):
self.assertEqual(u'dGV4dA==',
self.assertEqual('dGV4dA==',
base64.encode_as_text(b'text'))
self.assertEqual(u'dGV4dA==',
base64.encode_as_text(u'text'))
self.assertEqual(u'ZTrDqQ==',
base64.encode_as_text(u'e:\xe9'))
self.assertEqual(u'ZTrp',
base64.encode_as_text(u'e:\xe9', encoding='latin1'))
self.assertEqual('dGV4dA==',
base64.encode_as_text('text'))
self.assertEqual('ZTrDqQ==',
base64.encode_as_text('e:\xe9'))
self.assertEqual('ZTrp',
base64.encode_as_text('e:\xe9', encoding='latin1'))
def test_decode_as_bytes(self):
self.assertEqual(b'text',
base64.decode_as_bytes(b'dGV4dA=='))
self.assertEqual(b'text',
base64.decode_as_bytes(u'dGV4dA=='))
base64.decode_as_bytes('dGV4dA=='))
def test_decode_as_bytes__error(self):
self.assertRaises(TypeError,
......@@ -51,11 +51,11 @@ class Base64Tests(test_base.BaseTestCase):
'hello world')
def test_decode_as_text(self):
self.assertEqual(u'text',
self.assertEqual('text',
base64.decode_as_text(b'dGV4dA=='))
self.assertEqual(u'text',
base64.decode_as_text(u'dGV4dA=='))
self.assertEqual(u'e:\xe9',
base64.decode_as_text(u'ZTrDqQ=='))
self.assertEqual(u'e:\xe9',
base64.decode_as_text(u'ZTrp', encoding='latin1'))
self.assertEqual('text',
base64.decode_as_text('dGV4dA=='))
self.assertEqual('e:\xe9',
base64.decode_as_text('ZTrDqQ=='))
self.assertEqual('e:\xe9',
base64.decode_as_text('ZTrp', encoding='latin1'))
......@@ -89,24 +89,24 @@ class JSONUtilsTestMixin(object):
def test_loads_unicode(self):
self.assertIsInstance(jsonutils.loads(b'"foo"'), str)
self.assertIsInstance(jsonutils.loads(u'"foo"'), str)
self.assertIsInstance(jsonutils.loads('"foo"'), str)
# 'test' in Ukrainian
i18n_str_unicode = u'"\u0442\u0435\u0441\u0442"'
i18n_str_unicode = '"\u0442\u0435\u0441\u0442"'
self.assertIsInstance(jsonutils.loads(i18n_str_unicode), str)
i18n_str = i18n_str_unicode.encode('utf-8')
self.assertIsInstance(jsonutils.loads(i18n_str), str)
def test_loads_with_kwargs(self):
jsontext = u'{"foo": 3}'
jsontext = '{"foo": 3}'
result = jsonutils.loads(jsontext, parse_int=lambda x: 5)
self.assertEqual(5, result['foo'])
def test_load(self):
jsontext = u'{"a": "\u0442\u044d\u0441\u0442"}'
expected = {u'a': u'\u0442\u044d\u0441\u0442'}
jsontext = '{"a": "\u0442\u044d\u0441\u0442"}'
expected = {'a': '\u0442\u044d\u0441\u0442'}
for encoding in ('utf-8', 'cp1251'):
fp = io.BytesIO(jsontext.encode(encoding))
......@@ -325,12 +325,12 @@ class ToPrimitiveTestCase(test_base.BaseTestCase):
self.assertEqual({'ip_addr': '1.2.3.4'}, ret)
def test_ipaddr_using_ipaddress_v4(self):
thing = {'ip_addr': ipaddress.ip_address(u'192.168.0.1')}
thing = {'ip_addr': ipaddress.ip_address('192.168.0.1')}
ret = jsonutils.to_primitive(thing)
self.assertEqual({'ip_addr': '192.168.0.1'}, ret)
def test_ipaddr_using_ipaddress_v6(self):
thing = {'ip_addr': ipaddress.ip_address(u'2001:db8::')}
thing = {'ip_addr': ipaddress.ip_address('2001:db8::')}
ret = jsonutils.to_primitive(thing)
self.assertEqual({'ip_addr': '2001:db8::'}, ret)
......
......@@ -60,8 +60,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'oslo.serialization Release Notes'
copyright = u'2016, oslo.serialization Developers'
project = 'oslo.serialization Release Notes'
copyright = '2016, oslo.serialization Developers'
# Release notes do not need a version in the title, they span
# multiple versions.
......@@ -208,8 +208,8 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'oslo.serializationReleaseNotes.tex',
u'oslo.serialization Release Notes Documentation',
u'oslo.serialization Developers', 'manual'),
'oslo.serialization Release Notes Documentation',
'oslo.serialization Developers', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
......@@ -239,8 +239,8 @@ latex_documents = [
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'oslo.serializationReleaseNotes',
u'oslo.serialization Release Notes Documentation',
[u'oslo.serialization Developers'], 1)
'oslo.serialization Release Notes Documentation',
['oslo.serialization Developers'], 1)
]
# If true, show URL addresses after external links.
......@@ -254,8 +254,8 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'oslo.serializationReleaseNotes',
u'oslo.serialization Release Notes Documentation',
u'oslo.serialization Developers', 'oslo.serializationReleaseNotes',
'oslo.serialization Release Notes Documentation',
'oslo.serialization Developers', 'oslo.serializationReleaseNotes',
'One line description of project.',
'Miscellaneous'),
]
......
......@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
yoga
xena
wallaby
victoria
......
=========================
Yoga Series Release Notes
=========================
.. release-notes::
:branch: stable/yoga
......@@ -6,7 +6,7 @@ description_file =
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/oslo.serialization/latest/
python_requires = >=3.6
python_requires = >=3.8
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
......@@ -15,9 +15,8 @@ classifier =
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment