summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-26 17:46:18 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-03-26 17:46:18 +0900
commit8a98a1ad3d153caa39b3fa5d953790f89cd18b83 (patch)
tree5cf23a250144cfcc48ff104679869bd900c35384
parent6d08efe2dd28ad3084f2e6fe056c8df7d876a019 (diff)
downloadsphinx-git-8a98a1ad3d153caa39b3fa5d953790f89cd18b83.tar.gz
Fix event handlers should be called back by installed order
-rw-r--r--sphinx/events.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/events.py b/sphinx/events.py
index c97478282..336e13bae 100644
--- a/sphinx/events.py
+++ b/sphinx/events.py
@@ -12,7 +12,7 @@
"""
from __future__ import print_function
-from collections import defaultdict
+from collections import OrderedDict, defaultdict
from six import itervalues
@@ -47,7 +47,7 @@ class EventManager(object):
def __init__(self):
# type: () -> None
self.events = core_events.copy()
- self.listeners = defaultdict(dict) # type: Dict[unicode, Dict[int, Callable]]
+ self.listeners = defaultdict(OrderedDict) # type: Dict[unicode, Dict[int, Callable]]
self.next_listener_id = 0
def add(self, name):