From f82af44f63c1c307e5d96759329567c3a5917389 Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Tue, 11 Nov 2025 16:11:57 -0500 Subject: [PATCH] Update Bandersnatch to 6.6.0 --- pulp_python/app/tasks/sync.py | 3 ++- pulp_python/app/viewsets.py | 3 ++- pyproject.toml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pulp_python/app/tasks/sync.py b/pulp_python/app/tasks/sync.py index 2f009f1b..e3ecb108 100644 --- a/pulp_python/app/tasks/sync.py +++ b/pulp_python/app/tasks/sync.py @@ -59,9 +59,10 @@ def sync(remote_pk, repository_pk, mirror): def create_bandersnatch_config(remote): """Modifies the global Bandersnatch config state for this sync""" - config = BandersnatchConfig().config + config = BandersnatchConfig() config["mirror"]["master"] = remote.url config["mirror"]["workers"] = str(remote.download_concurrency) + config["mirror"]["allow_non_https"] = "true" if not config.has_section("plugins"): config.add_section("plugins") config["plugins"]["enabled"] = "blocklist_release\n" diff --git a/pulp_python/app/viewsets.py b/pulp_python/app/viewsets.py index dfe03bfb..8aabdfd1 100644 --- a/pulp_python/app/viewsets.py +++ b/pulp_python/app/viewsets.py @@ -1,6 +1,7 @@ from bandersnatch.configuration import BandersnatchConfig from django.db import transaction from drf_spectacular.utils import extend_schema +from pathlib import Path from rest_framework import status from rest_framework.decorators import action from rest_framework.response import Response @@ -496,7 +497,7 @@ def from_bandersnatch(self, request): bander_config_file = serializer.validated_data.get("config") name = serializer.validated_data.get("name") policy = serializer.validated_data.get("policy") - bander_config = BandersnatchConfig(bander_config_file.file.name).config + bander_config = BandersnatchConfig(Path(bander_config_file.file.name)) data = { "name": name, "policy": policy, diff --git a/pyproject.toml b/pyproject.toml index e5244146..5cee63a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ requires-python = ">=3.11" dependencies = [ "pulpcore>=3.81.0,<3.100", "pkginfo>=1.12.0,<1.13.0", - "bandersnatch>=6.3.0,<6.6", # 6.6 has breaking changes + "bandersnatch>=6.6.0,<6.7", "pypi-simple>=1.5.0,<2.0", ]