From 97bfdd2c5f645427b2e46820eeca7937d185f5ba Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Wed, 18 Mar 2026 10:53:38 -0400 Subject: [PATCH] Remove repository_version serializer field from Distribution Pulpcore now defines it universally, no need to do so ourselves. --- CHANGES/+remove-serializer-fields.misc | 1 + pulp_python/app/serializers.py | 4 ---- pyproject.toml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 CHANGES/+remove-serializer-fields.misc diff --git a/CHANGES/+remove-serializer-fields.misc b/CHANGES/+remove-serializer-fields.misc new file mode 100644 index 000000000..dd7f74b51 --- /dev/null +++ b/CHANGES/+remove-serializer-fields.misc @@ -0,0 +1 @@ +Pulpcore enabled a feature to allow users to specify "repository_version" on their distributions, which pulp_python already allowed. We no longer need to enable that field ourselves. diff --git a/pulp_python/app/serializers.py b/pulp_python/app/serializers.py index 6c716b9b3..c5b1730b2 100644 --- a/pulp_python/app/serializers.py +++ b/pulp_python/app/serializers.py @@ -74,9 +74,6 @@ class PythonDistributionSerializer(core_serializers.DistributionSerializer): queryset=core_models.Publication.objects.exclude(complete=False), allow_null=True, ) - repository_version = core_serializers.RepositoryVersionRelatedField( - required=False, help_text=_("RepositoryVersion to be served."), allow_null=True - ) base_url = serializers.SerializerMethodField(read_only=True) allow_uploads = serializers.BooleanField( default=True, help_text=_("Allow packages to be uploaded to this index.") @@ -98,7 +95,6 @@ def get_base_url(self, obj): class Meta: fields = core_serializers.DistributionSerializer.Meta.fields + ( "publication", - "repository_version", "allow_uploads", "remote", ) diff --git a/pyproject.toml b/pyproject.toml index f360f415e..e54bdeba4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers=[ ] requires-python = ">=3.11" dependencies = [ - "pulpcore>=3.85.3,<3.115", + "pulpcore>=3.106.0,<3.115", "pkginfo>=1.12.0,<1.13.0", "bandersnatch>=6.6.0,<6.7", "pypi-simple>=1.8.0,<2.0",