On 2/16/26 10:24 PM, Ilya Maximets wrote:
> On 2/16/26 10:16 PM, Aaron Conole wrote:
>> Ilya Maximets <[email protected]> writes:
>>
>>> This reverts commit 7330836535b52ad772a7878761e82226ce4d5706.
>>>
>>> The 'License-Expression' is not a classifier, so it must not be in
>>> the list of classifiers.  Otherwise PyPI rejects the package:
>>>
>>>   HTTPError: 400 Bad Request
>>>
>>>   The server could not comply with the request since it is either
>>>   malformed or otherwise incorrect.
>>>
>>>   400 'License-Expression :: Apache 2.0' is not a valid classifier.
>>>   See https://packaging.python.org/specifications/core-metadata for
>>>   more information.
>>>
>>> So, the commit is clearly wrong.  The list of valid classifiers
>>> can be seen here: https://pypi.org/classifiers/
>>>
>>> We probably shouldn't list the classifier at all and change the
>>> 'license' field instead.  But that's a thing to explore later.
>>> For now, just revert the change to the legacy working state.
>>>
>>> Fixes: 7330836535b5 ("python: Replace deprecated License with 
>>> License-Expression (PEP 639).")
>>> Signed-off-by: Ilya Maximets <[email protected]>
>>> ---
>>
>> Hrrm... I think it should probably either be:
>>
>>  Apache License 2.0
>>
>> or
>>
>>  Apache-2.0
>>
>> It's rather unfortunate that PyPI doesn't allow testing / staging these.
> 
> It sort of does, there is test.pypi.org.  But I can't test it directly,
> as there is already 'ovs' package on the test server and I don't have
> access to it.  But you still can tell if the result is 400 or 403.
> 
> AFAICT, from my current testing, it must be:
> 
> licence='Apache 2.0'
> classifiers=[
>   'License :: OSI Approved :: Apache Software License'
> ]
> 
> Here the 'license' clarifies the exact version of the license in the
> classifier.
> 
> Or it must be just:
> 
> license_expressions='Apache-2.0'
> 
> Without the 'license' or anything in the classifiers, as this expression
> must be a valid SPDX identifier in this case.
> 
> All other combinations are wrong, some are rejected by the PyPI, some are
> failing by the twine check before upload.
> 
>>
>> Anyway, rather than fighting with this for too long, maybe it is best to
>> revert for now, and work on it for 3.8
> 
> I can send a patch with the license_expressions thing later, but for now
> it's easier to just revert.  Legacy things work just fine.
> 
>>
>> Acked-by: Aaron Conole <[email protected]>
> 
> Thanks!

Applied to main and branch-3.7.  I hope we don't need to make a new release
tag for this, I'm going to push this as 3.7.0 on PyPI, even though it's
different by this one patch.  I should not be a problem for distributions,
AFAIU.

Best regards, Ilya Maximets.

> 
>>
>>>  python/setup.py.template | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/python/setup.py.template b/python/setup.py.template
>>> index 0a7849b4e..e28d5d397 100644
>>> --- a/python/setup.py.template
>>> +++ b/python/setup.py.template
>>> @@ -97,7 +97,7 @@ setup_args = dict(
>>>          'Topic :: Database :: Front-Ends',
>>>          'Topic :: Software Development :: Libraries :: Python Modules',
>>>          'Topic :: System :: Networking',
>>> -        'License-Expression :: Apache 2.0',
>>> +        'License :: OSI Approved :: Apache Software License',
>>>          'Programming Language :: Python :: 3',
>>>          'Programming Language :: Python :: 3.7',
>>>      ],
>>
> 

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to