From caaeb235a08a250a9438c97259f2a74ae2ca8bbd Mon Sep 17 00:00:00 2001 From: Serhii A Date: Tue, 17 Jan 2023 13:52:41 +0200 Subject: [PATCH] =?UTF-8?q?scrapy.utils.console.DEFAULT=5FPYTHON=5FSHELLS:?= =?UTF-8?q?=20OrderedDict=20=E2=86=92=20dict=20(#5795)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scrapy/utils/console.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scrapy/utils/console.py b/scrapy/utils/console.py index 1bc0bd45f..4828c7767 100644 --- a/scrapy/utils/console.py +++ b/scrapy/utils/console.py @@ -1,5 +1,4 @@ from functools import wraps -from collections import OrderedDict def _embed_ipython_shell(namespace={}, banner=''): @@ -63,12 +62,12 @@ def _embed_standard_shell(namespace={}, banner=''): return wrapper -DEFAULT_PYTHON_SHELLS = OrderedDict([ - ('ptpython', _embed_ptpython_shell), - ('ipython', _embed_ipython_shell), - ('bpython', _embed_bpython_shell), - ('python', _embed_standard_shell), -]) +DEFAULT_PYTHON_SHELLS = { + 'ptpython': _embed_ptpython_shell, + 'ipython': _embed_ipython_shell, + 'bpython': _embed_bpython_shell, + 'python': _embed_standard_shell, +} def get_shell_embed_func(shells=None, known_shells=None):