Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d785902

Browse files
committed
Brrrrr incompatibilities with every new Python minor revision
1 parent 4490d55 commit d785902

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

lib/core/common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import binascii
1111
import codecs
12-
import collections
1312
import contextlib
1413
import copy
1514
import distutils.version
@@ -194,6 +193,7 @@
194193
from thirdparty.magic import magic
195194
from thirdparty.odict import OrderedDict
196195
from thirdparty.six import unichr as _unichr
196+
from thirdparty.six.moves import collections_abc as _collections
197197
from thirdparty.six.moves import configparser as _configparser
198198
from thirdparty.six.moves import http_client as _http_client
199199
from thirdparty.six.moves import input as _input
@@ -3267,7 +3267,7 @@ def filterNone(values):
32673267

32683268
retVal = values
32693269

3270-
if isinstance(values, collections.Iterable):
3270+
if isinstance(values, _collections.Iterable):
32713271
retVal = [_ for _ in values if _]
32723272

32733273
return retVal
@@ -3558,7 +3558,7 @@ def arrayizeValue(value):
35583558
['1']
35593559
"""
35603560

3561-
if isinstance(value, collections.KeysView):
3561+
if isinstance(value, _collections.KeysView):
35623562
value = [_ for _ in value]
35633563
elif not isListLike(value):
35643564
value = [value]

lib/core/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import base64
1414
import binascii
1515
import codecs
16-
import collections
1716
import json
1817
import re
1918
import sys
@@ -31,6 +30,7 @@
3130
from lib.core.settings import UNICODE_ENCODING
3231
from thirdparty import six
3332
from thirdparty.six import unichr as _unichr
33+
from thirdparty.six.moves import collections_abc as _collections
3434

3535
try:
3636
from html import escape as htmlEscape
@@ -106,7 +106,7 @@ def singleTimeWarnMessage(message): # Cross-referenced function
106106
sys.stdout.flush()
107107

108108
def filterNone(values): # Cross-referenced function
109-
return [_ for _ in values if _] if isinstance(values, collections.Iterable) else values
109+
return [_ for _ in values if _] if isinstance(values, _collections.Iterable) else values
110110

111111
def isListLike(value): # Cross-referenced function
112112
return isinstance(value, (list, tuple, set, BigArray))

lib/core/datatype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import types
1010

1111
from thirdparty.odict import OrderedDict
12-
from thirdparty.six.moves import collections_abc
12+
from thirdparty.six.moves import collections_abc as _collections
1313

1414
class AttribDict(dict):
1515
"""
@@ -159,7 +159,7 @@ def keys(self):
159159
return self.cache.keys()
160160

161161
# Reference: https://code.activestate.com/recipes/576694/
162-
class OrderedSet(collections_abc.MutableSet):
162+
class OrderedSet(_collections.MutableSet):
163163
"""
164164
This class defines the set with ordered (as added) items
165165

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from __future__ import division
99

1010
import codecs
11-
import collections
1211
import functools
1312
import glob
1413
import inspect
@@ -154,6 +153,7 @@
154153
from thirdparty import six
155154
from thirdparty.keepalive import keepalive
156155
from thirdparty.multipart import multipartpost
156+
from thirdparty.six.moves import collections_abc as _collections
157157
from thirdparty.six.moves import http_client as _http_client
158158
from thirdparty.six.moves import http_cookiejar as _http_cookiejar
159159
from thirdparty.six.moves import urllib as _urllib
@@ -415,7 +415,7 @@ def retrieve():
415415
conf.googlePage += 1
416416

417417
def _setStdinPipeTargets():
418-
if isinstance(conf.stdinPipe, collections.Iterable):
418+
if isinstance(conf.stdinPipe, _collections.Iterable):
419419
infoMsg = "using 'STDIN' for parsing targets list"
420420
logger.info(infoMsg)
421421

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.5.1.31"
21+
VERSION = "1.5.1.32"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)