summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitreview2
-rw-r--r--.zuul.yaml17
-rw-r--r--README.rst4
-rw-r--r--ceilometermiddleware/swift.py13
-rw-r--r--doc/source/conf.py8
-rw-r--r--releasenotes/notes/drop-py-2-7-21178ddd27b28806.yaml6
-rw-r--r--releasenotes/source/index.rst2
-rw-r--r--releasenotes/source/stein.rst6
-rw-r--r--releasenotes/source/train.rst6
-rw-r--r--setup.cfg5
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini4
12 files changed, 61 insertions, 16 deletions
diff --git a/.gitreview b/.gitreview
index cd1c5d3..db9b041 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,4 +1,4 @@
[gerrit]
-host=review.openstack.org
+host=review.opendev.org
port=29418
project=openstack/ceilometermiddleware.git
diff --git a/.zuul.yaml b/.zuul.yaml
index 84521b0..e78a520 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -1,8 +1,17 @@
+- job:
+ name: ceilometermiddleware-integration
+ parent: telemetry-dsvm-integration
+ required-projects:
+ - openstack/ceilometermiddleware
+
- project:
templates:
- - openstack-python-jobs
- - openstack-python35-jobs
- - openstack-python36-jobs
+ - openstack-python3-ussuri-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
- - lib-forward-testing-plugin
+ check:
+ jobs:
+ - ceilometermiddleware-integration
+ gate:
+ jobs:
+ - ceilometermiddleware-integration
diff --git a/README.rst b/README.rst
index 10b0413..9722522 100644
--- a/README.rst
+++ b/README.rst
@@ -9,9 +9,9 @@ For information on contributing, see ``CONTRIBUTING.rst``.
* License: Apache License, Version 2.0
* Documentation: https://docs.openstack.org/ceilometermiddleware/latest/
-* Source: http://git.openstack.org/cgit/openstack/ceilometermiddleware
+* Source: http://opendev.org/openstack/ceilometermiddleware
* Bugs: http://bugs.launchpad.net/ceilometermiddleware
For any other information, refer to the parent project, Ceilometer:
- https://github.com/openstack/ceilometer
+ https://opendev.org/openstack/ceilometer
diff --git a/ceilometermiddleware/swift.py b/ceilometermiddleware/swift.py
index 0d19546..a44f45e 100644
--- a/ceilometermiddleware/swift.py
+++ b/ceilometermiddleware/swift.py
@@ -131,6 +131,11 @@ class InputProxy(object):
self.bytes_received += len(line)
return line
+ def close(self):
+ close_method = getattr(self.wsgi_input, 'close', None)
+ if callable(close_method):
+ close_method()
+
class KeystoneClientLoader(ksa_adapter.Adapter):
"""Keystone client adapter loader.
@@ -267,8 +272,14 @@ class Swift(object):
while chunk:
bytes_sent += len(chunk)
yield chunk
- chunk = next(iterator)
+ try:
+ chunk = next(iterator)
+ except StopIteration:
+ chunk = ''
finally:
+ close_method = getattr(iterable, 'close', None)
+ if callable(close_method):
+ close_method()
self.emit_event(env, input_proxy.bytes_received, bytes_sent)
try:
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 989b422..582c805 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [
'sphinx.ext.autodoc',
#'sphinx.ext.intersphinx',
- 'oslosphinx'
+ 'openstackdocstheme'
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
@@ -58,6 +58,8 @@ pygments_style = 'sphinx'
# html_theme = '_theme'
# html_static_path = ['static']
+html_theme = 'openstackdocs'
+
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
@@ -73,3 +75,7 @@ latex_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}
+
+# openstackdocstheme options
+repository_name = 'openstack/ceilometermiddleware'
+bug_project = 'http://bugs.launchpad.net/ceilometermiddleware'
diff --git a/releasenotes/notes/drop-py-2-7-21178ddd27b28806.yaml b/releasenotes/notes/drop-py-2-7-21178ddd27b28806.yaml
new file mode 100644
index 0000000..94753f1
--- /dev/null
+++ b/releasenotes/notes/drop-py-2-7-21178ddd27b28806.yaml
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ Python 2.7 support has been dropped. Last release of ceilometermiddleware
+ to support python 2.7 is OpenStack Train. The minimum version of Python now
+ supported by ceilometermiddleware is Python 3.6.
diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst
index 0483a74..4a15535 100644
--- a/releasenotes/source/index.rst
+++ b/releasenotes/source/index.rst
@@ -6,6 +6,8 @@
:maxdepth: 1
unreleased
+ train
+ stein
queens
pike
ocata
diff --git a/releasenotes/source/stein.rst b/releasenotes/source/stein.rst
new file mode 100644
index 0000000..efaceb6
--- /dev/null
+++ b/releasenotes/source/stein.rst
@@ -0,0 +1,6 @@
+===================================
+ Stein Series Release Notes
+===================================
+
+.. release-notes::
+ :branch: stable/stein
diff --git a/releasenotes/source/train.rst b/releasenotes/source/train.rst
new file mode 100644
index 0000000..5839003
--- /dev/null
+++ b/releasenotes/source/train.rst
@@ -0,0 +1,6 @@
+==========================
+Train Series Release Notes
+==========================
+
+.. release-notes::
+ :branch: stable/train
diff --git a/setup.cfg b/setup.cfg
index 4b9a114..98eb69a 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -13,10 +13,9 @@ classifier =
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.5
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
[files]
packages =
diff --git a/test-requirements.txt b/test-requirements.txt
index 7ea25fd..6c4ccb0 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,8 +4,8 @@
coverage>=3.6 # Apache-2.0
python-subunit>=0.0.18 # Apache-2.0/BSD
-sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
-oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
+sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD
+sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD
openstackdocstheme>=1.17.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index af3564d..13819d0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 1.8
-envlist = py35,py27,pypy,pep8,releasenotes
+envlist = py37,pypy,pep8,releasenotes
skipsdist = True
[testenv]
@@ -34,7 +34,7 @@ commands =
[testenv:docs]
basepython = python3
-commands = python setup.py build_sphinx
+commands = sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:debug]
basepython = python3