Hello community,

here is the log from the commit of package python-pbr for openSUSE:Factory 
checked in at 2018-09-26 14:53:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pbr (Old)
 and      /work/SRC/openSUSE:Factory/.python-pbr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pbr"

Wed Sep 26 14:53:06 2018 rev:39 rq:635822 version:4.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pbr/python-pbr.changes    2018-08-31 
09:51:27.621534691 +0200
+++ /work/SRC/openSUSE:Factory/.python-pbr.new/python-pbr.changes       
2018-09-26 14:53:07.839133908 +0200
@@ -1,0 +2,16 @@
+Fri Sep 14 21:18:14 UTC 2018 - dmuel...@suse.com
+
+- add 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch 
+
+-------------------------------------------------------------------
+Tue Sep  4 08:47:32 UTC 2018 - dmuel...@suse.com
+
+- update to 4.2.0:
+  * Deprecate 'test' integration
+  * Deprecate 'build\_sphinx' integration
+  * Add Sphinx extension
+  * doc: Add documentation for missing '[pbr]' options
+  * doc: Fix formatting of packagers guide
+  * Switch to stestr
+
+-------------------------------------------------------------------

Old:
----
  pbr-4.1.1.tar.gz

New:
----
  0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
  pbr-4.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pbr.spec ++++++
--- /var/tmp/diff_new_pack.s41qdJ/_old  2018-09-26 14:53:08.719132558 +0200
+++ /var/tmp/diff_new_pack.s41qdJ/_new  2018-09-26 14:53:08.723132552 +0200
@@ -28,13 +28,14 @@
 %else
 Name:           python-pbr-%{flavor}
 %endif
-Version:        4.1.1
+Version:        4.2.0
 Release:        0
 Summary:        Python Build Reasonableness
 License:        Apache-2.0
 Group:          Development/Languages/Python
 URL:            http://pypi.python.org/pypi/pbr
 Source:         
https://files.pythonhosted.org/packages/source/p/pbr/pbr-%{version}.tar.gz
+Patch0:         0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -49,7 +50,7 @@
 BuildRequires:  %{python_module fixtures >= 3.0.0}
 BuildRequires:  %{python_module mock >= 2.0}
 BuildRequires:  %{python_module six >= 1.9.0}
-BuildRequires:  %{python_module testrepository >= 0.0.18}
+BuildRequires:  %{python_module stestr}
 BuildRequires:  %{python_module testresources >= 2.0.0}
 BuildRequires:  %{python_module testscenarios >= 0.4}
 BuildRequires:  %{python_module testtools >= 2.2.0}
@@ -69,6 +70,7 @@
 
 %prep
 %setup -q -n pbr-%{version}
+%patch0 -p1
 # Get rid of ugly build-time deps that require network:
 sed -i "s/, 'sphinx\.ext\.intersphinx'//" doc/source/conf.py
 
@@ -90,10 +92,7 @@
 
 %if %{with test}
 %check
-%{python_expand rm -rf .testrepository
-$python %{_bindir}/testr init
-$python %{_bindir}/testr run --parallel
-}
+%python_exec -m stestr.cli run
 %endif
 
 %if !%{with test}

++++++ 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch ++++++
>From a4f27ca3972f88e1f494a95ac74fb0c582dd59dd Mon Sep 17 00:00:00 2001
From: Dirk Mueller <d...@dmllr.de>
Date: Fri, 14 Sep 2018 23:14:47 +0200
Subject: [PATCH] Skip test for testr hook being installed when testr is not
 available

pbr only depends on testrepository in the test requirements, so
packaging efforts can decide to skip the dependency if they want to.
As stestr is going to replace testrepository going forward, it makes
sense to make dependencies to testrepository optional.

Skip the test that requires testrepository in that scenario.

Change-Id: I28c30411a5a6fdb071ebcc35e65ce1f4f1242498
---
 pbr/tests/test_hooks.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pbr/tests/test_hooks.py b/pbr/tests/test_hooks.py
index 0fcf96c..3f74790 100644
--- a/pbr/tests/test_hooks.py
+++ b/pbr/tests/test_hooks.py
@@ -41,7 +41,9 @@
 import os
 
 from testtools import matchers
+from testtools import skipUnless
 
+from pbr import testr_command
 from pbr.tests import base
 from pbr.tests import util
 
@@ -66,6 +68,7 @@ class TestHooks(base.BaseTestCase):
         assert 'test_hook_1\ntest_hook_2' in stdout
         assert return_code == 0
 
+    @skipUnless(testr_command.have_testr, "testrepository not available")
     def test_custom_commands_known(self):
         stdout, _, return_code = self.run_setup('--help-commands')
         self.assertFalse(return_code)
