Marc Abramowitz <marc@marc-abramowitz.com>
Mark McLoughlin <markmc@redhat.com>
Mark Sienkiewicz <sienkiew@stsci.edu>
+Martin Domke <mail@martindomke.net>
Maru Newby <marun@redhat.com>
Masaki Matsushita <glass.saga@gmail.com>
Matt Riedemann <mriedem@us.ibm.com>
CHANGES
=======
+5.3.0
+-----
+
+* Stop using pbr sphinx integration
+* Switch to release.o.o for constraints
+* Make WSGI tests listen on localhost
+* Allow git-tags to be SemVer compliant
+* Read description file as utf-8
+
5.2.1
-----
Metadata-Version: 2.1
Name: pbr
-Version: 5.2.1
+Version: 5.3.0
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
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
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
# 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.autodoc', 'sphinx.ext.todo', 'sphinxcontrib.apidoc']
# make openstackdocstheme optional to not increase the needed dependencies
try:
import openstackdocstheme
'%s Documentation' % project,
'OpenStack Foundation', 'manual'),
]
+
+# -- sphinxcontrib.apidoc configuration --------------------------------------
+
+apidoc_module_dir = '../../pbr'
+apidoc_output_dir = 'reference/api'
+apidoc_excluded_paths = [
+ 'tests',
+]
===================
.. toctree::
- :glob:
- api/*
+ api/modules
+++ /dev/null
-=================
- Release History
-=================
-
-.. include:: ../../../ChangeLog
packagers
semver
compatibility
- history
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.5
+sphinxcontrib-apidoc==0.2.0
sphinxcontrib-websupport==1.0.1
stestr==2.1.0
testrepository==0.0.18
Metadata-Version: 2.1
Name: pbr
-Version: 5.2.1
+Version: 5.3.0
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
doc/source/reference/index.rst
doc/source/user/compatibility.rst
doc/source/user/features.rst
-doc/source/user/history.rst
doc/source/user/index.rst
doc/source/user/packagers.rst
doc/source/user/semver.rst
presentation logic to the output - making it suitable for different
uses.
+ .. caution:: this function risk to return a tag that doesn't exist really
+ inside the git objects list due to replacement made
+ to tag name to also list pre-release suffix.
+ Compliant with the SemVer specification (e.g 1.2.3-rc1)
+
:return: An iterator of (hash, tags_set, 1st_line) tuples.
"""
log.info('[pbr] Generating ChangeLog')
for tag_string in refname.split("refs/tags/")[1:]:
# git tag does not allow : or " " in tag names, so we split
# on ", " which is the separator between elements
- candidate = tag_string.split(", ")[0]
+ candidate = tag_string.split(", ")[0].replace("-", ".")
if _is_valid_version(candidate):
tags.add(candidate)
version = packaging._get_version_from_git('1.2.3')
self.assertEqual('1.2.3', version)
+ def test_tagged_version_with_semver_compliant_prerelease(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3-rc2')
+ version = packaging._get_version_from_git()
+ self.assertEqual('1.2.3.0rc2', version)
+
def test_non_canonical_tagged_version_bump(self):
self.repo.commit()
self.repo.tag('1.4')
version = packaging._get_version_from_git('1.2.3')
self.assertThat(version, matchers.StartsWith('1.2.3.0a2.dev1'))
+ def test_untagged_version_after_semver_compliant_prerelease_tag(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3-rc2')
+ self.repo.commit()
+ version = packaging._get_version_from_git()
+ self.assertEqual('1.2.3.0rc3.dev1', version)
+
def test_preversion_too_low_simple(self):
# That is, the target version is either already released or not high
# enough for the semver requirements given api breaks etc.
+# -*- coding: utf-8 -*-
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. (HP)
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# under the License.
import io
+import tempfile
import textwrap
import six
self.assertEqual(self.data_files,
list(kwargs['data_files']))
+
+
+class TestUTF8DescriptionFile(base.BaseTestCase):
+ def test_utf8_description_file(self):
+ _, path = tempfile.mkstemp()
+ ini_template = """
+ [metadata]
+ description_file = %s
+ """
+ # Two \n's because pbr strips the file content and adds \n\n
+ # This way we can use it directly as the assert comparison
+ unicode_description = u'UTF8 description: é"…-ʃŋ\'\n\n'
+ ini = ini_template % path
+ with io.open(path, 'w', encoding='utf8') as f:
+ f.write(unicode_description)
+ config = config_from_ini(ini)
+ kwargs = util.setup_cfg_to_setup_kwargs(config)
+ self.assertEqual(unicode_description, kwargs['long_description'])
def _test_wsgi(self, cmd_name, output, extra_args=None):
cmd = os.path.join(self.temp_dir, 'bin', cmd_name)
- print("Running %s -p 0" % cmd)
- popen_cmd = [cmd, '-p', '0']
+ print("Running %s -p 0 -b 127.0.0.1" % cmd)
+ popen_cmd = [cmd, '-p', '0', '-b', '127.0.0.1']
if extra_args:
popen_cmd.extend(extra_args)
import logging # noqa
from collections import defaultdict
+import io
import os
import re
import shlex
in_cfg_value = split_multiline(in_cfg_value)
value = ''
for filename in in_cfg_value:
- description_file = open(filename)
+ description_file = io.open(filename, encoding='utf-8')
try:
value += description_file.read().strip() + '\n\n'
finally:
packages =
pbr
-[pbr]
-autodoc_tree_index_modules = True
-autodoc_tree_excludes =
- setup.py
- pbr/tests/
-api_doc_dir = reference/api
-
[entry_points]
distutils.setup_keywords =
pbr = pbr.core:pbr
console_scripts =
pbr = pbr.cmd.main:main
-[build_sphinx]
-all-files = 1
-build-dir = doc/build
-source-dir = doc/source
-warning-is-error = 1
-
[bdist_wheel]
universal = 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}
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
commands = stestr run --suppress-attachments {posargs}
[testenv:docs]
basepython = python3
-deps = -r{toxinidir}/doc/requirements.txt
-commands = python setup.py build_sphinx
+whitelist_externals = rm
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/doc/requirements.txt
+commands =
+ rm -rf doc/build doc/source/reference/api
+ sphinx-build -W -b html doc/source doc/build/html {posargs}
[testenv:releasenotes]
basepython = python3
-deps = -r{toxinidir}/doc/requirements.txt
+whitelist_externals = rm
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+ -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html