classification
Title: Adding a read_pkg_file to DistributionMetadata
Type: Stage:
Components: Distutils Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: jason.coombs Nosy List: jason.coombs, ncoghlan, ned.deily, python-dev, tarek
Priority: normal Keywords:

Created on 2009-12-08 08:32 by tarek, last changed 2013-11-10 23:25 by jason.coombs. This issue is now closed.

Messages (8)
msg96113 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-12-08 08:32
This API will allow readong back static PKG-INFO files.
msg96116 - (view) Author: Tarek Ziadé (tarek) * (Python committer) Date: 2009-12-08 10:03
done in r76702 + r76704 (2.7) and r76706 (3.2)
msg192679 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-07-08 17:35
I recently discovered this method is missing from Python 3. I started porting a project which depends on it (a tool that uploads an already-packaged package to a cheeseshop), but found the method missing on Python 3. According to the changelog, this commit landed in 2.7 and 3.2, but when I search the Mercurial repo for #7457, it seems it only landed in 2.7 (25aede62fc17). Perhaps the change was lost in the migration to Mercurial?

Since this behavior was not intentionally removed from Python 3 and has no suitable replacement (afaik), the functionality should be restored in 3.2+, as it is a regression from 2.7.
msg192681 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-07-08 17:41
On second thought, the hyperlink for r76706 resolves to d9b4f6ea3e39, which is in the default branch since 2009, so apparently the code was present, so I'll continue to trace why it went away.
msg192682 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-07-08 17:48
I see now, the code was removed in 29a3eda89995.

But the associated comment indicates distutils is feature-frozen and that subsequent work should be done in distutils2, which of course is now a defunct effort.

Given that information, what's the proper solution for a project that requires the ability to read distribution metadata (preferably one that supports Python 3.2)?
msg192685 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2013-07-08 19:05
There have been a number of issues that have come up over the past few years due to Python 3.2+'s distutils being a subset of Python 2.7's as a result of the revert (29a3eda89995).  Since circumstances have changed since the decision was made to do the revert and distutils isn't going away immediately, I think the best thing at this point would be for someone to make a comprehensive forward port patch of the current distutils in 2.7 to default for review with the goal of having a common base, feature- and bug-wise, for 3.4.  That isn't going to solve the problem for those who need to support 3.2, of course, but knowing exactly what the differences are at this point might suggest some practical solutions, as I expect the differences among 3.2, 3.3, and default (3.4) at this point are fewer than the differences between any of them and 2.7.  A first step would be to open an issue.
msg202535 - (view) Author: Jason R. Coombs (jason.coombs) * (Python committer) Date: 2013-11-10 17:01
As suggested, I created issue19544 to track the larger effort.
msg202584 - (view) Author: Roundup Robot (python-dev) Date: 2013-11-10 23:22
New changeset e19441e540ca by Jason R. Coombs in branch '3.3':
Issue 19544 and Issue #7457: Restore the read_pkg_file method to distutils.dist.DistributionMetadata accidentally removed in the undo of distutils2.
http://hg.python.org/cpython/rev/e19441e540ca

New changeset 28059d8b395b by Jason R. Coombs in branch 'default':
Merge with 3.3 for Issue #19544 and Issue #7457
http://hg.python.org/cpython/rev/28059d8b395b
History
Date User Action Args
2013-11-10 23:25:25jason.coombssetstatus: open -> closed
resolution: fixed
2013-11-10 23:22:19python-devsetnosy: + python-dev
messages: + msg202584
2013-11-10 22:58:38jason.coombssetassignee: tarek -> jason.coombs
2013-11-10 17:01:00jason.coombssetmessages: + msg202535
2013-07-08 19:05:59ned.deilysetnosy: + ned.deily
messages: + msg192685
2013-07-08 17:48:52jason.coombssetnosy: + ncoghlan
messages: + msg192682
2013-07-08 17:41:43jason.coombssetmessages: + msg192681
2013-07-08 17:35:26jason.coombssetstatus: closed -> open
nosy: + jason.coombs
messages: + msg192679

2009-12-08 10:03:38tareksetstatus: open -> closed

messages: + msg96116
versions: - Python 3.1
2009-12-08 08:32:52tarekcreate