Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 957509 - Recent update of python-genshi to 0.7 breaks trac
Summary: Recent update of python-genshi to 0.7 breaks trac
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: trac
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 960296 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-28 15:55 UTC by Paul Howarth
Modified: 2014-02-05 21:30 UTC (History)
8 users (show)

Fixed In Version: python-genshi-0.7-3.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-22 03:10:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
0001-Patch-out-the-Genshi-0.7-requirement-957509.patch (deleted)
2013-05-01 13:56 UTC, Luke Macken
no flags Details | Diff

Description Paul Howarth 2013-04-28 15:55:09 UTC
Tried to use trac today, got a message about unsupported database type "sqlite". Couldn't find any recent changes to any trac or sqlite related packages so I tried "tracadm" from the command line and got:

Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2819, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Genshi>=0.6,<0.7dev

The /usr/share/doc/trac-0.12.3/INSTALL file shipped with trac says it needs "Genshi, version >= 0.6 (but not 0.7dev, i.e. Genshi trunk)".

Sure enough, "yum downgrade python-genshi" resolved the problem.

It would seem that the python-genshi maintainer has pushed an incompatible update (tsk, tsk) but there's not much can be done about that now. I tried installing a rebuild of EPEL-6's python-genshi06 package but I think trac needs patching to pick that up in preference to the current python-genshi.

Comment 1 Luke Macken 2013-04-29 20:46:44 UTC
I regretfully pushed Genshi 0.7 out to F18 without digging deeper than the RPM requirements. Since our Trac specfile does not specify the upper version limit that is in the setup.py, it is now causing DistributionNotFound errors.

As for our options, I think the easiest solution would be to build the EL6 python-genshi06 compat package for F18. The other options that I can think of are an Epoch, pushing Trac 1.x down to F18, or backporting the genshi 0.17 fixes from trac, all of which are painful.

With some basic testing locally, I think that Trac is smart enough to pull in the correct version from all of it's entry points (trac-admin, tracd, deploy_trac.wsgi), when both versions of Genshi are installed. The spec will need to patch the setup.py to add a __requires__ for this to get the test suite passing, but the current package /should/ work fine once you install python-genshi06.

Could you please test your trac setup with python-genshi-0.7 and python-genshi0.6 at the same time? http://koji.fedoraproject.org/koji/taskinfo?taskID=5315520

Thanks, and sorry for the inconvenience.

Comment 2 Anthony Messina 2013-04-29 23:25:34 UTC
(In reply to comment #1)
> Could you please test your trac setup with python-genshi-0.7 and
> python-genshi0.6 at the same time?
> http://koji.fedoraproject.org/koji/taskinfo?taskID=5315520

Unfortunately, having both installed does not work here:

yum[27032]: Updated: python-genshi-0.7-2.fc18.x86_64
yum[27038]: Installed: python-genshi06-0.6-1.fc18.noarch
systemd[1]: Stopping The Apache HTTP Server...
systemd[1]: Starting The Apache HTTP Server...
systemd[1]: Started The Apache HTTP Server.
httpd[27059]: Trac[loader] ERROR: Skipping "git = tracext.git.git_fs": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.about = trac.about": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.admin.console = trac.admin.console": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.admin.web_ui = trac.admin.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.attachment = trac.attachment": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.db.mysql = trac.db.mysql_backend": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.db.postgres = trac.db.postgres_backend": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.db.sqlite = trac.db.sqlite_backend": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.mimeview.patch = trac.mimeview.patch": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.prefs = trac.prefs.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.search = trac.search.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.ticket.admin = trac.ticket.admin": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.ticket.query = trac.ticket.query": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.ticket.report = trac.ticket.report": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.ticket.roadmap = trac.ticket.roadmap": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.ticket.web_ui = trac.ticket.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.timeline = trac.timeline.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.versioncontrol.admin = trac.versioncontrol.admin": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.versioncontrol.svn_authz = trac.versioncontrol.svn_authz": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.versioncontrol.svn_fs = trac.versioncontrol.svn_fs": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.versioncontrol.svn_prop = trac.versioncontrol.svn_prop": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.versioncontrol.web_ui = trac.versioncontrol.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.web.auth = trac.web.auth": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.web.session = trac.web.session": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.wiki.admin = trac.wiki.admin": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.wiki.interwiki = trac.wiki.interwiki": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.wiki.macros = trac.wiki.macros": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.wiki.web_api = trac.wiki.web_api": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "trac.wiki.web_ui = trac.wiki.web_ui": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.mimeview.enscript = tracopt.mimeview.enscript": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.mimeview.php = tracopt.mimeview.php": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.perm.authz_policy = tracopt.perm.authz_policy": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.perm.config_perm_provider = tracopt.perm.config_perm_provider": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.ticket.commit_updater = tracopt.ticket.commit_updater": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[loader] ERROR: Skipping "tracopt.ticket.deleter = tracopt.ticket.deleter": (version conflict "VersionConflict: (Genshi 0.7 (/usr/lib64/python2.7/site-packages), Requirement.parse('Genshi>=0.6,<0.7dev'))")
httpd[27059]: Trac[env] ERROR: Exception caught while checking for upgrade:
httpd[27059]: Trac[main] ERROR: Internal Server Error:
httpd[27059]: Trac[chrome] ERROR: Error during check of EMAIL_VIEW: TracError: Unsupported database type "postgres"
httpd[27059]: Trac[chrome] ERROR: Error during check of EMAIL_VIEW: TracError: Unsupported database type "postgres"

Comment 3 RevRagnarok 2013-04-30 09:31:37 UTC
On two of my trac installations, this came up as different errors (just found this bug after trying to run trac-admin):

One installation returned:

Warning: Can't synchronize with repository "(default)" (Unsupported database type "sqlite"). Look in the Trac log for more information. 

AttributeError: 'FakePerm' object has no attribute 'assert_permission'

The other:

AttributeError: Cannot find an implementation of the "IRequestHandler" interface named "WikiModule".  Please update the option trac.default_handler in trac.ini.

Adding these in to possibly let others find this bug and its (temporary) resolution.

Comment 4 Paul Howarth 2013-04-30 10:40:44 UTC
Didn't work for me when I tried it from a local rebuild of python-genshi06 myself at the weekend either, as I mentioned in the original report. trac still seemed to be pulling in the 0.7 version for some reason.

Comment 5 Luke Macken 2013-04-30 13:43:15 UTC
Okay, so the parallel installation of Genshi 0.6 & 0.7 is not going to be as easy as I had hoped.

Here is another attempt at a fix. Since Genshi 0.7 changed the default encoding to None (unicode) to ease the Python3 transition, I went ahead and built a patched Genshi 0.7 that changes the default back to utf-8.

So, could you guys please try removing the python-genshi06 package, and update python-genshi to this version to see if it fixes it? http://koji.fedoraproject.org/koji/taskinfo?taskID=5317449

Comment 6 Paul Howarth 2013-04-30 13:49:28 UTC
Running trac-admin results in:

Traceback (most recent call last):
  File "/usr/bin/trac-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2819, in <module>
    parse_requirements(__requires__), Environment()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Genshi>=0.6,<0.7dev

Using trac's web interface results in a traceback like the one in Comment #2. Trac will need patching for this to have any chance of working.

Comment 7 Luke Macken 2013-04-30 21:06:40 UTC
Ah, yeah we'll need to patch out that hard upper version requirement with my test genshi package. To test it out, you can either edit /usr/lib/python2.7/site-packages/Trac-0.12.3-py2.7.egg-info/requires.txt by hand, or install this scratch build that patches the requirement out. http://koji.fedoraproject.org/koji/taskinfo?taskID=5319341

Comment 8 Paul Howarth 2013-05-01 09:55:27 UTC
The combination of trac-0.12.3-5.fc18.noarch and python-genshi-0.7-3.fc18.x86_64 seems to work for me, both CLI and Web UI, at least for a few test queries.

Comment 9 Adri Verhoef 2013-05-01 10:55:39 UTC
On my computer, 'tracd' didn't run anymore after a software update and a reboot yesterday (30-4-2013).
In /usr/lib/python2.7/site-packages/Trac-0.12.3-py2.7.egg-info/requires.txt I changed "Genshi>=0.6,<0.7dev" into "Genshi>=0.7" and now 'tracd' is running again. Thanks!

Comment 10 Luke Macken 2013-05-01 13:19:51 UTC
(In reply to comment #8)
> The combination of trac-0.12.3-5.fc18.noarch and
> python-genshi-0.7-3.fc18.x86_64 seems to work for me, both CLI and Web UI,
> at least for a few test queries.

Great, thanks for testing. It seems like changing Genshi's default encoding back to utf-8 for Fedora 18 and patching Trac to allow 0.7 is the best approach. I'll push the builds into updates-testing.

Comment 11 Fedora Update System 2013-05-01 13:29:38 UTC
python-genshi-0.7-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-genshi-0.7-3.fc18

Comment 12 Luke Macken 2013-05-01 13:56:18 UTC
Created attachment 742217 [details]
0001-Patch-out-the-Genshi-0.7-requirement-957509.patch

Here is the patch to remove the hard upper Genshi version requirement. Could either limb or fschwartz please either apply the patch to f18 or approve my commit request? https://admin.fedoraproject.org/pkgdb/acls/name/trac Thanks!

Comment 13 Luke Macken 2013-05-01 13:57:26 UTC
Oh, and I also enabled the test suite in %check in my local repo, which runs perfectly with python-genshi-0.7-3.fc18

Comment 14 Gwyn Ciesla 2013-05-01 14:04:52 UTC
Go forth and patch.  Thank you!

Comment 15 Fedora Update System 2013-05-01 14:31:03 UTC
trac-0.12.3-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/trac-0.12.3-5.fc18

Comment 16 Fedora Update System 2013-05-02 03:50:37 UTC
Package trac-0.12.3-5.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing trac-0.12.3-5.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-7209/trac-0.12.3-5.fc18
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2013-05-10 04:56:01 UTC
python-genshi-0.7-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2013-05-22 03:10:19 UTC
python-genshi-0.7-3.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Paul Howarth 2014-02-05 21:30:44 UTC
*** Bug 960296 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.