Changes between Version 8 and Version 9 of TipAndDoc/project/trac/plugins


Ignore:
Timestamp:
Dec 31, 2010 9:24:07 PM (13 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/project/trac/plugins

    v8 v9  
    3030/path/to/global/trac/plugins/graphviz-0.7.6dev-py2.6.egg/graphviz/graphviz.py:23: DeprecationWarning: the sha module is deprecated; use the hashlib module instead 
    3131}}} 
    32    * 以下のようにして修正すればよい(というか警告のママ) 
     32   * ~~以下のようにして修正すればよい(というか警告のママ)~~ 
    3333{{{ 
    3434$ svn diff graphvizplugin/ 
     
    4646 import sys 
    4747}}} 
     48     * 上記だけではNG[[br]][[Image(graphviz-error_sha.png, 33%)]] 
     49   * svn diff 0.11/graphviz/graphviz.py 
     50{{{ 
     51Index: 0.11/graphviz/graphviz.py 
     52=================================================================== 
     53--- 0.11/graphviz/graphviz.py   (revision 9708) 
     54+++ 0.11/graphviz/graphviz.py   (working copy) 
     55@@ -20,7 +20,7 @@ 
     56 import locale 
     57 import os 
     58 import re 
     59-import sha 
     60+import hashlib 
     61 import subprocess 
     62 import sys 
     63 
     64@@ -310,7 +310,7 @@ 
     65         encoded_cmd = (processor + unicode(self.processor_options)) \ 
     66                 .encode(self.encoding) 
     67         encoded_content = content.encode(self.encoding) 
     68-        sha_key  = sha.new(encoded_cmd + encoded_content).hexdigest() 
     69+        sha_key  = hashlib.sha1(encoded_cmd + encoded_content).hexdigest() 
     70         img_name = '%s.%s.%s' % (sha_key, processor, out_format) 
     71         # cache: hash.<dot>.<png> 
     72         img_path = os.path.join(self.cache_dir, img_name) 
     73}}}