Hello community,
here is the log from the commit of package python-keystoneauth1 for
openSUSE:Factory checked in at 2020-06-05 20:10:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-keystoneauth1 (Old)
and /work/SRC/openSUSE:Factory/.python-keystoneauth1.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-keystoneauth1"
Fri Jun 5 20:10:27 2020 rev:13 rq:803566 version:4.0.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-keystoneauth1/python-keystoneauth1.changes
2020-03-24 22:32:36.461097147 +0100
+++
/work/SRC/openSUSE:Factory/.python-keystoneauth1.new.3606/python-keystoneauth1.changes
2020-06-05 20:13:41.214422464 +0200
@@ -1,0 +2,18 @@
+Tue May 12 09:57:35 UTC 2020 - [email protected]
+
+- update to version 4.0.0
+ - Follow the PTI for docs
+ - Switch to Ussuri jobs
+ - Remove universal wheel configuration
+ - Fetch discovery documents with auth when needed
+ - Update master for stable/train
+ - fix bandit complains
+ - Generate pdf documentation
+ - [ussuri][goal] Drop python 2.7 support and testing
+ - Update hacking for Python3
+ - Fix misspell word
+ - Cleanup session on delete
+ - Make tests pass in 2020
+ - Allow initializing session with connection retries
+
+-------------------------------------------------------------------
Old:
----
keystoneauth1-3.17.2.tar.gz
New:
----
keystoneauth1-4.0.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-keystoneauth1.spec ++++++
--- /var/tmp/diff_new_pack.jNRqWP/_old 2020-06-05 20:13:42.086425672 +0200
+++ /var/tmp/diff_new_pack.jNRqWP/_new 2020-06-05 20:13:42.090425687 +0200
@@ -17,13 +17,13 @@
Name: python-keystoneauth1
-Version: 3.17.2
+Version: 4.0.0
Release: 0
Summary: OpenStack authenticating tools
License: Apache-2.0
Group: Development/Languages/Python
URL: https://launchpad.net/keystoneauth
-Source0:
https://files.pythonhosted.org/packages/source/k/keystoneauth1/keystoneauth1-3.17.2.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/k/keystoneauth1/keystoneauth1-4.0.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-PyYAML
BuildRequires: python3-betamax
@@ -78,6 +78,7 @@
Group: Development/Languages/Python
BuildRequires: python3-Sphinx
BuildRequires: python3-openstackdocstheme
+BuildRequires: python3-sphinxcontrib-apidoc
%description -n python-keystoneauth1-doc
Documentation for OpenStack authenticating tools.
@@ -96,7 +97,7 @@
%{py3_install}
# generate html docs
-PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html
+PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
++++++ _service ++++++
--- /var/tmp/diff_new_pack.jNRqWP/_old 2020-06-05 20:13:42.122425805 +0200
+++ /var/tmp/diff_new_pack.jNRqWP/_new 2020-06-05 20:13:42.122425805 +0200
@@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="renderspec">
- <param
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/train/openstack/keystoneauth1/keystoneauth1.spec.j2</param>
+ <param
name="input-template">https://opendev.org/openstack/rpm-packaging/raw/branch/stable/ussuri/openstack/keystoneauth1/keystoneauth1.spec.j2</param>
<param name="output-name">python-keystoneauth1.spec</param>
- <param
name="requirements">https://raw.githubusercontent.com/openstack/keystoneauth/stable/train/requirements.txt</param>
+ <param
name="requirements">https://opendev.org/openstack/keystoneauth/raw/branch/stable/ussuri/requirements.txt</param>
<param name="changelog-email">[email protected]</param>
<param name="changelog-provider">gh,openstack,keystoneauth</param>
</service>
++++++ keystoneauth1-3.17.2.tar.gz -> keystoneauth1-4.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/.zuul.yaml
new/keystoneauth1-4.0.0/.zuul.yaml
--- old/keystoneauth1-3.17.2/.zuul.yaml 2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/.zuul.yaml 2020-04-02 16:32:45.000000000 +0200
@@ -1,11 +1,9 @@
- project:
templates:
- check-requirements
- - lib-forward-testing
- lib-forward-testing-python3
- openstack-lower-constraints-jobs
- - openstack-python-jobs
- - openstack-python3-train-jobs
+ - openstack-python3-ussuri-jobs
- openstacksdk-functional-tips
- openstacksdk-tox-tips
- osc-tox-unit-tips
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/AUTHORS
new/keystoneauth1-4.0.0/AUTHORS
--- old/keystoneauth1-3.17.2/AUTHORS 2020-02-25 00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/AUTHORS 2020-04-02 16:34:05.000000000 +0200
@@ -8,6 +8,7 @@
Alex Gaynor <[email protected]>
Alex Meade <[email protected]>
Alex Oughton <[email protected]>
+Alex Schultz <[email protected]>
Alexander Makarov <[email protected]>
Alexey Stepanov <[email protected]>
Alvaro Lopez Garcia <[email protected]>
@@ -15,6 +16,7 @@
Andrey Kurilin <[email protected]>
Antoni Segura Puimedon <[email protected]>
Antoni Segura Puimedon <[email protected]>
+Ben Nemec <[email protected]>
Bernhard M. Wiedemann <[email protected]>
Bhuvan Arumugam <[email protected]>
Blake Covarrubias <[email protected]>
@@ -121,6 +123,8 @@
Pavlo Shchelokovskyy <[email protected]>
Pradeep Kilambi <[email protected]>
Prosunjit Biswas <[email protected]>
+Q.hongtao <[email protected]>
+Rabi Mishra <[email protected]>
Raildo Mascena <[email protected]>
Rodrigo Duarte <[email protected]>
Rodrigo Duarte Sousa <[email protected]>
@@ -200,6 +204,7 @@
wangxiyuan <[email protected]>
wangxiyuan <[email protected]>
wangzhenyu <[email protected]>
+zhangboye <[email protected]>
zhangguoqing <[email protected]>
zhangzs <[email protected]>
zhouxinyong <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/ChangeLog
new/keystoneauth1-4.0.0/ChangeLog
--- old/keystoneauth1-3.17.2/ChangeLog 2020-02-25 00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/ChangeLog 2020-04-02 16:34:05.000000000 +0200
@@ -1,18 +1,31 @@
CHANGES
=======
-3.17.2
-------
+4.0.0
+-----
+* Update hacking for Python3
+* Remove universal wheel configuration
* fix bandit complains
+* [ussuri][goal] Drop python 2.7 support and testing
+* Switch to Ussuri jobs
+
+3.18.0
+------
+
+* Fetch discovery documents with auth when needed
* Make tests pass in 2020
-* Update TOX/UPPER\_CONSTRAINTS\_FILE for stable/train
-* Update .gitreview for stable/train
+* Generate pdf documentation
+* Follow the PTI for docs
+* Update master for stable/train
+* Fix misspell word
3.17.1
------
* Simplify session logger object tests
+* Allow initializing session with connection retries
+* Cleanup session on delete
3.17.0
------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/PKG-INFO
new/keystoneauth1-4.0.0/PKG-INFO
--- old/keystoneauth1-3.17.2/PKG-INFO 2020-02-25 00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/PKG-INFO 2020-04-02 16:34:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: keystoneauth1
-Version: 3.17.2
+Version: 4.0.0
Summary: Authentication Library for OpenStack Identity
Home-page: https://docs.openstack.org/keystoneauth/latest/
Author: OpenStack
@@ -51,8 +51,6 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/doc/requirements.txt
new/keystoneauth1-4.0.0/doc/requirements.txt
--- old/keystoneauth1-3.17.2/doc/requirements.txt 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/doc/requirements.txt 2020-04-02
16:32:45.000000000 +0200
@@ -5,8 +5,8 @@
# For generationg sphinx documentation
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
-sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
+sphinxcontrib-apidoc>=0.2.0 # BSD
# For autodoc builds
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/doc/source/conf.py
new/keystoneauth1-4.0.0/doc/source/conf.py
--- old/keystoneauth1-3.17.2/doc/source/conf.py 2020-02-25 00:10:15.000000000
+0100
+++ new/keystoneauth1-4.0.0/doc/source/conf.py 2020-04-02 16:32:45.000000000
+0200
@@ -35,14 +35,22 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc',
- 'sphinx.ext.todo',
+extensions = ['sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.intersphinx',
'openstackdocstheme',
'ext.list_plugins',
+ 'sphinxcontrib.apidoc',
]
+# sphinxcontrib.apidoc options
+apidoc_module_dir = '../../keystoneauth1'
+apidoc_output_dir = 'api'
+apidoc_excluded_paths = [
+ 'tests/*',
+ 'tests',
+ 'test']
+apidoc_separate_modules = True
todo_include_todos = True
# Add any paths that contain templates here, relative to this directory.
@@ -200,10 +208,10 @@
# (source start file, target name, title, author, documentclass [howto/manual])
# .
latex_documents = [
- ('index', 'keystoneauth1.tex',
- 'keystoneauth1 Documentation',
- 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
- 'manual'),
+ ('index', 'doc-keystoneauth.tex',
+ u'keystoneauth1 Documentation',
+ u'Openstack Developers',
+ 'manual', True),
]
# The name of an image file (relative to this directory) to place at the top of
@@ -225,6 +233,17 @@
ksc = 'https://docs.openstack.org/python-keystoneclient/latest/'
+# Disable usage of xindy https://bugzilla.redhat.com/show_bug.cgi?id=1643664
+latex_use_xindy = False
+
+latex_domain_indices = False
+
+latex_elements = {
+ 'makeindex': '',
+ 'printindex': '',
+ 'preamble': r'\setcounter{tocdepth}{3}',
+}
+
intersphinx_mapping = {
'python': ('http://docs.python.org/', None),
'osloconfig': ('https://docs.openstack.org/oslo.config/latest/', None),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/doc/source/history.rst
new/keystoneauth1-4.0.0/doc/source/history.rst
--- old/keystoneauth1-3.17.2/doc/source/history.rst 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/doc/source/history.rst 1970-01-01
01:00:00.000000000 +0100
@@ -1 +0,0 @@
-.. include:: ../../ChangeLog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/doc/source/index.rst
new/keystoneauth1-4.0.0/doc/source/index.rst
--- old/keystoneauth1-3.17.2/doc/source/index.rst 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/doc/source/index.rst 2020-04-02
16:32:45.000000000 +0200
@@ -6,7 +6,8 @@
existing OpenStack clients and for simplifying the process of writing new
clients.
-Contents:
+Contents
+--------
.. toctree::
:maxdepth: 1
@@ -21,15 +22,14 @@
api/modules
Release Notes
-=============
+-------------
-.. toctree::
- :maxdepth: 1
+`Release Notes`_
- history
+.. _Release Notes: https://docs.openstack.org/releasenotes/keystoneauth/
Contributing
-============
+------------
Code is hosted `on opendev.org`_. Submit bugs to the Keystone project on
`Launchpad`_. Submit code to the ``openstack/keystoneauth`` project
@@ -42,7 +42,7 @@
Run tests with ``tox``.
Indices and tables
-==================
+------------------
* :ref:`genindex`
* :ref:`modindex`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/access/__init__.py
new/keystoneauth1-4.0.0/keystoneauth1/access/__init__.py
--- old/keystoneauth1-3.17.2/keystoneauth1/access/__init__.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/access/__init__.py 2020-04-02
16:32:45.000000000 +0200
@@ -13,7 +13,7 @@
from keystoneauth1.access.access import * # noqa
-__all__ = ('AccessInfo',
- 'AccessInfoV2',
- 'AccessInfoV3',
- 'create')
+__all__ = ('AccessInfo', # noqa: F405
+ 'AccessInfoV2', # noqa: F405
+ 'AccessInfoV3', # noqa: F405
+ 'create') # noqa: F405
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/keystoneauth1/discover.py
new/keystoneauth1-4.0.0/keystoneauth1/discover.py
--- old/keystoneauth1-3.17.2/keystoneauth1/discover.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/discover.py 2020-04-02
16:32:45.000000000 +0200
@@ -98,13 +98,23 @@
"""
headers = {'Accept': 'application/json'}
- resp = session.get(url, headers=headers, authenticated=authenticated)
+ try:
+ resp = session.get(url, headers=headers, authenticated=authenticated)
+ except exceptions.Unauthorized:
+ resp = session.get(url, headers=headers, authenticated=True)
try:
body_resp = resp.json()
except ValueError:
pass
else:
+ # Swift returns the list of containers for an account on an
+ # authenticated GET from /, not a version document. To our knowledge
+ # it's the only thing returning a [] here - and that's ok.
+ if isinstance(body_resp, list):
+ raise exceptions.DiscoveryFailure(
+ 'Invalid Response - List returned instead of dict')
+
# In the event of querying a root URL we will get back a list of
# available versions.
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/extras/_saml2/v3/saml2.py
new/keystoneauth1-4.0.0/keystoneauth1/extras/_saml2/v3/saml2.py
--- old/keystoneauth1-3.17.2/keystoneauth1/extras/_saml2/v3/saml2.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/extras/_saml2/v3/saml2.py
2020-04-02 16:32:45.000000000 +0200
@@ -77,10 +77,10 @@
def _str_from_xml(xml, path):
- l = xml.xpath(path, namespaces=_XML_NAMESPACES)
- if len(l) != 1:
+ li = xml.xpath(path, namespaces=_XML_NAMESPACES)
+ if len(li) != 1:
raise IndexError('%s should provide a single element list' % path)
- return l[0]
+ return li[0]
class _SamlAuth(requests.auth.AuthBase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/fixture/__init__.py
new/keystoneauth1-4.0.0/keystoneauth1/fixture/__init__.py
--- old/keystoneauth1-3.17.2/keystoneauth1/fixture/__init__.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/fixture/__init__.py 2020-04-02
16:32:45.000000000 +0200
@@ -19,6 +19,8 @@
from this module on libraries that are only available in testing.
"""
+# flake8: noqa: F405
+
from keystoneauth1.fixture.discovery import * # noqa
from keystoneauth1.fixture import exception
from keystoneauth1.fixture.plugin import * # noqa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/keystoneauth1/hacking/checks.py
new/keystoneauth1-4.0.0/keystoneauth1/hacking/checks.py
--- old/keystoneauth1-3.17.2/keystoneauth1/hacking/checks.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/hacking/checks.py 2020-04-02
16:32:45.000000000 +0200
@@ -21,7 +21,10 @@
import re
+from hacking import core
+
[email protected]
def check_oslo_namespace_imports(logical_line, blank_before, filename):
oslo_namespace_imports = re.compile(
r"(((from)|(import))\s+oslo\.)|(from\s+oslo\s+import\s+)")
@@ -31,7 +34,3 @@
logical_line.replace('oslo.', 'oslo_'),
logical_line)
yield(0, msg)
-
-
-def factory(register):
- register(check_oslo_namespace_imports)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/identity/generic/base.py
new/keystoneauth1-4.0.0/keystoneauth1/identity/generic/base.py
--- old/keystoneauth1-3.17.2/keystoneauth1/identity/generic/base.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/identity/generic/base.py
2020-04-02 16:32:45.000000000 +0200
@@ -213,7 +213,7 @@
# implementation to respond with a dict without the subclass modifying
# it to add their own data in case the subclass doesn't support caching
if not _implemented:
- raise NotImplemented()
+ raise NotImplementedError()
return {'auth_url': self.auth_url,
'project_id': self._project_id,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/identity/v3/__init__.py
new/keystoneauth1-4.0.0/keystoneauth1/identity/v3/__init__.py
--- old/keystoneauth1-3.17.2/keystoneauth1/identity/v3/__init__.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/identity/v3/__init__.py
2020-04-02 16:32:45.000000000 +0200
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+# flake8: noqa: F405
+
from keystoneauth1.identity.v3.application_credential import * # noqa
from keystoneauth1.identity.v3.base import * # noqa
from keystoneauth1.identity.v3.federation import * # noqa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/loading/__init__.py
new/keystoneauth1-4.0.0/keystoneauth1/loading/__init__.py
--- old/keystoneauth1-3.17.2/keystoneauth1/loading/__init__.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/loading/__init__.py 2020-04-02
16:32:45.000000000 +0200
@@ -10,6 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
+# flake8: noqa: F405
+
from keystoneauth1.loading import adapter
from keystoneauth1.loading.base import * # noqa
from keystoneauth1.loading import cli
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/keystoneauth1/session.py
new/keystoneauth1-4.0.0/keystoneauth1/session.py
--- old/keystoneauth1-3.17.2/keystoneauth1/session.py 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/session.py 2020-04-02
16:32:45.000000000 +0200
@@ -330,6 +330,9 @@
:param rate_semaphore: Semaphore to be used to control concurrency
and rate limiting of requests. (optional,
defaults to no concurrency or rate control)
+ :param int connect_retries: the maximum number of retries that should
+ be attempted for connection errors.
+ (optional, defaults to 0 - never retry).
"""
user_agent = None
@@ -343,10 +346,18 @@
redirect=_DEFAULT_REDIRECT_LIMIT, additional_headers=None,
app_name=None, app_version=None, additional_user_agent=None,
discovery_cache=None, split_loggers=None,
- collect_timing=False, rate_semaphore=None):
+ collect_timing=False, rate_semaphore=None,
+ connect_retries=0):
self.auth = auth
self.session = _construct_session(session)
+ # NOTE(mwhahaha): keep a reference to the session object so we can
+ # clean it up when this object goes away. We don't want to close the
+ # session if it was passed into us as it may be reused externally.
+ # See LP#1838704
+ self._session = None
+ if not session:
+ self._session = self.session
self.original_ip = original_ip
self.verify = verify
self.cert = cert
@@ -364,6 +375,7 @@
# so we can distinguish between the value being set or not.
self._split_loggers = split_loggers
self._collect_timing = collect_timing
+ self._connect_retries = connect_retries
self._api_times = []
self._rate_semaphore = rate_semaphore or NoOpSemaphore()
@@ -375,6 +387,17 @@
self._json = _JSONEncoder()
+ def __del__(self):
+ """Clean up resources on delete."""
+ if self._session:
+ # If we created a requests.Session, try to close it out correctly
+ try:
+ self._session.close()
+ except Exception:
+ pass
+ finally:
+ self._session = None
+
@property
def adapters(self):
return self.session.adapters
@@ -603,7 +626,7 @@
user_agent=None, redirect=None, authenticated=None,
endpoint_filter=None, auth=None, requests_auth=None,
raise_exc=True, allow_reauth=True, log=True,
- endpoint_override=None, connect_retries=0, logger=None,
+ endpoint_override=None, connect_retries=None, logger=None,
allow=None, client_name=None, client_version=None,
microversion=None, microversion_service_type=None,
status_code_retries=0, retriable_status_codes=None,
@@ -636,7 +659,7 @@
for forever/never. (optional)
:param int connect_retries: the maximum number of retries that should
be attempted for connection errors.
- (optional, defaults to 0 - never retry).
+ (optional, defaults to None - never retry).
:param bool authenticated: True if a token should be attached to this
request, False if not or None for attach if
an auth_plugin is available.
@@ -730,6 +753,8 @@
else:
split_loggers = None
logger = logger or utils.get_logger(__name__)
+ if connect_retries is None:
+ connect_retries = self._connect_retries
# HTTP 503 - Service Unavailable
retriable_status_codes = retriable_status_codes or [503]
rate_semaphore = rate_semaphore or self._rate_semaphore
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/loading/test_conf.py
new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/loading/test_conf.py
--- old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/loading/test_conf.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/loading/test_conf.py
2020-04-02 16:32:45.000000000 +0200
@@ -113,9 +113,9 @@
self.assertEqual(auth_type, e.name)
def test_loading_with_no_data(self):
- l = loading.load_auth_from_conf_options(self.conf_fixture.conf,
- self.GROUP)
- self.assertIsNone(l)
+ lo = loading.load_auth_from_conf_options(self.conf_fixture.conf,
+ self.GROUP)
+ self.assertIsNone(lo)
@mock.patch('stevedore.DriverManager')
def test_other_params(self, m):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/loading/test_loading.py
new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/loading/test_loading.py
--- old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/loading/test_loading.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/loading/test_loading.py
2020-04-02 16:32:45.000000000 +0200
@@ -55,14 +55,14 @@
Plugin, Loader = utils.create_plugin(opts=opts)
- l = Loader()
+ lo = Loader()
v = uuid.uuid4().hex
- p1 = l.load_from_options(b=v)
+ p1 = lo.load_from_options(b=v)
self.assertEqual(v, p1['b'])
e = self.assertRaises(exceptions.MissingRequiredOptions,
- l.load_from_options,
+ lo.load_from_options,
a=v)
self.assertEqual(1, len(e.options))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_discovery.py
new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_discovery.py
--- old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_discovery.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_discovery.py
2020-04-02 16:32:45.000000000 +0200
@@ -1241,6 +1241,29 @@
[mock.call('sess', url, cache='cache', authenticated=False)
for url in ('url1', 'url2', 'url3')])
+ def test_run_discovery_auth(self):
+ url = 'https://example.com'
+ headers = {'Accept': 'application/json'}
+
+ session = mock.Mock()
+ session.get.side_effect = [
+ exceptions.Unauthorized('unauthorized'),
+ # Throw a different exception the second time so that we can
+ # catch it in the test and verify the retry.
+ exceptions.BadRequest('bad request'),
+ ]
+
+ try:
+ discover.get_version_data(session, url)
+ except exceptions.BadRequest:
+ pass
+ # Only one call with 'url'
+ self.assertEqual(2, session.get.call_count)
+ session.get.assert_has_calls([
+ mock.call(url, headers=headers, authenticated=None),
+ mock.call(url, headers=headers, authenticated=True),
+ ])
+
def test_endpoint_data_str(self):
"""Validate EndpointData.__str__."""
# Populate a few fields to make sure they come through.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_hacking_checks.py
new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_hacking_checks.py
--- old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_hacking_checks.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_hacking_checks.py
2020-04-02 16:32:45.000000000 +0200
@@ -13,7 +13,7 @@
import textwrap
import mock
-import pep8
+import pycodestyle
import testtools
from keystoneauth1.hacking import checks
@@ -22,16 +22,16 @@
class TestCheckOsloNamespaceImports(testtools.TestCase):
- # We are patching pep8 so that only the check under test is actually
+ # We are patching pycodestyle so that only the check under test is actually
# installed.
- @mock.patch('pep8._checks',
+ @mock.patch('pycodestyle._checks',
{'physical_line': {}, 'logical_line': {}, 'tree': {}})
def run_check(self, code):
- pep8.register_check(checks.check_oslo_namespace_imports)
+ pycodestyle.register_check(checks.check_oslo_namespace_imports)
lines = textwrap.dedent(code).strip().splitlines(True)
- checker = pep8.Checker(lines=lines)
+ checker = pycodestyle.Checker(lines=lines)
checker.check_all()
checker.report._deferred_print.sort()
return checker.report._deferred_print
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_session.py
new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_session.py
--- old/keystoneauth1-3.17.2/keystoneauth1/tests/unit/test_session.py
2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1/tests/unit/test_session.py
2020-04-02 16:32:45.000000000 +0200
@@ -421,24 +421,66 @@
self.assertIn('--cacert', self.logger.output)
self.assertIn(path_to_certs, self.logger.output)
- def test_connect_retries(self):
+ def _connect_retries_check(self, session, expected_retries=0,
+ call_args=None):
+ call_args = call_args or {}
+
self.stub_url('GET', exc=requests.exceptions.Timeout())
- session = client_session.Session()
- retries = 3
+ call_args['url'] = self.TEST_URL
with mock.patch('time.sleep') as m:
self.assertRaises(exceptions.ConnectTimeout,
session.get,
- self.TEST_URL, connect_retries=retries)
+ **call_args)
- self.assertEqual(retries, m.call_count)
+ self.assertEqual(expected_retries, m.call_count)
# 3 retries finishing with 2.0 means 0.5, 1.0 and 2.0
m.assert_called_with(2.0)
# we count retries so there will be one initial request + 3 retries
self.assertThat(self.requests_mock.request_history,
- matchers.HasLength(retries + 1))
+ matchers.HasLength(expected_retries + 1))
+
+ def test_session_connect_retries(self):
+ retries = 3
+ session = client_session.Session(connect_retries=retries)
+ self._connect_retries_check(session=session, expected_retries=retries)
+
+ def test_call_args_connect_retries_session_init(self):
+ session = client_session.Session()
+ retries = 3
+ call_args = {'connect_retries': retries}
+ self._connect_retries_check(session=session,
+ expected_retries=retries,
+ call_args=call_args)
+
+ def test_call_args_connect_retries_overrides_session_retries(self):
+ session_retries = 6
+ call_arg_retries = 3
+ call_args = {'connect_retries': call_arg_retries}
+ session = client_session.Session(connect_retries=session_retries)
+ self._connect_retries_check(session=session,
+ expected_retries=call_arg_retries,
+ call_args=call_args)
+
+ def test_override_session_connect_retries_for_request(self):
+ session_retries = 1
+ session = client_session.Session(connect_retries=session_retries)
+
+ self.stub_url('GET', exc=requests.exceptions.Timeout())
+ call_args = {'connect_retries': 0}
+
+ with mock.patch('time.sleep') as m:
+ self.assertRaises(
+ exceptions.ConnectTimeout,
+ session.request,
+ self.TEST_URL,
+ 'GET',
+ **call_args
+ )
+
+ self.assertEqual(0, m.call_count)
def test_connect_retries_interval_limit(self):
self.stub_url('GET', exc=requests.exceptions.Timeout())
@@ -930,6 +972,14 @@
self.assertRequestHeaderEqual('X-Auth-Token', None)
+ def test_object_delete(self):
+ auth = AuthPlugin()
+ sess = client_session.Session(auth=auth)
+ mock_close = mock.Mock()
+ sess._session.close = mock_close
+ del sess
+ mock_close.assert_called_once()
+
def test_service_type_urls(self):
service_type = 'compute'
interface = 'public'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/keystoneauth1.egg-info/PKG-INFO
new/keystoneauth1-4.0.0/keystoneauth1.egg-info/PKG-INFO
--- old/keystoneauth1-3.17.2/keystoneauth1.egg-info/PKG-INFO 2020-02-25
00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1.egg-info/PKG-INFO 2020-04-02
16:34:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: keystoneauth1
-Version: 3.17.2
+Version: 4.0.0
Summary: Authentication Library for OpenStack Identity
Home-page: https://docs.openstack.org/keystoneauth/latest/
Author: OpenStack
@@ -51,8 +51,6 @@
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1.egg-info/SOURCES.txt
new/keystoneauth1-4.0.0/keystoneauth1.egg-info/SOURCES.txt
--- old/keystoneauth1-3.17.2/keystoneauth1.egg-info/SOURCES.txt 2020-02-25
00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1.egg-info/SOURCES.txt 2020-04-02
16:34:05.000000000 +0200
@@ -23,7 +23,6 @@
doc/source/authentication-plugins.rst
doc/source/conf.py
doc/source/extras.rst
-doc/source/history.rst
doc/source/index.rst
doc/source/migrating.rst
doc/source/plugin-options.rst
@@ -220,9 +219,12 @@
releasenotes/notes/bug-1733052-1b4af3b3fe1b05bb.yaml
releasenotes/notes/bug-1766235wq-0de60d0f996c6bfb.yaml
releasenotes/notes/bug-1839748-5d8dfc99c43aaefc.yaml
+releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml
releasenotes/notes/cache-trailing-slash-3663c86cd9754379.yaml
+releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
releasenotes/notes/client-side-rate-limiting-dec43fc9b54f5b70.yaml
releasenotes/notes/collect-timing-85f007f0d86c8b26.yaml
+releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml
releasenotes/notes/expose-endpoint-status-6195a6b76d8a8de8.yaml
releasenotes/notes/filter-versions-service-type-763af68092344b7a.yaml
releasenotes/notes/fix-get-all-version-data-a01ee58524755b9b.yaml
@@ -236,6 +238,7 @@
releasenotes/notes/oslo-config-split-loggers-6bda266d657fe921.yaml
releasenotes/notes/retries-limit-dbaedcb3207934ae.yaml
releasenotes/notes/retries-options-99e4dbc240941557.yaml
+releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml
releasenotes/notes/retry-delay-68d0c0a1dffcf2fd.yaml
releasenotes/notes/serice-type-aliases-249454829c57f39a.yaml
releasenotes/notes/status-code-retries-75052a43efa4edb2.yaml
@@ -251,6 +254,7 @@
releasenotes/source/queens.rst
releasenotes/source/rocky.rst
releasenotes/source/stein.rst
+releasenotes/source/train.rst
releasenotes/source/unreleased.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/keystoneauth1.egg-info/pbr.json
new/keystoneauth1-4.0.0/keystoneauth1.egg-info/pbr.json
--- old/keystoneauth1-3.17.2/keystoneauth1.egg-info/pbr.json 2020-02-25
00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1.egg-info/pbr.json 2020-04-02
16:34:05.000000000 +0200
@@ -1 +1 @@
-{"git_version": "1d5f572", "is_release": true}
\ No newline at end of file
+{"git_version": "c096099", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/keystoneauth1.egg-info/requires.txt
new/keystoneauth1-4.0.0/keystoneauth1.egg-info/requires.txt
--- old/keystoneauth1-3.17.2/keystoneauth1.egg-info/requires.txt
2020-02-25 00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/keystoneauth1.egg-info/requires.txt 2020-04-02
16:34:05.000000000 +0200
@@ -20,7 +20,7 @@
lxml!=3.7.0,>=3.4.1
[test]
-hacking!=0.13.0,<0.14,>=0.12.0
+hacking<3.1.0,>=3.0
flake8-docstrings==0.2.1.post1
flake8-import-order>=0.17.1
bandit<1.6.0,>=1.1.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/lower-constraints.txt
new/keystoneauth1-4.0.0/lower-constraints.txt
--- old/keystoneauth1-3.17.2/lower-constraints.txt 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/lower-constraints.txt 2020-04-02
16:32:45.000000000 +0200
@@ -13,13 +13,9 @@
dulwich==0.19.0
extras==1.0.0
fixtures==3.0.0
-flake8-docstrings==0.2.1.post1
-flake8-import-order==0.17.1
-flake8==2.5.5
future==0.16.0
gitdb2==2.0.3
GitPython==2.1.8
-hacking==0.12.0
idna==2.6
imagesize==1.0.0
iso8601==0.1.11
@@ -46,10 +42,8 @@
Parsley==1.3
pbr==2.0.0
pep257==0.7.0
-pep8==1.5.7
prettytable==0.7.2
pycodestyle==2.3.1
-pyflakes==0.8.1
Pygments==2.2.0
pyparsing==2.2.0
pyperclip==1.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml
new/keystoneauth1-4.0.0/releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml
---
old/keystoneauth1-3.17.2/releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/keystoneauth1-4.0.0/releasenotes/notes/bug-1840235-ef2946d149ac329c.yaml
2020-04-02 16:32:45.000000000 +0200
@@ -0,0 +1,11 @@
+---
+features:
+ - |
+ [`feature bug 1840235
<https://bugs.launchpad.net/keystoneauth/+bug/1840235>`_]
+ Adds ``connect_retries`` to Session.__init__(), that can then be used
+ by projects when creating session objects, to set the required number of
+ retries for new connection requests. This would specifically help avoid
+ a scalability issue that results in number of ConnectTimeout errors when
+ doing endpoint discovery and fetching roles using an auth plugin under
+ heavy load. This still allows for it to be overridden per service with
+ the adapter interface.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
new/keystoneauth1-4.0.0/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
---
old/keystoneauth1-3.17.2/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/keystoneauth1-4.0.0/releasenotes/notes/cleanup-session-on-delete-1ed6177d4c5c1f83.yaml
2020-04-02 16:32:45.000000000 +0200
@@ -0,0 +1,9 @@
+---
+fixes:
+ - >
+ [`bug 1838704 <https://bugs.launchpad.net/keystone/+bug/1838704>`_]
+ When consuming keystoneauth1.session.Session, if a requests session is not
+ provided one is created. The Session used for requests may result in a
+ ResourceWarning being generated if it is not properly closed. The code
+ has been updated to close the session correctly when the Session object
+ is deleted.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml
new/keystoneauth1-4.0.0/releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml
---
old/keystoneauth1-3.17.2/releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/keystoneauth1-4.0.0/releasenotes/notes/drop-py-2-7-f90c67a5db0dfeb8.yaml
2020-04-02 16:32:45.000000000 +0200
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ Python 2.7 support has been dropped. Last release of keystoneauth
+ to support python 2.7 is OpenStack Train. The minimum version of Python now
+ supported is Python 3.6.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/keystoneauth1-3.17.2/releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml
new/keystoneauth1-4.0.0/releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml
---
old/keystoneauth1-3.17.2/releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/keystoneauth1-4.0.0/releasenotes/notes/retry-authenticated-discovery-19c4354ff983f507.yaml
2020-04-02 16:32:45.000000000 +0200
@@ -0,0 +1,14 @@
+---
+fixes:
+ - |
+ Retry version discovery with auth token when the initial request
+ throws 401 Unauthorized. There are some services that are erroneously
+ defaulting to authenticated discovery, and this allows discovery
+ to work properly on them.
+upgrade:
+ - |
+ If keystoneauth and openstacksdk are both in use and keystoneauth
+ is upgraded to this release **before** upgrading openstacksdk to
+ ``0.36.1`` or later, creation of ServerGroup objects with policies
+ and use of Ansible Inventory could be adversely affected. See
+ https://review.opendev.org/#/c/685999/ for more details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/releasenotes/source/index.rst
new/keystoneauth1-4.0.0/releasenotes/source/index.rst
--- old/keystoneauth1-3.17.2/releasenotes/source/index.rst 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/releasenotes/source/index.rst 2020-04-02
16:32:45.000000000 +0200
@@ -6,6 +6,7 @@
:maxdepth: 1
unreleased
+ train
stein
rocky
queens
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/releasenotes/source/train.rst
new/keystoneauth1-4.0.0/releasenotes/source/train.rst
--- old/keystoneauth1-3.17.2/releasenotes/source/train.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/keystoneauth1-4.0.0/releasenotes/source/train.rst 2020-04-02
16:32:45.000000000 +0200
@@ -0,0 +1,6 @@
+===================================
+ Train Series Release Notes
+===================================
+
+.. release-notes::
+ :branch: stable/train
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/requirements.txt
new/keystoneauth1-4.0.0/requirements.txt
--- old/keystoneauth1-3.17.2/requirements.txt 2020-02-25 00:10:15.000000000
+0100
+++ new/keystoneauth1-4.0.0/requirements.txt 2020-04-02 16:32:45.000000000
+0200
@@ -4,7 +4,7 @@
# All additions to this file must have significant justification.
-# NOTE(morgan) At no time may any olso library be added to the keystoneauth
+# NOTE(morgan) At no time may any oslo library be added to the keystoneauth
# requirements. The requirements for keystoneauth are very tightly controlled
# to ensure we are not pulling in a ton of transient dependencies. This is
# important from the standpoint of ensuring keystoneauth can be used outside
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/setup.cfg
new/keystoneauth1-4.0.0/setup.cfg
--- old/keystoneauth1-3.17.2/setup.cfg 2020-02-25 00:11:36.000000000 +0100
+++ new/keystoneauth1-4.0.0/setup.cfg 2020-04-02 16:34:05.000000000 +0200
@@ -13,8 +13,6 @@
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
- Programming Language :: Python :: 2
- Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
@@ -72,9 +70,6 @@
[upload_sphinx]
upload-dir = doc/build/html
-[wheel]
-universal = 1
-
[egg_info]
tag_build =
tag_date = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/test-requirements.txt
new/keystoneauth1-4.0.0/test-requirements.txt
--- old/keystoneauth1-3.17.2/test-requirements.txt 2020-02-25
00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/test-requirements.txt 2020-04-02
16:32:45.000000000 +0200
@@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
+hacking>=3.0,<3.1.0 # Apache-2.0
flake8-docstrings==0.2.1.post1 # MIT
flake8-import-order>=0.17.1 #LGPLv3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/keystoneauth1-3.17.2/tox.ini
new/keystoneauth1-4.0.0/tox.ini
--- old/keystoneauth1-3.17.2/tox.ini 2020-02-25 00:10:15.000000000 +0100
+++ new/keystoneauth1-4.0.0/tox.ini 2020-04-02 16:32:45.000000000 +0200
@@ -1,7 +1,8 @@
[tox]
-minversion = 2.5.0
+minversion = 3.1.1
skipsdist = True
-envlist = py27,py37,pep8,releasenotes
+envlist = py37,pep8,releasenotes
+ignore_basepython_conflict = True
[testenv]
usedevelop = True
@@ -9,15 +10,15 @@
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run {posargs}
whitelist_externals =
bash
+basepython = python3
[testenv:pep8]
-basepython = python3
commands =
flake8
# Run security linter
@@ -26,17 +27,14 @@
bandit -r keystoneauth1 -x tests -s B110,B410
[testenv:bandit]
-basepython = python3
# NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove.
commands = bandit -r keystoneauth1 -x tests -s B110,B410
[testenv:venv]
-basepython = python3
commands = {posargs}
[testenv:cover]
-basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage run --source keystoneauth1 --parallel-mode
@@ -47,7 +45,6 @@
coverage xml -o cover/coverage.xml
[testenv:debug]
-basepython = python3
commands = oslo_debug_helper -t keystoneauth1/tests {posargs}
[flake8]
@@ -57,7 +54,9 @@
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D203: 1 blank line required before class docstring (deprecated in pep257)
-ignore = D100,D101,D102,D103,D104,D203
+# W503 line break before binary operator
+# W504 line break after binary operator
+ignore = D100,D101,D102,D103,D104,D203,W503,W504
# H106: Don’t put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
enable-extensions=H106,H203
@@ -67,27 +66,37 @@
application-import-names = keystoneauth1
[testenv:docs]
-basepython = python3
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands =
bash -c "rm -rf doc/build"
bash -c "rm -rf doc/source/api"
- python setup.py build_sphinx
+ sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
+
+[testenv:pdf-docs]
+envdir = {toxworkdir}/docs
+deps = {[testenv:docs]deps}
+whitelist_externals =
+ make
+ rm
+commands =
+ rm -rf doc/build/pdf
+ sphinx-build -W -b latex doc/source doc/build/pdf
+ make -C doc/build/pdf
[testenv:releasenotes]
-basepython = python3
deps =
-
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
+
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html
releasenotes/source releasenotes/build/html
-[hacking]
-local-check-factory = keystoneauth1.hacking.checks.factory
+[flake8:local-plugins]
+extension =
+ K333 = checks:check_oslo_namespace_imports
+paths = ./keystoneauth1/hacking
[testenv:lower-constraints]
-basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt