[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Alexis Metaireau ale...@notmyidea.org added the comment: Hi, I was more thinking about something like: if the license is specified in the License metadata, then check that it's not a well known license (which can and must be provided by the classifiers instead). At the end, the code you've wrote is useful, but not complete. Additionally, it seems that your patch make check complaining if you just have *defined* classifiers and license (even if the license is not provided in the classifiers: it complains if there is both defined, regardless what is defined). It should check instead if the classifier field contain the same thing than the license field. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Éric Araujo mer...@netwok.org added the comment: PEP 345 actually defines two fields that should be used only when a suitable Trove classifier does not exist: Platform (multiple use) A Platform specification describing an operating system supported by the distribution which is not listed in the Operating System Trove classifiers. License (optional) Text indicating the license covering the distribution where the license is not a selection from the License Trove classifiers. See Classifier below. This field may also be used to specify a particular version of a licencse which is named via the Classifier field, or to indicate a variation or exception to such a license. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Kelsey kelsey.highto...@gmail.com added the comment: Based on the feedback, I will rework the patch to include the following: * Produce a warning only if the user supplied Platform or License metadata is listed in Trove classifiers (Exact match?). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Éric Araujo mer...@netwok.org added the comment: That’s not quite what the PEP says. Please read it again and try to follow the text in your code. Thanks for your work :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Alexis Metaireau ale...@notmyidea.org added the comment: That's almost what the PEP says, or at least what I understand of it. The platform and license fields should be used only if no matching classifier exists for them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Kelsey kelsey.highto...@gmail.com added the comment: Eric, I am not sure we can check for more than an exact match on Platform and License metadata fields. D2 maintains a list of all Trove Classifiers which can be searched for an exact match; if a match is found warn the user that a Classifier should be used instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Éric Araujo mer...@netwok.org added the comment: That's almost what the PEP says, or at least what I understand of it. I’ve probably misused “not quite”; I meant “not exactly”. Allow me to try to translate the PEP text to pseudo-code: Platform (multiple use) A Platform specification describing an operating system supported by the distribution which is not listed in the Operating System Trove classifiers. if 'platform' in meta: if 'Operating System' in meta['classifiers']: warnings.append('the platform keyword duplicates the Platform classifier') else: warnings.append('using a platform keyword instead of a classifier, please make sure there is no classifier for this platform') License (optional) Text indicating the license covering the distribution where the license is not a selection from the License Trove classifiers. See Classifier below. This field may also be used to specify a particular version of a licencse which is named via the Classifier field, or to indicate a variation or exception to such a license. if 'license' in meta: if 'License' in meta['classifiers']: warnings.append('using a license keyword with a License classifier, please make sure the keyword does not duplicate the classifier but precises it') else: warnings.append('using a license keyword instead of a classifier, please make sure there is no classifier for this license') My pseudo-code assumes that meta['classifiers'].__contains__ can get all matching classifiers (for example all classifiers of the 'Operating System' category), not just perform exact matching against a list of strings. I’ve just sent a message to the fellowship ML to brainstorm about a better data structure to model and work with classifiers; if we reach agreement, I’ll open another bug about that and make this one depend on the other. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Kelsey kelsey.highto...@gmail.com added the comment: Eric, thanks for the example. This clarifies things. +1 on the new data structure for the classifiers -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
New submission from Kelsey kelsey.highto...@gmail.com: Distutils2 should produce a warning when the license is specified in both the License and Classifier metadata fields -- assignee: tarek components: Distutils2 messages: 128624 nosy: alexis, eric.araujo, kelseyhightower, tarek priority: normal severity: normal status: open title: Produce a warning when the license is specified in both the License and Classifier metadata fields type: feature request versions: 3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11219] Produce a warning when the license is specified in both the License and Classifier metadata fields
Kelsey kelsey.highto...@gmail.com added the comment: Changes and additional tests can be reviewed on my patch queue. https://bitbucket.org/khightower/distutils2-patch-queue/changeset/d7dff88ab524 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com