<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/python-troveclient.git/troveclient/compat, branch 5.1.0</title>
<subtitle>opendev.org: openstack/python-troveclient.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/'/>
<entry>
<title>Stop to use the __future__ module.</title>
<updated>2020-06-02T18:54:04+00:00</updated>
<author>
<name>Hervé Beraud</name>
<email>hberaud@redhat.com</email>
</author>
<published>2020-06-02T18:54:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=e2bf7cff227eb464550aac1f94b504265c5ed26a'/>
<id>e2bf7cff227eb464550aac1f94b504265c5ed26a</id>
<content type='text'>
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I73b532283079d346b75a925e2aee707c4de8fa9e
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I73b532283079d346b75a925e2aee707c4de8fa9e
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove flavor API</title>
<updated>2020-05-08T06:30:49+00:00</updated>
<author>
<name>Lingxian Kong</name>
<email>anlin.kong@gmail.com</email>
</author>
<published>2020-04-18T11:25:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=27cf71299ec51976fed8b18dbf5c0e4f9f4fd6f5'/>
<id>27cf71299ec51976fed8b18dbf5c0e4f9f4fd6f5</id>
<content type='text'>
Change-Id: I5a35911b5658fdf6bc08844b31cc1325b749526a
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I5a35911b5658fdf6bc08844b31cc1325b749526a
</pre>
</div>
</content>
</entry>
<entry>
<title>Use unittest.mock instead of third party mock</title>
<updated>2020-04-18T16:59:46+00:00</updated>
<author>
<name>Sean McGinnis</name>
<email>sean.mcginnis@gmail.com</email>
</author>
<published>2020-04-18T16:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=2b8282bb1e254e7716eab106ca8cc0d6c0097a51'/>
<id>2b8282bb1e254e7716eab106ca8cc0d6c0097a51</id>
<content type='text'>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis &lt;sean.mcginnis@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Update hacking for Python3</title>
<updated>2020-03-31T11:33:41+00:00</updated>
<author>
<name>Andreas Jaeger</name>
<email>aj@suse.com</email>
</author>
<published>2020-03-31T11:29:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=e96e99f1ec05ecae17f6cee3c73bb84af3919128'/>
<id>e96e99f1ec05ecae17f6cee3c73bb84af3919128</id>
<content type='text'>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
</pre>
</div>
</content>
</entry>
<entry>
<title>Update hacking version</title>
<updated>2019-01-02T15:57:05+00:00</updated>
<author>
<name>ZhijunWei</name>
<email>wzj334965317@outlook.com</email>
</author>
<published>2018-12-28T15:04:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=463eab47e4d47cb306333b705247d4bd37f12651'/>
<id>463eab47e4d47cb306333b705247d4bd37f12651</id>
<content type='text'>
1. update hacking version to latest
2. fix pep8 failed

Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. update hacking version to latest
2. fix pep8 failed

Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix python3 compatibility issues</title>
<updated>2018-08-31T12:51:32+00:00</updated>
<author>
<name>Marcin Piwowarczyk</name>
<email>m.piwowarczy@samsung.com</email>
</author>
<published>2018-08-27T07:41:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=4021a1062b207f68747e10ffe88e93a7b7726014'/>
<id>4021a1062b207f68747e10ffe88e93a7b7726014</id>
<content type='text'>
While executing functional tests in trove project, with baseptyhon
python3 in change [1], there appears few incompatibilities
in troveclient.

All of them are directly related to differences in PY3 version.

This change removes these issues and will allow to execute functional
tests seamlessly.

Change details:
  * troveclient/compat/base.py - dict.iteritems was removed in PY3
    because dict.items now does the thing dict.iteritems did in PY2
  * troveclient/compat/client.py - json.loads expects string, and
    PY3 doesnt convert bytes to string. We have to use explicity call
    decode() which will decode given bytes to string
  * troveclient/apiclient/base.py - to avoid infinite recursion
    exception raised when pickling class attributes

[1] I9ee34642c700d1e6ba9c2f3891b7fa1f7f7e1e1d

Change-Id: I8989fd4798e80eae27408017e1543819a68b4ab1
Signed-off-by: Marcin Piwowarczyk &lt;m.piwowarczy@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While executing functional tests in trove project, with baseptyhon
python3 in change [1], there appears few incompatibilities
in troveclient.

All of them are directly related to differences in PY3 version.

This change removes these issues and will allow to execute functional
tests seamlessly.

Change details:
  * troveclient/compat/base.py - dict.iteritems was removed in PY3
    because dict.items now does the thing dict.iteritems did in PY2
  * troveclient/compat/client.py - json.loads expects string, and
    PY3 doesnt convert bytes to string. We have to use explicity call
    decode() which will decode given bytes to string
  * troveclient/apiclient/base.py - to avoid infinite recursion
    exception raised when pickling class attributes

