Skip to content

Commit 51a964c

Browse files
committed
Use absolute imports in sphinx
1 parent 2a30bb6 commit 51a964c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sphinx/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88

99
import os
1010
import warnings
11-
from os import path
12-
13-
from .deprecation import RemovedInNextVersionWarning
1411

1512
# by default, all DeprecationWarning under sphinx package will be emit.
1613
# Users can avoid this by using environment variable: PYTHONWARNINGS=
1714
if 'PYTHONWARNINGS' not in os.environ:
15+
from sphinx.deprecation import RemovedInNextVersionWarning
16+
1817
warnings.filterwarnings('default', category=RemovedInNextVersionWarning)
1918
warnings.filterwarnings(
2019
'ignore', 'The frontend.Option class .*', DeprecationWarning, module='docutils.frontend'
@@ -30,7 +29,7 @@
3029
#: Before version 1.2, check the string ``sphinx.__version__``.
3130
version_info = (7, 4, 0, 'beta', 0)
3231

33-
package_dir = path.abspath(path.dirname(__file__))
32+
package_dir = os.path.abspath(os.path.dirname(__file__))
3433

3534
_in_development = True
3635
if _in_development:

0 commit comments

Comments
 (0)