Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2011, 09:53 AM   #1
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,258
Karma: 821512
Join Date: Jan 2010
Location: France
Device: Many android devices
composite_formatter and eval_formatter APIs deprecated

The template formatter instance ebooks.metadata.book.base.composite_formatter has been deprecated. It is a static instance of SafeFormat. SafeFormat is not thread safe, making using the static instance problematic. The composite_formatter declaration will be removed after a release or two.

If you use composite_formatter, then replace your code that looks like
Code:
composite_formatter.safe_format(...)
with
Code:
from ebooks.metadata.book.base import SafeFormat
...
SafeFormat().safe_format(...)
You can make a local instance of SafeFormat if you wish, as long as you can guarantee that the local instance will never be used simultaneously by multiple threads.

utils.formatter.eval_formatter has the same problem, and should be fixed in a similar way.
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM
Using composite_formatter.safe_format with multiline text? kiwidude Development 6 04-28-2011 10:08 AM
[Metadata Download Plugin] Goodreads Metadata **Deprecated** kiwidude Plugins 30 04-23-2011 02:10 PM
[Covers Plugin] Goodreads Covers **Deprecated** kiwidude Plugins 13 04-17-2011 05:09 PM
--output-format deprecated? Robotech_Master Calibre 6 01-03-2011 10:07 PM


All times are GMT -4. The time now is 08:40 AM.


MobileRead.com is a privately owned, operated and funded community.