From 343c42778e74db8dd741710e74733fb2800cd50b Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Thu, 9 Jan 2025 15:44:33 +0100 Subject: [PATCH] Remove deprecated distribution_data on Replicator fixes #6077 --- CHANGES/plugin_api/6077.removal | 1 + pulpcore/app/replica.py | 13 ------------- 2 files changed, 1 insertion(+), 13 deletions(-) create mode 100644 CHANGES/plugin_api/6077.removal diff --git a/CHANGES/plugin_api/6077.removal b/CHANGES/plugin_api/6077.removal new file mode 100644 index 0000000000..45d4814e6e --- /dev/null +++ b/CHANGES/plugin_api/6077.removal @@ -0,0 +1 @@ +Removed `distribution_data` from `Replicator`. The function was renamed to `distribution_extra_fields`. diff --git a/pulpcore/app/replica.py b/pulpcore/app/replica.py index 385ba394a9..015e230309 100644 --- a/pulpcore/app/replica.py +++ b/pulpcore/app/replica.py @@ -11,7 +11,6 @@ general_multi_delete, ) from pulpcore.plugin.util import get_url, get_domain -from pulpcore.app.loggers import deprecation_logger _logger = logging.getLogger(__name__) @@ -153,12 +152,6 @@ def create_or_update_repository(self, remote): repository.save() return repository - def distribution_data(self, repository, upstream_distribution): - """ - Deprecated, use distribution_extra_fields instead. - """ - return self.distribution_extra_fields(repository, upstream_distribution) - def distribution_extra_fields(self, repository, upstream_distribution): """ Return the fields that need to be updated/cleared on distributions for idempotence. @@ -171,12 +164,6 @@ def distribution_extra_fields(self, repository, upstream_distribution): def create_or_update_distribution(self, repository, upstream_distribution): distribution_data = self.distribution_extra_fields(repository, upstream_distribution) - if "distribution_data" in self.__class__.__dict__: - deprecation_logger.warning( - "distribution_data() is deprecated and will be removed in pulpcore==3.70;" - " use distribution_extra_fields() instead." - ) - distribution_data = self.distribution_data(repository, upstream_distribution) try: distro = self.distribution_model_cls.objects.get( name=upstream_distribution["name"], pulp_domain=self.domain