diff --git a/CHANGES/plugin_api/6079.removal b/CHANGES/plugin_api/6079.removal new file mode 100644 index 00000000000..34ba8a87d83 --- /dev/null +++ b/CHANGES/plugin_api/6079.removal @@ -0,0 +1,2 @@ +Removed the fallback for unserializable task return values. +Tasks resulting from an api action should use the corresponding serializer to produce useful output. Maintenance tasks should return nothing. diff --git a/pulp_certguard/app/__init__.py b/pulp_certguard/app/__init__.py index 3d3ad4be6d7..afdfa86224b 100644 --- a/pulp_certguard/app/__init__.py +++ b/pulp_certguard/app/__init__.py @@ -6,6 +6,6 @@ class PulpCertGuardPluginAppConfig(PulpPluginAppConfig): name = "pulp_certguard.app" label = "certguard" - version = "3.96.0.dev" + version = "3.100.0.dev" python_package_name = "pulpcore" domain_compatible = True diff --git a/pulp_file/app/__init__.py b/pulp_file/app/__init__.py index fde7ecbe8e1..ad18b5a51b6 100644 --- a/pulp_file/app/__init__.py +++ b/pulp_file/app/__init__.py @@ -8,6 +8,6 @@ class PulpFilePluginAppConfig(PulpPluginAppConfig): name = "pulp_file.app" label = "file" - version = "3.96.0.dev" + version = "3.100.0.dev" python_package_name = "pulpcore" domain_compatible = True diff --git a/pulpcore/app/apps.py b/pulpcore/app/apps.py index dcc07db132f..936d4d0957f 100644 --- a/pulpcore/app/apps.py +++ b/pulpcore/app/apps.py @@ -239,7 +239,7 @@ class PulpAppConfig(PulpPluginAppConfig): label = "core" # The version of this app - version = "3.96.0.dev" + version = "3.100.0.dev" # The python package name providing this app python_package_name = "pulpcore" diff --git a/pulpcore/app/models/task.py b/pulpcore/app/models/task.py index ed0b2e87a0d..f93a21972a1 100644 --- a/pulpcore/app/models/task.py +++ b/pulpcore/app/models/task.py @@ -2,7 +2,6 @@ Django models related to the Tasking system """ -import json import logging import traceback from gettext import gettext as _ @@ -233,16 +232,6 @@ def set_completed(self, result=None): This updates the :attr:`finished_at` and sets the :attr:`state` to :attr:`COMPLETED`. If `result` is provided, the :attr:`result` contains the result of the task. """ - try: - json.dumps(result, cls=DjangoJSONEncoder) - except (TypeError, ValueError): - deprecation_logger.warning( - _( - "The result of the {} function is not JSON-serializable and will be " - "replaced with None: {}. This will raise an error in version 3.100." - ).format(self.name, result) - ) - result = None # Only set the state to finished if it's running. This is important for when the task has # been canceled, so we don't move the task from canceled to finished. diff --git a/pyproject.toml b/pyproject.toml index 9749ea20d43..2b3e3c2ffdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = 'setuptools.build_meta' [project] name = "pulpcore" -version = "3.96.0.dev" +version = "3.100.0.dev" description = "Pulp Django Application and Related Modules" readme = "README.md" authors = [ @@ -204,7 +204,7 @@ ignore = [ [tool.bumpversion] # This section is managed by the plugin template. Do not edit manually. -current_version = "3.96.0.dev" +current_version = "3.100.0.dev" commit = false tag = false parse = "(?P\\d+)\\.(?P\\d+)\\.(?P0a)?(?P\\d+)(\\.(?P[a-z]+))?"