Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
python-ssdeep
python-ssdeep-no-six.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-ssdeep-no-six.patch of Package python-ssdeep
diff --git a/setup.py b/setup.py index 3a32b13..c99d33d 100755 --- a/setup.py +++ b/setup.py @@ -182,11 +182,9 @@ def get_objects(): keywords="ssdeep", install_requires=[ "cffi>=1.0.0", - "six>=1.4.1", ], setup_requires=[ "cffi>=1.0.0", - "six>=1.4.1", ] + setup_requires, tests_require=[ "pytest", diff --git a/src/ssdeep/__init__.py b/src/ssdeep/__init__.py index 5735d51..7aaf884 100644 --- a/src/ssdeep/__init__.py +++ b/src/ssdeep/__init__.py @@ -5,8 +5,6 @@ import os -import six - # Ignore flake8 F401 warning for unused vars from ssdeep.__about__ import ( # noqa: F401 __author__, __copyright__, __email__, __license__, __summary__, __title__, @@ -104,10 +102,10 @@ def update(self, buf, encoding="utf-8"): if self._state == ffi.NULL: raise InternalError("State object is NULL") - if isinstance(buf, six.text_type): + if isinstance(buf, str): buf = buf.encode(encoding) - if not isinstance(buf, six.binary_type): + if not isinstance(buf, bytes): raise TypeError( "Argument must be of string, unicode or bytes type not " "'%r'" % type(buf) @@ -179,10 +177,10 @@ def update(self, buf, encoding="utf-8"): """ - if isinstance(buf, six.text_type): + if isinstance(buf, str): buf = buf.encode(encoding) - if not isinstance(buf, six.binary_type): + if not isinstance(buf, bytes): raise TypeError( "Argument must be of string, unicode or bytes type not " "'%r'" % type(buf) @@ -222,18 +220,18 @@ def compare(sig1, sig2): """ - if isinstance(sig1, six.text_type): + if isinstance(sig1, str): sig1 = sig1.encode("ascii") - if isinstance(sig2, six.text_type): + if isinstance(sig2, str): sig2 = sig2.encode("ascii") - if not isinstance(sig1, six.binary_type): + if not isinstance(sig1, bytes): raise TypeError( "First argument must be of string, unicode or bytes type not " "'%s'" % type(sig1) ) - if not isinstance(sig2, six.binary_type): + if not isinstance(sig2, bytes): raise TypeError( "Second argument must be of string, unicode or bytes type not " "'%r'" % type(sig2) @@ -258,10 +256,10 @@ def hash(buf, encoding="utf-8"): """ - if isinstance(buf, six.text_type): + if isinstance(buf, str): buf = buf.encode(encoding) - if not isinstance(buf, six.binary_type): + if not isinstance(buf, bytes): raise TypeError( "Argument must be of string, unicode or bytes type not " "'%r'" % type(buf)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor