diff options
| author | Georg Brandl <georg@python.org> | 2010-11-20 09:45:05 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2010-11-20 09:45:05 +0100 |
| commit | bf8a470cfeda7aa8322c52aa991ea456a3956f3a (patch) | |
| tree | f4c288f27221b044bb809ffa6488799228765854 /sphinx | |
| parent | 368840db262ff37370d7d371772bb27636b88926 (diff) | |
| download | sphinx-bf8a470cfeda7aa8322c52aa991ea456a3956f3a.tar.gz | |
Fix calling all serializers with pickle.HIGHEST_PROTOCOL argument.
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/builders/html.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sphinx/builders/html.py b/sphinx/builders/html.py index 3d437053..6e8279f7 100644 --- a/sphinx/builders/html.py +++ b/sphinx/builders/html.py @@ -931,6 +931,8 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder): #: (pickle, simplejson etc.) implementation = None implementation_dumps_unicode = False + #: additional arguments for dump() + additional_dump_args = () #: the filename for the global context file globalcontext_filename = None @@ -959,8 +961,7 @@ class SerializingHTMLBuilder(StandaloneHTMLBuilder): else: f = open(filename, 'wb') try: - # XXX: the third argument is pickle-specific! - self.implementation.dump(context, f, 2) + self.implementation.dump(context, f, *self.additional_dump_args) finally: f.close() @@ -1011,6 +1012,7 @@ class PickleHTMLBuilder(SerializingHTMLBuilder): """ implementation = pickle implementation_dumps_unicode = False + additional_dump_args = (pickle.HIGHEST_PROTOCOL,) indexer_format = pickle indexer_dumps_unicode = False name = 'pickle' |
