Ticket #10 (closed enhancement: fixed)
Allow use of TurboMail independent of TurboGears.
| Reported by: | alberto@… | Owned by: | realuser |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0 |
| Component: | infrastructure | Version: | |
| Keywords: | Cc: | alberto@… |
Description (last modified by amcgregor) (diff)
I've made a couple of changes to TurboMail's package structure (hopefully 100% backwards compatible) to allow re-use of the TurboMail in any python app.
Changes made:
- Removed KidMessage from message.py (I've seen in a comment it was planned for next version) since it depends on tg's view engines
- Tweaked Message's constructor so it doesn't fetch encoding from tg's config but accept it as parameter. If not given, will use Message.default_encoding (which ext.tg monkey-patches for backwards compatibility)
- Moved startup.py to turbogears.ext.tg (changedentrypoints and some imports accordingly)
- Modified init.py to check if TG is installed before importing the extension's symbols into the turbomail namespace.
- Removed the turbogears dependency at setup.py and added as "extras_require". TurboMail now only requires stdlib :)
- Applied reindent.py on all .py files (since I sc**ed indentation badly with my 4-tab-spaces editor)
I've minimally tested it in a quickstarted 1.0.2.2 app and everything seems ok.
This patch makes TurboMail TurboGears2-ready! :)
Alberto
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
