[Python-checkins] asyncio: use dict instead of OrderedDict (GH-11710)

Inada Naoki webhook-mailer at python.org
Tue Feb 5 03:04:49 EST 2019


https://github.com/python/cpython/commit/f34517094049170acc311bac30f68fa67f27a301
commit: f34517094049170acc311bac30f68fa67f27a301
branch: master
author: Inada Naoki <methane at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-02-05T17:04:40+09:00
summary:

asyncio: use dict instead of OrderedDict (GH-11710)

files:
M Lib/asyncio/base_events.py

diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index cec47ce67f38..36fe7e0076c9 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -1187,7 +1187,7 @@ def _check_sendfile_params(self, sock, file, offset, count):
                                     (local_addr, remote_addr)), )
             else:
                 # join address by (family, protocol)
-                addr_infos = collections.OrderedDict()
+                addr_infos = {}  # Using order preserving dict
                 for idx, addr in ((0, local_addr), (1, remote_addr)):
                     if addr is not None:
                         assert isinstance(addr, tuple) and len(addr) == 2, (



More information about the Python-checkins mailing list