Hello community, here is the log from the commit of package python-reno for openSUSE:Factory checked in at 2020-04-19 21:49:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-reno (Old) and /work/SRC/openSUSE:Factory/.python-reno.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-reno" Sun Apr 19 21:49:32 2020 rev:8 rq:794362 version:3.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-reno/python-reno.changes 2019-06-18 14:50:41.757649717 +0200 +++ /work/SRC/openSUSE:Factory/.python-reno.new.2738/python-reno.changes 2020-04-19 21:49:34.728093892 +0200 @@ -1,0 +2,22 @@ +Wed Apr 15 15:29:40 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com> + +- update to 3.0.1 + * scan the whole branch if a version cannot be found + +------------------------------------------------------------------- +Fri Mar 27 12:13:30 UTC 2020 - pgaj...@suse.com + +- version update to 3.0.0 + * Remove usage of six + * [ussuri][goal] Drop python 2.7 support and testing + * Add extension metadata to sphinxext + * Handle Windows compatibility + * Scan all branches for cache generation + * Avoid docutils 0.15 with py2 + * Add Python 3 Train unit tests + * Fix py27 test: Update sphinx requirement + * OpenDev Migration Patch + * Switch to current hacking + * Remove references to oslosphinx + +------------------------------------------------------------------- Old: ---- _service reno-2.11.3.tar.gz New: ---- reno-3.0.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-reno.spec ++++++ --- /var/tmp/diff_new_pack.rXMDem/_old 2020-04-19 21:49:35.864096171 +0200 +++ /var/tmp/diff_new_pack.rXMDem/_new 2020-04-19 21:49:35.868096179 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-reno # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,56 +16,40 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define skip_python2 1 Name: python-reno -Version: 2.11.3 +Version: 3.0.1 Release: 0 Summary: RElease NOtes manager License: Apache-2.0 Group: Development/Languages/Python -URL: http://www.openstack.org/ -Source0: https://files.pythonhosted.org/packages/source/r/reno/reno-2.11.3.tar.gz -BuildRequires: openstack-macros -BuildRequires: python2-PyYAML -BuildRequires: python2-Sphinx -BuildRequires: python2-docutils -BuildRequires: python2-dulwich -BuildRequires: python2-openstackdocstheme -BuildRequires: python2-oslotest -BuildRequires: python2-pbr -BuildRequires: python2-setuptools -BuildRequires: python2-stestr -BuildRequires: python2-testscenarios -BuildRequires: python2-testtools -BuildRequires: python3-PyYAML -BuildRequires: python3-Sphinx -BuildRequires: python3-docutils -BuildRequires: python3-dulwich -BuildRequires: python3-openstackdocstheme -BuildRequires: python3-oslotest -BuildRequires: python3-pbr -BuildRequires: python3-setuptools -BuildRequires: python3-stestr -BuildRequires: python3-testscenarios -BuildRequires: python3-testtools -Requires: python-PyYAML +URL: https://www.openstack.org/ +Source0: https://files.pythonhosted.org/packages/source/r/reno/reno-%{version}.tar.gz +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module docutils} +BuildRequires: %{python_module dulwich >= 0.15.0} +BuildRequires: %{python_module openstackdocstheme} +BuildRequires: %{python_module oslotest} +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module stestr} +BuildRequires: %{python_module testscenarios} +BuildRequires: %{python_module testtools} +BuildRequires: fdupes +BuildRequires: git-core +BuildRequires: gpg2 +BuildRequires: python-rpm-macros +Requires: python-PyYAML >= 3.10 Requires: python-Sphinx Requires: python-docutils -Requires: python-dulwich +Requires: python-dulwich >= 0.15.0 Requires: python-pbr Requires: python-six -BuildArch: noarch -%if 0%{?suse_version} -BuildRequires: git-core -BuildRequires: gpg2 Requires(post): update-alternatives Requires(postun): update-alternatives -%else -BuildRequires: git -BuildRequires: gnupg -# on RDO, update-alternatives is in chkconfig -Requires(post): chkconfig -Requires(postun): chkconfig -%endif +BuildArch: noarch %python_subpackages %description @@ -73,16 +57,15 @@ repository and then building documentation from them. %prep -%autosetup -p1 -n reno-2.11.3 -# we dont need hacking -sed -i '/^hacking.*/d' test-requirements.txt -%py_req_cleanup +%autosetup -n reno-%{version} %build -%{python_build} +%python_build %install -%{python_install} +%python_install +%python_expand rm -r %{buildroot}%{$python_sitelib}/reno/tests +%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_clone -a %{buildroot}%{_bindir}/reno %post ++++++ reno-2.11.3.tar.gz -> reno-3.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/.zuul.yaml new/reno-3.0.1/.zuul.yaml --- old/reno-2.11.3/.zuul.yaml 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/.zuul.yaml 2020-04-01 21:32:27.000000000 +0200 @@ -1,9 +1,6 @@ - project: templates: - - openstack-python-jobs - - openstack-python35-jobs - - openstack-python36-jobs - - openstack-python37-jobs + - openstack-python3-ussuri-jobs - openstack-cover-jobs - publish-openstack-docs-pti - openstack-lower-constraints-jobs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/AUTHORS new/reno-3.0.1/AUTHORS --- old/reno-2.11.3/AUTHORS 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/AUTHORS 2020-04-01 21:33:22.000000000 +0200 @@ -7,6 +7,8 @@ Cedric Brandily <zze...@gmail.com> ChangBo Guo(gcb) <eric....@easystack.cn> Clint Byrum <cl...@fewbar.com> +Corey Bryant <corey.bry...@canonical.com> +Dirk Mueller <d...@dmllr.de> Doug Hellmann <d...@doughellmann.com> EdLeafe <e...@leafe.com> Flavio Percoco <flape...@gmail.com> @@ -24,6 +26,7 @@ Louis Taylor <lo...@kragniz.eu> Markus Zoeller <mzoel...@de.ibm.com> Matt Riedemann <mriedem...@gmail.com> +Matthew Treinish <mtrein...@kortar.org> Mike Perez <thin...@gmail.com> Monty Taylor <mord...@inaugust.com> Nguyen Hai Truong <truon...@vn.fujitsu.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/ChangeLog new/reno-3.0.1/ChangeLog --- old/reno-2.11.3/ChangeLog 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/ChangeLog 2020-04-01 21:33:22.000000000 +0200 @@ -1,6 +1,26 @@ CHANGES ======= +3.0.1 +----- + +* scan the whole branch if a version cannot be found + +3.0.0 +----- + +* Remove usage of six +* [ussuri][goal] Drop python 2.7 support and testing +* Add extension metadata to sphinxext +* Handle Windows compatibility +* Scan all branches for cache generation +* Avoid docutils 0.15 with py2 +* Add Python 3 Train unit tests +* Fix py27 test: Update sphinx requirement +* OpenDev Migration Patch +* Switch to current hacking +* Remove references to oslosphinx + 2.11.3 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/PKG-INFO new/reno-3.0.1/PKG-INFO --- old/reno-2.11.3/PKG-INFO 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/PKG-INFO 2020-04-01 21:33:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: reno -Version: 2.11.3 +Version: 3.0.1 Summary: RElease NOtes manager Home-page: https://docs.openstack.org/reno/latest/ Author: OpenStack @@ -73,9 +73,11 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation :: CPython +Requires-Python: >=3.6 Provides-Extra: sphinx Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/doc/source/conf.py new/reno-3.0.1/doc/source/conf.py --- old/reno-2.11.3/doc/source/conf.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/doc/source/conf.py 2020-04-01 21:32:27.000000000 +0200 @@ -12,14 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -import sys - # oslosphinx uses reno and reno uses oslosphinx. Make oslosphinx for # reno optional to break the build cycle try: - import openstackdocstheme -except: + import openstackdocstheme # noqa +except ImportError: has_theme = False else: has_theme = True @@ -31,27 +28,12 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', - # 'sphinx.ext.intersphinx', 'reno.sphinxext', 'reno._exts.show_reno_config', ] if has_theme: extensions.append('openstackdocstheme') - html_theme = 'openstackdocs' - -# openstackdocstheme options -repository_name = 'openstack/reno' -bug_project = '933' -bug_tag = 'docs' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - -# autodoc generation is a bit aggressive and a nuisance when doing heavy -# text edit cycles. -# execute "export SPHINX_DEBUG=1" in your terminal to disable - -# The suffix of source filenames. -source_suffix = '.rst' # The master toctree document. master_doc = 'index' @@ -60,39 +42,18 @@ project = u'reno' copyright = u'2013, OpenStack Foundation' -# If true, '()' will be appended to :func: etc. cross-reference text. -add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -add_module_names = True - # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Do not warn about non-local image URI suppress_warnings = ['image.nonlocal_uri'] -# -- Options for HTML output -------------------------------------------------- -# The theme to use for HTML and HTML Help pages. Major themes that come with -# Sphinx are currently 'default' and 'sphinxdoc'. -# html_theme_path = ["."] -# html_theme = '_theme' -# html_static_path = ['static'] - -# Output file base name for HTML help builder. -htmlhelp_basename = '%sdoc' % project - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, author, documentclass -# [howto/manual]). -latex_documents = [ - ('index', - '%s.tex' % project, - u'%s Documentation' % project, - u'OpenStack Foundation', 'manual'), -] +# -- openstackdocstheme configuration ----------------------------------------- + +if has_theme: + html_theme = 'openstackdocs' -# Example configuration for intersphinx: refer to the Python standard library. -# intersphinx_mapping = {'http://docs.python.org/': None} +repository_name = 'openstack/reno' +bug_project = '933' +bug_tag = 'docs' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/lower-constraints.txt new/reno-3.0.1/lower-constraints.txt --- old/reno-2.11.3/lower-constraints.txt 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/lower-constraints.txt 2020-04-01 21:32:27.000000000 +0200 @@ -1,6 +1,5 @@ docutils==0.11 dulwich==0.15.0 PyYAML==3.10.0 -six==1.9.0 Sphinx==1.6.1 stestr==2.0.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/releasenotes/notes/cache-scan-all-branches-a935824a844d1d9f.yaml new/reno-3.0.1/releasenotes/notes/cache-scan-all-branches-a935824a844d1d9f.yaml --- old/reno-2.11.3/releasenotes/notes/cache-scan-all-branches-a935824a844d1d9f.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/reno-3.0.1/releasenotes/notes/cache-scan-all-branches-a935824a844d1d9f.yaml 2020-04-01 21:32:27.000000000 +0200 @@ -0,0 +1,6 @@ +--- +features: + - | + The ``reno cache`` command and ``build_reno`` setuptools command now + default to scanning to all enabled branches. This ensures the cache is + complete for projects that use multiple branches, such as stable branches. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml new/reno-3.0.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml --- old/reno-2.11.3/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml 1970-01-01 01:00:00.000000000 +0100 +++ new/reno-3.0.1/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml 2020-04-01 21:32:27.000000000 +0200 @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The minimum version of Python now + supported by reno is Python 3.6. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/_exts/show_reno_config.py new/reno-3.0.1/reno/_exts/show_reno_config.py --- old/reno-2.11.3/reno/_exts/show_reno_config.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/_exts/show_reno_config.py 2020-04-01 21:32:27.000000000 +0200 @@ -13,7 +13,6 @@ from docutils import nodes from docutils.parsers import rst from docutils.statemachine import ViewList -import six from sphinx.util import logging from sphinx.util.nodes import nested_parse_with_titles @@ -37,7 +36,7 @@ for l in _multi_line_string(opt.help, ' '): yield l yield '' - if isinstance(opt.default, six.string_types) and '\n' in opt.default: + if isinstance(opt.default, str) and '\n' in opt.default: # Multi-line string yield ' Defaults to' yield '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/cache.py new/reno-3.0.1/reno/cache.py --- old/reno-2.11.3/reno/cache.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/cache.py 2020-04-01 21:32:27.000000000 +0200 @@ -10,6 +10,7 @@ # License for the specific language governing permissions and limitations # under the License. +import collections import os import sys @@ -21,7 +22,14 @@ def build_cache_db(conf, versions_to_include): s = scanner.Scanner(conf) - notes = s.get_notes_by_version() + + branches = [conf.branch] + if not conf.branch: # if no branch requested, scan all + branches += s.get_series_branches() + + notes = collections.OrderedDict() + for branch in branches: + notes.update(s.get_notes_by_version(branch)) # Default to including all versions returned by the scanner. if not versions_to_include: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/loader.py new/reno-3.0.1/reno/loader.py --- old/reno-2.11.3/reno/loader.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/loader.py 2020-04-01 21:32:27.000000000 +0200 @@ -14,7 +14,6 @@ import logging import os.path -import six import yaml from reno import scanner @@ -107,7 +106,7 @@ for section_name, section_content in content.items(): if section_name == self._config.prelude_section_name: - if not isinstance(section_content, six.string_types): + if not isinstance(section_content, str): LOG.warning( ('The %s section of %s ' 'does not parse as a single string. ' @@ -115,7 +114,7 @@ (self._config.prelude_section_name, filename), ) else: - if isinstance(section_content, six.string_types): + if isinstance(section_content, str): # A single string is OK, but wrap it with a list # so the rest of the code can treat the data model # consistently. @@ -129,7 +128,7 @@ ) else: for item in section_content: - if not isinstance(item, six.string_types): + if not isinstance(item, str): LOG.warning( ('The item %r in the %s section of %s ' 'parses as a %s instead of a string. ' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/scanner.py new/reno-3.0.1/reno/scanner.py --- old/reno-2.11.3/reno/scanner.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/scanner.py 2020-04-01 21:32:27.000000000 +0200 @@ -89,6 +89,9 @@ commit = walk_entry.commit store = repo.object_store + if os.path.sep == '\\': + subdir = subdir.replace('\\', '/') + parents = walk_entry._get_parents(commit) if not parents: @@ -484,6 +487,10 @@ commit = self[sha] tree = self[commit.tree] try: + if os.path.sep == '\\': + # Dulwich doesn't handle Windows paths, we need to take care of + # it ourselves + filename = filename.replace('\\', '/') mode, blob_sha = tree.lookup_path(self.get_object, filename.encode('utf-8')) except KeyError: @@ -810,7 +817,7 @@ "Return true if the file exists at the given commit." return bool(self.get_file_at_commit(filename, sha)) - def _get_series_branches(self): + def get_series_branches(self): "Get branches matching the branch_name_re config option." refs = self._repo.get_refs() LOG.debug('refs %s', list(refs.keys())) @@ -846,7 +853,7 @@ if branch.startswith('origin/'): branch = branch[7:] LOG.debug('looking for the branch before %s', branch) - branch_names = self._get_series_branches() + branch_names = self.get_series_branches() if branch not in branch_names: LOG.debug('Could not find branch %r among %s', branch, branch_names) @@ -910,7 +917,7 @@ return candidate return None - def get_notes_by_version(self): + def get_notes_by_version(self, branch=None): """Return an OrderedDict mapping versions to lists of notes files. The versions are presented in reverse chronological order. @@ -918,13 +925,13 @@ Notes files are associated with the earliest version for which they were available, regardless of whether they changed later. - :param reporoot: Path to the root of the git repository. - :type reporoot: str + :param branch: The branch to scan. If not provided, using the branch + configured in ``self.conf``. """ reporoot = self.reporoot notesdir = self.conf.notespath - branch = self.conf.branch + branch = branch or self.conf.branch earliest_version = self.conf.earliest_version collapse_pre_releases = self.conf.collapse_pre_releases stop_at_branch_base = self.conf.stop_at_branch_base @@ -967,7 +974,7 @@ # On the current branch, stop at the point where the most # recent branch was created, if we can find one. LOG.debug('working on current branch without earliest_version') - branches = self._get_series_branches() + branches = self.get_series_branches() if branches: for earlier_branch in reversed(branches): LOG.debug('checking if current branch is later than %s', @@ -1011,8 +1018,17 @@ if not scan_stop_tag: earliest_version = branch_base else: - idx = versions_by_date.index(scan_stop_tag) - earliest_version = versions_by_date[idx - 1] + try: + idx = versions_by_date.index(scan_stop_tag) + except ValueError: + LOG.debug( + 'could not find calculated scan stop point %s ' + 'in history of %s, so using branch base %s instead', + scan_stop_tag, branch, branch_base, + ) + earliest_version = branch_base + else: + earliest_version = versions_by_date[idx - 1] LOG.debug('using version before %s as scan stop point', scan_stop_tag) if earliest_version and collapse_pre_releases: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/setup_command.py new/reno-3.0.1/reno/setup_command.py --- old/reno-2.11.3/reno/setup_command.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/setup_command.py 2020-04-01 21:32:27.000000000 +0200 @@ -24,7 +24,6 @@ from distutils import errors from distutils import log -import six from reno import cache from reno import config @@ -108,7 +107,7 @@ if val is None: setattr(self, option, default) return default - elif not isinstance(val, six.string_types): + elif not isinstance(val, str): raise errors.DistutilsOptionError("'%s' must be a %s (got `%s`)" % (option, what, val)) return val diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/sphinxext.py new/reno-3.0.1/reno/sphinxext.py --- old/reno-2.11.3/reno/sphinxext.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/sphinxext.py 2020-04-01 21:32:27.000000000 +0200 @@ -21,6 +21,7 @@ from sphinx.util.nodes import nested_parse_with_titles from dulwich import repo +import reno from reno import config from reno import defaults from reno import formatter @@ -123,3 +124,8 @@ def setup(app): app.add_directive('release-notes', ReleaseNotesDirective) + metadata_dict = { + 'version': reno.__version__, + 'parallel_read_safe': False + } + return metadata_dict diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/tests/test_cache.py new/reno-3.0.1/reno/tests/test_cache.py --- old/reno-2.11.3/reno/tests/test_cache.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/tests/test_cache.py 2020-04-01 21:32:27.000000000 +0200 @@ -12,6 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. +import collections import fixtures import textwrap @@ -24,10 +25,15 @@ class TestCache(base.TestCase): - scanner_output = { - '0.0.0': [('note1', 'shaA')], - '1.0.0': [('note2', 'shaB'), ('note3', 'shaC')], - } + scanner_output = [ + collections.OrderedDict([ # master + ('0.0.0', [('note1', 'shaA')]), + ('1.0.0', [('note2', 'shaB'), ('note3', 'shaC')]), + ]), + collections.OrderedDict([ # stable/1.0 + ('1.0.1', [('note4', 'shaD')]), + ]), + ] note_bodies = { 'note1': textwrap.dedent(""" @@ -42,7 +48,11 @@ 'note3': textwrap.dedent(""" features: - We added a feature! - """) + """), + 'note4': textwrap.dedent(""" + fixes: + - We fixed all the bugs! + """), } def _get_note_body(self, filename, sha): @@ -57,12 +67,18 @@ self.c = config.Config('.') @mock.patch('reno.scanner.Scanner.get_notes_by_version') - def test_build_cache_db(self, gnbv): - gnbv.return_value = self.scanner_output + @mock.patch('reno.scanner.Scanner.get_series_branches') + def test_build_cache_db(self, mock_get_branches, mock_get_notes): + mock_get_notes.side_effect = self.scanner_output + mock_get_branches.return_value = ['stable/1.0'] expected = { 'notes': [ - {'version': k, 'files': v} - for k, v in self.scanner_output.items() + {'version': '0.0.0', + 'files': [('note1', 'shaA')]}, + {'version': '1.0.0', + 'files': [('note2', 'shaB'), ('note3', 'shaC')]}, + {'version': '1.0.1', + 'files': [('note4', 'shaD')]}, ], 'file-contents': { 'note1': { @@ -77,6 +93,9 @@ 'note3': { 'features': ['We added a feature!'], }, + 'note4': { + 'fixes': ['We fixed all the bugs!'], + }, }, } @@ -85,4 +104,7 @@ versions_to_include=[], ) + mock_get_branches.assert_called_once() + mock_get_notes.assert_has_calls([ + mock.call(None), mock.call('stable/1.0')]) self.assertEqual(expected, db) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/tests/test_loader.py new/reno-3.0.1/reno/tests/test_loader.py --- old/reno-2.11.3/reno/tests/test_loader.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/tests/test_loader.py 2020-04-01 21:32:27.000000000 +0200 @@ -17,7 +17,6 @@ import fixtures import mock -import six import yaml from reno import config @@ -73,7 +72,7 @@ This is a single string. ''')) print(type(note_bodies['issues'])) - self.assertIsInstance(note_bodies['issues'], six.string_types) + self.assertIsInstance(note_bodies['issues'], str) ldr = self._make_loader(note_bodies) parse_results = ldr.parse_note_file('note1', None) self.assertIsInstance(parse_results['issues'], list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/tests/test_scanner.py new/reno-3.0.1/reno/tests/test_scanner.py --- old/reno-2.11.3/reno/tests/test_scanner.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/tests/test_scanner.py 2020-04-01 21:32:27.000000000 +0200 @@ -2432,7 +2432,7 @@ self.scanner = scanner.Scanner(self.c) self.assertEqual( [], - self.scanner._get_series_branches(), + self.scanner.get_series_branches(), ) def test_real_branches_sorted_names(self): @@ -2445,7 +2445,7 @@ self.scanner = scanner.Scanner(self.c) self.assertEqual( ['stable/a', 'stable/b'], - self.scanner._get_series_branches(), + self.scanner.get_series_branches(), ) def test_eol_tag(self): @@ -2455,7 +2455,7 @@ self.scanner = scanner.Scanner(self.c) self.assertEqual( ['stable/a'], - self.scanner._get_series_branches(), + self.scanner.get_series_branches(), ) def test_mix_tag_and_branch(self): @@ -2468,5 +2468,5 @@ self.scanner = scanner.Scanner(self.c) self.assertEqual( ['stable/a', 'stable/b'], - self.scanner._get_series_branches(), + self.scanner.get_series_branches(), ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/tests/test_utils.py new/reno-3.0.1/reno/tests/test_utils.py --- old/reno-2.11.3/reno/tests/test_utils.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/tests/test_utils.py 2020-04-01 21:32:27.000000000 +0200 @@ -13,7 +13,6 @@ # under the License. import mock -import six from reno.tests import base from reno import utils @@ -28,7 +27,7 @@ randrange.return_value = ord('a') actual = utils.get_random_string() expected = '61' * 8 # hex for ord('a') - self.assertIsInstance(actual, six.text_type) + self.assertIsInstance(actual, str) self.assertEqual(expected, actual) @mock.patch('random.randrange') @@ -38,5 +37,5 @@ randrange.return_value = ord('a') actual = utils.get_random_string() expected = '62' * 8 # hex for ord('b') - self.assertIsInstance(actual, six.text_type) + self.assertIsInstance(actual, str) self.assertEqual(expected, actual) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno/utils.py new/reno-3.0.1/reno/utils.py --- old/reno-2.11.3/reno/utils.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/reno/utils.py 2020-04-01 21:32:27.000000000 +0200 @@ -23,11 +23,11 @@ def get_random_string(nbytes=8): """Return a fixed-length random string - :rtype: six.text_type + :rtype: str """ try: # NOTE(dhellmann): Not all systems support urandom(). - # hexlify returns six.binary_type, decode to convert to six.text_type. + # hexlify returns binary, decode to convert to str. val = binascii.hexlify(os.urandom(nbytes)).decode('utf-8') except Exception as e: print('ERROR, perhaps urandom is not supported: %s' % e) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno.egg-info/PKG-INFO new/reno-3.0.1/reno.egg-info/PKG-INFO --- old/reno-2.11.3/reno.egg-info/PKG-INFO 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/reno.egg-info/PKG-INFO 2020-04-01 21:33:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: reno -Version: 2.11.3 +Version: 3.0.1 Summary: RElease NOtes manager Home-page: https://docs.openstack.org/reno/latest/ Author: OpenStack @@ -73,9 +73,11 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: POSIX :: Linux Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: Implementation :: CPython +Requires-Python: >=3.6 Provides-Extra: sphinx Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno.egg-info/SOURCES.txt new/reno-3.0.1/reno.egg-info/SOURCES.txt --- old/reno-2.11.3/reno.egg-info/SOURCES.txt 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/reno.egg-info/SOURCES.txt 2020-04-01 21:33:22.000000000 +0200 @@ -40,11 +40,13 @@ releasenotes/notes/branches-eol-bcafc2a007a1eb9f.yaml releasenotes/notes/bug-1537451-f44591da125ba09d.yaml releasenotes/notes/cache-ordering-6c743f68e3f7107f.yaml +releasenotes/notes/cache-scan-all-branches-a935824a844d1d9f.yaml releasenotes/notes/collapse-pre-releases-0b24e0bab46d7cf1.yaml releasenotes/notes/config-option-branch-name-re-8ecfe93195b8824e.yaml releasenotes/notes/config-option-sections-9c68b070698e984a.yaml releasenotes/notes/custom-tag-versions-d02028b6d35db967.yaml releasenotes/notes/default-repository-root-cli-85d23034bef81619.yaml +releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml releasenotes/notes/dulwich-rewrite-3a5377162d97402b.yaml releasenotes/notes/first-release-2857bfc9474c00b4.yaml releasenotes/notes/fix-branch-base-detection-95300805f26a0c15.yaml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno.egg-info/pbr.json new/reno-3.0.1/reno.egg-info/pbr.json --- old/reno-2.11.3/reno.egg-info/pbr.json 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/reno.egg-info/pbr.json 2020-04-01 21:33:22.000000000 +0200 @@ -1 +1 @@ -{"git_version": "cba8022", "is_release": true} \ No newline at end of file +{"git_version": "bd3886a", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/reno.egg-info/requires.txt new/reno-3.0.1/reno.egg-info/requires.txt --- old/reno-2.11.3/reno.egg-info/requires.txt 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/reno.egg-info/requires.txt 2020-04-01 21:33:22.000000000 +0200 @@ -1,14 +1,12 @@ pbr PyYAML>=3.10 -six>=1.9.0 dulwich>=0.15.0 [sphinx] -sphinx>=1.6.1 +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.1 docutils>=0.11 [test] -hacking!=0.13.0,<0.14,>=0.12.0 mock>=1.2 coverage!=4.4,>=4.0 python-subunit>=0.0.18 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/requirements.txt new/reno-3.0.1/requirements.txt --- old/reno-2.11.3/requirements.txt 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/requirements.txt 2020-04-01 21:32:27.000000000 +0200 @@ -4,5 +4,4 @@ pbr PyYAML>=3.10 -six>=1.9.0 dulwich>=0.15.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/setup.cfg new/reno-3.0.1/setup.cfg --- old/reno-2.11.3/setup.cfg 2019-04-04 06:00:56.000000000 +0200 +++ new/reno-3.0.1/setup.cfg 2020-04-01 21:33:22.000000000 +0200 @@ -6,6 +6,7 @@ author = OpenStack author-email = openstack-disc...@lists.openstack.org home-page = https://docs.openstack.org/reno/latest/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,10 +14,11 @@ License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 2 - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython [files] packages = @@ -30,7 +32,7 @@ [extras] sphinx = - sphinx>=1.6.1 # BSD + sphinx>=1.6.1,!=1.6.6,!=1.6.7,!=2.1.0 # BSD docutils>=0.11 # OSI-Approved Open Source, Public Domain [compile_catalog] @@ -42,9 +44,6 @@ output_dir = reno/locale input_file = reno/locale/reno.pot -[wheel] -universal = 1 - [egg_info] tag_build = tag_date = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/setup.py new/reno-3.0.1/setup.py --- old/reno-2.11.3/setup.py 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/setup.py 2020-04-01 21:32:27.000000000 +0200 @@ -16,14 +16,6 @@ # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setuptools.setup( setup_requires=['pbr'], pbr=True) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/test-requirements.txt new/reno-3.0.1/test-requirements.txt --- old/reno-2.11.3/test-requirements.txt 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/test-requirements.txt 2020-04-01 21:32:27.000000000 +0200 @@ -2,8 +2,6 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0 - mock>=1.2 coverage!=4.4,>=4.0 # Apache-2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/reno-2.11.3/tox.ini new/reno-3.0.1/tox.ini --- old/reno-2.11.3/tox.ini 2019-04-04 05:59:54.000000000 +0200 +++ new/reno-3.0.1/tox.ini 2020-04-01 21:32:27.000000000 +0200 @@ -1,10 +1,11 @@ [tox] -minversion = 2.0 -envlist = py36,py35,py37,py27,pep8 +minversion = 3.1.0 +envlist = py37,pep8 +ignore_basepython_conflict = True [testenv] +basepython = python3 usedevelop = True -install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = @@ -14,23 +15,21 @@ stestr run --slowest {posargs} [testenv:pep8] -basepython = python3 +deps = {[testenv]deps} + hacking >= 1.1.0,<1.2.0 commands = flake8 reno -q lint [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt {[testenv]deps} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 setenv = {[testenv]setenv} PYTHON=coverage run --source reno --parallel-mode @@ -47,11 +46,9 @@ deps = -c{toxinidir}/lower-constraints.txt {[testenv]deps} -basepython = python3 commands = sphinx-build -a -W -E -b html doc/source doc/build/html [testenv:debug] -basepython = python3 commands = oslo_debug_helper {posargs} [flake8]