-- 
2.18.0

++++++ pbr-4.1.1.tar.gz -> pbr-4.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/.stestr.conf new/pbr-4.2.0/.stestr.conf
--- old/pbr-4.1.1/.stestr.conf  1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-4.2.0/.stestr.conf  2018-07-24 00:21:00.000000000 +0200
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=./pbr/tests
+top_dir=./
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/.testr.conf new/pbr-4.2.0/.testr.conf
--- old/pbr-4.1.1/.testr.conf   2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/.testr.conf   1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-[DEFAULT]
-test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} ${PYTHON:-python} -m subunit.run 
discover -t ./ . $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/ChangeLog new/pbr-4.2.0/ChangeLog
--- old/pbr-4.1.1/ChangeLog     2018-07-20 03:15:38.000000000 +0200
+++ new/pbr-4.2.0/ChangeLog     2018-07-24 00:25:13.000000000 +0200
@@ -1,6 +1,16 @@
 CHANGES
 =======
 
+4.2.0
+-----
+
+* Deprecate 'test' integration
+* Deprecate 'build\_sphinx' integration
+* Add Sphinx extension
+* doc: Add documentation for missing '[pbr]' options
+* doc: Fix formatting of packagers guide
+* Switch to stestr
+
 4.1.1
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/PKG-INFO new/pbr-4.2.0/PKG-INFO
--- old/pbr-4.1.1/PKG-INFO      2018-07-20 03:15:40.000000000 +0200
+++ new/pbr-4.2.0/PKG-INFO      2018-07-24 00:25:14.000000000 +0200
@@ -1,13 +1,13 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 4.1.1
+Version: 4.2.0
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
 Author-email: openstack-...@lists.openstack.org
 License: UNKNOWN
-Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
 Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
+Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
 Project-URL: Documentation, https://docs.openstack.org/pbr/
 Description: Introduction
         ============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/RELEASENOTES.rst 
new/pbr-4.2.0/RELEASENOTES.rst
--- old/pbr-4.1.1/RELEASENOTES.rst      2018-07-20 03:15:40.000000000 +0200
+++ new/pbr-4.2.0/RELEASENOTES.rst      1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-===
-pbr
-===
-
-.. _pbr_4.0.0:
-
-4.0.0
-=====
-
-.. _pbr_4.0.0_New Features:
-
-New Features
-------------
-
-.. releasenotes/notes/v_version-457b38c8679c5868.yaml @ 
b'4c775e7890e90fc2ea77c66020659e52d6a61414'
-
-- Support version parsing of git tag with the ``v<semver>`` pattern
-  (or ``V<semver>``), in addition to ``<semver>``.
-
-
-.. _pbr_4.0.0_Upgrade Notes:
-
-Upgrade Notes
--------------
-
-.. releasenotes/notes/remove-command-hooks-907d9c2325f306ca.yaml @ 
b'32c90ba598d7740e52bf21bc5e920fb5df08645a'
-
-- Support for entry point command hooks has been removed. This feature was
-  poorly tested, poorly documented, and broken in some environments.
-  Support for global hooks is not affected.
-
-
-.. _pbr_4.0.0_Deprecation Notes:
-
-Deprecation Notes
------------------
-
-.. releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml @ 
b'9be181e8e60cc41f3ad685e236b0c4cdc29dbd3c'
-
-- Support for ``pyN``-suffixed requirement files has been deprecated:
-  environment markers should be used instead.
-
-.. releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml @ 
b'113685e1b94df9dd2945adbdda757a545b09598c'
-
-- *testr* and *nose* integration has been deprecated. This feature allowed
-  *pbr* to dynamically configure the test runner used when running
-  ``setup.py test``. However, this target has fallen out of favour in both
-  the OpenStack and broader Python ecosystem, and both *testr* and *nose*
-  offer native setuptools commands that can be manually aliased to ``test``
-  on a per-project basis, if necessary. This feature will be removed in a
-  future release.
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/doc/requirements.txt 
new/pbr-4.2.0/doc/requirements.txt
--- old/pbr-4.1.1/doc/requirements.txt  1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-4.2.0/doc/requirements.txt  2018-07-24 00:21:00.000000000 +0200
@@ -0,0 +1,3 @@
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+openstackdocstheme>=1.18.1 # Apache-2.0
+reno>=2.5.0 # Apache-2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/doc/source/user/features.rst 
new/pbr-4.2.0/doc/source/user/features.rst
--- old/pbr-4.1.1/doc/source/user/features.rst  2018-07-20 03:12:35.000000000 
+0200
+++ new/pbr-4.2.0/doc/source/user/features.rst  2018-07-24 00:21:00.000000000 
+0200
@@ -256,6 +256,8 @@
 Setup Commands
 --------------
 
