Hello community,
here is the log from the commit of package python-pbr for openSUSE:Factory checked in at 2019-03-04 09:11:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pbr (Old)
and /work/SRC/openSUSE:Factory/.python-pbr.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pbr"
Mon Mar 4 09:11:30 2019 rev:44 rq:680542 version:5.1.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pbr/python-pbr.changes 2019-01-28 20:48:50.737879782 +0100
+++ /work/SRC/openSUSE:Factory/.python-pbr.new.28833/python-pbr.changes 2019-03-04 09:11:31.788696323 +0100
@@ -1,0 +2,13 @@
+Fri Mar 1 14:36:24 UTC 2019 - Ondřej Súkup
+
+- update to 5.1.3
+- drop 0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
+ new_wheel.patch
+ * Resolve ``ValueError`` when mapping value contains a literal ``=``
+ * ignore –find-links in requirements file
+ * Do not globally replace path prefix
+ * Use templates for cover and lower-constraints
+ * Special case long_description_content_type
+ * Support wheel 0.32.0+
+
+-------------------------------------------------------------------
Old:
----
0001-Skip-test-for-testr-hook-being-installed-when-testr-.patch
new_wheel.patch
pbr-4.3.0.tar.gz
New:
----
pbr-5.1.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pbr.spec ++++++
--- /var/tmp/diff_new_pack.dqqesz/_old 2019-03-04 09:11:32.260696244 +0100
+++ /var/tmp/diff_new_pack.dqqesz/_new 2019-03-04 09:11:32.260696244 +0100
@@ -26,15 +26,13 @@
%bcond_with test
%endif
Name: python-pbr%{psuffix}
-Version: 4.3.0
+Version: 5.1.3
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
-Patch1: new_wheel.patch
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
++++++ pbr-4.3.0.tar.gz -> pbr-5.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/.zuul.yaml new/pbr-5.1.3/.zuul.yaml
--- old/pbr-4.3.0/.zuul.yaml 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/.zuul.yaml 2019-02-28 19:08:19.000000000 +0100
@@ -105,23 +105,20 @@
- project:
templates:
+ - lib-forward-testing
+ - lib-forward-testing-python3
+ - openstack-cover-jobs
+ - openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs
- - lib-forward-testing
- - lib-forward-testing-python3
- - publish-openstack-docs-pti
- periodic-stable-jobs
+ - publish-openstack-docs-pti
check:
jobs:
- - openstack-tox-lower-constraints
- pbr-installation-devstack
- pbr-installation-upstream-devstack
gate:
jobs:
- - openstack-tox-lower-constraints
- pbr-installation-devstack
- pbr-installation-upstream-devstack
- post:
- jobs:
- - openstack-tox-cover
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/AUTHORS new/pbr-5.1.3/AUTHORS
--- old/pbr-4.3.0/AUTHORS 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/AUTHORS 2019-02-28 19:10:35.000000000 +0100
@@ -11,6 +11,7 @@
Attila Fazekas
Ben Nemec
Bhuvan Arumugam
+Brandon LeBlanc
Brant Knudson
Brian Waldon
Cao Xuan Hoang
@@ -104,7 +105,9 @@
Sascha Peilicke
Sean Dague
Sean Dague
+Sean McGinnis
Sergey Lukjanov
+Sorin Sbarnea
Stephen Finucane
Stephen Finucane
Steve Kowalik
@@ -124,6 +127,7 @@
Vincent Untz
Vishvananda Ishaya
Wei Tie
+Will Szumski
YAMAMOTO Takashi
Yaguang Tang
Yuriy Taraday
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/ChangeLog new/pbr-5.1.3/ChangeLog
--- old/pbr-4.3.0/ChangeLog 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/ChangeLog 2019-02-28 19:10:35.000000000 +0100
@@ -1,10 +1,43 @@
CHANGES
=======
+5.1.3
+-----
+
+* Resolve \`\`ValueError\`\` when mapping value contains a literal \`\`=\`\`
+
+5.1.2
+-----
+
+* Ignore --find-links in requirements file
+* Do not globally replace path prefix
+* Change openstack-dev to openstack-discuss
+
+5.1.1
+-----
+
+* Fix incorrect use of flake8:noqa
+* Correct documentation hyperlink for environment-markers
+
+5.1.0
+-----
+
+
+5.0.0
+-----
+
+* Use templates for cover and lower-constraints
+* Special case long\_description\_content\_type
+* tox: Suppress output
+* Support wheel 0.32.0+
+
4.3.0
-----
* Remove my\_ip from generated wsgi script
+* Add an option to skip generating RELEASENOTES.rst
+* docs: Add docs for reno integration
+* Skip test for testr hook being installed when testr is not available
* Fix typo in contribution instructions
* Add release note for fix to bug 1786306
* Move pbr-installation jobs in-tree
@@ -15,6 +48,7 @@
* switch documentation job to new PTI
* import zuul job settings from project-config
* Ignore Zuul when generating AUTHORS
+* packaging: Remove support for pyN requirement files
* tox: Re-add cover target
4.2.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/PKG-INFO new/pbr-5.1.3/PKG-INFO
--- old/pbr-4.3.0/PKG-INFO 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/PKG-INFO 2019-02-28 19:10:35.000000000 +0100
@@ -1,10 +1,10 @@
Metadata-Version: 2.1
Name: pbr
-Version: 4.3.0
+Version: 5.1.3
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
-Author-email: openstack-dev@lists.openstack.org
+Author-email: openstack-discuss@lists.openstack.org
License: UNKNOWN
Project-URL: Documentation, https://docs.openstack.org/pbr/
Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/doc/source/index.rst new/pbr-5.1.3/doc/source/index.rst
--- old/pbr-4.3.0/doc/source/index.rst 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/doc/source/index.rst 2019-02-28 19:08:19.000000000 +0100
@@ -21,6 +21,7 @@
* **ChangeLog**: Generate ChangeLog from git log
* **Manifest**: Generate a sensible manifest from git files and some standard
files
+* **Release Notes**: Generate a release notes file using reno
* **Requirements**: Store your dependencies in a pip requirements file
* **long_description**: Use your README file as a long_description
* **Smart find_packages**: Smartly find packages under your root package
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/doc/source/user/features.rst new/pbr-5.1.3/doc/source/user/features.rst
--- old/pbr-4.3.0/doc/source/user/features.rst 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/doc/source/user/features.rst 2019-02-28 19:08:19.000000000 +0100
@@ -62,7 +62,7 @@
- Extensive use of ``setup.cfg`` for configuration
- Automatic package metadata generation (``version``)
- Automatic metadata file generation (``AUTHOR``, ``ChangeLog``,
- ``MANIFEST.in``)
+ ``MANIFEST.in``, ``RELEASENOTES.txt``)
In addition, there are other things that you don't see here but which *pbr*
will do for you:
@@ -181,6 +181,10 @@
You can also specify the exact file you want to use using the
``description-file`` parameter.
+You can set the ``description-content-type`` to a MIME type that may
+help rendering of the description; for example ``text/markdown`` or
+``text/x-rst; charset=UTF-8``.
+
Requirements
~~~~~~~~~~~~
@@ -200,14 +204,16 @@
and inject them into the ``install_requires``, ``tests_require`` and/or
``dependency_links`` arguments to ``setup``. Voila!
-You can also have a requirement file for each specific major version of Python.
-If you want to have a different package list for Python 3 then just drop a
-``requirements-py3.txt`` and it will be used instead.
-
Finally, it is possible to specify groups of optional dependencies, or
:ref:`"extra" requirements <extra-requirements>`, in your ``setup.cfg`` rather
than ``setup.py``.
+.. versionchanged:: 5.0
+
+ Previously you could specify requirements for a given major version of
+ Python using requirments files with a ``-pyN`` suffix. This was deprecated
+ in 4.0 and removed in 5.0 in favour of environment markers.
+
Automatic File Generation
-------------------------
@@ -253,6 +259,21 @@
__ https://packaging.python.org/tutorials/distributing-packages/#manifest-in
+Release Notes
+~~~~~~~~~~~~~
+
+.. admonition:: Summary
+
+ *pbr* will automatically use *reno* \'s ``build_reno`` setuptools command
+ to generate a release notes file, if reno is available and configured.
+
+If using *reno*, you may wish to include a copy of the release notes in your
+packages. *reno* provides a ``build_reno`` `setuptools command`__ and, if reno
+is present and configured, *pbr* will automatically call this to generate a
+release notes file for inclusion in your package.
+
+__ https://docs.openstack.org/reno/latest/user/setuptools.html
+
Setup Commands
--------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/doc/source/user/packagers.rst new/pbr-5.1.3/doc/source/user/packagers.rst
--- old/pbr-4.3.0/doc/source/user/packagers.rst 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/doc/source/user/packagers.rst 2019-02-28 19:08:19.000000000 +0100
@@ -103,3 +103,20 @@
will cause logic around generating ``ChangeLog`` file using *git*
information to be skipped.
+
+.. _packaging-releasenotes:
+
+Release Notes
+-------------
+
+*pbr* generates a release notes file, typically called ``RELEASENOTES.rst``,
+if `reno`_ is present and configured. You may wish to disable this
+functionality. If that is the case setting ``SKIP_GENERATE_RENO``
+
+::
+
+ export SKIP_GENERATE_RENO
+
+will disable this feature.
+
+.. _reno: https://docs.openstack.org/reno/latest/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/doc/source/user/using.rst new/pbr-5.1.3/doc/source/user/using.rst
--- old/pbr-4.3.0/doc/source/user/using.rst 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/doc/source/user/using.rst 2019-02-28 19:08:19.000000000 +0100
@@ -230,6 +230,13 @@
This can also be configured using the ``SKIP_GENERATE_AUTHORS`` environment
variable, as described :ref:`here <packaging-authors-changelog>`
+``skip_reno``
+ If enabled, *pbr* will not generate a ``RELEASENOTES.txt`` file if `reno`_ is
+ present and configured.
+
+ This can also be configured using the ``SKIP_GENERATE_RENO`` environment
+ variable, as described :ref:`here <packaging-releasenotes>`.
+
``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``
@@ -382,20 +389,18 @@
Requirements files are used in place of the ``install_requires`` and
``extras_require`` attributes. Requirement files should be given one of the
-below names. This order is also the order that the requirements are tried in
-(where ``N`` is the Python major version number used to install the package):
+below names. This order is also the order that the requirements are tried in:
-* ``requirements-pyN.txt``
-* ``tools/pip-requires-py3``
* ``requirements.txt``
* ``tools/pip-requires``
Only the first file found is used to install the list of packages it contains.
-.. note::
+.. versionchanged:: 5.0
- The ``requirements-pyN.txt`` file is deprecated - ``requirements.txt``
- should be universal. You can use `Environment markers`_ for this purpose.
+ Previously you could specify requirements for a given major version of
+ Python using requirements files with a ``-pyN`` suffix. This was deprecated
+ in 4.0 and removed in 5.0 in favour of environment markers.
.. _extra-requirements:
@@ -489,3 +494,4 @@
.. _setuptools: http://www.sphinx-doc.org/en/stable/setuptools.html
.. _sphinxcontrib-apidoc: https://pypi.org/project/sphinxcontrib-apidoc/
+.. _reno: https://docs.openstack.org/reno/latest/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/lower-constraints.txt new/pbr-5.1.3/lower-constraints.txt
--- old/pbr-4.3.0/lower-constraints.txt 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/lower-constraints.txt 2019-02-28 19:08:19.000000000 +0100
@@ -26,7 +26,7 @@
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
-stestr==2.0.0
+stestr==2.1.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.3.0/pbr/core.py new/pbr-5.1.3/pbr/core.py
--- old/pbr-4.3.0/pbr/core.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/core.py 2019-02-28 19:08:19.000000000 +0100
@@ -43,13 +43,13 @@
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
-from distutils import core
-from distutils import errors
import logging
import os
import sys
import warnings
+from distutils import errors
+
from pbr import util
@@ -57,8 +57,8 @@
string_type = str
integer_types = (int,)
else:
- string_type = basestring # flake8: noqa
- integer_types = (int, long) # flake8: noqa
+ string_type = basestring # noqa
+ integer_types = (int, long) # noqa
def pbr(dist, attr, value):
@@ -103,6 +103,15 @@
raise errors.DistutilsSetupError(
'Error parsing %s: %s: %s' % (path, e.__class__.__name__, e))
+ # There are some metadata fields that are only supported by
+ # setuptools and not distutils, and hence are not in
+ # dist.metadata. We are OK to write these in. For gory details
+ # see
+ # https://github.com/pypa/setuptools/pull/1343
+ _DISTUTILS_UNSUPPORTED_METADATA = (
+ 'long_description_content_type', 'project_urls', 'provides_extras'
+ )
+
# Repeat some of the Distribution initialization code with the newly
# provided attrs
if attrs:
@@ -115,6 +124,8 @@
setattr(dist.metadata, key, val)
elif hasattr(dist, key):
setattr(dist, key, val)
+ elif key in _DISTUTILS_UNSUPPORTED_METADATA:
+ setattr(dist.metadata, key, val)
else:
msg = 'Unknown distribution option: %s' % repr(key)
warnings.warn(msg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/hooks/files.py new/pbr-5.1.3/pbr/hooks/files.py
--- old/pbr-4.3.0/pbr/hooks/files.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/hooks/files.py 2019-02-28 19:08:19.000000000 +0100
@@ -58,8 +58,12 @@
if not target.endswith(os.path.sep):
target += os.path.sep
for (dirpath, dirnames, fnames) in os.walk(source_prefix):
- finished.append(
- "%s = " % dirpath.replace(source_prefix, target))
+ # As source_prefix is always matched, using replace with a
+ # a limit of one is always going to replace the path prefix
+ # and not accidentally replace some text in the middle of
+ # the path
+ new_prefix = dirpath.replace(source_prefix, target, 1)
+ finished.append("%s = " % new_prefix)
finished.extend(
[" %s" % os.path.join(dirpath, f) for f in fnames])
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/packaging.py new/pbr-5.1.3/pbr/packaging.py
--- old/pbr-4.3.0/pbr/packaging.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/packaging.py 2019-02-28 19:08:19.000000000 +0100
@@ -81,14 +81,16 @@
def get_reqs_from_files(requirements_files):
existing = _any_existing(requirements_files)
+ # TODO(stephenfin): Remove this in pbr 6.0+
deprecated = [f for f in existing if f in PY_REQUIREMENTS_FILES]
if deprecated:
warnings.warn('Support for \'-pyN\'-suffixed requirements files is '
- 'deprecated in pbr 4.0 and will be removed in 5.0. '
+ 'removed in pbr 5.0 and these files are now ignored. '
'Use environment markers instead. Conflicting files: '
'%r' % deprecated,
DeprecationWarning)
+ existing = [f for f in existing if f not in PY_REQUIREMENTS_FILES]
for requirements_file in existing:
with open(requirements_file, 'r') as fil:
return fil.read().split('\n')
@@ -116,7 +118,8 @@
continue
# Ignore index URL lines
- if re.match(r'^\s*(-i|--index-url|--extra-index-url).*', line):
+ if re.match(r'^\s*(-i|--index-url|--extra-index-url|--find-links).*',
+ line):
continue
# Handle nested requirements files such as:
@@ -575,6 +578,13 @@
if hasattr(self, '_has_reno'):
return self._has_reno
+ option_dict = self.distribution.get_option_dict('pbr')
+ should_skip = options.get_boolean_option(option_dict, 'skip_reno',
+ 'SKIP_GENERATE_RENO')
+ if should_skip:
+ self._has_reno = False
+ return False
+
try:
# versions of reno witout this module will not have the required
# feature, hence the import
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/tests/test_files.py new/pbr-5.1.3/pbr/tests/test_files.py
--- old/pbr-4.3.0/pbr/tests/test_files.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/tests/test_files.py 2019-02-28 19:08:19.000000000 +0100
@@ -35,15 +35,20 @@
])
self.useFixture(pkg_fixture)
pkg_etc = os.path.join(pkg_fixture.base, 'etc')
+ pkg_ansible = os.path.join(pkg_fixture.base, 'ansible',
+ 'kolla-ansible', 'test')
pkg_sub = os.path.join(pkg_etc, 'sub')
subpackage = os.path.join(
pkg_fixture.base, 'fake_package', 'subpackage')
os.makedirs(pkg_sub)
os.makedirs(subpackage)
+ os.makedirs(pkg_ansible)
with open(os.path.join(pkg_etc, "foo"), 'w') as foo_file:
foo_file.write("Foo Data")
with open(os.path.join(pkg_sub, "bar"), 'w') as foo_file:
foo_file.write("Bar Data")
+ with open(os.path.join(pkg_ansible, "baz"), 'w') as baz_file:
+ baz_file.write("Baz Data")
with open(os.path.join(subpackage, "__init__.py"), 'w') as foo_file:
foo_file.write("# empty")
@@ -76,3 +81,19 @@
self.assertIn(
'\netc/pbr/ = \n etc/foo\netc/pbr/sub = \n etc/sub/bar',
config['files']['data_files'])
+
+ def test_data_files_globbing_source_prefix_in_directory_name(self):
+ # We want to test that the string, "docs", is not replaced in a
+ # subdirectory name, "sub-docs"
+ config = dict(
+ files=dict(
+ data_files="\n share/ansible = ansible/*"
+ )
+ )
+ files.FilesConfig(config, 'fake_package').run()
+ self.assertIn(
+ '\nshare/ansible/ = '
+ '\nshare/ansible/kolla-ansible = '
+ '\nshare/ansible/kolla-ansible/test = '
+ '\n ansible/kolla-ansible/test/baz',
+ config['files']['data_files'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/tests/test_hooks.py new/pbr-5.1.3/pbr/tests/test_hooks.py
--- old/pbr-4.3.0/pbr/tests/test_hooks.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/tests/test_hooks.py 2019-02-28 19:08:19.000000000 +0100
@@ -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 @@
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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/tests/test_packaging.py new/pbr-5.1.3/pbr/tests/test_packaging.py
--- old/pbr-4.3.0/pbr/tests/test_packaging.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/tests/test_packaging.py 2019-02-28 19:08:19.000000000 +0100
@@ -43,7 +43,6 @@
import imp
import os
import re
-import sys
import sysconfig
import tempfile
import textwrap
@@ -56,7 +55,7 @@
import testtools
from testtools import matchers
import virtualenv
-import wheel.install
+from wheel import wheelfile
from pbr import git
from pbr import packaging
@@ -372,13 +371,13 @@
relative_wheel_filename = os.listdir(dist_dir)[0]
absolute_wheel_filename = os.path.join(
dist_dir, relative_wheel_filename)
- wheel_file = wheel.install.WheelFile(absolute_wheel_filename)
+ wheel_file = wheelfile.WheelFile(absolute_wheel_filename)
wheel_name = wheel_file.parsed_filename.group('namever')
# Create a directory path to unpack the wheel to
self.extracted_wheel_dir = os.path.join(dist_dir, wheel_name)
# Extract the wheel contents to the directory we just created
- wheel_file.zipfile.extractall(self.extracted_wheel_dir)
- wheel_file.zipfile.close()
+ wheel_file.extractall(self.extracted_wheel_dir)
+ wheel_file.close()
def test_data_directory_has_wsgi_scripts(self):
# Build the path to the scripts directory
@@ -532,11 +531,13 @@
tempdir = tempfile.mkdtemp()
requirements = os.path.join(tempdir, 'requirements.txt')
with open(requirements, 'w') as f:
- f.write('-i https://myindex.local')
- f.write(' --index-url https://myindex.local')
- f.write(' --extra-index-url https://myindex.local')
+ f.write('-i https://myindex.local\n')
+ f.write(' --index-url https://myindex.local\n')
+ f.write(' --extra-index-url https://myindex.local\n')
+ f.write('--find-links https://myindex.local\n')
+ f.write('arequirement>=1.0\n')
result = packaging.parse_requirements([requirements])
- self.assertEqual([], result)
+ self.assertEqual(['arequirement>=1.0'], result)
def test_nested_requirements(self):
tempdir = tempfile.mkdtemp()
@@ -549,28 +550,6 @@
result = packaging.parse_requirements([requirements])
self.assertEqual(['pbr'], result)
- @mock.patch('warnings.warn')
- def test_python_version(self, mock_warn):
- with open("requirements-py%d.txt" % sys.version_info[0],
- "w") as fh:
- fh.write("# this is a comment\nfoobar\n# and another one\nfoobaz")
- self.assertEqual(['foobar', 'foobaz'],
- packaging.parse_requirements())
- mock_warn.assert_called_once_with(mock.ANY, DeprecationWarning)
-
- @mock.patch('warnings.warn')
- def test_python_version_multiple_options(self, mock_warn):
- with open("requirements-py1.txt", "w") as fh:
- fh.write("thisisatrap")
- with open("requirements-py%d.txt" % sys.version_info[0],
- "w") as fh:
- fh.write("# this is a comment\nfoobar\n# and another one\nfoobaz")
- self.assertEqual(['foobar', 'foobaz'],
- packaging.parse_requirements())
- # even though we have multiple offending files, this should only be
- # called once
- mock_warn.assert_called_once_with(mock.ANY, DeprecationWarning)
-
class ParseRequirementsTestScenarios(base.BaseTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/tests/test_util.py new/pbr-5.1.3/pbr/tests/test_util.py
--- old/pbr-4.3.0/pbr/tests/test_util.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/tests/test_util.py 2019-02-28 19:08:19.000000000 +0100
@@ -23,6 +23,19 @@
from pbr import util
+def config_from_ini(ini):
+ config = {}
+ if sys.version_info >= (3, 2):
+ parser = configparser.ConfigParser()
+ else:
+ parser = configparser.SafeConfigParser()
+ ini = textwrap.dedent(six.u(ini))
+ parser.readfp(io.StringIO(ini))
+ for section in parser.sections():
+ config[section] = dict(parser.items(section))
+ return config
+
+
class TestExtrasRequireParsingScenarios(base.BaseTestCase):
scenarios = [
@@ -64,20 +77,8 @@
{}
})]
- def config_from_ini(self, ini):
- config = {}
- if sys.version_info >= (3, 2):
- parser = configparser.ConfigParser()
- else:
- parser = configparser.SafeConfigParser()
- ini = textwrap.dedent(six.u(ini))
- parser.readfp(io.StringIO(ini))
- for section in parser.sections():
- config[section] = dict(parser.items(section))
- return config
-
def test_extras_parsing(self):
- config = self.config_from_ini(self.config_text)
+ config = config_from_ini(self.config_text)
kwargs = util.setup_cfg_to_setup_kwargs(config)
self.assertEqual(self.expected_extra_requires,
@@ -89,3 +90,43 @@
def test_invalid_marker_raises_error(self):
config = {'extras': {'test': "foo :bad_marker>'1.0'"}}
self.assertRaises(SyntaxError, util.setup_cfg_to_setup_kwargs, config)
+
+
+class TestMapFieldsParsingScenarios(base.BaseTestCase):
+
+ scenarios = [
+ ('simple_project_urls', {
+ 'config_text': """
+ [metadata]
+ project_urls =
+ Bug Tracker = https://bugs.launchpad.net/pbr/
+ Documentation = https://docs.openstack.org/pbr/
+ Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/
+ """, # noqa: E501
+ 'expected_project_urls': {
+ 'Bug Tracker': 'https://bugs.launchpad.net/pbr/',
+ 'Documentation': 'https://docs.openstack.org/pbr/',
+ 'Source Code': 'https://git.openstack.org/cgit/openstack-dev/pbr/', # noqa: E501
+ },
+ }),
+ ('query_parameters', {
+ 'config_text': """
+ [metadata]
+ project_urls =
+ Bug Tracker = https://bugs.launchpad.net/pbr/?query=true
+ Documentation = https://docs.openstack.org/pbr/?foo=bar
+ Source Code = https://git.openstack.org/cgit/openstack-dev/pbr/commit/?id=hash
+ """, # noqa: E501
+ 'expected_project_urls': {
+ 'Bug Tracker': 'https://bugs.launchpad.net/pbr/?query=true',
+ 'Documentation': 'https://docs.openstack.org/pbr/?foo=bar',
+ 'Source Code': 'https://git.openstack.org/cgit/openstack-dev/pbr/commit/?id=hash', # noqa: E501
+ },
+ }),
+ ]
+
+ def test_project_url_parsing(self):
+ config = config_from_ini(self.config_text)
+ kwargs = util.setup_cfg_to_setup_kwargs(config)
+
+ self.assertEqual(self.expected_project_urls, kwargs['project_urls'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr/util.py new/pbr-5.1.3/pbr/util.py
--- old/pbr-4.3.0/pbr/util.py 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/pbr/util.py 2019-02-28 19:08:19.000000000 +0100
@@ -56,24 +56,21 @@
# irritating Python bug that can crop up when using ./setup.py test.
# See: http://www.eby-sarna.com/pipermail/peak/2010-May/003355.html
try:
- import multiprocessing # flake8: noqa
+ import multiprocessing # noqa
except ImportError:
pass
-import logging # flake8: noqa
+import logging # noqa
+from collections import defaultdict
import os
import re
import sys
import traceback
-from collections import defaultdict
-
import distutils.ccompiler
-import pkg_resources
-
-from distutils import log
from distutils import errors
-from setuptools.command.egg_info import manifest_maker
+from distutils import log
+import pkg_resources
from setuptools import dist as st_dist
from setuptools import extension
@@ -244,11 +241,11 @@
if hook != 'pbr.hooks.setup_hook']
for hook in setup_hooks:
hook_fn = resolve_name(hook)
- try :
+ try:
hook_fn(config)
except SystemExit:
log.error('setup hook %s terminated the installation')
- except:
+ except Exception:
e = sys.exc_info()[1]
log.error('setup hook %s raised exception: %s\n' %
(hook, e))
@@ -288,7 +285,9 @@
def setup_cfg_to_setup_kwargs(config, script_args=()):
- """Processes the setup.cfg options and converts them to arguments accepted
+ """Convert config options to kwargs.
+
+ Processes the setup.cfg options and converts them to arguments accepted
by setuptools' setup() function.
"""
@@ -334,7 +333,7 @@
elif arg in MAP_FIELDS:
in_cfg_map = {}
for i in split_multiline(in_cfg_value):
- k, v = i.split('=')
+ k, v = i.split('=', 1)
in_cfg_map[k.strip()] = v.strip()
in_cfg_value = in_cfg_map
elif arg in BOOL_FIELDS:
@@ -354,12 +353,13 @@
# Split install_requires into package,env_marker tuples
# These will be re-assembled later
install_requires = []
- requirement_pattern = '(?P<package>[^;]*);?(?P[^#]*?)(?:\s*#.*)?$'
+ requirement_pattern = (
+ r'(?P<package>[^;]*);?(?P[^#]*?)(?:\s*#.*)?$')
for requirement in in_cfg_value:
m = re.match(requirement_pattern, requirement)
requirement_package = m.group('package').strip()
env_marker = m.group('env_marker').strip()
- install_requires.append((requirement_package,env_marker))
+ install_requires.append((requirement_package, env_marker))
all_requirements[''] = install_requires
elif arg == 'package_dir':
in_cfg_value = {'': in_cfg_value}
@@ -414,7 +414,8 @@
# -> {'fred': ['bar'], 'fred:marker':['foo']}
if 'extras' in config:
- requirement_pattern = '(?P<package>[^:]*):?(?P[^#]*?)(?:\s*#.*)?$'
+ requirement_pattern = (
+ r'(?P<package>[^:]*):?(?P[^#]*?)(?:\s*#.*)?$')
extras = config['extras']
# Add contents of test-requirements, if any, into an extra named
# 'test' if one does not already exist.
@@ -430,7 +431,7 @@
m = re.match(requirement_pattern, requirement)
extras_value = m.group('package').strip()
env_marker = m.group('env_marker')
- extra_requirements.append((extras_value,env_marker))
+ extra_requirements.append((extras_value, env_marker))
all_requirements[extra] = extra_requirements
# Transform the full list of requirements into:
@@ -459,7 +460,7 @@
"Marker evaluation failed, see the following "
"error. For more information see: "
"http://docs.openstack.org/"
- "developer/pbr/compatibility.html#evaluate-marker"
+ "pbr/latest/user/using.html#environment-markers"
)
raise
else:
@@ -473,9 +474,10 @@
def register_custom_compilers(config):
- """Handle custom compilers; this has no real equivalent in distutils, where
- additional compilers could only be added programmatically, so we have to
- hack it in somehow.
+ """Handle custom compilers.
+
+ This has no real equivalent in distutils, where additional compilers could
+ only be added programmatically, so we have to hack it in somehow.
"""
compilers = has_get_option(config, 'global', 'compilers')
@@ -497,7 +499,7 @@
module_name = compiler.__module__
# Note; this *will* override built in compilers with the same name
- # TODO: Maybe display a warning about this?
+ # TODO(embray): Maybe display a warning about this?
cc = distutils.ccompiler.compiler_class
cc[name] = (module_name, compiler.__name__, desc)
@@ -560,13 +562,14 @@
def get_entry_points(config):
- """Process the [entry_points] section of setup.cfg to handle setuptools
- entry points. This is, of course, not a standard feature of
- distutils2/packaging, but as there is not currently a standard alternative
- in packaging, we provide support for them.
+ """Process the [entry_points] section of setup.cfg.
+
+ Processes setup.cfg to handle setuptools entry points. This is, of course,
+ not a standard feature of distutils2/packaging, but as there is not
+ currently a standard alternative in packaging, we provide support for them.
"""
- if not 'entry_points' in config:
+ if 'entry_points' not in config:
return {}
return dict((option, split_multiline(value))
@@ -600,9 +603,7 @@
# The following classes are used to hack Distribution.command_options a bit
class DefaultGetDict(defaultdict):
- """Like defaultdict, but the get() method also sets and returns the default
- value.
- """
+ """Like defaultdict, but get() also sets and returns the default value."""
def get(self, key, default=None):
if default is None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr.egg-info/PKG-INFO new/pbr-5.1.3/pbr.egg-info/PKG-INFO
--- old/pbr-4.3.0/pbr.egg-info/PKG-INFO 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/pbr.egg-info/PKG-INFO 2019-02-28 19:10:35.000000000 +0100
@@ -1,10 +1,10 @@
Metadata-Version: 2.1
Name: pbr
-Version: 4.3.0
+Version: 5.1.3
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
-Author-email: openstack-dev@lists.openstack.org
+Author-email: openstack-discuss@lists.openstack.org
License: UNKNOWN
Project-URL: Documentation, https://docs.openstack.org/pbr/
Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/pbr.egg-info/SOURCES.txt new/pbr-5.1.3/pbr.egg-info/SOURCES.txt
--- old/pbr-4.3.0/pbr.egg-info/SOURCES.txt 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/pbr.egg-info/SOURCES.txt 2019-02-28 19:10:35.000000000 +0100
@@ -95,6 +95,10 @@
playbooks/legacy/pbr-installation-upstream-devstack/run.yaml
releasenotes/notes/deprecate-pyN-requirements-364655c38fa5b780.yaml
releasenotes/notes/deprecate-testr-nose-integration-56e3e11248d946fc.yaml
+releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml
+releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml
+releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml
+releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml
releasenotes/notes/remove-command-hooks-907d9c2325f306ca.yaml
releasenotes/notes/support-vcs-uris-with-subdirectories-20ad68b6138f72ca.yaml
releasenotes/notes/v_version-457b38c8679c5868.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml new/pbr-5.1.3/releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml
--- old/pbr-4.3.0/releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-5.1.3/releasenotes/notes/fix-global-replace-of-src-prefix-in-glob-eb850b94ca96993e.yaml 2019-02-28 19:08:19.000000000 +0100
@@ -0,0 +1,9 @@
+---
+fixes:
+ - |
+ Fixes a bug where the directory names of items specified in ``data_files``
+ could be renamed if the source prefix glob was contained within the
+ directory name. See `bug 1810804
+ https://bugs.launchpad.net/pbr/+bug/1810804`_ for details. For more
+ information on ``data_files``, see the `distutils documentation
+ https://docs.python.org/2/distutils/setupscript.html#installing-additional-f...`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml new/pbr-5.1.3/releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml
--- old/pbr-4.3.0/releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-5.1.3/releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml 2019-02-28 19:08:19.000000000 +0100
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Fix mapping error on values who contains a literal ``=``. Example when
+ setup.cfg contains content like the following project urls configuration
+ "project_urls = Documentation = http://foo.bar/?badge=latest".
+ https://bugs.launchpad.net/pbr/+bug/1817592
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml new/pbr-5.1.3/releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml
--- old/pbr-4.3.0/releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-5.1.3/releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml 2019-02-28 19:08:19.000000000 +0100
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ PBR now ignores ``--find-links`` in requirements files. This option is not
+ a valid ``install_requires`` entry for setuptools and thus breaks
+ PBR-based installs.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml new/pbr-5.1.3/releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml
--- old/pbr-4.3.0/releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml 1970-01-01 01:00:00.000000000 +0100
+++ new/pbr-5.1.3/releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml 2019-02-28 19:08:19.000000000 +0100
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ The ``description-content-type`` was not being set correctly. It
+ will now be correctly populated when using ``setuptools`` 39.2.0
+ and beyond.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/setup.cfg new/pbr-5.1.3/setup.cfg
--- old/pbr-4.3.0/setup.cfg 2018-10-03 11:37:09.000000000 +0200
+++ new/pbr-5.1.3/setup.cfg 2019-02-28 19:10:35.000000000 +0100
@@ -1,7 +1,7 @@
[metadata]
name = pbr
author = OpenStack
-author-email = openstack-dev@lists.openstack.org
+author-email = openstack-discuss@lists.openstack.org
summary = Python Build Reasonableness
description-file =
README.rst
@@ -53,7 +53,7 @@
source-dir = doc/source
warning-is-error = 1
-[wheel]
+[bdist_wheel]
universal = 1
[egg_info]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/test-requirements.txt new/pbr-5.1.3/test-requirements.txt
--- old/pbr-4.3.0/test-requirements.txt 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/test-requirements.txt 2019-02-28 19:08:19.000000000 +0100
@@ -1,15 +1,17 @@
# 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.
+wheel>=0.32.0 # MIT
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
six>=1.10.0 # MIT
-stestr>=2.0.0 # Apache-2.0
+stestr>=2.1.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
+coverage!=4.4,>=4.0 # Apache-2.0
# optionally exposed by distutils commands
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-4.3.0/tox.ini new/pbr-5.1.3/tox.ini
--- old/pbr-4.3.0/tox.ini 2018-10-03 11:34:38.000000000 +0200
+++ new/pbr-5.1.3/tox.ini 2019-02-28 19:08:19.000000000 +0100
@@ -5,11 +5,15 @@
[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
+passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS
+setenv =
+ OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1}
+ OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1}
+ OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
deps =
-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}
+commands = stestr run --suppress-attachments {posargs}
[testenv:pep8]
basepython = python3