Skip to content

Commit fd61b09

Browse files
committed
Fix import on Python 3
This changes fixes the import for cStringIO and ifilterfalse as intended by pull request #60. In this old pull request the import for ifilterfalse is tried in the wrong direction for Python 2 and 3.
1 parent a31ee69 commit fd61b09

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
language: python
22
python:
3-
- "2.6"
43
- "2.7"
4+
- "3.5"
5+
- "3.6"
6+
- "3.7"
57
install:
68
- pip install -r requirements.txt
79
before_script:

rtkit/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'Andrea De Marco <24erre@gmail.com>'
2-
__version__ = '0.7.2'
2+
__version__ = '0.7.3'
33
__classifiers__ = [
44
'Development Status :: 4 - Beta',
55
'Intended Audience :: Developers',
@@ -11,7 +11,7 @@
1111
'Topic :: Internet :: WWW/HTTP',
1212
'Topic :: Software Development :: Libraries',
1313
]
14-
__copyright__ = "2011 - 2017, %s " % __author__
14+
__copyright__ = "2011 - 2019, %s " % __author__
1515
__license__ = """
1616
Copyright (C) %s
1717

rtkit/parser.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
try:
2-
from itertools import filterfalse as ifilterfalse
32
from cStringIO import StringIO
43
except ImportError:
5-
from itertools import ifilterfalse
64
from io import StringIO
5+
try:
6+
from itertools import ifilterfalse
7+
except ImportError:
8+
from itertools import filterfalse as ifilterfalse
79
import re
810
from rtkit import comment
911

0 commit comments

Comments
 (0)