This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Invalid detection of metadata version
Type: behavior Stage: resolved
Components: Distutils, Distutils2 Versions: Python 3.2, Python 3.3, Python 2.7, 3rd party
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, benliles, eric.araujo, gruszczy, python-dev, tarek
Priority: normal Keywords: easy, needs review, patch

Created on 2010-06-07 16:22 by benliles, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
8933.patch gruszczy, 2011-03-01 12:59 review
disutils2_8933.patch gruszczy, 2011-03-12 23:42
Messages (18)
msg107268 - (view) Author: Benjamin Liles (benliles) Date: 2010-06-07 16:22
The detection for metadata version does not follow what is specified in PEP 241 and PEP 314.

Specifically, the following fields are being sent as version 1.0 when they are not allowed as per PEP 241:

* Classifier
* Download-URL
msg112909 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-04 22:10
Thanks for the report. I’ll look into this shortly in distutils2 and see if it applies to distutils too (not sure it implements PEP 345).
msg129666 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-02-27 23:02
Here is a simple patch, that sets metadata version in PKG-INFO to 1.1, if finds classifier or download_url parametres in setup. If it's any good, I'll try to write a test. If not, I'll be happy to get some advice on how to provide a better one.
msg129667 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-02-27 23:19
Thanks for your help.  Tests would be very much appreciated; we don’t strictly follow the test-before-code method, but in this case it’s the best method to make sure we comply with the PEP: I can review the test against the PEP, then check if the unpatched code fails, apply a patch and check that it works.
msg129751 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-03-01 11:10
I'll get down to it.
msg129756 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-03-01 12:59
Patch with tests. Hope this is enough.
msg130524 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-03-10 19:01
Bump! How about applying this patch, Eric? Or maybe there is something else, that needs to be done. If so, I'll be happy to do it.
msg130525 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-10 19:21
Could you port the patch to distutils2?  I should have told so sooner, it’s the process we follow (more info on http://wiki.python.org/moin/Distutils/FixingBugs).
msg130526 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-03-10 19:22
Sure :-)
msg130712 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-03-12 23:42
Here is patch for distutils2. Or maybe you would prefer a patch made by hg export?
msg131559 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-03-20 22:39
Diffs or full changesets are fine.  I’m putting this on standby until distutils2 is fully merged into the standard library and we have a clear workflow from packaging to d2 to d1.
msg134059 - (view) Author: Filip Gruszczyński (gruszczy) Date: 2011-04-19 14:21
Bump! How about commiting this patch, Eric?
msg134073 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-04-19 15:58
“I’m putting this on standby until distutils2 is fully merged into the standard library and we have a clear workflow from packaging to d2 to d1.”
msg138331 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-14 15:29
I’ll look into this shortly.
msg143907 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-09-12 15:42
New changeset e5c1de856828 by Éric Araujo in branch '3.2':
Fix determination of Metadata version (#8933).  Patch by Filip Gruszczyński.
http://hg.python.org/cpython/rev/e5c1de856828

New changeset 70298cdc48cd by Éric Araujo in branch 'default':
Merge fix for #8933 from 3.2
http://hg.python.org/cpython/rev/70298cdc48cd

New changeset ca21a47b1ec2 by Éric Araujo in branch 'default':
Fix determination of Metadata version in packaging (#8933).
http://hg.python.org/cpython/rev/ca21a47b1ec2
msg143910 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-09-12 15:49
New changeset 4b72d56cf42f by Éric Araujo in branch '2.7':
Fix determination of Metadata version (#8933).  Patch by Filip Gruszczyński.
http://hg.python.org/cpython/rev/4b72d56cf42f
msg143917 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-09-12 16:18
It was very easy to verify your patch: PEP 314 lists the new fields.

For packaging (distutils2), I thought the fix would be less easy: I believed that all fields in _314_MARKERS would cause i conflict if used together with 345 fields, but as it turns out they don’t.  I’ll leave it at that for now, but I really want to rework the best_version-related functions to make them easier to grasp.

Thanks for the patches and bumps!
msg144270 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-09-19 13:34
Fixed in distutils2 in b9ca25b3254e.
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53179
2011-09-19 13:34:02eric.araujosetmessages: + msg144270
2011-09-12 16:18:00eric.araujosetstatus: open -> closed
resolution: fixed
messages: + msg143917

stage: patch review -> resolved
2011-09-12 15:49:39python-devsetmessages: + msg143910
2011-09-12 15:42:15python-devsetnosy: + python-dev
messages: + msg143907
2011-06-14 15:29:05eric.araujosetmessages: + msg138331
versions: - Python 3.1
2011-04-19 15:58:04eric.araujosetmessages: + msg134073
2011-04-19 14:21:53gruszczysetstatus: pending -> open

messages: + msg134059
2011-03-20 22:39:16eric.araujosetstatus: open -> pending
nosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg131559
2011-03-12 23:42:07gruszczysetfiles: + disutils2_8933.patch
nosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg130712
2011-03-10 19:22:54gruszczysetnosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg130526
2011-03-10 19:21:05eric.araujosetversions: + Python 3.3
nosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg130525

keywords: + needs review
stage: needs patch -> patch review
2011-03-10 19:01:49gruszczysetnosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg130524
2011-03-01 12:59:56gruszczysetfiles: + 8933.patch
nosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg129756
2011-03-01 12:59:36gruszczysetfiles: - 8933.patch
nosy: tarek, eric.araujo, gruszczy, benliles, alexis
2011-03-01 11:10:27gruszczysetnosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg129751
2011-02-27 23:19:10eric.araujosetnosy: tarek, eric.araujo, gruszczy, benliles, alexis
messages: + msg129667
2011-02-27 23:02:01gruszczysetfiles: + 8933.patch

nosy: + gruszczy
messages: + msg129666

keywords: + patch
2011-02-04 01:27:34eric.araujosetkeywords: + easy
nosy: tarek, eric.araujo, benliles, alexis
stage: needs patch
2010-09-29 23:59:37eric.araujosetversions: + 3rd party, Python 3.1, Python 3.2
2010-09-07 15:34:24eric.araujosetnosy: + alexis
2010-08-04 22:10:47eric.araujosetassignee: tarek -> eric.araujo
messages: + msg112909
components: + Distutils2
nosy: tarek, eric.araujo, benliles
2010-08-04 22:04:06terry.reedysetversions: + Python 2.7, - Python 2.6, Python 2.5
2010-06-07 16:25:46eric.araujosetnosy: + eric.araujo
2010-06-07 16:22:39benlilescreate