Package: pexpect / 4.8.0-2

0002-Switch-to-Sphinx-logging-API.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
From: =?utf-8?q?Lukas_M=C3=A4rdian?= <luk@slyon.de>
Date: Mon, 10 Aug 2020 15:59:30 +0200
Subject: Switch to Sphinx logging API.

Apply upstream fix, switching to Sphinx logging API:
https://github.com/jupyter/sphinxcontrib_github_alt/commit/1f1036514578016297f5f77e706fc91b2401bcf3
---
 doc/sphinxext/github.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/doc/sphinxext/github.py b/doc/sphinxext/github.py
index 519e146..835416a 100644
--- a/doc/sphinxext/github.py
+++ b/doc/sphinxext/github.py
@@ -20,6 +20,10 @@ Authors
 from docutils import nodes, utils
 from docutils.parsers.rst.roles import set_classes
 
+from sphinx.util import logging
+logger = logging.getLogger(__name__)
+
+
 def make_link_node(rawtext, app, type, slug, options):
     """Create a link to a github resource.
 
@@ -75,7 +79,7 @@ def ghissue_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
         prb = inliner.problematic(rawtext, rawtext, msg)
         return [prb], [msg]
     app = inliner.document.settings.env.app
-    #app.info('issue %r' % text)
+    # logger.info('issue %r' % text)
     if 'pull' in name.lower():
         category = 'pull'
     elif 'issue' in name.lower():
@@ -104,8 +108,7 @@ def ghuser_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
     :param options: Directive options for customization.
     :param content: The directive content for customization.
     """
-    app = inliner.document.settings.env.app
-    #app.info('user link %r' % text)
+    # logger.info('user link %r' % text)
     ref = 'https://www.github.com/' + text
     node = nodes.reference(rawtext, text, refuri=ref, **options)
     return [node], []
@@ -126,7 +129,7 @@ def ghcommit_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
     :param content: The directive content for customization.
     """
     app = inliner.document.settings.env.app
-    #app.info('user link %r' % text)
+    # logger.info('user link %r' % text)
     try:
         base = app.config.github_project_url
         if not base:
@@ -146,7 +149,7 @@ def setup(app):
     
     :param app: Sphinx application context.
     """
-    app.info('Initializing GitHub plugin')
+    logger.info('Initializing GitHub plugin')
     app.add_role('ghissue', ghissue_role)
     app.add_role('ghpull', ghissue_role)
     app.add_role('ghuser', ghuser_role)