This commit is part of a series to retire the Packaging Deb
project. Step 2 is to remove all content from the project
repos, replacing it with a README notification where to find
ongoing work, and how to recover the repo if needed at some
future point (as in
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project).
Change-Id: I102612d36887a6049d63c213bd1ba303c0b4d832
This reverts commit 3727b2d6e0.
It breaks nova's test, need log warning before we make major release.
Change-Id: Ibbfde6207fc8c066155758c7c1aa1521b95d4db1
Currently, to_primitive tries to iterate through all addresses in the
network, because the type doesn't have a special handling that would
short curcuit it, but also has __iter__. This may be detrimental to
performance, up to the point of node crash due to memory exhaustion if
the passed network range is too large (think of 0.0.0.0/0 or even
2001::/64). This behavior also makes it impossible to restore the
original data format (CIDR).
This patch short curcuits the iteration by handling the IPNetwork type
as a special case, same as we do for IPAddress.
Change-Id: I6aecd2d057d282a655ff9e4918c164253142b188
Closes-Bug: #1698355
The problem in the current version of to_primitive function
from jsonutils module is in the situation when the function
doesn't know how to convert an object to primitive. In that
case the function simply returns the same object which causes
the following exception later in json.dumps:
ValueError: Circular reference detected. This exception is not
obvious and is quite misleading. So I think it would be better
to explicitly raise ValueError here.
Closes-Bug: #1593641
Change-Id: If9e8dd5cc2634168910d5f9f8d9302aeefa16097
With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate
the setting from the old warnerrors one.
No bugs in this one. Good work guys!
Change-Id: I0c5020a8758918dc45fad49220aecb54af599322
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848
Change-Id: I11e9cbdc72537b150fdc6921c2b363ab0bd217df
Now that there exists only a gate job for Python 3.5 and not 3.4,
we should remove those references to the 3.4 that is untested.
Change-Id: Iac4c303d3d064758c918f38f77f7a45cc51691a6
The current change made in de68f08d37 breaks cinder and other
projects that were expecting a TypeError, so for now and to keep
those projects operating translate the py3.x exception from binascii
into a type error to prefer consistency with existing code.
Change-Id: I4575ea3dad51be9bb2278eb0bfa31cef54c300d5
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.
This change adds constraints support by also adding a helper script to
edit the constraints to remove oslo.serialization.
Change-Id: If02798738dd0293ede4e3d6939e6d5cf6b0182ec
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can use
dict.items instead, as it will return iterators
in PY3 as well. And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible,
see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: Ifbe7929580ec61a2cd50232794c0cbd0cbf37edc
Openstack common has a wrapper for generating uuids.We should
use that function when generating uuids for consistency.
Change-Id: Ifb450c91a1b91f016b4f9ad3a4367e8117b89a0d
Closes-Bug: #1082248
The release management team have indicated this is their preferred way
to collect release notes in future.
Closes-Bug: #1634356
Change-Id: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
Many assertEqual sentences don't follow assertEqual(expected, actual),
These misplaces have 2 impacts:
1, giving confusing messages when some tests failed.
2, mislead other developers, new test modules may follow these wrong pattern.
This patch fix all of them.
Change-Id: Ice3148685b81bf906672b91159fbb29bd618abb0
Closes-Bug: #1604213
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.
Change-Id: I6f67834cc0f6f204aba2457f71e788d1fafd2640
There is a performance impact when using dict() instead of {}
in CPython (up to 6 times longer).
Considering the to_primitive function is recursive this can
have quite an effect.
Measuring:
$ python2.7 -m timeit -n 1000000 -r 5 -v 'dict()'
raw times: 0.24 0.24 0.24 0.239 0.24
1000000 loops, best of 5: 0.239 usec per loop
$ python2.7 -m timeit -n 1000000 -r 5 -v '{}'
raw times: 0.0417 0.0413 0.0407 0.0411 0.042
1000000 loops, best of 5: 0.0407 usec per loop
For more information:
https://doughellmann.com/blog/2012/11/12/
the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2/
Change-Id: Ia0b5892773a19cbabe40313a3bc788580a943f53
There are some differences in the behaviour of json and msgpack
serializers. Msgpack throws TypeError when it doesn't know
how to handle an object. Json throws ValueError instead. Regarding
the fact that serialization should be configurable (in particular,
serializers should have similar behaviour; right now transition from
json to msgpack leads to errors and fails) this patch proposes to
raise ValueError instead of TypeError on failures so that libraries
already using jsonutils would be able to also work with msgpackutils.
Change-Id: I3d21b7d136e5a426a3c4a70a953c82ddcd6ef5af
Fixes jsonutils.to_primitive so that it can serialize ipaddress
objects, as used by Python 3 or through the backport in
global-requirements.txt. Current support for netaddr is maintained.
Change-Id: I6aa1ecd5be754f61cdda4e47bc0e0180e232b366
Closes-bug: 1590076