Show More
@@ -120,6 +120,8 if ispy3: | |||||
120 | rawinput = input |
|
120 | rawinput = input | |
121 | getargspec = inspect.getfullargspec |
|
121 | getargspec = inspect.getfullargspec | |
122 |
|
122 | |||
|
123 | long = int | |||
|
124 | ||||
123 | # TODO: .buffer might not exist if std streams were replaced; we'll need |
|
125 | # TODO: .buffer might not exist if std streams were replaced; we'll need | |
124 | # a silly wrapper to make a bytes stream backed by a unicode one. |
|
126 | # a silly wrapper to make a bytes stream backed by a unicode one. | |
125 | stdin = sys.stdin.buffer |
|
127 | stdin = sys.stdin.buffer | |
@@ -384,6 +386,7 else: | |||||
384 | ospardir = os.pardir |
|
386 | ospardir = os.pardir | |
385 | ossep = os.sep |
|
387 | ossep = os.sep | |
386 | osaltsep = os.altsep |
|
388 | osaltsep = os.altsep | |
|
389 | long = long | |||
387 | stdin = sys.stdin |
|
390 | stdin = sys.stdin | |
388 | stdout = sys.stdout |
|
391 | stdout = sys.stdout | |
389 | stderr = sys.stderr |
|
392 | stderr = sys.stderr |
@@ -10,6 +10,8 from __future__ import absolute_import | |||||
10 | import struct |
|
10 | import struct | |
11 | import sys |
|
11 | import sys | |
12 |
|
12 | |||
|
13 | from .. import pycompat | |||
|
14 | ||||
13 | # Very short very of RFC 7049... |
|
15 | # Very short very of RFC 7049... | |
14 | # |
|
16 | # | |
15 | # Each item begins with a byte. The 3 high bits of that byte denote the |
|
17 | # Each item begins with a byte. The 3 high bits of that byte denote the | |
@@ -190,6 +192,7 def streamencodenone(v): | |||||
190 | STREAM_ENCODERS = { |
|
192 | STREAM_ENCODERS = { | |
191 | bytes: streamencodebytestring, |
|
193 | bytes: streamencodebytestring, | |
192 | int: streamencodeint, |
|
194 | int: streamencodeint, | |
|
195 | pycompat.long: streamencodeint, | |||
193 | list: streamencodearray, |
|
196 | list: streamencodearray, | |
194 | tuple: streamencodearray, |
|
197 | tuple: streamencodearray, | |
195 | dict: streamencodemap, |
|
198 | dict: streamencodemap, |
General Comments 0
You need to be logged in to leave comments.
Login now