Commit Graph

227 Commits

Author SHA1 Message Date
Tony Breeds 2b16aebe50 Retire Packaging Deb project repos
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
2017-09-12 16:07:25 -06:00
ChangBo Guo(gcb) bbee6d1aa1 Revert "Explicitly raise ValueError in to_primitive"
This reverts commit 3727b2d6e0.

It breaks nova's test, need log warning before we make major release.

Change-Id: Ibbfde6207fc8c066155758c7c1aa1521b95d4db1
2017-07-17 23:28:58 +08:00
ChangBo Guo(gcb) 790d1d12d0 Update URLs in documents according to document migration
Change-Id: I3230bd42051dc74f2185e50a7d1f5cb90d61f7c8
2017-07-12 23:21:07 +08:00
Akihiro Motoki e1f6499c67 rearrange existing documentation to fit the new standard layout
Fixes formatting things related to openstackdocstheme adoption

Change-Id: Ia4272bf073d53ae4075a1b6d860898c0a6121145
2017-07-06 21:53:30 +00:00
Akihiro Motoki ed34d20c38 switch from oslosphinx to openstackdocstheme
Fixes formatting things related to openstackdocstheme adoption

Change-Id: I05a794b806c36b5237fc9a1b6eabaaff802aba0e
2017-07-06 21:53:27 +00:00
Jenkins 2a29a5e836 Merge "Explicitly raise ValueError in to_primitive" 2017-07-05 11:26:43 +00:00
OpenStack Proposal Bot 0515601245 Updated from global requirements
Change-Id: I055862eb7a8a3618bf8988b7e87b66dc4f7e8fb3
2017-06-27 12:20:30 +00:00
Ihar Hrachyshka 38ac21b523 Don't iterate through addresses in netaddr.IPNetwork
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
2017-06-16 11:46:36 -07:00
OpenStack Proposal Bot 98642b2d69 Updated from global requirements
Change-Id: Ic382884e9e510f2edb6aec69cf8140ee6774bfc5
2017-06-02 22:05:37 +00:00
OpenStack Proposal Bot e7c6f94d41 Updated from global requirements
Change-Id: I5301b0c77e1148380be543aa68cdbfc8febee4b0
2017-05-23 11:58:14 +00:00
ChangBo Guo(gcb) 3727b2d6e0 Explicitly raise ValueError in to_primitive
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
2017-05-17 15:55:14 +08:00
OpenStack Proposal Bot e74deca80a Updated from global requirements
Change-Id: Ifeba24d5f3cfd1641b5aeddb3cfb9628c81b1df5
2017-05-17 03:56:52 +00:00
OpenStack Proposal Bot 7fded98036 Updated from global requirements
Change-Id: I6634af9cb35a4c7a9e9ff04ba9745a4d608f7ad5
2017-04-12 04:20:20 +00:00
Stephen Finucane e6764d4010 Use Sphinx 1.5 warning-is-error
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
2017-03-16 15:01:15 +00:00
OpenStack Proposal Bot 279da59d17 Updated from global requirements
Change-Id: Ib76611efc7723a4cffe56188958739d63de6145e
2017-03-03 00:03:20 +00:00
ricolin 8bbe534725 [Fix gate]Update test requirement
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
2017-03-02 18:24:24 +08:00
OpenStack Proposal Bot e321e96eab Updated from global requirements
Change-Id: I1ed677901c9ca87969bf4d20db53175a45d7ae1b
2017-02-10 05:57:57 +00:00
Jenkins e7f5339e49 Merge "Update reno for stable/ocata" 2017-02-06 20:54:55 +00:00
OpenStack Release Bot d98e9e23fb Update reno for stable/ocata
Change-Id: I0c01a9f9e2ffda9c5d0789d1bf9cfa3cc231e988
2017-01-20 19:15:52 +00:00
Eric Brown 4fdec1b120 Remove references to Python 3.4
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
2017-01-17 10:34:52 -08:00
Joshua Harlow ac5787d0e4 Prefer raising the python2.x type error for b64 decode errors
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
2017-01-09 16:37:28 -08:00
Jenkins 004bc47522 Merge "Replace six.iteritems() with .items()" 2017-01-02 21:28:38 +00:00
Jenkins b1a64590e7 Merge "Add Constraints support" 2016-12-22 00:53:07 +00:00
Tony Breeds 6aa05a3c36 Add Constraints support
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
2016-12-20 14:36:50 +11:00
Stephen Finucane ede68f08d3 Don't raise TypeError for invalid b64
In Python 2, the 'b64decode' function calls the 'binascii.a2b_base64'
function but catches any 'binascii.Error' exceptions raised and raises a
TypeError instead [1]. In Python 3, a 'binascii.Error' error is raised
instead [2]. Rather than forcing users to handle two types of exception,
we can allow them to catch only the 'bisascii.Error'. Python 2 provides
a function that does just this - 'decodestring' - which we can use. Make
it so.

[1] https://github.com/python/cpython/blob/2.7/Lib/base64.py#L78
[2] https://github.com/python/cpython/blob/3.5/Lib/base64.py#L87
[3] https://github.com/python/cpython/blob/2.7/Lib/base64.py#L326

