From bca31b45cef8e25b5562a9dc89cd052889b93cda Mon Sep 17 00:00:00 2001 From: Cyb3r Jak3 Date: Sun, 6 Sep 2020 14:48:11 -0400 Subject: [PATCH] Fixes 2.7 Issues: - Uses six collections for MutableMapping - Added six to requirements.txt and setup.py --- haralyzer/mixins.py | 5 +++-- requirements.txt | 1 + setup.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/haralyzer/mixins.py b/haralyzer/mixins.py index a7a93f8..2177a50 100644 --- a/haralyzer/mixins.py +++ b/haralyzer/mixins.py @@ -1,8 +1,9 @@ """Mixin Objects that allow for shared methods""" from abc import ABC -from collections.abc import MutableMapping from cached_property import cached_property +from six.moves.collections_abc import MutableMapping + class GetHeaders(object): """Mixin to get a header""" @@ -43,4 +44,4 @@ def __init__(self, entry): # Base class gets properties that belong to both request/response @cached_property def headers(self): - return self.raw_entry["headers"] \ No newline at end of file + return self.raw_entry["headers"] diff --git a/requirements.txt b/requirements.txt index 5edc5cd..ba55527 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ cached-property python-dateutil +six == 1.15.0 diff --git a/setup.py b/setup.py index f8867c9..8bbc53c 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,9 @@ from distutils.core import setup install_reqs = ['cached-property', - 'python-dateutil', ] + 'python-dateutil', + "six == 1.15.0"] + if sys.version_info < (3, 4): install_reqs.extend([ "backports.statistics",