get_pkginfo() doesn't work for MySQLdb and trac.core
|Reported by:||Jun Omae||Owned by:||Jun Omae|
Description (last modified by )
trac.util.get_pkginfo() function retrieves
PKG-INFO for the specified module. The function usually is used to provide System Information and Installed Plugins.
However, if the module is non-toplevel module or isn't matched with package name, it doesn't work as expected.
>>> from trac.util import get_pkginfo >>> import trac, trac.core, MySQLdb, psycopg2 >>> for mod in (trac, trac.core, MySQLdb, psycopg2): ... mod.__name__, get_pkginfo(mod).get('version', '???') ... ('trac', '1.0.1') ('trac.core', '???') ('MySQLdb', '???') ('psycopg2', '2.0.14')
We could check that file path is included in
SOURCES.txt of the metadata to fix it.
Change History (7)
comment:6 by , 7 years ago
|Milestone:||next-stable-1.0.x → 1.0.2|
|Release Notes:||modified (diff)|
|Status:||new → closed|