Skip to content

Commit c20dfc0

Browse files
committed
refactor(aafig): Use hashlib library (sha1 deprecated since 2.5)
See also: https://docs.python.org/2.7/library/sha.html
1 parent e8bf689 commit c20dfc0

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

docs/_ext/aafig.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,14 @@
1111
:license: BOLA, see LICENSE for details
1212
"""
1313
import posixpath
14+
from hashlib import sha1 as sha
1415
from os import path
1516

1617
from docutils import nodes
1718
from docutils.parsers.rst.directives import flag, images, nonnegative_int
1819
from sphinx.errors import SphinxError
1920
from sphinx.util import ensuredir, logging, relative_uri
2021

21-
try:
22-
from hashlib import sha1 as sha
23-
except ImportError:
24-
from sha import sha
25-
26-
2722
try:
2823
import aafigure
2924
except ImportError:

0 commit comments

Comments
 (0)