+.. _build_sphinx:
+
 ``build_sphinx``
 ~~~~~~~~~~~~~~~~
 
@@ -265,6 +267,15 @@
     *pbr*-provided package metadata and automatically generate API
     documentation.
 
+.. deprecated:: 4.2
+
+   This feature has been superseded by the `sphinxcontrib-apidoc`__ (for
+   generation of API documentation) and :ref:`pbr.sphinxext` (for configuration
+   of versioning via package metadata) extensions. It will be removed in a
+   future release.
+
+   __ https://pypi.org/project/sphinxcontrib-apidoc/
+
 Sphinx can produce auto documentation indexes based on signatures and
 docstrings of your project but you have to give it index files to tell it to
 *autodoc* each module: that's kind of repetitive and boring. *pbr* will scan
@@ -310,3 +321,29 @@
 __ https://testrepository.readthedocs.io/en/latest/
 __ https://nose.readthedocs.io/en/latest/
 __ 
https://setuptools.readthedocs.io/en/latest/setuptools.html#test-build-package-and-run-a-unittest-suite
+
+.. _pbr.sphinxext:
+
+Sphinx Extension
+----------------
+
+.. admonition:: Summary
+
+    *pbr* provides a Sphinx extension to allow you to use *pbr* version
+    metadata in your Sphinx documentation.
+
+.. versionadded:: 4.2
+
+*pbr* provides a Sphinx extension which can be used to configure version
+numbers for documentation. The package does not need to be installed for this
+to function.
+
+.. note::
+
+    The ``openstackdocstheme`` Sphinx theme provides similar functionality.
+    This should be preferred for official OpenStack projects. Refer to the
+    `documentation`__ for more information.
+
+    __ https://docs.openstack.org/openstackdocstheme/
+
+For more information on the extension, refer to :doc:`/user/using`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/doc/source/user/packagers.rst 
new/pbr-4.2.0/doc/source/user/packagers.rst
--- old/pbr-4.1.1/doc/source/user/packagers.rst 2018-07-20 03:12:35.000000000 
+0200
+++ new/pbr-4.2.0/doc/source/user/packagers.rst 2018-07-24 00:21:00.000000000 
+0200
@@ -2,21 +2,21 @@
  Notes for Package maintainers
 ===============================
 
-If you are maintaining packages of software that uses `pbr`, there are some
+If you are maintaining packages of software that uses *pbr*, there are some
 features you probably want to be aware of that can make your life easier.
 They are exposed by environment variables, so adding them to rules or spec
 files should be fairly easy.
 
 Versioning
-==========
+----------
 
-`pbr`, when run in a git repo, derives the version of a package from the
+*pbr*, when run in a git repo, derives the version of a package from the
 git tags. When run in a tarball with a proper egg-info dir, it will happily
 pull the version from that. So for the most part, the package maintainers
 shouldn't need to care. However, if you are doing something like keeping a
 git repo with the sources and the packaging intermixed and it's causing pbr
 to get confused about whether its in its own git repo or not, you can set
-`PBR_VERSION`:
+``PBR_VERSION``:
 
 ::
 
@@ -26,73 +26,80 @@
 version will be considered absolute.
 
 Distribution version numbers
-============================
+----------------------------
 
