Edgewall Software

Ticket #103 (closed defect: fixed)

Opened 8 years ago

Last modified 4 years ago

Genshi doesn't export version information

Reported by: techie Owned by: cmlenz
Priority: trivial Milestone: 0.4
Component: General Version: 0.3.6
Keywords: Cc:


>>> import genshi
>>> genshi.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute '__version__'


Change History

Changed 8 years ago by cmlenz

If you have setuptools, and have installed Genshi using setuptools (which is the default when setuptools is found when you run setup.py), you can do:

import pkg_resources

This could probably be done in __init__.py, but I'm not sure what to do when Genshi is installed without setuptools—which is still an option.

Changed 8 years ago by cmlenz

  • status changed from new to closed
  • resolution set to fixed

[516] adds the __version__ attribute for a setuptools-based install. I don't really want to have multiple places to change the version number, so this will have to do for now.

Add/Change #103 (Genshi doesn't export version information)


E-mail address and user name can be saved in the Preferences.

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'
Note: See TracTickets for help on using tickets.