[1] I9ee34642c700d1e6ba9c2f3891b7fa1f7f7e1e1d

Change-Id: I8989fd4798e80eae27408017e1543819a68b4ab1
Signed-off-by: Marcin Piwowarczyk &lt;m.piwowarczy@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable Keystone v3 support for compat client</title>
<updated>2017-10-09T19:40:44+00:00</updated>
<author>
<name>Samuel Matzek</name>
<email>smatzek@us.ibm.com</email>
</author>
<published>2017-10-07T02:30:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=565a6e0a5b9467df9880ed4c831ff0bca1a5084a'/>
<id>565a6e0a5b9467df9880ed4c831ff0bca1a5084a</id>
<content type='text'>
Enable Keystone v3 auth support in the compat client.
This is needed for the Trove integration and scenario tests which
use the compat client. The Keystone v2 APIs have been removed in
the Queens release and this stop-gap fix of putting Keystone v3
support in the compat client is needed to fix the Trove gate.

Change-Id: I60ea2188443d8905c03c24607703e69c6490420b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Enable Keystone v3 auth support in the compat client.
This is needed for the Trove integration and scenario tests which
use the compat client. The Keystone v2 APIs have been removed in
the Queens release and this stop-gap fix of putting Keystone v3
support in the compat client is needed to fix the Trove gate.

Change-Id: I60ea2188443d8905c03c24607703e69c6490420b
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle log message interpolation by the logger</title>
<updated>2017-03-08T18:00:34+00:00</updated>
<author>
<name>Gábor Antal</name>
<email>antal@inf.u-szeged.hu</email>
</author>
<published>2017-02-07T16:54:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=ccceffa7f56bfcc2ff42f98a6272ace866993d09'/>
<id>ccceffa7f56bfcc2ff42f98a6272ace866993d09</id>
<content type='text'>
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

Also, upgraded hacking requirement, to enable H904 check.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages

Co-Authored-By: jiansong &lt;jian.song@easystack.cn&gt;
Change-Id: I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8
Closes-Bug: #1596829
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

Also, upgraded hacking requirement, to enable H904 check.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages

Co-Authored-By: jiansong &lt;jian.song@easystack.cn&gt;
Change-Id: I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8
Closes-Bug: #1596829
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid use xx=[]  for parameter in function</title>
<updated>2016-10-19T02:08:46+00:00</updated>
<author>
<name>jiansong</name>
<email>jian.song@easystack.cn</email>
</author>
<published>2016-10-08T02:23:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=91e098e0ea46a7674f9d0fb6e4734675c658f444'/>
<id>91e098e0ea46a7674f9d0fb6e4734675c658f444</id>
<content type='text'>
Use xx = [] for the parameter for function, this parameter will
only be initialized at the first call, this is should be avoided.
Better choice is to set the initial value to None, then the initialization
time use xx= xx or []

more information:http://effbot.org/zone/default-values.htm

Change-Id: Icbade7dd4c7d231ae65fd4f8de673b484bab721c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use xx = [] for the parameter for function, this parameter will
only be initialized at the first call, this is should be avoided.
Better choice is to set the initial value to None, then the initialization
time use xx= xx or []

more information:http://effbot.org/zone/default-values.htm

Change-Id: Icbade7dd4c7d231ae65fd4f8de673b484bab721c
</pre>
</div>
</content>
</entry>
<entry>
<title>Using assertIsNotNone() instead of assertNotEqual(None)</title>
<updated>2016-10-03T02:33:04+00:00</updated>
<author>
<name>Cao Xuan Hoang</name>
<email>hoangcx@vn.fujitsu.com</email>
</author>
<published>2016-10-03T02:32:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/python-troveclient.git/commit/?id=71b0ff69fa4983b6d04ce7a53858e42093fb3630'/>
<id>71b0ff69fa4983b6d04ce7a53858e42093fb3630</id>
<content type='text'>
Following OpenStack Style Guidelines[1]:
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNotNone(...) is preferred
over assertNotEqual(None, ...) and assertIsNot(None, ...)

[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

Change-Id: Ie2631ce6d5f1756fe520850be0e0d304f41ba760
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following OpenStack Style Guidelines[1]:
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNotNone(...) is preferred
over assertNotEqual(None, ...) and assertIsNot(None, ...)

[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

Change-Id: Ie2631ce6d5f1756fe520850be0e0d304f41ba760
</pre>
</div>
</content>
</entry>
</feed>