-`pbr` will automatically calculate upstream version numbers for dpkg and rpm
-using systems. Releases are easy (and obvious). When packaging preleases though
-things get more complex. Firstly, semver does not provide for any sort order
-between pre-releases and development snapshots, so it can be complex (perhaps
-intractable) to package both into one repository - we recommend with either
-packaging pre-release releases (alpha/beta/rc's) or dev snapshots but not both.
-Secondly, as pre-releases and snapshots have the same major/minor/patch version
-as the version they lead up to, but have to sort before it, we cannot map their
-version naturally into the rpm version namespace: instead we represent their
-versions as versions of the release before.
+*pbr* will automatically calculate upstream version numbers for *dpkg* and
+*rpm* using systems. Releases are easy (and obvious). When packaging
+pre-releases though things get more complex. Firstly, semver does not provide
+for any sort order between pre-releases and development snapshots, so it can be
+complex (perhaps intractable) to package both into one repository - we
+recommend with either packaging pre-release releases (alpha/beta/rc's) or dev
+snapshots but not both.  Secondly, as pre-releases and snapshots have the same
+major/minor/patch version as the version they lead up to, but have to sort
+before it, we cannot map their version naturally into the rpm version
+namespace: instead we represent their versions as versions of the release
+before.
 
 Dependencies
-============
+------------
 
-As of 1.0.0 `pbr` doesn't alter the dependency behaviour of `setuptools`.
+As of 1.0.0 *pbr* doesn't alter the dependency behaviour of *setuptools*.
 
-Older versions would invoke `pip` internally under some circumstances and
-required the environment variable `SKIP_PIP_INSTALL` to be set to prevent
+Older versions would invoke *pip* internally under some circumstances and
+required the environment variable ``SKIP_PIP_INSTALL`` to be set to prevent
 that. Since 1.0.0 we now document that dependencies should be installed before
-installing a `pbr` using package. We don't support easy install, but neither
+installing a *pbr* using package. We don't support easy install, but neither
 do we interfere with it today. If you observe easy install being triggered when
 building a binary package, then you've probably missed one or more package
 requirements.
 
-Note: we reserve the right to disable easy install via `pbr` in future, since
-we don't want to debug or support the interactions that can occur when using
-it.
+.. important::
+
+   We reserve the right to disable easy install via *pbr* in future, since we
+   don't want to debug or support the interactions that can occur when using
+   it.
+
+.. _packaging-tarballs:
 
 Tarballs
-========
+--------
 
-`pbr` includes everything in a source tarball that is in the original `git`
+*pbr* includes everything in a source tarball that is in the original *git*
 repository. This can again cause havoc if a package maintainer is doing fancy
-things with combined `git` repos, and is generating a source tarball using
-`python setup.py sdist` from that repo. If that is the workflow the packager
-is using, setting `SKIP_GIT_SDIST`:
+things with combined *git* repos, and is generating a source tarball using
+``python setup.py sdist`` from that repo. If that is the workflow the packager
+is using, setting ``SKIP_GIT_SDIST``:
 
 ::
 
   export SKIP_GIT_SDIST=1
 
 will cause all logic around using git to find the files that should be in the
-source tarball to be skipped. Beware though, that because `pbr` packages
+source tarball to be skipped. Beware though, that because *pbr* packages
 automatically find all of the files, most of them do not have a complete
-`MANIFEST.in` file, so its possible that a tarball produced in that way will
+``MANIFEST.in`` file, so its possible that a tarball produced in that way will
 be missing files.
 
+.. _packaging-authors-changelog:
+
 AUTHORS and ChangeLog
-=====================
+---------------------
 
-`pbr` generates AUTHORS and ChangeLog files from git information. This
-can cause problem in distro packaging if package maintainer is using git
+*pbr* generates ``AUTHORS`` and ``ChangeLog`` files from *git* information.
+This can cause problem in distro packaging if package maintainer is using *git*
 repository for packaging source. If that is the case setting
-`SKIP_GENERATE_AUTHORS`
+``SKIP_GENERATE_AUTHORS``
 
 ::
 
    export SKIP_GENERATE_AUTHORS=1
 
-will cause logic around generating AUTHORS using git information to be
-skipped. Similarly setting `SKIP_WRITE_GIT_CHANGELOG`
+will cause logic around generating ``AUTHORS`` using *git* information to be
+skipped. Similarly setting ``SKIP_WRITE_GIT_CHANGELOG``
 
 ::
 
    export SKIP_WRITE_GIT_CHANGELOG=1
 
-will cause logic around generating ChangeLog file using git
+will cause logic around generating ``ChangeLog`` file using *git*
 information to be skipped.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/doc/source/user/using.rst 
new/pbr-4.2.0/doc/source/user/using.rst
--- old/pbr-4.1.1/doc/source/user/using.rst     2018-07-20 03:12:35.000000000 
+0200
+++ new/pbr-4.2.0/doc/source/user/using.rst     2018-07-24 00:21:00.000000000 
+0200
@@ -209,39 +209,80 @@
 
 The ``pbr`` section controls *pbr*-specific options and behaviours.
 
-``autodoc_tree_index_modules``
+``skip_git_sdist``
+  If enabled, *pbr* will not generate a manifest file from *git* commits. If
+  this is enabled, you may need to define your own `manifest template`__.
+
+  This can also be configured using the ``SKIP_GIT_SDIST`` environment
+  variable, as described :ref:`here <packaging-tarballs>`.
+
+  __ https://packaging.python.org/tutorials/distributing-packages/#manifest-in
+
+``skip_changelog``
+  If enabled, *pbr* will not generated a ``ChangeLog`` file from *git* commits.
 
+  This can also be configured using the ``SKIP_WRITE_GIT_CHANGELOG``
+  environment variable, as described :ref:`here <packaging-authors-changelog>`
+
+``skip_authors``
+  If enabled, *pbr* will not generate an ``AUTHORS`` file from *git* commits.
+
+  This can also be configured using the ``SKIP_GENERATE_AUTHORS`` environment
+  variable, as described :ref:`here <packaging-authors-changelog>`
+
+``autodoc_tree_index_modules``
   A boolean option controlling whether *pbr* should generate an index of
   modules using ``sphinx-apidoc``. By default, all files except ``setup.py``
   are included, but this can be overridden using the ``autodoc_tree_excludes``
   option.
 
-``autodoc_tree_excludes``
+  .. deprecated:: 4.2
+
+      This feature has been replaced by the `sphinxcontrib-apidoc`_ extension.
+      Refer to the :ref:`build_sphinx` overview for more information.
 
+``autodoc_tree_excludes``
   A list of modules to exclude when building documentation using
   ``sphinx-apidoc``. Defaults to ``[setup.py]``. Refer to the
   `sphinx-apidoc man page`__ for more information.
 
-__ http://sphinx-doc.org/man/sphinx-apidoc.html
+  __ http://sphinx-doc.org/man/sphinx-apidoc.html
 
-``autodoc_index_modules``
+  .. deprecated:: 4.2
 
+      This feature has been replaced by the `sphinxcontrib-apidoc`_ extension.
+      Refer to the :ref:`build_sphinx` overview for more information.
+
+``autodoc_index_modules``
   A boolean option controlling whether *pbr* should itself generates
   documentation for Python modules of the project. By default, all found Python
   modules are included; some of them can be excluded by listing them in
   ``autodoc_exclude_modules``.
 
-``autodoc_exclude_modules``
+  .. deprecated:: 4.2
 
+      This feature has been replaced by the `sphinxcontrib-apidoc`_ extension.
+      Refer to the :ref:`build_sphinx` overview for more information.
+
+``autodoc_exclude_modules``
   A list of modules to exclude when building module documentation using *pbr*.
   *fnmatch* style pattern (e.g. ``myapp.tests.*``) can be used.
 
-``api_doc_dir``
+  .. deprecated:: 4.2
+
+      This feature has been replaced by the `sphinxcontrib-apidoc`_ extension.
+      Refer to the :ref:`build_sphinx` overview for more information.
 
+``api_doc_dir``
   A subdirectory inside the ``build_sphinx.source_dir`` where auto-generated
   API documentation should be written, if ``autodoc_index_modules`` is set to
   True. Defaults to ``"api"``.
 
+  .. deprecated:: 4.2
+
+      This feature has been replaced by the `sphinxcontrib-apidoc`_ extension.
+      Refer to the :ref:`build_sphinx` overview for more information.
+
 .. note::
 
    When using ``autodoc_tree_excludes`` or ``autodoc_index_modules`` you may
@@ -252,7 +293,13 @@
    set. See the `Sphinx build configuration file`__ documentation for more
    information on configuring Sphinx.
 
-__ http://sphinx-doc.org/config.html
+   __ http://sphinx-doc.org/config.html
+
+.. versionchanged:: 4.2
+
+   The ``autodoc_tree_index_modules``, ``autodoc_tree_excludes``,
+   ``autodoc_index_modules``, ``autodoc_exclude_modules`` and ``api_doc_dir``
+   settings are all deprecated.
 
 .. versionchanged:: 2.0
 
@@ -277,6 +324,13 @@
    page output. This is no longer the case, and you should explicitly set
    ``builders`` to ``html man`` if you wish to retain this behavior.
 
+.. deprecated:: 4.2
+
+   This feature has been superseded by the `sphinxcontrib-apidoc`_ (for
+   generation of API documentation) and :ref:`pbr.sphinxext` (for configuration
+   of versioning via package metadata) extensions. It will be removed in a
+   future release.
+
 The ``build_sphinx`` section is a version of the ``build_sphinx`` *setuptools*
 plugin provided with Sphinx. This plugin extends the original plugin to add the
 following:
@@ -414,4 +468,24 @@
 a coverage report.  ``--coverage-package-name`` can be used to modify or narrow
 the packages traced.
 
+
+Sphinx ``conf.py``
+------------------
+
+As described in :doc:`/user/features`, *pbr* provides a Sphinx extension to
+automatically configure the version numbers for your documentation using *pbr*
+metadata.
+
+To enable this extension, you must add it to the list of extensions in
+your ``conf.py`` file::
+
+    extensions = [
+        'pbr.sphinxext',
+        # ... other extensions
+    ]
+
+You should also unset/remove the ``version`` and ``release`` attributes from
+this file.
+
 .. _setuptools: http://www.sphinx-doc.org/en/stable/setuptools.html
+.. _sphinxcontrib-apidoc: https://pypi.org/project/sphinxcontrib-apidoc/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/lower-constraints.txt 
new/pbr-4.2.0/lower-constraints.txt
--- old/pbr-4.1.1/lower-constraints.txt 2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/lower-constraints.txt 2018-07-24 00:21:00.000000000 +0200
@@ -1,6 +1,5 @@
 alabaster==0.7.10
 Babel==2.3.4
-coverage==4.0
 docutils==0.11
 dulwich==0.15.0
 extras==1.0.0
@@ -27,6 +26,7 @@
 snowballstemmer==1.2.1
 Sphinx==1.6.5
 sphinxcontrib-websupport==1.0.1
+stestr==2.0.0
 testrepository==0.0.18
 testresources==2.0.0
 testscenarios==0.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/pbr/builddoc.py 
new/pbr-4.2.0/pbr/builddoc.py
--- old/pbr-4.1.1/pbr/builddoc.py       2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/pbr/builddoc.py       2018-07-24 00:21:00.000000000 +0200
@@ -57,6 +57,9 @@
 from pbr import version
 
 
+_deprecated_options = ['autodoc_tree_index_modules', 'autodoc_index_modules',
+                       'autodoc_tree_excludes', 'autodoc_exclude_modules']
+_deprecated_envs = ['AUTODOC_TREE_INDEX_MODULES', 'AUTODOC_INDEX_MODULES']
 _rst_template = """%(heading)s
 %(underline)s
 
@@ -181,6 +184,23 @@
 
     def run(self):
         option_dict = self.distribution.get_option_dict('pbr')
+
+        # TODO(stephenfin): Remove this (and the entire file) when 5.0 is
+        # released
+        warn_opts = set(option_dict.keys()).intersection(_deprecated_options)
+        warn_env = list(filter(lambda x: os.getenv(x), _deprecated_envs))
+        if warn_opts or warn_env:
+            msg = ('The autodoc and autodoc_tree features are deprecated in '
+                   '4.2 and will be removed in a future release. You should '
+                   'use the sphinxcontrib-apidoc Sphinx extension instead. '
+                   'Refer to the pbr documentation for more information.')
+            if warn_opts:
+                msg += ' Deprecated options: %s' % list(warn_opts)
+            if warn_env:
+                msg += ' Deprecated environment variables: %s' % warn_env
+
+            log.warn(msg)
+
         if git._git_is_installed():
             git.write_git_changelog(option_dict=option_dict)
             git.generate_authors(option_dict=option_dict)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/pbr/packaging.py 
new/pbr-4.2.0/pbr/packaging.py
--- old/pbr-4.1.1/pbr/packaging.py      2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/pbr/packaging.py      2018-07-24 00:21:00.000000000 +0200
@@ -217,8 +217,14 @@
     """Make setup.py test do the right thing."""
 
     command_name = 'test'
+    description = 'DEPRECATED: Run unit tests using testr'
 
     def run(self):
+        warnings.warn('testr integration is deprecated in pbr 4.2 and will '
+                      'be removed in a future release. Please call your test '
+                      'runner directly',
+                      DeprecationWarning)
+
         # Can't use super - base class old-style class
         testr_command.Testr.run(self)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/pbr/sphinxext.py 
new/pbr-4.2.0/pbr/sphinxext.py
--- old/pbr-4.1.1/pbr/sphinxext.py      1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-4.2.0/pbr/sphinxext.py      2018-07-24 00:21:00.000000000 +0200
@@ -0,0 +1,99 @@
+# Copyright 2018 Red Hat, Inc.
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+import os.path
+
+from six.moves import configparser
+from sphinx.util import logging
+
+import pbr.version
+
+_project = None
+logger = logging.getLogger(__name__)
+
+
+def _find_setup_cfg(srcdir):
+    """Find the 'setup.cfg' file, if it exists.
+
+    This assumes we're using 'doc/source' for documentation, but also allows
+    for single level 'doc' paths.
+    """
+    # TODO(stephenfin): Are we sure that this will always exist, e.g. for
+    # an sdist or wheel? Perhaps we should check for 'PKG-INFO' or
+    # 'METADATA' files, a la 'pbr.packaging._get_version_from_pkg_metadata'
+    for path in [
+            os.path.join(srcdir, os.pardir, 'setup.cfg'),
+            os.path.join(srcdir, os.pardir, os.pardir, 'setup.cfg')]:
+        if os.path.exists(path):
+            return path
+
+    return None
+
+
+def _get_project_name(srcdir):
+    """Return string name of project name, or None.
+
+    This extracts metadata from 'setup.cfg'. We don't rely on
+    distutils/setuptools as we don't want to actually install the package
+    simply to build docs.
+    """
+    global _project
+
+    if _project is None:
+        parser = configparser.ConfigParser()
+
+        path = _find_setup_cfg(srcdir)
+        if not path or not parser.read(path):
+            logger.info('Could not find a setup.cfg to extract project name '
+                        'from')
+            return None
+
+        try:
+            # for project name we use the name in setup.cfg, but if the
+            # length is longer then 32 we use summary. Otherwise thAe
+            # menu rendering looks brolen
+            project = parser.get('metadata', 'name')
+            if len(project.split()) == 1 and len(project) > 32:
+                project = parser.get('metadata', 'summary')
+        except configparser.Error:
+            logger.info('Could not extract project metadata from setup.cfg')
+            return None
+
+        _project = project
+
+    return _project
+
+
+def _builder_inited(app):
+    # TODO(stephenfin): Once Sphinx 1.8 is released, we should move the below
+    # to a 'config-inited' handler
+
+    project_name = _get_project_name(app.srcdir)
+    try:
+        version_info = pbr.version.VersionInfo(project_name)
+    except Exception:
+        version_info = None
+
+    if version_info and not app.config.version and not app.config.release:
+        app.config.version = version_info.canonical_version_string()
+        app.config.release = version_info.version_string_with_vcs()
+
+
+def setup(app):
+    app.connect('builder-inited', _builder_inited)
+    return {
+        'parallel_read_safe': True,
+        'parallel_write_safe': True,
+    }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/pbr.egg-info/PKG-INFO 
new/pbr-4.2.0/pbr.egg-info/PKG-INFO
--- old/pbr-4.1.1/pbr.egg-info/PKG-INFO 2018-07-20 03:15:39.000000000 +0200
+++ new/pbr-4.2.0/pbr.egg-info/PKG-INFO 2018-07-24 00:25:13.000000000 +0200
@@ -1,13 +1,13 @@
 Metadata-Version: 2.1
 Name: pbr
-Version: 4.1.1
+Version: 4.2.0
 Summary: Python Build Reasonableness
 Home-page: https://docs.openstack.org/pbr/latest/
 Author: OpenStack
 Author-email: openstack-...@lists.openstack.org
 License: UNKNOWN
-Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
 Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
+Project-URL: Source Code, https://git.openstack.org/cgit/openstack-dev/pbr/
 Project-URL: Documentation, https://docs.openstack.org/pbr/
 Description: Introduction
         ============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/pbr.egg-info/SOURCES.txt 
new/pbr-4.2.0/pbr.egg-info/SOURCES.txt
--- old/pbr-4.1.1/pbr.egg-info/SOURCES.txt      2018-07-20 03:15:39.000000000 
+0200
+++ new/pbr-4.2.0/pbr.egg-info/SOURCES.txt      2018-07-24 00:25:14.000000000 
+0200
@@ -1,6 +1,6 @@
 .coveragerc
 .mailmap
-.testr.conf
+.stestr.conf
 .zuul.yaml
 AUTHORS
 CONTRIBUTING.rst
@@ -12,6 +12,7 @@
 setup.py
 test-requirements.txt
 tox.ini
+doc/requirements.txt
 doc/source/conf.py
 doc/source/index.rst
 doc/source/contributor/index.rst
@@ -32,6 +33,7 @@
 pbr/options.py
 pbr/packaging.py
 pbr/pbr_json.py
+pbr/sphinxext.py
 pbr/testr_command.py
 pbr/util.py
 pbr/version.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/releasenotes/notes/reno.cache 
new/pbr-4.2.0/releasenotes/notes/reno.cache
--- old/pbr-4.1.1/releasenotes/notes/reno.cache 2018-07-20 03:15:40.000000000 
+0200
+++ new/pbr-4.2.0/releasenotes/notes/reno.cache 1970-01-01 01:00:00.000000000 
+0100
@@ -1,55 +0,0 @@
----
-file-contents:
-  releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml:
-    deprecations: ['Support for ``pyN``-suffixed requirement files has been 
deprecated:
-
-        environment markers should be used instead.
-
-        ']
-  releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml:
-    deprecations: ['*testr* and *nose* integration has been deprecated. This 
feature
-        allowed
-
-        *pbr* to dynamically configure the test runner used when running
-
-        ``setup.py test``. However, this target has fallen out of favour in 
both
-
-        the OpenStack and broader Python ecosystem, and both *testr* and *nose*
-
-        offer native setuptools commands that can be manually aliased to 
``test``
-
-        on a per-project basis, if necessary. This feature will be removed in a
-
-        future release.
-
-        ']
-  releasenotes/notes/remove-command-hooks-907d9c2325f306ca.yaml:
-    upgrade: ['Support for entry point command hooks has been removed. This 
feature
-        was
-
-        poorly tested, poorly documented, and broken in some environments.
-
-        Support for global hooks is not affected.
-
-        ']
-  releasenotes/notes/v_version-457b38c8679c5868.yaml:
-    features: ['Support version parsing of git tag with the ``v<semver>`` 
pattern
-
-        (or ``V<semver>``), in addition to ``<semver>``.
-
-        ']
-notes:
-- files:
-  - - releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml
-    - !!binary |
-      OWJlMTgxZThlNjBjYzQxZjNhZDY4NWUyMzZiMGM0Y2RjMjlkYmQzYw==
-  - - releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml
-    - !!binary |
-      MTEzNjg1ZTFiOTRkZjlkZDI5NDVhZGJkZGE3NTdhNTQ1YjA5NTk4Yw==
-  - - releasenotes/notes/remove-command-hooks-907d9c2325f306ca.yaml
-    - !!binary |
-      MzJjOTBiYTU5OGQ3NzQwZTUyYmYyMWJjNWU5MjBmYjVkZjA4NjQ1YQ==
-  - - releasenotes/notes/v_version-457b38c8679c5868.yaml
-    - !!binary |
-      NGM3NzVlNzg5MGU5MGZjMmVhNzdjNjYwMjA2NTllNTJkNmE2MTQxNA==
-  version: 4.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/setup.cfg new/pbr-4.2.0/setup.cfg
--- old/pbr-4.1.1/setup.cfg     2018-07-20 03:15:40.000000000 +0200
+++ new/pbr-4.2.0/setup.cfg     2018-07-24 00:25:14.000000000 +0200
@@ -32,10 +32,6 @@
 packages = 
        pbr
 
-[global]
-setup-hooks = 
-       pbr.hooks.setup_hook
-
 [pbr]
 autodoc_tree_index_modules = True
 autodoc_tree_excludes = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/test-requirements.txt 
new/pbr-4.2.0/test-requirements.txt
--- old/pbr-4.1.1/test-requirements.txt 2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/test-requirements.txt 2018-07-24 00:21:00.000000000 +0200
@@ -1,17 +1,16 @@
 # The order of packages is significant, because pip processes them in the order
 # of appearance. Changing the order has an impact on the overall integration
 # process, which may cause wedges in the gate later.
-coverage!=4.4,>=4.0 # Apache-2.0
 fixtures>=3.0.0 # Apache-2.0/BSD
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
 mock>=2.0.0 # BSD
-python-subunit>=1.0.0 # Apache-2.0/BSD
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
-openstackdocstheme>=1.18.1 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
 six>=1.10.0 # MIT
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
 testresources>=2.0.0 # Apache-2.0/BSD
 testscenarios>=0.4 # Apache-2.0/BSD
 testtools>=2.2.0 # MIT
 virtualenv>=14.0.6 # MIT
+
+# optionally exposed by distutils commands
+sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
+testrepository>=0.0.18 # Apache-2.0/BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pbr-4.1.1/tox.ini new/pbr-4.2.0/tox.ini
--- old/pbr-4.1.1/tox.ini       2018-07-20 03:12:35.000000000 +0200
+++ new/pbr-4.2.0/tox.ini       2018-07-24 00:21:00.000000000 +0200
@@ -1,19 +1,15 @@
 [tox]
 minversion = 2.0
-envlist = py35,py36,py27,pypy,pep8,docs
+envlist = py{27,35,36},pep8,docs
 
 [testenv]
 usedevelop = True
 install_command = pip install {opts} {packages}
 passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE 
PROJECTS OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE
 deps =
-     
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-     -r{toxinidir}/test-requirements.txt
-commands =
-  python setup.py test --testr-args='{posargs}'
-
-[tox:jenkins]
-sitepackages = True
+  
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+  -r{toxinidir}/test-requirements.txt
+commands = stestr run {posargs}
 
 [testenv:pep8]
 basepython = python3
@@ -21,19 +17,16 @@
 
 [testenv:docs]
 basepython = python3
+deps = -r{toxinidir}/doc/requirements.txt
 commands = python setup.py build_sphinx
 
 [testenv:releasenotes]
 basepython = python3
+deps = -r{toxinidir}/doc/requirements.txt
 commands =
   rm -rf releasenotes/build
   sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source 
releasenotes/build/html
 
-[testenv:cover]
-basepython = python3
-commands =
-  python setup.py test --coverage
-
 [testenv:venv]
 basepython = python3
 commands = {posargs}
@@ -51,4 +44,3 @@
 deps =
   -c{toxinidir}/lower-constraints.txt
   -r{toxinidir}/test-requirements.txt
-


Reply via email to