Skip to content

Commit 4c03b32

Browse files
committed
PYTHON-1347 - Replace usage of Sphinx Directive
sphinx.util.compat.Directive is deprecated. Use docutils.parsers.rst.Directive instead.
1 parent eb65239 commit 4c03b32

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

doc/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Version 3.5.1 fixes bugs reported since the release of 3.5.0:
1010
- :meth:`pymongo.command_cursor.CommandCursor.close` now closes
1111
the cursor synchronously instead of deferring to a background
1212
thread.
13+
- Fix documentation build warnings with Sphinx 1.6.x.
1314

1415
Issues Resolved
1516
...............

doc/mongo_extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"""MongoDB specific extensions to Sphinx."""
1616

1717
from docutils import nodes
18+
from docutils.parsers import rst
1819
from sphinx import addnodes
19-
from sphinx.util.compat import Directive
2020

2121

2222
class mongodoc(nodes.Admonition, nodes.Element):
@@ -48,7 +48,7 @@ def depart_mongoref_node(self, node):
4848
self.body.append('\n')
4949

5050

51-
class MongodocDirective(Directive):
51+
class MongodocDirective(rst.Directive):
5252

5353
has_content = True
5454
required_arguments = 0

0 commit comments

Comments
 (0)