77from pulpcore .plugin import serializers as core_serializers
88
99from pulp_python .app import models as python_models
10+ from pulp_python .app import fields
1011from pulp_python .app .utils import get_project_metadata_from_artifact , parse_project_metadata
1112
1213
@@ -154,7 +155,7 @@ class PythonPackageContentSerializer(core_serializers.SingleArtifactContentUploa
154155 required = False , allow_blank = True ,
155156 help_text = _ ('A browsable URL for the project and a label for it, separated by a comma.' )
156157 )
157- project_urls = serializers . JSONField (
158+ project_urls = fields . JSONObjectField (
158159 required = False , default = dict ,
159160 help_text = _ ('A dictionary of labels and URLs for the project.' )
160161 )
@@ -167,28 +168,28 @@ class PythonPackageContentSerializer(core_serializers.SingleArtifactContentUploa
167168 required = False , allow_blank = True ,
168169 help_text = _ ('Field to specify the OS and CPU for which the binary package was compiled. ' )
169170 )
170- requires_dist = serializers . JSONField (
171+ requires_dist = fields . JSONObjectField (
171172 required = False , default = list ,
172173 help_text = _ ('A JSON list containing names of some other distutils project '
173174 'required by this distribution.' )
174175 )
175- provides_dist = serializers . JSONField (
176+ provides_dist = fields . JSONObjectField (
176177 required = False , default = list ,
177178 help_text = _ ('A JSON list containing names of a Distutils project which is contained'
178179 ' within this distribution.' )
179180 )
180- obsoletes_dist = serializers . JSONField (
181+ obsoletes_dist = fields . JSONObjectField (
181182 required = False , default = list ,
182183 help_text = _ ('A JSON list containing names of a distutils project\' s distribution which '
183184 'this distribution renders obsolete, meaning that the two projects should not '
184185 'be installed at the same time.' )
185186 )
186- requires_external = serializers . JSONField (
187+ requires_external = fields . JSONObjectField (
187188 required = False , default = list ,
188189 help_text = _ ('A JSON list containing some dependency in the system that the distribution '
189190 'is to be used.' )
190191 )
191- classifiers = serializers . JSONField (
192+ classifiers = fields . JSONObjectField (
192193 required = False , default = list ,
193194 help_text = _ ('A JSON list containing classification values for a Python package.' )
194195 )
0 commit comments