Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated distribution_data on Replicator #6187

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/plugin_api/6077.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed `distribution_data` from `Replicator`. The function was renamed to `distribution_extra_fields`.
13 changes: 0 additions & 13 deletions pulpcore/app/replica.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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.
Expand All @@ -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
Expand Down
Loading