vars:
pbr_pip_version: 'git+https://github.com/pypa/pip.git#egg=pip'
+- job:
+ name: pbr-installation-openstack-focal
+ parent: pbr-installation-openstack
+ nodeset: ubuntu-focal
+ description: |
+ Run pbr integration testing on older Ubuntu which allows us
+ to test compatibility with older versions of pip and setuptools.
+
- project:
templates:
- lib-forward-testing
- openstack-tox-py38
- openstack-tox-py39
- pbr-installation-openstack
+ - pbr-installation-openstack-focal
- pbr-installation-openstack-pip-dev
- tempest-full:
override-checkout: stable/train
- openstack-tox-py38
- openstack-tox-py39
- pbr-installation-openstack
+ - pbr-installation-openstack-focal
- pbr-installation-openstack-pip-dev
- tempest-full:
override-checkout: stable/train
Chang Bo Guo <guochbo@cn.ibm.com>
ChangBo Guo(gcb) <eric.guo@easystack.cn>
Chris Dent <cdent@anticdent.org>
+Chris Dohmen <chris.dohmen@sciencelogic.com>
Christian Berendt <berendt@b1-systems.de>
Chuck Short <chuck.short@canonical.com>
Clark Boylan <clark.boylan@gmail.com>
dineshbhor <dinesh.bhor@nttdata.com>
jiansong <jian.song@easystack.cn>
lifeless <robertc@robertcollins.net>
+ljhuang <huang.liujie@99cloud.net>
manchandavishal <manchandavishal143@gmail.com>
melanie witt <melwitt@yahoo-inc.com>
melissaml <ma.lei@99cloud.net>
https://docs.opendev.org/opendev/infra-manual/latest/developers.html#development-workflow
+Release notes are managed through the tool
+`reno <https://pypi.org/project/reno/>`_. This tool will create
+a new file under the directory ``releasenotes`` that should
+be checked in with the code changes.
+
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
CHANGES
=======
+5.11.1
+------
+
+* Run PBR integration on Ubuntu Focal too
+* Remove numpy dependencies
+* Tie recursion calls to Dist object, not module
+* Update tox.ini to work with tox 4
+
+5.11.0
+------
+
+* Fix symbol identification in multiline message
+* Replace deprecated readfp method with read\_file
+
+5.10.0
+------
+
+* Specify Changelog procedure
+* Allow leading spaces when determining symbols
+* Use stdlib importlib.metadata where possible
+* Adding python classifiers py38 & py39
+
5.9.0
-----
Metadata-Version: 2.1
Name: pbr
-Version: 5.9.0
+Version: 5.11.1
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=2.6
Description-Content-Type: text/x-rst; charset=UTF-8
Metadata-Version: 2.1
Name: pbr
-Version: 5.9.0
+Version: 5.11.1
Summary: Python Build Reasonableness
Home-page: https://docs.openstack.org/pbr/latest/
Author: OpenStack
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=2.6
Description-Content-Type: text/x-rst; charset=UTF-8
releasenotes/notes/fix-keywords-as-cfg-list-6cadc5141429d7f5.yaml
releasenotes/notes/fix-mapping-value-explode-with-equal-sign-41bf822fa4dd0e68.yaml
releasenotes/notes/fix-pep517-metadata-regression-bc287e60e45b2732.yaml
+releasenotes/notes/fix-symbols-leading-spaces-f68928d75a8f0997.yaml
releasenotes/notes/ignore-find-links-07cf54f465aa33a6.yaml
releasenotes/notes/long-descr-content-type-f9a1003acbb8740f.yaml
releasenotes/notes/pep517-support-89189ce0bab15845.yaml
integer_types = (int, long) # noqa
-# We use this canary to detect whether the module has already been called,
-# in order to avoid recursion
-in_use = False
-
-
def pbr(dist, attr, value):
"""Implements the actual pbr setup() keyword.
# particularly when using PEP517 build-system configs without
# setup_requires in setup.py. We can avoid the recursion by setting
# this canary so we don't repeat ourselves.
- global in_use
- if in_use:
+ if hasattr(dist, '_pbr_initialized'):
return
- in_use = True
+ dist._pbr_initialized = True
if not value:
return
# git log output affecting out ability to have working sem ver headers.
changelog = git._run_git_command(['log', '--pretty=%B', version_spec],
git_dir)
- header_len = len('sem-ver:')
- commands = [line[header_len:].strip() for line in changelog.split('\n')
- if line.lower().startswith('sem-ver:')]
symbols = set()
- for command in commands:
- symbols.update([symbol.strip() for symbol in command.split(',')])
+ header = 'sem-ver:'
+ for line in changelog.split("\n"):
+ line = line.lower().strip()
+ if not line.lower().strip().startswith(header):
+ continue
+ new_symbols = line[len(header):].strip().split(",")
+ symbols.update([symbol.strip() for symbol in new_symbols])
def _handle_symbol(symbol, symbols, impact):
if symbol in symbols:
scenarios = [
('pip-latest', {'modules': ['pip']}),
- ('setuptools-Bionic', {
- 'modules': ['pip==9.0.1', 'setuptools==39.0.1']}),
- ('setuptools-Stretch', {
- 'modules': ['pip==9.0.1', 'setuptools==33.1.1']}),
- ('setuptools-EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}),
- ('setuptools-Buster', {
- 'modules': ['pip==18.1', 'setuptools==40.8.0']}),
- ('setuptools-Focal', {
- 'modules': ['pip==20.0.2', 'setuptools==45.2.0']}),
+ (
+ 'setuptools-Bullseye',
+ {'modules': ['pip==20.3.4', 'setuptools==52.0.0']},
+ ),
+ (
+ 'setuptools-Focal',
+ {'modules': ['pip==20.0.2', 'setuptools==45.2.0']},
+ ),
+ (
+ 'setuptools-Jammy',
+ {'modules': ['pip==22.0.2', 'setuptools==59.6.0']},
+ ),
]
@testtools.skipUnless(
os.environ.get('PBR_INTEGRATION', None) == '1',
- 'integration tests not enabled')
+ 'integration tests not enabled',
+ )
def test_pip_versions(self):
pkgs = {
'test_markers':
allow_fail=False)[0])
-class TestLTSSupport(base.BaseTestCase):
-
- # These versions come from the versions installed from the 'virtualenv'
- # command from the 'python-virtualenv' package.
- scenarios = [
+# Handle collections.abc moves in python breaking old pip
+# These versions come from the versions installed from the 'virtualenv'
+# command from the 'python-virtualenv' package.
+if sys.version_info[0:3] < (3, 10, 0):
+ lts_scenarios = [
('Bionic', {'modules': ['pip==9.0.1', 'setuptools==39.0.1']}),
('Stretch', {'modules': ['pip==9.0.1', 'setuptools==33.1.1']}),
('EL8', {'modules': ['pip==9.0.3', 'setuptools==39.2.0']}),
('Buster', {'modules': ['pip==18.1', 'setuptools==40.8.0']}),
('Focal', {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}),
]
+else:
+ lts_scenarios = [
+ ('Bullseye', {'modules': ['pip==20.3.4', 'setuptools==52.0.0']}),
+ ('Focal', {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}),
+ ('Jammy', {'modules': ['pip==22.0.2', 'setuptools==59.6.0']}),
+ ]
+
+
+class TestLTSSupport(base.BaseTestCase):
+
+ scenarios = lts_scenarios
@testtools.skipUnless(
os.environ.get('PBR_INTEGRATION', None) == '1',
- 'integration tests not enabled')
+ 'integration tests not enabled',
+ )
def test_lts_venv_default_versions(self):
venv = self.useFixture(
test_packaging.Venv('setuptools', modules=self.modules))
version = packaging._get_version_from_git()
self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+ def test_multi_inline_symbols_no_space(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit('Sem-ver: feature,api-break')
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+
+ def test_multi_inline_symbols_spaced(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit('Sem-ver: feature, api-break')
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+
+ def test_multi_inline_symbols_reversed(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit('Sem-ver: api-break,feature')
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+
+ def test_leading_space(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit(' sem-ver: api-break')
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+
+ def test_leading_space_multiline(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit(
+ (
+ ' Some cool text\n'
+ ' sem-ver: api-break'
+ )
+ )
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('2.0.0.dev1'))
+
+ def test_leading_characters_symbol_not_found(self):
+ self.repo.commit()
+ self.repo.tag('1.2.3')
+ self.repo.commit(' ssem-ver: api-break')
+ version = packaging._get_version_from_git()
+ self.assertThat(version, matchers.StartsWith('1.2.4.dev1'))
+
def test_tagged_version_has_tag_version(self):
self.repo.commit()
self.repo.tag('1.2.3')
def config_from_ini(ini):
config = {}
+ ini = textwrap.dedent(six.u(ini))
if sys.version_info >= (3, 2):
parser = configparser.ConfigParser()
+ parser.read_file(io.StringIO(ini))
else:
parser = configparser.SafeConfigParser()
- ini = textwrap.dedent(six.u(ini))
- parser.readfp(io.StringIO(ini))
+ parser.readfp(io.StringIO(ini))
for section in parser.sections():
config[section] = dict(parser.items(section))
return config
import operator
import sys
-try:
- import importlib_metadata
+# TODO(stephenfin): Remove this once we drop support for Python < 3.8
+if sys.version_info >= (3, 8):
+ from importlib import metadata as importlib_metadata
use_importlib = True
-except ImportError:
- use_importlib = False
+else:
+ try:
+ import importlib_metadata
+ use_importlib = True
+ except ImportError:
+ use_importlib = False
def _is_int(string):
--- /dev/null
+---
+fixes:
+ - |
+ Fix an issue where symbols that were indented
+ would produce an incorrect version.
\ No newline at end of file
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
[options]
python_requires = >=2.6
sudo apt-get update
sudo apt-get install -y --force-yes libvirt-dev libxml2-dev libxslt-dev libmysqlclient-dev libpq-dev libnspr4-dev pkg-config libsqlite3-dev libffi-dev libldap2-dev libsasl2-dev ccache libkrb5-dev liberasurecode-dev libjpeg-dev libsystemd-dev libnss3-dev libssl-dev
-# FOR numpy / pyyaml
-# The source list has been removed from our apt config so rather than
-# installing deps via apt-get build-dep <PKG> we install the lists provied
-# by apt-cache showsrc <PKG>
-
-# Numpy
-sudo apt-get install -y --force-yes cython debhelper gfortran libblas-dev liblapack-dev python-all-dbg python-all-dev python-nose python-tz python3-all-dbg python3-all-dev python3-nose python3-tz
-#pyyaml
-sudo apt-get install -y --force-yes debhelper python-all-dev python-all-dbg python3-all-dev python3-all-dbg libyaml-dev cython cython-dbg quilt
+# FOR pyyaml
+sudo apt-get install -y --force-yes debhelper python3-all-dev python3-all-dbg libyaml-dev cython3 cython3-dbg quilt
# And use ccache explitly
export PATH=/usr/lib/ccache:$PATH
[tox]
minversion = 3.18.0
-envlist = pep8,py27,py37,docs
-ignore_basepython_conflict = True
+envlist = pep8,py3,docs
[testenv]
-usedevelop = True
-basepython = python3
-passenv = PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS
+usedevelop = true
+passenv =
+ PBR_INTEGRATION
+ PIPFLAGS
+ PIPVERSION
+ PBRVERSION
+ REPODIR
+ WHEELHOUSE
+ PROJECTS
# TODO(fungi): drop distutils override once logging improves in Setuptools
# https://github.com/pypa/setuptools/issues/3038
setenv =
commands = pre-commit run -a
[testenv:docs]
-allowlist_externals = rm
+allowlist_externals =
+ rm
deps =
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html {posargs}
[testenv:releasenotes]
-allowlist_externals = rm
+allowlist_externals =
+ rm
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build