diff options
author | Andrey Lushnikov <lushnikov@chromium.org> | 2018-07-25 13:48:47 -0700 |
---|---|---|
committer | Aleksey Kozyatinskiy <ak239spb@gmail.com> | 2018-08-10 18:03:43 -0700 |
commit | e0395247c899af101f8a1f76a8554be1ff14040a (patch) | |
tree | 2e0c061ac9dc90092605aaf49b7a7d0ed82799da /tools/markupsafe/_compat.py | |
parent | 2e37d0fdc0ad4a23034b7a2793c766bbcc416de2 (diff) | |
download | android-node-v8-e0395247c899af101f8a1f76a8554be1ff14040a.tar.gz android-node-v8-e0395247c899af101f8a1f76a8554be1ff14040a.tar.bz2 android-node-v8-e0395247c899af101f8a1f76a8554be1ff14040a.zip |
inspector: add inspector_protocol as a direct dependency
Currently, node.js depends on inspector_protocol indirectly through the
dependency on v8.
This is a dependency violation that will make it hard to roll V8 into
Node if V8 gets a newer inspector protocol version with incompatible
API. In fact, this surfaced on one of our bots when we tried to roll new
inspector_protocol into V8.
This patch adds inspector protocol and its required dependencies to node
deps:
- jinja2
- markupsafe
PR-URL: https://github.com/nodejs/node/pull/21975
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Diffstat (limited to 'tools/markupsafe/_compat.py')
-rw-r--r-- | tools/markupsafe/_compat.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/markupsafe/_compat.py b/tools/markupsafe/_compat.py new file mode 100644 index 0000000000..29e4a3dac1 --- /dev/null +++ b/tools/markupsafe/_compat.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +""" + markupsafe._compat + ~~~~~~~~~~~~~~~~~~ + + Compatibility module for different Python versions. + + :copyright: (c) 2013 by Armin Ronacher. + :license: BSD, see LICENSE for more details. +""" +import sys + +PY2 = sys.version_info[0] == 2 + +if not PY2: + text_type = str + string_types = (str,) + unichr = chr + int_types = (int,) +else: + text_type = unicode + string_types = (str, unicode) + unichr = unichr + int_types = (int, long) |