summaryrefslogtreecommitdiff
path: root/factory/base.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-03 20:59:58 +0100
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-03-03 21:38:46 +0100
commite8dc25b5db5b470a64cc6a89259d476269fcebb5 (patch)
tree2fb60dde8f60dd3c2689c90f13436f637e28a312 /factory/base.py
parentf248ebda408faee17f32c8f260bcf2d5df27b83d (diff)
downloadfactory-boy-e8dc25b5db5b470a64cc6a89259d476269fcebb5.tar
factory-boy-e8dc25b5db5b470a64cc6a89259d476269fcebb5.tar.gz
Get rid of the FACTORY_ABSTRACT rename.
This was just adding noise to an already complex release. Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Diffstat (limited to 'factory/base.py')
-rw-r--r--factory/base.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/factory/base.py b/factory/base.py
index c8c7f06..28d7cdb 100644
--- a/factory/base.py
+++ b/factory/base.py
@@ -212,21 +212,12 @@ class FactoryMetaClass(BaseFactoryMetaClass):
for construction of an associated class instance at a later time."""
parent_factories = get_factory_bases(bases)
- if not parent_factories or attrs.get('ABSTRACT_FACTORY', False) \
- or attrs.get('FACTORY_ABSTRACT', False):
+ if not parent_factories or attrs.get('ABSTRACT_FACTORY', False):
# If this isn't a subclass of Factory, or specifically declared
# abstract, don't do anything special.
if 'ABSTRACT_FACTORY' in attrs:
- warnings.warn(
- "The 'ABSTRACT_FACTORY' class attribute has been renamed "
- "to 'FACTORY_ABSTRACT' for naming consistency, and will "
- "be ignored in the future. Please upgrade class %s." %
- class_name, DeprecationWarning, 2)
attrs.pop('ABSTRACT_FACTORY')
- if 'FACTORY_ABSTRACT' in attrs:
- attrs.pop('FACTORY_ABSTRACT')
-
return super(FactoryMetaClass, cls).__new__(cls, class_name, bases, attrs)
base = parent_factories[0]
@@ -650,7 +641,7 @@ class DjangoModelFactory(Factory):
handle those for non-numerical primary keys.
"""
- FACTORY_ABSTRACT = True
+ ABSTRACT_FACTORY = True
@classmethod
def _setup_next_sequence(cls):
@@ -669,7 +660,7 @@ class DjangoModelFactory(Factory):
class MogoFactory(Factory):
"""Factory for mogo objects."""
- FACTORY_ABSTRACT = True
+ ABSTRACT_FACTORY = True
@classmethod
def _build(cls, target_class, *args, **kwargs):