From 29cde0921d25f44f8b25b01f622f85725cbe5896 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sun, 14 Apr 2013 22:09:32 +0200 Subject: [PATCH] Re-implemented the six.with_metaclass functionality to avoid having to include six in the distrubution. --- src/utils/picklefield.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/picklefield.py b/src/utils/picklefield.py index 8caa0afef..483cb9c54 100644 --- a/src/utils/picklefield.py +++ b/src/utils/picklefield.py @@ -32,6 +32,7 @@ Modified for Evennia by Griatch. from copy import deepcopy from base64 import b64encode, b64decode from zlib import compress, decompress +#import six # not in default syslib import django from django.db import models @@ -112,7 +113,11 @@ def _get_subfield_superclass(): # see https://github.com/django/django/commit/222c73261650201f5ce99e8dd4b1ce0d30a69eb4 if django.VERSION < (1,3): return models.Field - return six.with_metaclass(models.SubfieldBase, models.Field) + # mimic six.with_metaclass + meta = models.SubfieldBase + base = models.Field + return meta("NewBase", (base,), {}) + #return six.with_metaclass(models.SubfieldBase, models.Field) class PickledObjectField(_get_subfield_superclass()):