summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Run PBR integration on Ubuntu Focal too"HEAD5.11.1masterZuul2023-01-072-5/+28
|\
| * Run PBR integration on Ubuntu Focal tooClark Boylan2023-01-062-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3.10 on Jammy is not compatible with old pip and setuptools due to collections.abc moves. It is still desireable to test modern PBR functions against these old library versions because old distro installs will often use latest PBR. Update our testing to also run PBR integration testing on Focal selecting appropriate pip and setuptools versions based on the running python version. This should help ensure PBR continues to run on old platforms even as we modernize pip. Change-Id: Ib53f637d5826bb51a348e3e629fbdbabec2a95e0
* | Merge "Tie recursion calls to Dist object, not module"Zuul2023-01-071-8/+2
|\ \ | |/
| * Tie recursion calls to Dist object, not moduleStephen Finucane2023-01-061-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In change I1f2b4d34e587389f7e11b99d000e14477cf5091b, we attempted to resolve an issue whereby using PBR as a PEP-517 backend could result in recursion. We did this by setting 'dist.pbr' to 'None' but later discovered this introduced a regression that prevented us from writing the 'pbr.json' file into generated sdists. The fix for the regression, change I407ae88ab8de4b61f94034b3d79a2ca7f7d79d16, stopped setting 'dist.pbr' to 'None' and instead set a global flag to indicate whether we had already been called or not. Unfortunately it seems this fix is also insufficent. As discussed in tox#2712 [1], tox v4 has implemented its own implementation of PEP-517 - 'pyproject-api' [2] - and unlike 'build' this implementation optionally allows re-use of the backend process for multiple PEP-517 commands. tox's 'Pep517VirtualEnvFrontend' does just this. This means if we run multiple commands that require generation of a 'Distribution' object - say, 'prepare_metadata_for_build_wheel' followed by 'build_sdist' - anything but the first step will not result in proper population of said 'Distribution' objects. The solution to this issue is simple: per $subject, instead of setting our recursion-detection canary at the module level, set it at the Distribution level. [1] https://github.com/tox-dev/tox/issues/2712 [2] github.com/tox-dev/pyproject-api/ Change-Id: I67909d732a74550fbcd7c06a9e2f4ac88c063444 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Remove numpy dependenciesStephen Finucane2023-01-061-8/+1
|/ | | | | | | | There do not appear to be any openstack projects relying on this package these days. Remove the unnecessary dependencies. Change-Id: Iddd95afad9e6cf10d2cf0a3d6cae4b6ba75a7a05 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Update tox.ini to work with tox 4Stephen Finucane2023-01-063-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | Resolve the following warnings: tox.tox_env.errors.Fail: pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'PBR_INTEGRATION PIPFLAGS PIPVERSION PBRVERSION REPODIR WHEELHOUSE PROJECTS' Also, reduce down the envlist as tox 4 when run in OpenStack CI is also attempting to validate interpreters utilizing the --skip-missing-interpreters=false setting [1]. Finally, fix up the integration job so that it passes on Ubuntu 22.04. This necessitates removing any Python 2-based dependencies used in the these jobs (since these are no longer available on Ubuntu 22.04) and removing tests for pip versions that are not compatible with Python 3.10 (the Python version found on Ubuntu 22.04). [1] https://github.com/tox-dev/tox/issues/2811 Change-Id: Ib4dbe4e09e269219c08a87f6fb64ad9628b5864a Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "Fix symbol identification in multiline message"5.11.0Zuul2022-08-053-5/+45
|\
| * Fix symbol identification in multiline messageChris Dohmen2022-08-053-5/+45
| | | | | | | | | | | | | | | | | | * Fix an issue where a multiline message with leading spaces would cause invalid symbol identification. * Add unit-tests around multiple symbols in a single line Sem-Ver: bugfix Change-Id: Id799c2fd368d9df38a5c01fc2071283aecef67c6
* | Merge "Replace deprecated readfp method with read_file"Zuul2022-08-031-2/+3
|\ \
| * | Replace deprecated readfp method with read_fileljhuang2022-07-221-2/+3
| |/ | | | | | | | | | | | | | | The readfp method has been deprecated since version 3.2 [1]. [1] https://docs.python.org/3/library/configparser.html?highlight=deprecated#configparser.ConfigParser.readfp Change-Id: Ib9549509bfcc749740953e3769030d787b2bf251
* | Merge "Use stdlib importlib.metadata where possible"Zuul2022-08-031-4/+9
|\ \ | |/ |/|
| * Use stdlib importlib.metadata where possibleStephen Finucane2022-05-181-4/+9
| | | | | | | | | | | | | | | | The importlib_metadata package isn't guaranteed to be available, but the stlib version will always be there (at least on Python 3.8 or later). Change-Id: I532a365aa0f1a3206edf6b01e821bd83ea04ab3c Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Specify Changelog procedure5.10.0Chris Dohmen2022-06-131-0/+5
| | | | | | | | | | | | | | | | Update the CONTRIBUTING file to specify how release notes are managed. This allows contributors to follow best-practices to ensure the auto-generated Changelog stays up-to-date. Change-Id: I7902c33a76c4cce8f50307843476e5d9435c9e2c
* | Allow leading spaces when determining symbolsChris Dohmen2022-06-032-1/+15
|/ | | | | | | | | Update the logic that checks for sem-ver to strip out leading spaces. This helps solve an issue during automated squashes appending a tab character to the start of each line in a commit message. Closes-Bug: #1977479 Change-Id: I6f56500c366fd9610d98507f01e8af21862e4421
* Adding python classifiers py38 & py39Hervé Beraud2022-05-051-0/+2
| | | | Change-Id: Ib8e251ae9dd93a5eb356478d633f1fef271911d9
* Future-proofing pyproject.toml5.9.0Jiri Podivin2022-03-281-0/+3
| | | | | | | | | | | | | | | Setting the 'py-modules' key to empty list should prevent reemergence of setuptools related issues[1] should the toml file be ever introduced. [1] https://github.com/pypa/setuptools/issues/3197 Related-Bug: #1966382 Depends-On: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/835425 Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I89985a68cc497fd26a30058778fc1a1a52f6d96a
* Merge "Changed minversion in tox to 3.18.0."Zuul2022-03-221-3/+3
|\
| * Changed minversion in tox to 3.18.0.Daniel Bengtsson2022-02-161-3/+3
| | | | | | | | | | | | | | | | | | The patch bumps min version of tox to 3.18.0 in order to replace tox's whitelist_externals[1] by allowlist_externals option. [1] https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23 Change-Id: I7ee77638d44ee314cdfa6f6d9320b19d794b718c
* | Merge "Upgrade the pre-commit-hooks version"Zuul2022-03-221-1/+1
|\ \
| * | Upgrade the pre-commit-hooks versionwu.shiming2021-05-181-1/+1
| | | | | | | | | | | | | | | | | | [1] https://github.com/pre-commit/pre-commit-hooks/commit/9136088a246768144165fcc3ecc3d31bb686920a Change-Id: I609d7291aeb482c5f60c0e07c6acb490f67f3280
* | | Merge "Drop wheel from pyproject.toml examples"Zuul2022-03-222-3/+3
|\ \ \
| * | | Drop wheel from pyproject.toml examplesJeremy Stanley2022-02-282-3/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | Per https://github.com/pypa/setuptools/pull/3056 the addition of wheel in build_system.requires is redundant since SetupTools already drags it in anyway. Simplify our recommendations accordingly. Change-Id: I0359ed11a6f0c54dc1af6a7f5f34e49476c58fb0
* | | Use importlib-metadata for runtime package version lookupsClark Boylan2022-03-011-4/+37
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using pkg_resources for runtime package version lookups but pkg_resources incurs a pretty significant cost to use it in thise way (because it scans all installed packages on disk and sorts them). importlib-metadata is the way of the future (part of stdlib in python3.8) and is supposed to be significantly more performant. Replace our use of pkg_resources for runtime version lookups with importlib-metadata so that we are both quicker and future proof. Note that this doesn't handle the problem of no pbr deps yet. We will probably end up needing to vendor importlib-metadata in pbr or something similar. Change-Id: Ife68089d997b266adb37f18e226f49bdd67766fc
* | Merge "setup.cfg: Replace dashes with underscores"Zuul2022-02-081-8/+9
|\ \
| * | setup.cfg: Replace dashes with underscoresyangyawei2022-01-211-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setuptools v54.1.0 introduces a warning that the use of dash-separated options in 'setup.cfg' will not be supported in a future version [1]. Get ahead of the issue by updating to canonical configuration[2]. Without this, we see 'UserWarning' messages like the following on new enough versions of setuptools: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead [1] https://github.com/pypa/setuptools/commit/a2e9ae4cb [2] https://setuptools.pypa.io/en/stable/userguide/declarative_config.html Change-Id: I9c51ffdeb548833f2cc303d2e53ba169756690d3
* | | Add release note about missing pbr.json fix5.8.1Jeremy Stanley2022-02-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Include a release note for I407ae88ab8de4b61f94034b3d79a2ca7f7d79d16 which corrected a regression for missing pbr.json metadata files in packages. Change-Id: I3f0e48c215e890f9b26bae6600d5fcacf67831c6
* | | Avoid recursive calls into SetupTools entrypointJeremy Stanley2022-02-042-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a check in pbr.core.pbr() to make sure it hasn't already run, and return immediately if it has. This replaces the earlier attempt at loop-busting by setting the entrypoint to None in the dist, in order to support PEP 517 builds without setup_requires. Also test that pbr.json is now included in the dist tree, in order to avoid future regressions. Change-Id: I407ae88ab8de4b61f94034b3d79a2ca7f7d79d16
* | | remove explicit mockBen Greiner2022-01-213-3/+8
|/ / | | | | | | | | | | | | The explicit mock package is not required if you can use unittest.mock from python >= 3.3 Change-Id: I1e3a764b38be66b994d790768bc5eb9be4237444
* | Don't test with setuptools local distutilsJeremy Stanley2022-01-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We noticed some aberrations in log level/threshold handling as of Setuptools 60.0.0, and the only substantive change for that release toggles the default selection for its internal ("local") distutils replacement vs the "stdlib" one. For now, toggle the SETUPTOOLS_USE_DISTUTILS envvar in our testing back to the old value. This should be revisited once logging is handled better in Setuptools. https://github.com/pypa/setuptools/issues/3038 Change-Id: If372a33607fff884cd7bf888ee5a23a2fbb351b2
* | Use context blocks for open() calls in packagingJeremy Stanley2021-11-191-8/+6
| | | | | | | | | | | | | | | | Two unclosed file descriptors in packaging are raising ResourceWarning on termination in newer Python interpreters. Make sure they're closed as soon as we're done with them. Change-Id: I07f500e1157da18de799eb0ff9bf82d3bcb46510
* | Merge "Allow PEP517 without setup_requires"5.8.0Zuul2021-11-132-1/+14
|\ \
| * | Allow PEP517 without setup_requiresClark Boylan2021-11-122-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using PBR PEP517 support without setup_requires were were infinitely recursing because Distribution.finalize_options calls pbr() and pbr() calls Distribution.finalize_options. With a setup_requires this doesn't seem to happen because something is resetting dist.pbr's value from True (callable) to None (not callable) after the initial pbr() call and before further recursion can occur. Explicitly enforce this behavior in pbr() via an explicit update of dist.pbr to None to avoid calling pbr() more than once resulting in the unwanted loop. Change-Id: I1f2b4d34e587389f7e11b99d000e14477cf5091b
* | | Add python2 testing back to PBRClark Boylan2021-11-121-0/+2
|/ / | | | | | | | | | | | | I think this was lost when we expanded the openstack-python job templates to include more versions of python3. Oops. Change-Id: I0ebaff67634857216ca8d565311ed7c63f687a16
* | Clarify the need for setup.py with PEP517Clark Boylan2021-11-082-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | There was a misunderstanding that PBRs PEP517 build hooks meant we no longer needed a setup.py. But it turns out the setuptools build_meta hooks that we wrap call out to setup.py. This means PBR will continue to need to be used in conjunction with a setup.py. This is better for backward compatibiltiy anyway so not a huge loss. Document this more properly and update the test to reflect it. Change-Id: If4320da1e89a5c765e0bfe56b724364f9cba34f3
* | Add a PEP517 interface5.7.0Monty Taylor2021-11-035-1/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pep517 defines a new module method of specifying build backends. To allow pbr to exist in this world, we should define the interface that's needed. For this to be used, one will put: [build-system] requires = ["pbr>=5.7.0", "setuptools>=36.6.0", "wheel"] build-backend = "pbr.build" Into pyproject.toml - and the pep517 interface will be used. This doesn't really change anything else - it just makes us support this. So by itself this commit isn't SUPER helpful. But maybe let's take baby steps with something this prone to strife, yeah? After this we can start teasing some things apart and doing our own things directly. Co-Authored-By: Clark Boylan <clark.boylan@gmail.com> Change-Id: I293f59b5074a38c78adffe580de2f1533bb01ce7
* | PBR package testing improvementsClark Boylan2021-11-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We simplify virtualenv setup for PBR package installation testing by switching to a simple file path for the PBR installation rather than a full url with egg specifier. The egg specifer isn't necessary and neither is the url and simpler is easier to understand. We also add the verbose flag to the pip installations of tools into that virtualenv to better understand problems when they occur. Finally we add the option to skip writing package files if their contents are empty. This allows us to ensure that we can omit certain files which will be useful for the next change. Change-Id: I1f081d29d62c905c1bb1abee5402b0990c83e948
* | Run python3.9 test jobsClark Boylan2021-10-261-3/+12
| | | | | | | | | | | | | | | | | | | | We want to run python3.9 test jobs for PBR too. Also we explicitly list out all the python jobs because the various openstack project-templates for this are release specific and PBR is not release specific. PBR must run against all of the releases at the same time. Just spell it out then it becomes easy to add new versions of python. Change-Id: I9c85731040a73fa57e45ad8da3924c4d13c5affc
* | Retire django-openstack-authmanchandavishal2021-07-131-1/+0
|/ | | | | | | | | | | | ``django_openstack_auth`` code was merged into the main horizon repository during the queens release. This repo is already deprecated and now we can retire it. This patch removes all references of ``django_openstack_auth`` as mentioned in [1]. [1] https://docs.openstack.org/project-team-guide/repository.html#retiring-a-repository Needed-By: https://review.opendev.org/c/openstack/project-config/+/800532/ Change-Id: Ib82098453691f605de80a8d87583cf62e15258fd
* Correct comment for 'D1_D2_SETUP_ARGS'Stephen Finucane2021-04-231-4/+2
| | | | | | | | Change Ic7b71f1093671533c9f17fd621e02299bfbd7a6d reversed the order of this list but didn't update the comment. Do so now. Change-Id: I36f2dd791297a9e3df4f1e427db5b45017820bbf Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* Merge "Reverse ordering of 'D1_D2_SETUP_ARGS'"5.6.0Zuul2021-04-221-45/+38
|\
| * Reverse ordering of 'D1_D2_SETUP_ARGS'Stephen Finucane2021-04-221-45/+38
| | | | | | | | | | | | | | | | | | | | The previous ordering was confusing and placed new values before old ones. Switch this order, making it more obvious what we're going *from* and what we're going *to*. With this reordering, the old name no longer makes sense so we rename the attribute. Change-Id: Ic7b71f1093671533c9f17fd621e02299bfbd7a6d Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Add test for cfg -> py transformation"Zuul2021-04-222-3/+104
|\ \ | |/
| * Add test for cfg -> py transformationStephen Finucane2021-04-222-3/+104
| | | | | | | | | | Change-Id: I176dc6a2c6d8f37717e1e17ba41ee72bef9536fb Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Don't pass empty 'long_description'"Zuul2021-04-221-17/+15
|\ \ | |/
| * Don't pass empty 'long_description'Stephen Finucane2021-04-221-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Correct a small logic error that would result in us passing an empty 'long_description' value to 'setup' if 'description_file' pointed to a file that was empty. Fixing this also makes it a little more obvious that we are only setting values that are present in 'setup.cfg', since that wasn't totally clear before. A small, unrelated typo is addressed. Change-Id: Ib32b5fb5da84215376c8e372470b2ff08eb47908 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | Merge "Increase OS_TEST_TIMEOUT to 1200"Zuul2021-04-221-1/+1
|\ \ | |/ |/|
| * Increase OS_TEST_TIMEOUT to 1200Sorin Sbarnea2021-04-011-1/+1
| | | | | | | | | | | | | | | | We do not want to timeout just because installation of packages got bit slower. See: https://zuul.opendev.org/t/openstack/build/e14185c56a0f495ca21c3afd0c67a7aa Change-Id: I1915a4992c3e98c01d77d7feb72ddf6e8e383f09
* | Merge "Map requires-python to python-requires (attempt 2)"Zuul2021-04-161-0/+1
|\ \
| * | Map requires-python to python-requires (attempt 2)Stephen Finucane2021-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt two at the problem, this time done properly. As discussed in change I7158e75934535b80eb60d6b4b7dcef08866b5bab, the previous attempt actually mapped 'python_requires' to 'requires_python' rather than the other way around. This resolves that. Change-Id: I415b64d5b51a248d2f45a28234f1635e8b82ffcc Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
* | | Move flake8 as a pre-commit local target.Daniel Bengtsson2021-04-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The goal here is to avoid conflicts between flake8 and hacking version each 2 days. Inspired from nova's approach[1]. The flake8 version to install will be determined by hacking and requirements[2] will stay aligned instead of relying on different versions. [1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35 [2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1 Change-Id: Ia194a634df19386380caefa074e5ad593bf364d1