Change-Id: I72c6de71b174181292427128d20e03756f85fb97
2016-12-14 16:16:41 +00:00
gecong1973 1df76ee42d Replace six.iteritems() with .items()
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
2016-12-12 11:11:28 +08:00
Luong Anh Tuan 6704d5f8ba Replaces uuid.uuid4 with uuidutils.generate_uuid()
Openstack common has a wrapper for generating uuids.We should
use that function when generating uuids for consistency.

Change-Id: Ifb450c91a1b91f016b4f9ad3a4367e8117b89a0d
Closes-Bug: #1082248
2016-12-05 11:12:56 +07:00
Flavio Percoco 58ee9d8ca2 Show team and repo badges on README
This patch adds the team's and repository's badges to the README file.
The motivation behind this is to communicate the project status and
features at first glance.

For more information about this effort, please read this email thread:

http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html

To see an example of how this would look like check:

b'https://gist.github.com/4d5b24484f965cc0a7ad252d9ffff20a\n'

Change-Id: I5453d4039c48a263a9fd373ea93cda82a46d0ee7
2016-11-25 15:21:15 +01:00
OpenStack Proposal Bot 1dc9e0de3c Updated from global requirements
Change-Id: I3fe045fff363c96e711ebb3f991e4646c70c338d
2016-11-09 04:23:03 +00:00
OpenStack Proposal Bot eb0132efb6 Updated from global requirements
Change-Id: Ibc6f1ac2b545f68866666c891adc84cef1366ba5
2016-11-06 02:06:01 +00:00
ChangBo Guo(gcb) ba8abbada8 Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Closes-Bug: #1634356

Change-Id: Ia8a357ce4a42176b9bc46a715aef7158310c2cf0
2016-11-03 20:44:36 +08:00
OpenStack Proposal Bot 0e17d0b5f2 Updated from global requirements
Change-Id: Idec21f411f8cfc5df4351839b842e709558e6123
2016-10-22 01:26:14 +00:00
Jenkins 0a5dc84db7 Merge "modify the home-page info with the developer documentation" 2016-09-29 22:55:53 +00:00
John L. Villalovos b69beaef2d Add a title to the API Documentation page
The API Documentation page had a title of "base64". Make it "API
Documentation"

Change-Id: I309374560487762a8a539a70a6478f1123bd3a5c
2016-09-29 12:53:06 -07:00
OpenStack Proposal Bot e409634751 Updated from global requirements
Change-Id: Ie6f11162ad19399cffc525080dce51b72d41d784
2016-09-28 16:59:49 +00:00
avnish d8aed63b28 modify the home-page info with the developer documentation
Change-Id: I4fc6a5af613e81fa553d7a176e1ec51b7945d427
2016-09-20 11:47:00 +05:30
Jenkins 1f86a66a36 Merge "Fix serialization of binary strings in Python3" 2016-08-04 13:31:57 +00:00
xianming.mao d8e6057b31 Drop H803 in flake8 ignore list
In hacking >=0.10.0,there is not H803.We should remove it.

Change-Id: I4738aba1d02ad1404944a326f1ce5538dd1edc7a
2016-08-03 14:08:31 +08:00
Gevorg Davoian a73120aad6 Fix serialization of binary strings in Python3
Change-Id: I30e7c7b7cb2356a39bc51eb8c93f14c8881a38c2
Closes-Bug: #1599387
2016-08-01 16:58:08 +03:00
OpenStack Proposal Bot afb53323a1 Updated from global requirements
Change-Id: Ib76f363aba1eaf059799c4b954ddf296269ff390
2016-07-29 02:34:03 +00:00
yanheven 5ae04325e6 Fix parameters of assertEqual are misplaced
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
2016-07-23 19:38:43 +08:00
ChangBo Guo(gcb) aa0e48021a Add Python 3.5 classifier and venv
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
2016-07-12 16:53:18 +08:00
OpenStack Proposal Bot 7ad9a95800 Updated from global requirements
Change-Id: I4e8b08864afacea4261d48e403ce159faae36da8
2016-07-09 19:26:04 +00:00
OpenStack Proposal Bot 5ee90fcb0e Updated from global requirements
Change-Id: I6ffc7b5b8ba947ce08c5e2484a4536b7719d9581
2016-06-30 18:48:37 +00:00
Edan David 1ec85e90cd Use {} instead of dict()
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
2016-06-21 10:58:06 -04:00
OpenStack Proposal Bot 23866b6d6c Updated from global requirements
Change-Id: I177163b1f2739abb83b88c561da8c92701c860cc
2016-06-09 16:13:02 +00:00
Jenkins 0aa1638408 Merge "Support serializing ipaddress objs with jsonutils" 2016-06-09 08:18:25 +00:00
Gevorg Davoian 4fdaeff758 Replace TypeError by ValueError in msgpackutils
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
2016-06-08 08:41:36 +00:00
Jim Baker 8943c73662 Support serializing ipaddress objs with jsonutils
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
2016-06-07 14:05:50 -06:00
OpenStack Proposal Bot 8a4cac92bc Updated from global requirements
Change-Id: Iecdb59fdb7059e74c59e9414b4516cccbb96b828
2016-06-01 13:53:25 +00:00