Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a read_pkg_file to DistributionMetadata #51706

Closed
tarekziade mannequin opened this issue Dec 8, 2009 · 8 comments
Closed

Adding a read_pkg_file to DistributionMetadata #51706

tarekziade mannequin opened this issue Dec 8, 2009 · 8 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented Dec 8, 2009

BPO 7457
Nosy @jaraco, @ncoghlan, @tarekziade, @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/jaraco'
closed_at = <Date 2013-11-10.23:25:25.116>
created_at = <Date 2009-12-08.08:32:52.513>
labels = ['library']
title = 'Adding a read_pkg_file to DistributionMetadata'
updated_at = <Date 2013-11-10.23:25:25.115>
user = 'https://github.com/tarekziade'

bugs.python.org fields:

activity = <Date 2013-11-10.23:25:25.115>
actor = 'jaraco'
assignee = 'jaraco'
closed = True
closed_date = <Date 2013-11-10.23:25:25.116>
closer = 'jaraco'
components = ['Distutils']
creation = <Date 2009-12-08.08:32:52.513>
creator = 'tarek'
dependencies = []
files = []
hgrepos = []
issue_num = 7457
keywords = []
message_count = 8.0
messages = ['96113', '96116', '192679', '192681', '192682', '192685', '202535', '202584']
nosy_count = 5.0
nosy_names = ['jaraco', 'ncoghlan', 'tarek', 'ned.deily', 'python-dev']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue7457'
versions = ['Python 2.7', 'Python 3.2']

@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented Dec 8, 2009

This API will allow readong back static PKG-INFO files.

@tarekziade tarekziade mannequin self-assigned this Dec 8, 2009
@tarekziade tarekziade mannequin added the stdlib Python modules in the Lib dir label Dec 8, 2009
@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented Dec 8, 2009

done in r76702 + r76704 (2.7) and r76706 (3.2)

@tarekziade tarekziade mannequin closed this as completed Dec 8, 2009
@jaraco
Copy link
Member

jaraco commented Jul 8, 2013

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 bpo-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.

@jaraco jaraco reopened this Jul 8, 2013
@jaraco
Copy link
Member

jaraco commented Jul 8, 2013

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.

@jaraco
Copy link
Member

jaraco commented Jul 8, 2013

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)?

@ned-deily
Copy link
Member

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.

@jaraco
Copy link
Member

jaraco commented Nov 10, 2013

As suggested, I created bpo-19544 to track the larger effort.

@jaraco jaraco assigned jaraco and unassigned tarekziade Nov 10, 2013
@python-dev
Copy link
Mannequin

python-dev mannequin commented Nov 10, 2013

New changeset e19441e540ca by Jason R. Coombs in branch '3.3':
bpo-19544 and Issue bpo-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 bpo-19544 and Issue bpo-7457
http://hg.python.org/cpython/rev/28059d8b395b

@jaraco jaraco closed this as completed Nov 10, 2013
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants