Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2467 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Unable to Disable Unneeded Dependencies (Genshi & ToscaWidgets)

Reported by: lambacck Owned by:
Priority: normal Milestone: 2.1rc1
Component: TurboGears Version: trunk
Severity: normal Keywords: toscawidgets genshi
Cc:

Description

It is possible to disable both ToscaWidgets? and Genshi, but it is not possible to get rid of the dependency because they are always imported.

Genshi is imported in tg/render.py but not used unless a Genshi template is used.

ToscaWidgets? is imported in tg/controllers/decoratedcontroller.py but not used unless use_toscawidgets config variable is set to true. ToscaWidgets2 is conditionally imported.

I'll provide a patch before the PyCon? sprint on Monday. I'm not in Atlanta, but I'll show up on IRC to discuss.

Attachments

dependencies.diff Download (18.8 KB) - added by lambacck 9 years ago.
Patch to fix dependencies

Change History

comment:1 Changed 9 years ago by lambacck

I added a patch. After this patch is applied, ToscaWidgets? and Genshi should only be required if they are being used. I did not change the install_requires in setup.py because I was not sure how this should be handled.

I also made it so that Mako is not required when dotted names support is used.

Changed 9 years ago by lambacck

Patch to fix dependencies

comment:2 Changed 9 years ago by lmacken

  • Status changed from new to closed
  • Resolution set to fixed

Committed, tweaked ( http://bitbucket.org/turbogears/tg-dev/changeset/2ec592fe10dd/) and pushed. Works with the tg test suite, along with mako & genshi quickstart test suites.

Thanks for the patch!

comment:3 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 2.1

comment:4 Changed 9 years ago by percious

  • Milestone changed from 2.1 to 2.1rc1
Note: See TracTickets for help on using tickets.