Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pbr for openSUSE:Factory checked in at 2025-02-12 21:30:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pbr (Old) and /work/SRC/openSUSE:Factory/.python-pbr.new.8181 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pbr" Wed Feb 12 21:30:39 2025 rev:71 rq:1245349 version:6.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pbr/python-pbr.changes 2024-10-29 14:32:52.587865937 +0100 +++ /work/SRC/openSUSE:Factory/.python-pbr.new.8181/python-pbr.changes 2025-02-12 21:30:48.832466796 +0100 @@ -1,0 +2,16 @@ +Wed Feb 12 10:34:46 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 6.1.1 + * docs: Drop SetupTools from pyproject.toml example + * Simplify PBR dependency on SetupTools + * Update setup.cfg example in Usage document + * Clarify PEP 517 implementation for users +- from version 6.1.1.0b1 + * Set up PBR with setuptools as a dependency + * Use pyproject.toml + * Test pip and setup.py install behavior in PBR testing + * Remove the use of six from PBR + * Fix integration testing of current change + * Update PBR testing for Noble + +------------------------------------------------------------------- Old: ---- pbr-6.1.0.tar.gz New: ---- pbr-6.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pbr.spec ++++++ --- /var/tmp/diff_new_pack.KXe8Wd/_old 2025-02-12 21:30:49.500494335 +0100 +++ /var/tmp/diff_new_pack.KXe8Wd/_new 2025-02-12 21:30:49.500494335 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-pbr # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,7 +26,7 @@ %bcond_with test %endif Name: python-pbr%{psuffix} -Version: 6.1.0 +Version: 6.1.1 Release: 0 Summary: Python Build Reasonableness License: Apache-2.0 ++++++ pbr-6.1.0.tar.gz -> pbr-6.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/.pre-commit-config.yaml new/pbr-6.1.1/.pre-commit-config.yaml --- old/pbr-6.1.0/.pre-commit-config.yaml 2024-08-27 15:16:54.000000000 +0200 +++ new/pbr-6.1.1/.pre-commit-config.yaml 2025-02-04 15:24:43.000000000 +0100 @@ -32,7 +32,7 @@ - id: flake8 name: flake8 additional_dependencies: - - hacking>=4.0.0,<4.1.0 + - hacking>=7.0.0,<7.1.0 language: python entry: flake8 files: '^.*\.py$' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/.zuul.yaml new/pbr-6.1.1/.zuul.yaml --- old/pbr-6.1.0/.zuul.yaml 2024-08-27 15:16:54.000000000 +0200 +++ new/pbr-6.1.1/.zuul.yaml 2025-02-04 15:24:43.000000000 +0100 @@ -96,6 +96,26 @@ vars: pbr_pip_version: 'git+https://github.com/pypa/pip.git#egg=pip' +- job: + name: pbr-installation-openstack-jammy + parent: pbr-installation-openstack + nodeset: ubuntu-jammy + +- job: + name: pbr-installation-openstack-pip-dev-jammy + parent: pbr-installation-openstack-pip-dev + nodeset: ubuntu-jammy + +- job: + name: pbr-installation-openstack-noble + parent: pbr-installation-openstack + nodeset: ubuntu-noble + +- job: + name: pbr-installation-openstack-pip-dev-noble + parent: pbr-installation-openstack-pip-dev + nodeset: ubuntu-noble + - project: templates: - lib-forward-testing-python3 @@ -112,10 +132,11 @@ - openstack-tox-py39 - openstack-tox-py310 - openstack-tox-py311 - - openstack-tox-py312: - voting: false - - pbr-installation-openstack - - pbr-installation-openstack-pip-dev + - openstack-tox-py312 + - pbr-installation-openstack-jammy + - pbr-installation-openstack-pip-dev-jammy + - pbr-installation-openstack-noble + - pbr-installation-openstack-pip-dev-noble gate: jobs: - openstack-tox-pep8 @@ -127,9 +148,14 @@ - openstack-tox-py39 - openstack-tox-py310 - openstack-tox-py311 - - pbr-installation-openstack - - pbr-installation-openstack-pip-dev + - openstack-tox-py312 + - pbr-installation-openstack-jammy + - pbr-installation-openstack-pip-dev-jammy + - pbr-installation-openstack-noble + - pbr-installation-openstack-pip-dev-noble periodic: jobs: - - pbr-installation-openstack - - pbr-installation-openstack-pip-dev + - pbr-installation-openstack-jammy + - pbr-installation-openstack-pip-dev-jammy + - pbr-installation-openstack-noble + - pbr-installation-openstack-pip-dev-noble diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/ChangeLog new/pbr-6.1.1/ChangeLog --- old/pbr-6.1.0/ChangeLog 2024-08-27 15:17:49.000000000 +0200 +++ new/pbr-6.1.1/ChangeLog 2025-02-04 15:27:13.000000000 +0100 @@ -1,6 +1,24 @@ CHANGES ======= +6.1.1 +----- + +* docs: Drop SetupTools from pyproject.toml example +* Simplify PBR dependency on SetupTools +* Update setup.cfg example in Usage document +* Clarify PEP 517 implementation for users + +6.1.1.0b1 +--------- + +* Set up PBR with setuptools as a dependency +* Use pyproject.toml +* Test pip and setup.py install behavior in PBR testing +* Remove the use of six from PBR +* Fix integration testing of current change +* Update PBR testing for Noble + 6.1.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/PKG-INFO new/pbr-6.1.1/PKG-INFO --- old/pbr-6.1.0/PKG-INFO 2024-08-27 15:17:49.346071200 +0200 +++ new/pbr-6.1.1/PKG-INFO 2025-02-04 15:27:13.869112000 +0100 @@ -1,59 +1,13 @@ Metadata-Version: 2.1 Name: pbr -Version: 6.1.0 +Version: 6.1.1 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack Author-email: openstack-disc...@lists.openstack.org -License: UNKNOWN Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ Project-URL: Source Code, https://opendev.org/openstack/pbr -Description: Introduction - ============ - - .. image:: https://img.shields.io/pypi/v/pbr.svg - :target: https://pypi.python.org/pypi/pbr/ - :alt: Latest Version - - .. image:: https://img.shields.io/pypi/dm/pbr.svg - :target: https://pypi.python.org/pypi/pbr/ - :alt: Downloads - - PBR is a library that injects some useful and sensible default behaviors - into your setuptools run. It started off life as the chunks of code that - were copied between all of the `OpenStack`_ projects. Around the time that - OpenStack hit 18 different projects each with at least 3 active branches, - it seemed like a good time to make that code into a proper reusable library. - - PBR is only mildly configurable. The basic idea is that there's a decent - way to run things and if you do, you should reap the rewards, because then - it's simple and repeatable. If you want to do things differently, cool! But - you've already got the power of Python at your fingertips, so you don't - really need PBR. - - PBR builds on top of the work that `d2to1`_ started to provide for declarative - configuration. `d2to1`_ is itself an implementation of the ideas behind - `distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards - `PEP 426`_ and Metadata 2.0, declarative config is still a great idea and - specifically important in trying to distribute setup code as a library - when that library itself will alter how the setup is processed. As Metadata - 2.0 and other modern Python packaging PEPs come out, PBR aims to support - them as quickly as possible. - - * License: Apache License, Version 2.0 - * Documentation: https://docs.openstack.org/pbr/latest/ - * Source: https://opendev.org/openstack/pbr - * Bugs: https://bugs.launchpad.net/pbr - * Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html - * ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html - - .. _d2to1: https://pypi.python.org/pypi/d2to1 - .. _distutils2: https://pypi.python.org/pypi/Distutils2 - .. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ - .. _OpenStack: https://www.openstack.org/ - -Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Environment :: OpenStack @@ -74,3 +28,49 @@ Classifier: Programming Language :: Python :: 3.11 Requires-Python: >=2.6 Description-Content-Type: text/x-rst; charset=UTF-8 +License-File: LICENSE +Requires-Dist: setuptools + +Introduction +============ + +.. image:: https://img.shields.io/pypi/v/pbr.svg + :target: https://pypi.python.org/pypi/pbr/ + :alt: Latest Version + +.. image:: https://img.shields.io/pypi/dm/pbr.svg + :target: https://pypi.python.org/pypi/pbr/ + :alt: Downloads + +PBR is a library that injects some useful and sensible default behaviors +into your setuptools run. It started off life as the chunks of code that +were copied between all of the `OpenStack`_ projects. Around the time that +OpenStack hit 18 different projects each with at least 3 active branches, +it seemed like a good time to make that code into a proper reusable library. + +PBR is only mildly configurable. The basic idea is that there's a decent +way to run things and if you do, you should reap the rewards, because then +it's simple and repeatable. If you want to do things differently, cool! But +you've already got the power of Python at your fingertips, so you don't +really need PBR. + +PBR builds on top of the work that `d2to1`_ started to provide for declarative +configuration. `d2to1`_ is itself an implementation of the ideas behind +`distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards +`PEP 426`_ and Metadata 2.0, declarative config is still a great idea and +specifically important in trying to distribute setup code as a library +when that library itself will alter how the setup is processed. As Metadata +2.0 and other modern Python packaging PEPs come out, PBR aims to support +them as quickly as possible. + +* License: Apache License, Version 2.0 +* Documentation: https://docs.openstack.org/pbr/latest/ +* Source: https://opendev.org/openstack/pbr +* Bugs: https://bugs.launchpad.net/pbr +* Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html +* ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html + +.. _d2to1: https://pypi.python.org/pypi/d2to1 +.. _distutils2: https://pypi.python.org/pypi/Distutils2 +.. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ +.. _OpenStack: https://www.openstack.org/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/doc/requirements.txt new/pbr-6.1.1/doc/requirements.txt --- old/pbr-6.1.0/doc/requirements.txt 2024-08-27 15:16:54.000000000 +0200 +++ new/pbr-6.1.1/doc/requirements.txt 2025-02-04 15:24:43.000000000 +0100 @@ -1,6 +1,6 @@ +setuptools;python_version>='3.12' 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 -six==1.12.0 # MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/doc/source/user/using.rst new/pbr-6.1.1/doc/source/user/using.rst --- old/pbr-6.1.0/doc/source/user/using.rst 2024-08-27 15:16:54.000000000 +0200 +++ new/pbr-6.1.1/doc/source/user/using.rst 2025-02-04 15:24:43.000000000 +0100 @@ -37,20 +37,32 @@ ``pyproject.toml`` ------------------ -PBR can be configured as a PEP517 build-system in ``pyproject.toml``. This -currently continues to rely on setuptools which means you need the above -``setup.py`` file to be present. The main benefits to using a -``pyproject.toml`` file with PBR are that you can control the versions of -PBR and setuptools that are used avoiding easy_install invocation. -Your build-system block in ``pyproject.toml`` will need to look something +*If your project only supports Python 3.7 or newer*, PBR can be configured as a +PEP517 build-system in ``pyproject.toml``. The main benefits are that you can +control the versions of PBR and setuptools that are used avoiding easy_install +invocation. Your build-system block in ``pyproject.toml`` will need to look like this:: [build-system] - requires = ["pbr>=6.0.0", "setuptools>=64.0.0"] + requires = ["pbr>=6.1.1"] build-backend = "pbr.build" Eventually PBR may grow its own direct support for PEP517 build hooks, but -until then it will continue to need setuptools and ``setup.py``. +until then it will continue to need setuptools with a minimal ``setup.py`` and +``setup.cfg`` as follows... + +``setup.py``:: + + import setuptools + setuptools.setup(pbr=True) + +``setup.cfg``:: + + [metadata] + name = myproject + +If desired, any other metadata can be placed in your ``pyproject.toml`` instead +of ``setup.cfg``. .. _setup_cfg: @@ -59,51 +71,51 @@ The ``setup.cfg`` file is an INI-like file that can mostly replace the ``setup.py`` file. It is similar to the ``setup.cfg`` file found in recent -versions of `setuptools`__. A simple sample can be found in *pbr*'s own -``setup.cfg`` (it uses its own machinery to install itself): - -:: +versions of `setuptools`__. A simple example:: [metadata] - name = pbr - author = OpenStack Foundation - author_email = openstack-disc...@lists.openstack.org - summary = OpenStack's setup automation in a reusable form - description_file = README.rst - description_content_type = text/x-rst; charset=UTF-8 - home_page = https://launchpad.net/pbr - project_urls = - Bug Tracker = https://bugs.launchpad.net/pbr/ - Documentation = https://docs.openstack.org/pbr/ - Source Code = https://opendev.org/openstack/pbr - license = Apache-2 - classifier = - Development Status :: 4 - Beta + name = my_project + summary = A brief one-line descriptive title of my project + author = My Project's Contributors + author_email = my-project-mailing-l...@lists.example.org + classifiers = + Development Status :: 5 - Production/Stable Environment :: Console - Environment :: OpenStack Intended Audience :: Developers Intended Audience :: Information Technology License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - keywords = - setup - distutils + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 + Topic :: Utilities + keywords = commandline utility + long_description = file: README.rst + long_description_content_type = text/x-rst; charset=UTF-8 + project_urls = + Homepage = https://my-project.example.org/ + Bug Tracker = https://my-project.example.org/bugs/ + Documentation = https://my-project.example.org/docs/ + Release Notes = https://my-project.example.org/releasenotes/ + Source Code = https://my-project.example.org/code/ + + [options] + python_requires = >=3.10 [files] packages = - pbr - data_files = - etc/pbr = etc/* - etc/init = - pbr.packaging.conf - pbr.version.conf + my_project [entry_points] console_scripts = - pbr = pbr.cmd:main - pbr.config.drivers = - plain = pbr.cfg.driver:Plain + my-project = my_project.cmd:main + + [pbr] + manpages = + my-project.1 Recent versions of `setuptools`_ provide many of the same sections as *pbr*. However, *pbr* does provide a number of additional sections: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr/sphinxext.py new/pbr-6.1.1/pbr/sphinxext.py --- old/pbr-6.1.0/pbr/sphinxext.py 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/pbr/sphinxext.py 2025-02-04 15:24:43.000000000 +0100 @@ -13,9 +13,16 @@ # License for the specific language governing permissions and limitations # under the License. +# (hberaud) do not use six here to import configparser +# to keep this module free from external dependencies +# to avoid cross dependencies errors on minimal system +# free from dependencies. +try: + import configparser +except ImportError: + import ConfigParser as configparser import os.path -from six.moves import configparser from sphinx.util import logging import pbr.version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr/tests/test_integration.py new/pbr-6.1.1/pbr/tests/test_integration.py --- old/pbr-6.1.0/pbr/tests/test_integration.py 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/pbr/tests/test_integration.py 2025-02-04 15:24:43.000000000 +0100 @@ -153,6 +153,8 @@ class TestInstallWithoutPbr(base.BaseTestCase): + # TODO(clarkb) This test should be reimagined with modern packaging tools + # and expectations. @testtools.skipUnless( os.environ.get('PBR_INTEGRATION', None) == '1', 'integration tests not enabled') @@ -175,19 +177,23 @@ import setuptools setuptools.setup( name = 'pkgTest', - tests_require = ['pkgReq'], - test_suite='pkgReq' + # TODO(clarkb) should we use a random prefix to + # avoid collisions? + install_requires = ['pkgReq'], ) """), 'setup.cfg': textwrap.dedent("""\ [easy_install] find_links = %s """ % dist_dir)}, + # We don't need to use PBRVERSION here because we precreate the + # pbr sdist and point to it with find_links. 'pkgReq': { 'requirements.txt': textwrap.dedent("""\ pbr """), - 'pkgReq/__init__.py': textwrap.dedent("""\ + 'pkgReq/__init__.py': "", + 'pkgReq/__main__.py': textwrap.dedent("""\ print("FakeTest loaded and ran") """)}, } @@ -199,30 +205,52 @@ self._run_cmd(sys.executable, ('setup.py', 'sdist', '-d', dist_dir), allow_fail=False, cwd=req_pkg_dir) # A venv to test within - venv = self.useFixture(test_packaging.Venv('nopbr', ['pip', 'wheel'])) + # We install setuptools because we rely on setup.py below. + venv = self.useFixture(test_packaging.Venv('nopbr', + ['pip', 'wheel', + 'setuptools'])) python = venv.python - # Run the depending script + # Install both packages self.useFixture(base.CapturedSubprocess( - 'nopbr', [python] + ['setup.py', 'test'], cwd=test_pkg_dir)) + 'nopbr', [python] + ['setup.py', 'install'], cwd=test_pkg_dir)) + # Execute code that should only be present if the install worked. + self.useFixture(base.CapturedSubprocess( + 'nopbr', [python] + ['-m', 'pkgReq'], cwd=test_pkg_dir)) + pbr_cmd = os.path.join(venv.path, 'bin', 'pbr') + self.useFixture(base.CapturedSubprocess( + 'nopbr', [pbr_cmd] + ['freeze'], cwd=test_pkg_dir)) + + +# Handle various comaptibility issues with pip and setuptools versions against +# python3 versions. Unfortunately python3.12 in particular isn't very backward +# compatible with pip and setuptools. +# TODO(clarkb) add other distros like EL9 and EL10 +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']}), + ] +elif sys.version_info[0:3] < (3, 12, 0): + lts_scenarios = [ + ('Bullseye', {'modules': ['pip==20.3.4', 'setuptools==52.0.0']}), + ('Bookworm', {'modules': ['pip==23.0.1', 'setuptools==66.1.1']}), + ('Focal', {'modules': ['pip==20.0.2', 'setuptools==45.2.0']}), + ('Jammy', {'modules': ['pip==22.0.2', 'setuptools==59.6.0']}), + ] +else: + lts_scenarios = [ + ('Noble', {'modules': ['pip==24.0.0', 'setuptools==68.1.2']}), + ] class TestMarkersPip(base.BaseTestCase): scenarios = [ - ('pip-latest', {'modules': ['pip']}), - ( - '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']}, - ), - ] + ('pip-latest', {'modules': ['pip', 'setuptools']}) + ] + lts_scenarios @testtools.skipUnless( os.environ.get('PBR_INTEGRATION', None) == '1', @@ -246,10 +274,12 @@ bin_python = venv.python os.mkdir(repo_dir) for module in self.modules: - self._run_cmd( - bin_python, - ['-m', 'pip', 'install', '--upgrade', module], - cwd=venv.path, allow_fail=False) + self.useFixture(base.CapturedSubprocess( + 'pip-version', + [bin_python, '-m', 'pip', 'install', '--upgrade', module], + cwd=venv.path)) + # TODO(clarkb) do we need to install PBR from source here to avoid + # using the latest release? for pkg in pkg_dirs: self._run_cmd( bin_python, ['setup.py', 'sdist', '-d', repo_dir], @@ -269,25 +299,6 @@ self.assertTrue('pkg_b' in pkgs or 'pkg-b' in pkgs) -# 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 @@ -303,5 +314,7 @@ pbr = 'file://%s#egg=pbr' % PBR_ROOT # Installing PBR is a reasonable indication that we are not broken on # this particular combination of setuptools and pip. - self._run_cmd(bin_python, ['-m', 'pip', 'install', pbr], - cwd=venv.path, allow_fail=False) + self.useFixture(base.CapturedSubprocess( + 'lts-support', + [bin_python, '-m', 'pip', 'install', pbr], + cwd=venv.path)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr/tests/test_packaging.py new/pbr-6.1.1/pbr/tests/test_packaging.py --- old/pbr-6.1.0/pbr/tests/test_packaging.py 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/pbr/tests/test_packaging.py 2025-02-04 15:24:43.000000000 +0100 @@ -52,7 +52,6 @@ except ImportError: import mock import pkg_resources -import six import testscenarios import testtools from testtools import matchers @@ -218,18 +217,18 @@ """ defaults = { - 'setup.py': textwrap.dedent(six.u("""\ + 'setup.py': textwrap.dedent(u"""\ #!/usr/bin/env python import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True, ) - """)), - 'setup.cfg': textwrap.dedent(six.u("""\ + """), + 'setup.cfg': textwrap.dedent(u"""\ [metadata] name = {pkg_name} - """)) + """) } def __init__(self, packages): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr/tests/test_util.py new/pbr-6.1.1/pbr/tests/test_util.py --- old/pbr-6.1.0/pbr/tests/test_util.py 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/pbr/tests/test_util.py 2025-02-04 15:24:43.000000000 +0100 @@ -13,12 +13,14 @@ # License for the specific language governing permissions and limitations # under the License. +try: + import configparser +except ImportError: + import ConfigParser as configparser import io import tempfile import textwrap -import six -from six.moves import configparser import sys from pbr.tests import base @@ -27,7 +29,7 @@ def config_from_ini(ini): config = {} - ini = textwrap.dedent(six.u(ini)) + ini = textwrap.dedent(ini) if sys.version_info >= (3, 2): parser = configparser.ConfigParser() parser.read_file(io.StringIO(ini)) @@ -43,7 +45,7 @@ def test_basics(self): self.maxDiff = None - config_text = """ + config_text = u""" [metadata] name = foo version = 1.0 @@ -145,7 +147,7 @@ scenarios = [ ('simple_extras', { - 'config_text': """ + 'config_text': u""" [extras] first = foo @@ -162,7 +164,7 @@ } }), ('with_markers', { - 'config_text': """ + 'config_text': u""" [extras] test = foo:python_version=='2.6' @@ -174,7 +176,7 @@ "test:(python_version=='2.6')": ['foo', 'baz<1.6'], "test": ['bar', 'zaz']}}), ('no_extras', { - 'config_text': """ + 'config_text': u""" [metadata] long_description = foo """, @@ -201,7 +203,7 @@ scenarios = [ ('simple_project_urls', { - 'config_text': """ + 'config_text': u""" [metadata] project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/ @@ -215,7 +217,7 @@ }, }), ('query_parameters', { - 'config_text': """ + 'config_text': u""" [metadata] project_urls = Bug Tracker = https://bugs.launchpad.net/pbr/?query=true @@ -241,7 +243,7 @@ scenarios = [ ('keywords_list', { - 'config_text': """ + 'config_text': u""" [metadata] keywords = one @@ -252,7 +254,7 @@ }, ), ('inline_keywords', { - 'config_text': """ + 'config_text': u""" [metadata] keywords = one, two, three """, # noqa: E501 @@ -269,7 +271,7 @@ class TestProvidesExtras(base.BaseTestCase): def test_provides_extras(self): - ini = """ + ini = u""" [metadata] provides_extras = foo bar @@ -283,7 +285,7 @@ scenarios = [ ('data_files', { - 'config_text': """ + 'config_text': u""" [files] data_files = 'i like spaces/' = @@ -306,7 +308,7 @@ class TestUTF8DescriptionFile(base.BaseTestCase): def test_utf8_description_file(self): _, path = tempfile.mkstemp() - ini_template = """ + ini_template = u""" [metadata] description_file = %s """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr.egg-info/PKG-INFO new/pbr-6.1.1/pbr.egg-info/PKG-INFO --- old/pbr-6.1.0/pbr.egg-info/PKG-INFO 2024-08-27 15:17:49.000000000 +0200 +++ new/pbr-6.1.1/pbr.egg-info/PKG-INFO 2025-02-04 15:27:13.000000000 +0100 @@ -1,59 +1,13 @@ Metadata-Version: 2.1 Name: pbr -Version: 6.1.0 +Version: 6.1.1 Summary: Python Build Reasonableness Home-page: https://docs.openstack.org/pbr/latest/ Author: OpenStack Author-email: openstack-disc...@lists.openstack.org -License: UNKNOWN Project-URL: Bug Tracker, https://bugs.launchpad.net/pbr/ Project-URL: Documentation, https://docs.openstack.org/pbr/ Project-URL: Source Code, https://opendev.org/openstack/pbr -Description: Introduction - ============ - - .. image:: https://img.shields.io/pypi/v/pbr.svg - :target: https://pypi.python.org/pypi/pbr/ - :alt: Latest Version - - .. image:: https://img.shields.io/pypi/dm/pbr.svg - :target: https://pypi.python.org/pypi/pbr/ - :alt: Downloads - - PBR is a library that injects some useful and sensible default behaviors - into your setuptools run. It started off life as the chunks of code that - were copied between all of the `OpenStack`_ projects. Around the time that - OpenStack hit 18 different projects each with at least 3 active branches, - it seemed like a good time to make that code into a proper reusable library. - - PBR is only mildly configurable. The basic idea is that there's a decent - way to run things and if you do, you should reap the rewards, because then - it's simple and repeatable. If you want to do things differently, cool! But - you've already got the power of Python at your fingertips, so you don't - really need PBR. - - PBR builds on top of the work that `d2to1`_ started to provide for declarative - configuration. `d2to1`_ is itself an implementation of the ideas behind - `distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards - `PEP 426`_ and Metadata 2.0, declarative config is still a great idea and - specifically important in trying to distribute setup code as a library - when that library itself will alter how the setup is processed. As Metadata - 2.0 and other modern Python packaging PEPs come out, PBR aims to support - them as quickly as possible. - - * License: Apache License, Version 2.0 - * Documentation: https://docs.openstack.org/pbr/latest/ - * Source: https://opendev.org/openstack/pbr - * Bugs: https://bugs.launchpad.net/pbr - * Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html - * ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html - - .. _d2to1: https://pypi.python.org/pypi/d2to1 - .. _distutils2: https://pypi.python.org/pypi/Distutils2 - .. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ - .. _OpenStack: https://www.openstack.org/ - -Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Environment :: OpenStack @@ -74,3 +28,49 @@ Classifier: Programming Language :: Python :: 3.11 Requires-Python: >=2.6 Description-Content-Type: text/x-rst; charset=UTF-8 +License-File: LICENSE +Requires-Dist: setuptools + +Introduction +============ + +.. image:: https://img.shields.io/pypi/v/pbr.svg + :target: https://pypi.python.org/pypi/pbr/ + :alt: Latest Version + +.. image:: https://img.shields.io/pypi/dm/pbr.svg + :target: https://pypi.python.org/pypi/pbr/ + :alt: Downloads + +PBR is a library that injects some useful and sensible default behaviors +into your setuptools run. It started off life as the chunks of code that +were copied between all of the `OpenStack`_ projects. Around the time that +OpenStack hit 18 different projects each with at least 3 active branches, +it seemed like a good time to make that code into a proper reusable library. + +PBR is only mildly configurable. The basic idea is that there's a decent +way to run things and if you do, you should reap the rewards, because then +it's simple and repeatable. If you want to do things differently, cool! But +you've already got the power of Python at your fingertips, so you don't +really need PBR. + +PBR builds on top of the work that `d2to1`_ started to provide for declarative +configuration. `d2to1`_ is itself an implementation of the ideas behind +`distutils2`_. Although `distutils2`_ is now abandoned in favor of work towards +`PEP 426`_ and Metadata 2.0, declarative config is still a great idea and +specifically important in trying to distribute setup code as a library +when that library itself will alter how the setup is processed. As Metadata +2.0 and other modern Python packaging PEPs come out, PBR aims to support +them as quickly as possible. + +* License: Apache License, Version 2.0 +* Documentation: https://docs.openstack.org/pbr/latest/ +* Source: https://opendev.org/openstack/pbr +* Bugs: https://bugs.launchpad.net/pbr +* Release Notes: https://docs.openstack.org/pbr/latest/user/releasenotes.html +* ChangeLog: https://docs.openstack.org/pbr/latest/user/history.html + +.. _d2to1: https://pypi.python.org/pypi/d2to1 +.. _distutils2: https://pypi.python.org/pypi/Distutils2 +.. _PEP 426: http://legacy.python.org/dev/peps/pep-0426/ +.. _OpenStack: https://www.openstack.org/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr.egg-info/SOURCES.txt new/pbr-6.1.1/pbr.egg-info/SOURCES.txt --- old/pbr-6.1.0/pbr.egg-info/SOURCES.txt 2024-08-27 15:17:49.000000000 +0200 +++ new/pbr-6.1.1/pbr.egg-info/SOURCES.txt 2025-02-04 15:27:13.000000000 +0100 @@ -8,7 +8,8 @@ ChangeLog LICENSE README.rst -pyproject.toml.future +pyproject.toml +requirements.txt setup.cfg setup.py test-requirements.txt @@ -44,6 +45,7 @@ pbr.egg-info/dependency_links.txt pbr.egg-info/entry_points.txt pbr.egg-info/not-zip-safe +pbr.egg-info/requires.txt pbr.egg-info/top_level.txt pbr/cmd/__init__.py pbr/cmd/main.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr.egg-info/entry_points.txt new/pbr-6.1.1/pbr.egg-info/entry_points.txt --- old/pbr-6.1.0/pbr.egg-info/entry_points.txt 2024-08-27 15:17:49.000000000 +0200 +++ new/pbr-6.1.1/pbr.egg-info/entry_points.txt 2025-02-04 15:27:13.000000000 +0100 @@ -6,4 +6,3 @@ [egg_info.writers] pbr.json = pbr.pbr_json:write_pbr_json - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pbr.egg-info/requires.txt new/pbr-6.1.1/pbr.egg-info/requires.txt --- old/pbr-6.1.0/pbr.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pbr-6.1.1/pbr.egg-info/requires.txt 2025-02-04 15:27:13.000000000 +0100 @@ -0,0 +1 @@ +setuptools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pyproject.toml new/pbr-6.1.1/pyproject.toml --- old/pbr-6.1.0/pyproject.toml 1970-01-01 01:00:00.000000000 +0100 +++ new/pbr-6.1.1/pyproject.toml 2025-02-04 15:24:43.000000000 +0100 @@ -0,0 +1,16 @@ +[build-system] +requires = [ + # Includes pep660 support in setuptools + "setuptools>=64.0.0;python_version>='3.7'", + # Fallback to whatever we can get otherwise. + # Note this is not something projects should typically + # need. PBR attempts to support a wide range of python + # versions and this is an exceptional case due to that + # need. + "setuptools;python_version<'3.7'" +] +build-backend = "pbr.build" +backend-path = ["."] + +[tools.setuptools] +py-modules=[] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/pyproject.toml.future new/pbr-6.1.1/pyproject.toml.future --- old/pbr-6.1.0/pyproject.toml.future 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/pyproject.toml.future 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -# PBR doesn't use the pyproject.toml interface internally yet as -# fixing issues in the system will be difficult if PBR itself -# depends on it. We will put this file into place at pyproject.toml -# once we are more confident it works generally. - -[build-system] -requires = ["setuptools>=64.0.0"] -build-backend = "pbr.build" -backend-path = ["."] - -[tools.setuptools] -py-modules=[] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/requirements.txt new/pbr-6.1.1/requirements.txt --- old/pbr-6.1.0/requirements.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/pbr-6.1.1/requirements.txt 2025-02-04 15:24:43.000000000 +0100 @@ -0,0 +1,11 @@ +# PBR always implicitly depended on setuptools which until python3.12 +# was included by default in python installations. Since python3.12 +# setuptools is not included so we add an explicit dependency on +# setuptools here. For the sake of simplicity we don't set an +# environment marker restricting this to specific Python versions, +# since in older environments it should just be a no-op anyway. +# +# DO NOT add any other dependencies as PBR is meant to be minimalist +# to avoid problems with bootstrapping build environments. + +setuptools diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/test-requirements.txt new/pbr-6.1.1/test-requirements.txt --- old/pbr-6.1.0/test-requirements.txt 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/test-requirements.txt 2025-02-04 15:24:43.000000000 +0100 @@ -6,7 +6,6 @@ fixtures>=3.0.0 # Apache-2.0/BSD hacking>=1.1.0,<4.0.0;python_version>='3.6' # Apache-2.0 mock>=2.0.0,<4.0.0;python_version=='2.7' # BSD -six>=1.12.0 # MIT stestr>=2.1.0,<3.0;python_version=='2.7' # Apache-2.0 stestr>=2.1.0;python_version>='3.0' # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/tools/integration.sh new/pbr-6.1.1/tools/integration.sh --- old/pbr-6.1.0/tools/integration.sh 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/tools/integration.sh 2025-02-04 15:24:43.000000000 +0100 @@ -14,7 +14,7 @@ rm -rf $venv virtualenv -p python3 $venv - $venv/bin/pip install $PIPFLAGS -U $PIPVERSION wheel requests + $venv/bin/pip install $PIPFLAGS -U $PIPVERSION wheel # If a change to PBR is being tested, preinstall the wheel for it if [ -n "$PBR_CHANGE" ] ; then @@ -30,10 +30,10 @@ # TODO: Figure out how to get this on to the box properly 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 +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 libpcre3-dev # FOR pyyaml -sudo apt-get install -y --force-yes debhelper python3-all-dev python3-all-dbg libyaml-dev cython3 cython3-dbg quilt +sudo apt-get install -y --force-yes debhelper python3-all-dev python3-all-dbg libyaml-dev cython3 quilt # And use ccache explitly export PATH=/usr/lib/ccache:$PATH @@ -72,13 +72,26 @@ git clone $REPODIR/pbr $pbrsdistdir cd $pbrsdistdir -# Prepare a wheel and flag whether a change to PBR is being tested -if git fetch $ZUUL_URL/$ZUUL_PROJECT $ZUUL_REF ; then +# Capture Zuul repo state info. Local master should be the current change. +# origin/master should refer to the parent of the current change. If they +# are the same then there is no change either from zuul or locally. +git --git-dir $REPODIR/pbr/.git show --format=oneline --no-patch master +git --git-dir $REPODIR/pbr/.git show --format=oneline --no-patch origin/master +# If there is no diff between the branches then there is no local change. +if ! git --git-dir $REPODIR/pbr/.git diff --quiet master..origin/master ; then + git show --format=oneline --no-patch HEAD mkvenv wheel + # TODO(clarkb) switch to using build tool here + wheel/bin/pip install setuptools wheel/bin/python setup.py bdist_wheel PBR_CHANGE=1 fi +##### Test Project Installation ##### +# Create a test project and install it multiple different ways +# using different tools to sanity check behavior is consistent +# with what expect and doesn't change. +# TODO(clarkb) Add test coverage for build and wheel tools too. eptest=$tmpdir/eptest mkdir $eptest cd $eptest @@ -95,22 +108,9 @@ cat <<EOF > setup.py import setuptools -from requests import Timeout -from socket import error as SocketError - -# Some environments have network issues that drop connections to pypi -# when running integration tests, so we retry here so that hour-long -# test runs are less likely to fail randomly. -try: - setuptools.setup( - setup_requires=['pbr'], - pbr=True, - ) -except (SocketError, Timeout): - setuptools.setup( - setup_requires=['pbr'], - pbr=True, - ) +setuptools.setup( + setup_requires=['pbr'], + pbr=True) EOF mkdir test_project @@ -119,24 +119,93 @@ print("Test cmd") EOF -epvenv=$eptest/venv -mkvenv $epvenv - eppbrdir=$tmpdir/eppbrdir git clone $REPODIR/pbr $eppbrdir -$epvenv/bin/pip $PIPFLAGS install -f $WHEELHOUSE -e $eppbrdir -# First check develop -PBR_VERSION=0.0 $epvenv/bin/python setup.py develop -cat $epvenv/bin/test_cmd -grep 'PBR Generated' $epvenv/bin/test_cmd -PBR_VERSION=0.0 $epvenv/bin/python setup.py develop --uninstall - -# Now check install -PBR_VERSION=0.0 $epvenv/bin/python setup.py install -cat $epvenv/bin/test_cmd -grep 'PBR Generated' $epvenv/bin/test_cmd -$epvenv/bin/test_cmd | grep 'Test cmd' +function check_setuppy { + local checkname + checkname=$1 + + local epvenv + epvenv=$eptest/setuppyvenv_$checkname + mkvenv $epvenv + $epvenv/bin/pip $PIPFLAGS install -f $WHEELHOUSE -e $eppbrdir + # We install setuptools only in this venv to check setup.py + # behaviors. + $epvenv/bin/pip $PIPFLAGS install -f $WHEELHOUSE setuptools + + # First check develop + PBR_VERSION=0.0 $epvenv/bin/python setup.py develop + cat $epvenv/bin/test_cmd + grep 'PBR Generated' $epvenv/bin/test_cmd + $epvenv/bin/test_cmd | grep 'Test cmd' + PBR_VERSION=0.0 $epvenv/bin/python setup.py develop --uninstall + + # Now check install + PBR_VERSION=0.0 $epvenv/bin/python setup.py install + cat $epvenv/bin/test_cmd + grep 'PBR Generated' $epvenv/bin/test_cmd + $epvenv/bin/test_cmd | grep 'Test cmd' +} + +function check_pip { + local checkname + checkname=$1 + + local epvenv + epvenv=$eptest/pipvenv_$checkname + mkvenv $epvenv + $epvenv/bin/pip $PIPFLAGS install -f $WHEELHOUSE -e $eppbrdir + + # First check develop + PBR_VERSION=0.0 $epvenv/bin/pip install -e ./ + cat $epvenv/bin/test_cmd + if [ -f ./pyproject.toml ] ; then + # Pip dev installs with pyproject.toml build from editable wheels + # which do not use PBR generated console scripts. + grep 'from test_project import main' $epvenv/bin/test_cmd + ! grep 'PBR Generated' $epvenv/bin/test_cmd + else + # Otherwise we should get the PBR generated script + grep 'PBR Generated' $epvenv/bin/test_cmd + fi + $epvenv/bin/test_cmd | grep 'Test cmd' + PBR_VERSION=0.0 $epvenv/bin/pip uninstall -y test-project + + # Now check install + PBR_VERSION=0.0 $epvenv/bin/pip install ./ + cat $epvenv/bin/test_cmd + # Pip installs install from wheel builds which do not use + # PBR generated console scripts. + grep 'from test_project import main' $epvenv/bin/test_cmd + ! grep 'PBR Generated' $epvenv/bin/test_cmd + $epvenv/bin/test_cmd | grep 'Test cmd' +} + +### No pyproject.toml ### +# Check setup.py behavior +check_setuppy nopyprojecttoml + +# Check pip behavior +check_pip nopyprojecttoml + +### pyproject.toml ### +# Now write a pyproject.toml and recheck the results. +# Note the pip install -e behavior differs. +cat <<EOF > pyproject.toml +[build-system] +requires = [ + "pbr>=6.0.0", + "setuptools>=64.0.0", +] +build-backend = "pbr.build" +EOF + +# Check setup.py behavior +check_setuppy pyprojecttoml + +# Check pip behavior +check_pip pyprojecttoml projectdir=$tmpdir/projects mkdir -p $projectdir diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pbr-6.1.0/tox.ini new/pbr-6.1.1/tox.ini --- old/pbr-6.1.0/tox.ini 2024-08-27 15:16:55.000000000 +0200 +++ new/pbr-6.1.1/tox.ini 2025-02-04 15:24:43.000000000 +0100 @@ -22,6 +22,15 @@ -r{toxinidir}/test-requirements.txt commands = stestr run --serial --suppress-attachments {posargs} +# The latest pip that supports python3.6 assumes that pep660 editable +# wheel installations should be used for development installs when the +# project has a pyproject.toml file. Unfortunately, the latest setuptools +# that supports python3.6 does not support pep660. This means the combo +# breaks under python3.6. Workaround the problem by disabling development +# installs for this version of python. +[testenv:py36] +usedevelop = false + [testenv:pep8] commands = pre-commit run -a @@ -57,6 +66,8 @@ [flake8] # W504 (you have to choose this or W503) -ignore = W504 +# H216 we use mock instead of unittest.mock because we still test +# against python2.7. +ignore = W504,H216 exclude = .venv,.tox,dist,doc,*.egg,build show-source = true