File tree 1 file changed +4
-13
lines changed
1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change 18
18
for a commercial license.
19
19
"""
20
20
21
- from __future__ import absolute_import
22
- from __future__ import print_function
23
21
import logging .config
24
22
25
23
import shutil
28
26
import sys
29
27
import os
30
28
import traceback
31
- try :
32
- from io import BytesIO as IO
33
- except :
34
- from cStringIO import StringIO as IO # python 2 backport
35
-
36
- try :
37
- from pathlib import Path
38
- except ImportError :
39
- from pathlib2 import Path # python 2 backport
29
+ from io import BytesIO
30
+ from pathlib import Path
40
31
41
32
from .bison_ import ParserEngine
42
33
from .node import BisonNode
52
43
WIN_BISON = join (WIN_CHOCO_DIR , 'win_bison.exe' )
53
44
54
45
55
- __version__ = '0.6.4 '
46
+ __version__ = '0.6.3 '
56
47
__uri__ = 'https://github.com/lukeparser/pybison'
57
48
__author__ = 'David McNab'
58
49
__maintainer__ = 'Lukeparser Team'
@@ -335,7 +326,7 @@ def reset(self):
335
326
336
327
def parse_string (self , string , debug = False ):
337
328
"""Supply file-like object containing the string."""
338
- file = IO (string .encode ('utf-8' ))
329
+ file = BytesIO (string .encode ('utf-8' ))
339
330
return self .run (file = file , debug = debug )
340
331
341
332
def parse_file (self , filename ):
You can’t perform that action at this time.
0 commit comments