Skip to content

Commit 3aabf36

Browse files
committed
Remove backport stuff and downgrade version to check things.
1 parent daf923b commit 3aabf36

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/bison/__init__.py

+4-13
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
for a commercial license.
1919
"""
2020

21-
from __future__ import absolute_import
22-
from __future__ import print_function
2321
import logging.config
2422

2523
import shutil
@@ -28,15 +26,8 @@
2826
import sys
2927
import os
3028
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
4031

4132
from .bison_ import ParserEngine
4233
from .node import BisonNode
@@ -52,7 +43,7 @@
5243
WIN_BISON = join(WIN_CHOCO_DIR, 'win_bison.exe')
5344

5445

55-
__version__ = '0.6.4'
46+
__version__ = '0.6.3'
5647
__uri__ = 'https://github.com/lukeparser/pybison'
5748
__author__ = 'David McNab'
5849
__maintainer__ = 'Lukeparser Team'
@@ -335,7 +326,7 @@ def reset(self):
335326

336327
def parse_string(self, string, debug=False):
337328
"""Supply file-like object containing the string."""
338-
file = IO(string.encode('utf-8'))
329+
file = BytesIO(string.encode('utf-8'))
339330
return self.run(file=file, debug=debug)
340331

341332
def parse_file(self, filename):

0 commit comments

Comments
 (0)