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

Skip to content

Commit fd137b4

Browse files
committed
Fixing Python3.10 incompatibility
1 parent 6fa5922 commit fd137b4

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

lib/core/datatype.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import types
1111

1212
from thirdparty.odict import OrderedDict
13+
from thirdparty.six.moves import collections_abc
1314

1415
class AttribDict(dict):
1516
"""
@@ -159,7 +160,7 @@ def keys(self):
159160
return self.cache.keys()
160161

161162
# Reference: https://code.activestate.com/recipes/576694/
162-
class OrderedSet(collections.MutableSet):
163+
class OrderedSet(collections_abc.MutableSet):
163164
"""
164165
This class defines the set with ordered (as added) items
165166

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.29"
21+
VERSION = "1.5.1.30"
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)

thirdparty/six/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ def get_code(self, fullname):
223223
return None
224224
get_source = get_code # same as get_code
225225

226+
def create_module(self, spec):
227+
return self.load_module(spec.name)
228+
229+
def exec_module(self, module):
230+
pass
231+
226232
_importer = _SixMetaPathImporter(__name__)
227233

228234

0 commit comments

Comments
 (0)