From b97fe448f05adad8df3c63c4e8ce63c3de19c9cb Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 22 Mar 2026 03:27:44 +0000 Subject: [PATCH] Update CI files --- .ci/scripts/check_release.py | 6 +++--- .ci/scripts/check_requirements.py | 1 - .ci/scripts/collect_changes.py | 1 - .github/workflows/build.yml | 10 +++++----- .github/workflows/publish.yml | 6 +++--- .../scripts/stage-changelog-for-default-branch.py | 7 ++----- .github/workflows/test.yml | 2 +- lint_requirements.txt | 2 +- pulp_python/app/global_access_conditions.py | 1 - pulp_python/app/serializers.py | 1 - pulp_python/app/tasks/publish.py | 1 - pulp_python/app/utils.py | 1 - pulp_python/pytest_plugin.py | 1 - pulp_python/tests/functional/api/test_domains.py | 1 - pulp_python/tests/functional/api/test_export_import.py | 1 - pulp_python/tests/functional/api/test_pypi_apis.py | 1 - pulp_python/tests/functional/constants.py | 1 - 17 files changed, 15 insertions(+), 29 deletions(-) diff --git a/.ci/scripts/check_release.py b/.ci/scripts/check_release.py index 611c882ca..6e0799952 100755 --- a/.ci/scripts/check_release.py +++ b/.ci/scripts/check_release.py @@ -99,9 +99,9 @@ def main(options: argparse.Namespace, template_config: dict[str, t.Any]) -> int: # Warning: This will not work if branch names contain "/" but we don't really care here. heads = [h.split("/")[-1] for h in repo.git.branch("--remote").split("\n")] - available_branches = [h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)] - available_branches.sort(key=lambda ver: Version(ver)) - available_branches.append(DEFAULT_BRANCH) + available_branches = sorted( + {h for h in heads if re.fullmatch(RELEASE_BRANCH_REGEX, h)}, key=lambda ver: Version(ver) + ) + [DEFAULT_BRANCH] branches = options.branches if branches == "supported": diff --git a/.ci/scripts/check_requirements.py b/.ci/scripts/check_requirements.py index cf9efbe97..eca496879 100755 --- a/.ci/scripts/check_requirements.py +++ b/.ci/scripts/check_requirements.py @@ -9,7 +9,6 @@ import warnings from packaging.requirements import Requirement - CHECK_MATRIX = [ ("pyproject.toml", True, True, True), ("requirements.txt", True, True, True), diff --git a/.ci/scripts/collect_changes.py b/.ci/scripts/collect_changes.py index fbb5d59d0..1a0003c8b 100755 --- a/.ci/scripts/collect_changes.py +++ b/.ci/scripts/collect_changes.py @@ -25,7 +25,6 @@ from git import GitCommandError, Repo from packaging.version import parse as parse_version - PYPI_PROJECT = "pulp_python" # Read Towncrier settings diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 988902a0f..20d99914d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: pulpcore-manager openapi --file "api.json" pulpcore-manager openapi --bindings --component "python" --file "python-api.json" - name: "Upload Package whl" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "plugin_package" path: "pulp_python/dist/" @@ -54,7 +54,7 @@ jobs: retention-days: 5 overwrite: true - name: "Upload API specs" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "api_spec" path: | @@ -73,7 +73,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - name: "Upload python client packages" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "python-client.tar" path: | @@ -82,7 +82,7 @@ jobs: retention-days: 5 overwrite: true - name: "Upload python client docs" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "python-client-docs.tar" path: | @@ -100,7 +100,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}" - name: "Upload Ruby client" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "ruby-client.tar" path: | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6d0d3aa8c..b65bb5fb4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,7 +30,7 @@ jobs: id-token: "write" steps: - - uses: "actions/download-artifact@v4" + - uses: "actions/download-artifact@v8" with: name: "plugin_package" path: "dist/" @@ -53,7 +53,7 @@ jobs: path: "pulp_python" - name: "Download Python client" - uses: "actions/download-artifact@v4" + uses: "actions/download-artifact@v8" with: name: "python-client.tar" path: "pulp_python/" @@ -82,7 +82,7 @@ jobs: path: "pulp_python" - name: "Download Ruby client" - uses: "actions/download-artifact@v4" + uses: "actions/download-artifact@v8" with: name: "ruby-client.tar" path: "pulp_python/" diff --git a/.github/workflows/scripts/stage-changelog-for-default-branch.py b/.github/workflows/scripts/stage-changelog-for-default-branch.py index 3950d7f9c..1a21419d4 100755 --- a/.github/workflows/scripts/stage-changelog-for-default-branch.py +++ b/.github/workflows/scripts/stage-changelog-for-default-branch.py @@ -12,16 +12,13 @@ from git import Repo from git.exc import GitCommandError - -helper = textwrap.dedent( - """\ +helper = textwrap.dedent("""\ Stage the changelog for a release on main branch. Example: $ python .github/workflows/scripts/stage-changelog-for-default-branch.py 3.4.0 - """ -) + """) parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description=helper) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fbddb788b..8f7e14cac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -122,7 +122,7 @@ jobs: docker logs pulp 2>&1 | grep -i pulpcore.deprecation | tee deprecations-${{ matrix.env.TEST }}.txt - name: "Upload Deprecations" - uses: "actions/upload-artifact@v5" + uses: "actions/upload-artifact@v7" with: name: "deprecations-${{ matrix.env.TEST }}" path: "pulp_python/deprecations-${{ matrix.env.TEST }}.txt" diff --git a/lint_requirements.txt b/lint_requirements.txt index 3c2947a08..5c38ff60f 100644 --- a/lint_requirements.txt +++ b/lint_requirements.txt @@ -5,7 +5,7 @@ # # For more info visit https://github.com/pulp/plugin_template -black==24.3.0 +black~=26.3 # Pin style to the year. https://black.readthedocs.io/en/stable/faq.html#how-stable-is-black-s-style bump-my-version check-manifest flake8 diff --git a/pulp_python/app/global_access_conditions.py b/pulp_python/app/global_access_conditions.py index a2a5ee617..8abb14f18 100644 --- a/pulp_python/app/global_access_conditions.py +++ b/pulp_python/app/global_access_conditions.py @@ -1,6 +1,5 @@ from django.conf import settings - # Access Condition methods that can be used with PyPI access policies diff --git a/pulp_python/app/serializers.py b/pulp_python/app/serializers.py index 38db20053..0432b05cf 100644 --- a/pulp_python/app/serializers.py +++ b/pulp_python/app/serializers.py @@ -29,7 +29,6 @@ parse_project_metadata, ) - log = logging.getLogger(__name__) diff --git a/pulp_python/app/tasks/publish.py b/pulp_python/app/tasks/publish.py index 39102eb50..4e8a80388 100644 --- a/pulp_python/app/tasks/publish.py +++ b/pulp_python/app/tasks/publish.py @@ -12,7 +12,6 @@ from pulp_python.app.serializers import PythonPublicationSerializer from pulp_python.app.utils import write_simple_index, write_simple_detail - log = logging.getLogger(__name__) diff --git a/pulp_python/app/utils.py b/pulp_python/app/utils.py index 143850925..133a6a92f 100644 --- a/pulp_python/app/utils.py +++ b/pulp_python/app/utils.py @@ -20,7 +20,6 @@ from pulpcore.plugin.exceptions import TimeoutException from pulpcore.plugin.util import get_domain - log = logging.getLogger(__name__) diff --git a/pulp_python/pytest_plugin.py b/pulp_python/pytest_plugin.py index 54db7caa9..799a7a2ae 100644 --- a/pulp_python/pytest_plugin.py +++ b/pulp_python/pytest_plugin.py @@ -13,7 +13,6 @@ PYTHON_WHEEL_FILENAME, ) - # Bindings API Fixtures diff --git a/pulp_python/tests/functional/api/test_domains.py b/pulp_python/tests/functional/api/test_domains.py index e12643f5b..25c4d6390 100644 --- a/pulp_python/tests/functional/api/test_domains.py +++ b/pulp_python/tests/functional/api/test_domains.py @@ -12,7 +12,6 @@ ) from urllib.parse import urlsplit - pytestmark = pytest.mark.skipif(not settings.DOMAIN_ENABLED, reason="Domain not enabled") diff --git a/pulp_python/tests/functional/api/test_export_import.py b/pulp_python/tests/functional/api/test_export_import.py index 9681411b7..8eb623eff 100644 --- a/pulp_python/tests/functional/api/test_export_import.py +++ b/pulp_python/tests/functional/api/test_export_import.py @@ -14,7 +14,6 @@ PYTHON_SM_PROJECT_SPECIFIER, ) - pytestmark = [ pytest.mark.skipif( "/tmp" not in settings.ALLOWED_EXPORT_PATHS, diff --git a/pulp_python/tests/functional/api/test_pypi_apis.py b/pulp_python/tests/functional/api/test_pypi_apis.py index 35d269ad5..2cbdc87a2 100644 --- a/pulp_python/tests/functional/api/test_pypi_apis.py +++ b/pulp_python/tests/functional/api/test_pypi_apis.py @@ -16,7 +16,6 @@ ) from pulp_python.tests.functional.utils import ensure_metadata - PYPI_LAST_SERIAL = "X-PYPI-LAST-SERIAL" diff --git a/pulp_python/tests/functional/constants.py b/pulp_python/tests/functional/constants.py index af5744b20..d1b54ac2e 100644 --- a/pulp_python/tests/functional/constants.py +++ b/pulp_python/tests/functional/constants.py @@ -1,7 +1,6 @@ import os from urllib.parse import urljoin - PULP_FIXTURES_BASE_URL = os.environ.get( "REMOTE_FIXTURES_ORIGIN", "https://fixtures.pulpproject.org/" )