python-apt's apt.Cache should be more like a dict
Bug #251587 reported by
to be removed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Wishlist
|
Michael Vogt |
Bug Description
Binary package hint: python-apt
Attached is a small Python program to display the problem: apt.Cache does not support '"foo" in cache' even though it tries to be a dict. The output of the program should be four times True, now the second line is False. I think that is a bug.
Fixing this should be possible by just adding a __contains__(self, item) method to apt.Cache, possibly as an alias for has_key.
(I'm currently using version 0.7.6ubuntu3~ppa1 of python-apt.)
Also, isn't it time to make python-apt _not_ complain about the API being unstable? Pretty please?
Changed in python-apt: | |
assignee: | nobody → mvo |
importance: | Undecided → Wishlist |
status: | New → Fix Committed |
To post a comment you must log in.
This bug was fixed in the package python-apt - 0.7.7.1ubuntu2
---------------
python-apt (0.7.7.1ubuntu2) intrepid; urgency=low
* python/cache.cc: ateVer( ) was used. Thanks to Julian Andres Klode for apt_instmodule. cc:
- fix GetCandidateVer() reporting incorrect versions after
SetCandid
the test-case (LP: #237372)
* python/
- do not change working dir in debExtractArchive() (LP: #184093)
* apt/cache.py:
- support "in" in apt.Cache() (LP: #251587)
-- Michael Vogt <email address hidden> Tue, 05 Aug 2008 11:35:32 +0200