]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Remove object in class definition
authorFederico Caselli <cfederico87@gmail.com>
Sun, 21 Nov 2021 19:36:35 +0000 (20:36 +0100)
committerFederico Caselli <cfederico87@gmail.com>
Mon, 22 Nov 2021 15:03:17 +0000 (15:03 +0000)
References: #4600
Change-Id: I2a62ddfe00bc562720f0eae700a497495d7a987a

222 files changed:
doc/build/faq/sessions.rst
doc/build/orm/collections.rst
doc/build/orm/composites.rst
doc/build/orm/constructors.rst
doc/build/orm/declarative_config.rst
doc/build/orm/inheritance.rst
doc/build/orm/join_conditions.rst
doc/build/orm/mapping_styles.rst
doc/build/orm/session_basics.rst
doc/build/orm/session_events.rst
examples/association/dict_of_sets_with_default.py
examples/custom_attributes/custom_management.py
examples/custom_attributes/listen_for_events.py
examples/dogpile_caching/caching_query.py
examples/dynamic_dict/dynamic_dict.py
examples/elementtree/adjacency_list.py
examples/elementtree/optimized_al.py
examples/elementtree/pickle_type.py
examples/extending_query/filter_public.py
examples/extending_query/temporal_range.py
examples/generic_associations/discriminator_on_association.py
examples/generic_associations/generic_fk.py
examples/generic_associations/table_per_association.py
examples/generic_associations/table_per_related.py
examples/large_collection/large_collection.py
examples/performance/__init__.py
examples/performance/large_resultsets.py
examples/postgis/postgis.py
examples/versioned_history/history_meta.py
examples/versioned_rows/versioned_rows.py
examples/versioned_rows/versioned_rows_w_versionid.py
examples/versioned_rows/versioned_update_old_row.py
examples/vertical/dictlike-polymorphic.py
examples/vertical/dictlike.py
lib/sqlalchemy/connectors/__init__.py
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/json.py
lib/sqlalchemy/dialects/mssql/pyodbc.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/mysql/json.py
lib/sqlalchemy/dialects/mysql/reflection.py
lib/sqlalchemy/dialects/mysql/types.py
lib/sqlalchemy/dialects/postgresql/ranges.py
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/dialects/sqlite/json.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/interfaces.py
lib/sqlalchemy/engine/reflection.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/engine/row.py
lib/sqlalchemy/engine/strategies.py
lib/sqlalchemy/engine/util.py
lib/sqlalchemy/event/attr.py
lib/sqlalchemy/event/base.py
lib/sqlalchemy/event/registry.py
lib/sqlalchemy/exc.py
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/ext/automap.py
lib/sqlalchemy/ext/baked.py
lib/sqlalchemy/ext/compiler.py
lib/sqlalchemy/ext/declarative/extensions.py
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/ext/instrumentation.py
lib/sqlalchemy/ext/mutable.py
lib/sqlalchemy/log.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/clsregistry.py
lib/sqlalchemy/orm/collections.py
lib/sqlalchemy/orm/context.py
lib/sqlalchemy/orm/decl_api.py
lib/sqlalchemy/orm/decl_base.py
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/orm/evaluator.py
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/identity.py
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/orm/scoping.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/state.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/orm/unitofwork.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/pool/base.py
lib/sqlalchemy/pool/dbapi_proxy.py
lib/sqlalchemy/sql/annotation.py
lib/sqlalchemy/sql/base.py
lib/sqlalchemy/sql/coercions.py
lib/sqlalchemy/sql/compiler.py
lib/sqlalchemy/sql/dml.py
lib/sqlalchemy/sql/elements.py
lib/sqlalchemy/sql/functions.py
lib/sqlalchemy/sql/lambdas.py
lib/sqlalchemy/sql/naming.py
lib/sqlalchemy/sql/operators.py
lib/sqlalchemy/sql/roles.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/sql/sqltypes.py
lib/sqlalchemy/sql/traversals.py
lib/sqlalchemy/sql/type_api.py
lib/sqlalchemy/sql/util.py
lib/sqlalchemy/sql/visitors.py
lib/sqlalchemy/testing/assertions.py
lib/sqlalchemy/testing/assertsql.py
lib/sqlalchemy/testing/config.py
lib/sqlalchemy/testing/engines.py
lib/sqlalchemy/testing/entities.py
lib/sqlalchemy/testing/exclusions.py
lib/sqlalchemy/testing/fixtures.py
lib/sqlalchemy/testing/pickleable.py
lib/sqlalchemy/testing/plugin/plugin_base.py
lib/sqlalchemy/testing/profiling.py
lib/sqlalchemy/testing/provision.py
lib/sqlalchemy/testing/requirements.py
lib/sqlalchemy/testing/schema.py
lib/sqlalchemy/testing/suite/test_types.py
lib/sqlalchemy/util/_collections.py
lib/sqlalchemy/util/compat.py
lib/sqlalchemy/util/langhelpers.py
test/aaa_profiling/test_memusage.py
test/aaa_profiling/test_misc.py
test/aaa_profiling/test_pool.py
test/aaa_profiling/test_resultset.py
test/base/test_events.py
test/base/test_inspect.py
test/base/test_tutorials.py
test/base/test_utils.py
test/dialect/mssql/test_query.py
test/dialect/mysql/test_types.py
test/dialect/oracle/test_types.py
test/dialect/postgresql/test_compiler.py
test/dialect/postgresql/test_dialect.py
test/dialect/postgresql/test_on_conflict.py
test/dialect/postgresql/test_reflection.py
test/dialect/postgresql/test_types.py
test/dialect/test_sqlite.py
test/engine/test_execute.py
test/engine/test_pool.py
test/engine/test_transaction.py
test/ext/declarative/test_deprecations.py
test/ext/mypy/files/as_declarative.py
test/ext/mypy/files/as_declarative_base.py
test/ext/mypy/incremental/stubs_14/__init__.py
test/ext/test_associationproxy.py
test/ext/test_baked.py
test/ext/test_extendedattr.py
test/ext/test_horizontal_shard.py
test/ext/test_hybrid.py
test/ext/test_mutable.py
test/ext/test_orderinglist.py
test/orm/_fixtures.py
test/orm/declarative/test_basic.py
test/orm/declarative/test_clsregistry.py
test/orm/declarative/test_deprecations.py
test/orm/declarative/test_inheritance.py
test/orm/declarative/test_mixin.py
test/orm/inheritance/test_assorted_poly.py
test/orm/inheritance/test_basic.py
test/orm/inheritance/test_concrete.py
test/orm/inheritance/test_manytomany.py
test/orm/inheritance/test_poly_linked_list.py
test/orm/inheritance/test_poly_loading.py
test/orm/inheritance/test_productspec.py
test/orm/test_attributes.py
test/orm/test_cache_key.py
test/orm/test_cascade.py
test/orm/test_collection.py
test/orm/test_compile.py
test/orm/test_composites.py
test/orm/test_core_compilation.py
test/orm/test_deprecations.py
test/orm/test_dynamic.py
test/orm/test_eager_relations.py
test/orm/test_events.py
test/orm/test_inspect.py
test/orm/test_instrumentation.py
test/orm/test_joins.py
test/orm/test_lambdas.py
test/orm/test_lazy_relations.py
test/orm/test_mapper.py
test/orm/test_merge.py
test/orm/test_of_type.py
test/orm/test_options.py
test/orm/test_pickled.py
test/orm/test_query.py
test/orm/test_rel_fn.py
test/orm/test_relationship_criteria.py
test/orm/test_relationships.py
test/orm/test_session.py
test/orm/test_subquery_relations.py
test/orm/test_sync.py
test/orm/test_transaction.py
test/orm/test_unitofwork.py
test/orm/test_unitofworkv2.py
test/orm/test_update_delete.py
test/orm/test_utils.py
test/orm/test_validators.py
test/sql/test_compare.py
test/sql/test_defaults.py
test/sql/test_delete.py
test/sql/test_deprecations.py
test/sql/test_insert.py
test/sql/test_lambdas.py
test/sql/test_metadata.py
test/sql/test_operators.py
test/sql/test_resultset.py
test/sql/test_roles.py
test/sql/test_select.py
test/sql/test_type_expressions.py
test/sql/test_types.py
test/sql/test_update.py
test/sql/test_values.py

index dc1336dad00da2d6349936c6e8de75c0f31d22e1..0c03080f470c8549d3159e14ab82cbbc77eb8ebe 100644 (file)
@@ -329,7 +329,7 @@ method, which emits a `SELECT COUNT`. The reason this is not possible is
 because evaluating the query as a list would incur two SQL calls instead of
 one::
 
-    class Iterates(object):
+    class Iterates:
         def __len__(self):
             print("LEN!")
             return 5
index bc98b4b41d810b60cfe28679c24474046451fae4..a811779afa707198f20f9830f425285fdc409532 100644 (file)
@@ -453,7 +453,7 @@ interface are detected and instrumented via duck-typing:
 
 .. sourcecode:: python+sql
 
-    class ListLike(object):
+    class ListLike:
         def __init__(self):
             self.data = []
         def append(self, item):
@@ -475,7 +475,7 @@ Duck-typing (i.e. guesswork) isn't rock-solid, of course, so you can be
 explicit about the interface you are implementing by providing an
 ``__emulates__`` class attribute::
 
-    class SetLike(object):
+    class SetLike:
         __emulates__ = set
 
         def __init__(self):
@@ -511,7 +511,7 @@ get the job done.
 
     from sqlalchemy.orm.collections import collection
 
-    class SetLike(object):
+    class SetLike:
         __emulates__ = set
 
         def __init__(self):
index fb3ca476783f488d0e884928def0600bc0d8ecf3..0628f56aef877172119db5386fdd107b0364d250 100644 (file)
@@ -12,7 +12,7 @@ class you provide.
 A simple example represents pairs of columns as a ``Point`` object.
 ``Point`` represents such a pair as ``.x`` and ``.y``::
 
-    class Point(object):
+    class Point:
         def __init__(self, x, y):
             self.x = x
             self.y = y
@@ -155,7 +155,7 @@ itself be a composite object, which is then mapped to a class ``HasVertex``::
 
     from sqlalchemy.orm import composite
 
-    class Point(object):
+    class Point:
         def __init__(self, x, y):
             self.x = x
             self.y = y
@@ -174,7 +174,7 @@ itself be a composite object, which is then mapped to a class ``HasVertex``::
         def __ne__(self, other):
             return not self.__eq__(other)
 
-    class Vertex(object):
+    class Vertex:
         def __init__(self, start, end):
             self.start = start
             self.end = end
index b78b0f0cb97a1788649092058053d7c1f333a630..c55d381c503dc98039a48b1d64018f8cf52a2c57 100644 (file)
@@ -29,7 +29,7 @@ useful for recreating transient properties that are normally assigned in
 
     from sqlalchemy import orm
 
-    class MyMappedClass(object):
+    class MyMappedClass:
         def __init__(self, data):
             self.data = data
             # we need stuff on all instances, but not in the database.
index 9240d9011b27657ad7c6e24ad9aa930c6c35d9e0..4a091c84832f330f8582ca98c259d6022518d9ae 100644 (file)
@@ -360,7 +360,7 @@ Allows the callable / class used to generate a :class:`_schema.Table` to be cust
 This is a very open-ended hook that can allow special customizations
 to a :class:`_schema.Table` that one generates here::
 
-    class MyMixin(object):
+    class MyMixin:
         @classmethod
         def __table_cls__(cls, name, metadata_obj, *arg, **kw):
             return Table(
@@ -378,7 +378,7 @@ This may be useful in some customization schemes to determine that single-table
 inheritance should take place based on the arguments for the table itself,
 such as, define as single-inheritance if there is no primary key present::
 
-    class AutoTable(object):
+    class AutoTable:
         @declared_attr
         def __tablename__(cls):
             return cls.__name__
index eafbba342aceefcdc96a0ef223532e949ee3c1c6..cb3ccfd8d297ebc1bbe897e0210220a5c3440a08 100644 (file)
@@ -859,7 +859,7 @@ Alternatively, the same :class:`_schema.Table` objects can be used in
 fully "classical" style, without using Declarative at all.
 A constructor similar to that supplied by Declarative is illustrated::
 
-    class Employee(object):
+    class Employee:
         def __init__(self, **kw):
             for k in kw:
                 setattr(self, k, kw[k])
index af314f221eb9bd51c076c4d205743b03312b0ee5..a6d0309918b3f08d9ef906e3c61de230d508d78e 100644 (file)
@@ -609,7 +609,7 @@ to ``node.c.id``::
         Column('id', Integer, primary_key=True),
         Column('label', String)
     )
-    class Node(object):
+    class Node:
         pass
 
     mapper_registry.map_imperatively(Node, node, properties={
index e643cfce63394ab17bbceda6ee96b61017de18a5..723b5406849c72e5c81f785aabccb9b3ce6570e3 100644 (file)
@@ -419,7 +419,7 @@ constructs that can't be easily duplicated must be given as callables,
 using the :class:`_orm.declared_attr` decorator, such as in the
 example at :ref:`orm_declarative_mixins_relationships`::
 
-    class RefTargetMixin(object):
+    class RefTargetMixin:
         @declared_attr
         def target_id(cls):
             return Column('target_id', ForeignKey('target.id'))
index fce6d4919d36236e5f7074d5a157b3c7f262cdc5..6f818a439b77458b76f4cfc91900b93a2fbca0f0 100644 (file)
@@ -956,7 +956,7 @@ E.g. **don't do this**::
 
     ### this is the **wrong way to do it** ###
 
-    class ThingOne(object):
+    class ThingOne:
         def go(self):
             session = Session()
             try:
@@ -966,7 +966,7 @@ E.g. **don't do this**::
                 session.rollback()
                 raise
 
-    class ThingTwo(object):
+    class ThingTwo:
         def go(self):
             session = Session()
             try:
@@ -988,11 +988,11 @@ transaction automatically::
 
     ### this is a **better** (but not the only) way to do it ###
 
-    class ThingOne(object):
+    class ThingOne:
         def go(self, session):
             session.query(FooBar).update({"x": 5})
 
-    class ThingTwo(object):
+    class ThingTwo:
         def go(self, session):
             session.query(Widget).update({"q": 18})
 
index 544a6c5773d3921b7c5da6cac24a2f2b60ca2267..430471f4f54999300733490f816a6976f0cd4e36 100644 (file)
@@ -114,7 +114,7 @@ Given a series of classes based on a mixin called ``HasTimestamp``::
 
     import datetime
 
-    class HasTimestamp(object):
+    class HasTimestamp:
         timestamp = Column(DateTime, default=datetime.datetime.now)
 
 
index 435761d3f7fde908d324e35b886a388b3562a634..14045b7f56126d3b9d3cc0c224e831915f19a5e5 100644 (file)
@@ -26,7 +26,7 @@ from sqlalchemy.orm import Session
 from sqlalchemy.orm.collections import MappedCollection
 
 
-class Base(object):
+class Base:
     id = Column(Integer, primary_key=True)
 
 
index 6cddfe7bd114427da9c96c238447475f9ccbcdad..5ee5a45f83c82a0b534bb79a441fde775f5460b7 100644 (file)
@@ -43,7 +43,7 @@ class MyClassState(InstrumentationManager):
         return find
 
 
-class MyClass(object):
+class MyClass:
     __sa_instrumentation_manager__ = MyClassState
 
     def __init__(self, **kwargs):
index e3ef4cbea85e4e6bd7db0c2f07064ac0610ec297..b2d2b690b6e8b3844d01bc3de6a6c5db49e101a7 100644 (file)
@@ -27,7 +27,7 @@ if __name__ == "__main__":
     from sqlalchemy.orm import relationship
     from sqlalchemy.ext.declarative import declarative_base
 
-    class Base(object):
+    class Base:
         def receive_change_event(self, verb, key, value, oldvalue):
             s = "Value '%s' %s on attribute '%s', " % (value, verb, key)
             if oldvalue:
index 68f72e5f06e92733f1b757d6de95bff4ee064807..dc007a7602f89ca29538a056c7f365369835ea3a 100644 (file)
@@ -26,7 +26,7 @@ from sqlalchemy.orm import loading
 from sqlalchemy.orm.interfaces import UserDefinedOption
 
 
-class ORMCache(object):
+class ORMCache:
 
     """An add-on for an ORM :class:`.Session` optionally loads full results
     from a dogpile cache region.
index 63a23bffb17579fe0e46edd653c5d88d052271b1..f8dc080ffe26fa0daa4f7a9d7aff452fb41ccd2c 100644 (file)
@@ -8,7 +8,7 @@ from sqlalchemy.orm import relationship
 from sqlalchemy.orm import sessionmaker
 
 
-class ProxyDict(object):
+class ProxyDict:
     def __init__(self, parent, collection_name, childclass, keyname):
         self.parent = parent
         self.collection_name = collection_name
index 43961fb41d223ce198374fc52ecc653f79d022df..9d2c78157e4c01ab12ee3dfc072b28ecf81e88d0 100644 (file)
@@ -89,7 +89,7 @@ mapper_registry.metadata.create_all(e)
 # and the ElementTree root element.
 
 
-class Document(object):
+class Document:
     def __init__(self, name, element):
         self.filename = name
         self.element = element
@@ -103,7 +103,7 @@ class Document(object):
 # may be backed by native implementations. so here we construct an adapter.
 
 
-class _Node(object):
+class _Node:
     pass
 
 
@@ -111,7 +111,7 @@ class _Node(object):
 # stored for a particular Node.
 
 
-class _Attribute(object):
+class _Attribute:
     def __init__(self, name, value):
         self.name = name
         self.value = value
@@ -144,7 +144,7 @@ mapper(_Attribute, attributes)
 # collection.
 
 
-class ElementTreeMarshal(object):
+class ElementTreeMarshal:
     def __get__(self, document, owner):
         if document is None:
             return self
index c68720aaa5193816868c10e474026ba9de691a02..1c16e1c8a4dfa87c904ebe3ecc2d75907f3593ac 100644 (file)
@@ -80,7 +80,7 @@ mapper_registry.metadata.create_all(e)
 # and the ElementTree root element.
 
 
-class Document(object):
+class Document:
     def __init__(self, name, element):
         self.filename = name
         self.element = element
@@ -94,7 +94,7 @@ class Document(object):
 # may be backed by native implementations. so here we construct an adapter.
 
 
-class _Node(object):
+class _Node:
     pass
 
 
@@ -102,7 +102,7 @@ class _Node(object):
 # stored for a particular Node.
 
 
-class _Attribute(object):
+class _Attribute:
     def __init__(self, name, value):
         self.name = name
         self.value = value
@@ -147,7 +147,7 @@ mapper(_Attribute, attributes)
 # collection.
 
 
-class ElementTreeMarshal(object):
+class ElementTreeMarshal:
     def __get__(self, document, owner):
         if document is None:
             return self
index cde517db3679b5f6a82a7bbd220b8af168efc06f..e96a128b3663eaa54b772a43e300c2fd08bac3c4 100644 (file)
@@ -51,7 +51,7 @@ mapper_registry.metadata.create_all(e)
 # and the ElementTree root element.
 
 
-class Document(object):
+class Document:
     def __init__(self, name, element):
         self.filename = name
         self.element = element
index 53472e95a332cefff641bb942a6ab2c40a807ade..08a0d273db27dce62a66b81965e76ebfb68a6146 100644 (file)
@@ -50,7 +50,7 @@ def _add_filtering_criteria(execute_state):
         )
 
 
-class HasPrivate(object):
+class HasPrivate:
     """Mixin that identifies a class as having private entities"""
 
     public = Column(Boolean, nullable=False)
index 370687746997c4b1e25ae6aa17741e1d52288317..3a6570ad1ecbfa69143ff09d4ba0106baae9ae0b 100644 (file)
@@ -11,7 +11,7 @@ from sqlalchemy import DateTime
 from sqlalchemy import orm
 
 
-class HasTemporal(object):
+class HasTemporal:
     """Mixin that identifies a class as having a timestamp column"""
 
     timestamp = Column(
index 95020884646e80298450012103fae869af788cb6..f0f1d7ed99ca832233707caae6cd04fd5ab939e3 100644 (file)
@@ -29,7 +29,7 @@ from sqlalchemy.orm import Session
 
 
 @as_declarative()
-class Base(object):
+class Base:
     """Base class which provides automated table name
     and surrogate primary key column.
 
@@ -81,7 +81,7 @@ class Address(Base):
         )
 
 
-class HasAddresses(object):
+class HasAddresses:
     """HasAddresses mixin, creates a relationship to
     the address_association table for each parent.
 
index 23145ed4c673af53e7f6fcc1767c43d844fbe736..1cd0404e9fbf04a979969399c9eaf852e2855158 100644 (file)
@@ -35,7 +35,7 @@ from sqlalchemy.orm import Session
 
 
 @as_declarative()
-class Base(object):
+class Base:
     """Base class which provides automated table name
     and surrogate primary key column.
 
@@ -86,7 +86,7 @@ class Address(Base):
         )
 
 
-class HasAddresses(object):
+class HasAddresses:
     """HasAddresses mixin, creates a relationship to
     the address_association table for each parent.
 
index 98c76ef7bed96d06680da9571ecab815ddab515f..2e412869f08224d9d96396db703a87f83dcd48c0 100644 (file)
@@ -24,7 +24,7 @@ from sqlalchemy.orm import Session
 
 
 @as_declarative()
-class Base(object):
+class Base:
     """Base class which provides automated table name
     and surrogate primary key column.
 
@@ -58,7 +58,7 @@ class Address(Base):
         )
 
 
-class HasAddresses(object):
+class HasAddresses:
     """HasAddresses mixin, creates a new address_association
     table for each parent.
 
index 3f09e538b0e4dc464c6993ce0600468226f1a429..5b83e6e68f36fcc6d8d584d9f8440e30e617d1ce 100644 (file)
@@ -28,7 +28,7 @@ from sqlalchemy.orm import Session
 
 
 @as_declarative()
-class Base(object):
+class Base:
     """Base class which provides automated table name
     and surrogate primary key column.
 
@@ -41,7 +41,7 @@ class Base(object):
     id = Column(Integer, primary_key=True)
 
 
-class Address(object):
+class Address:
     """Define columns that will be present in each
     'Address' table.
 
@@ -64,7 +64,7 @@ class Address(object):
         )
 
 
-class HasAddresses(object):
+class HasAddresses:
     """HasAddresses mixin, creates a new Address class
     for each parent.
 
index 2b8c57232a5e017700209f2f5e84754152dde1cf..b2ba1b6ae35a7a61d7895482f7ff8cddaaddaf31 100644 (file)
@@ -34,12 +34,12 @@ member_table = Table(
 )
 
 
-class Organization(object):
+class Organization:
     def __init__(self, name):
         self.name = name
 
 
-class Member(object):
+class Member:
     def __init__(self, name):
         self.name = name
 
index b6c74d7fe986e0a0a167f387c9b4f3ad6abe0af7..bdf8e841dba80309f666ef477e5ee521db4b2990 100644 (file)
@@ -215,7 +215,7 @@ import sys
 import time
 
 
-class Profiler(object):
+class Profiler:
     tests = []
 
     _setup = None
@@ -400,7 +400,7 @@ class Profiler(object):
         return suites
 
 
-class TestResult(object):
+class TestResult:
     def __init__(
         self, profile, test, stats=None, total_time=None, sort="cumulative"
     ):
index b7b96453d956be48cf2dc2865172148b435dc72f..ac1b98b6f5aafac2fd5162c46c32a525b12a94d8 100644 (file)
@@ -168,7 +168,7 @@ def _test_dbapi_raw(n, make_objects):
         # because if you're going to roll your own, you're probably
         # going to do this, so see how this pushes you right back into
         # ORM land anyway :)
-        class SimpleCustomer(object):
+        class SimpleCustomer:
             def __init__(self, id_, name, description):
                 self.id_ = id_
                 self.name = name
index 2b45b98f566821c1ba3970a6445294750adb795f..06df2ce6620ceb31478e5c8047326eebf322e0a9 100644 (file)
@@ -10,7 +10,7 @@ from sqlalchemy.types import UserDefinedType
 # Python datatypes
 
 
-class GisElement(object):
+class GisElement:
     """Represents a geometry value."""
 
     def __str__(self):
index 7d13f2d7456a7851a319d278ea0a520307d9ae3e..214f75e6b6b76d9e8af7cb111047848013dc4e04 100644 (file)
@@ -173,7 +173,7 @@ def _history_mapper(local_mapper):
             local_mapper.version_id_col = local_mapper.local_table.c.version
 
 
-class Versioned(object):
+class Versioned:
     use_mapper_versioning = False
     """if True, also assign the version column to be tracked by the mapper"""
 
index 7179d04749dc437e2e28e75169d3f66e789f9969..96d2e399ec14c8c01a8c0eaf6c0f045006803fce 100644 (file)
@@ -18,7 +18,7 @@ from sqlalchemy.orm import Session
 from sqlalchemy.orm import sessionmaker
 
 
-class Versioned(object):
+class Versioned:
     def new_version(self, session):
         # make us transient (removes persistent
         # identity).
index 87d246da1d9931d096faf812781e0ec7f6443d49..39cbaf1aa69dad1d545754c0d5450bc4c8403d08 100644 (file)
@@ -25,7 +25,7 @@ from sqlalchemy.orm import Session
 from sqlalchemy.orm import sessionmaker
 
 
-class Versioned(object):
+class Versioned:
     # we have a composite primary key consisting of "id"
     # and "version_id"
     id = Column(Integer, primary_key=True)
index 049c1a7a0211b1a9ae8deddb546ee749726a6b34..e1e25704c94c3bb9f5a0dca06e791fcd82727952 100644 (file)
@@ -37,7 +37,7 @@ def current_time():
     return now
 
 
-class VersionedStartEnd(object):
+class VersionedStartEnd:
     start = Column(DateTime, primary_key=True)
     end = Column(DateTime, primary_key=True)
 
index 4c81af6d543db3de53de8bc53f3116cc1ec55179..95b582a761f357413f9e826b96d4a99d500fb7ec 100644 (file)
@@ -31,7 +31,7 @@ from sqlalchemy.orm.interfaces import PropComparator
 from .dictlike import ProxiedDictMixin
 
 
-class PolymorphicVerticalProperty(object):
+class PolymorphicVerticalProperty:
     """A key/value pair with polymorphic value storage.
 
     The class which is mapped should indicate typing information
index f1f36420798d2a2cf3831c2fe52c5282a03ef1fb..9d2eb4a229ae3c25470140a889d870af04cd227c 100644 (file)
@@ -33,7 +33,7 @@ can be used with many common vertical schemas as-is or with minor adaptations.
 from __future__ import unicode_literals
 
 
-class ProxiedDictMixin(object):
+class ProxiedDictMixin:
     """Adds obj[key] access to a mapped class.
 
     This class basically proxies dictionary access to an attribute
index fee8b3836f529a8321ef5d0fefa0a37a8703a030..eaa3e1a58fa5517cfcc12e51483488941b082923 100644 (file)
@@ -6,5 +6,5 @@
 # the MIT License: https://www.opensource.org/licenses/mit-license.php
 
 
-class Connector(object):
+class Connector:
     pass
index 974cae4f7ee7a0d26ea35b596c4815cf05686de6..e5745bf6984f58d307cf98107f3d4cb7a31f865d 100644 (file)
@@ -1146,7 +1146,7 @@ class _BASETIMEIMPL(TIME):
     __visit_name__ = "_BASETIMEIMPL"
 
 
-class _DateTimeBase(object):
+class _DateTimeBase:
     def bind_processor(self, dialect):
         def process(value):
             if type(value) == datetime.date:
@@ -1181,7 +1181,7 @@ class DATETIMEOFFSET(_DateTimeBase, sqltypes.DateTime):
         self.precision = precision
 
 
-class _UnicodeLiteral(object):
+class _UnicodeLiteral:
     def literal_processor(self, dialect):
         def process(value):
 
index d5157312c72a6638ffa47dfb5dc13efa400c896d..ae90597771cedccffe03cf1978c42f214dd5378c 100644 (file)
@@ -77,7 +77,7 @@ class JSON(sqltypes.JSON):
 # Note: these objects currently match exactly those of MySQL, however since
 # these are not generalizable to all JSON implementations, remain separately
 # implemented for each dialect.
-class _FormatTypeMixin(object):
+class _FormatTypeMixin:
     def _format_value(self, value):
         raise NotImplementedError()
 
index 0a56a03de69c50b515b77f8fa885b2ae6b92cc92..6ce55d3925b78b0e4347cc54e9d4790df4846a46 100644 (file)
@@ -294,7 +294,7 @@ from ... import util
 from ...connectors.pyodbc import PyODBCConnector
 
 
-class _ms_numeric_pyodbc(object):
+class _ms_numeric_pyodbc:
 
     """Turns Decimals with adjusted() < 0 or > 7 into strings.
 
@@ -366,7 +366,7 @@ class _MSFloat_pyodbc(_ms_numeric_pyodbc, sqltypes.Float):
     pass
 
 
-class _ms_binary_pyodbc(object):
+class _ms_binary_pyodbc:
     """Wraps binary values in dialect-specific Binary wrapper.
     If the value is null, return a pyodbc-specific BinaryNull
     object to prevent pyODBC [and FreeTDS] from defaulting binary
@@ -389,7 +389,7 @@ class _ms_binary_pyodbc(object):
         return process
 
 
-class _ODBCDateTimeBindProcessor(object):
+class _ODBCDateTimeBindProcessor:
     """Add bind processors to handle datetimeoffset behaviors"""
 
     has_tz = False
index af2d7bdbbf78987adacbf05132447c05106a8d5e..54fe1f57f81276c1fb0dc45cd181c4679c15f609 100644 (file)
@@ -3196,7 +3196,7 @@ class MySQLDialect(default.DefaultDialect):
         return rows
 
 
-class _DecodingRow(object):
+class _DecodingRow:
     """Return unicode-decoded values based on type inspection.
 
     Smooth over data type issues (esp. with alpha driver versions) and
index 8d052cc7c0dc3a52af5df64b4c702b30232b0c72..384d3b9b629d627ee41bcf55179c013f8864b28e 100644 (file)
@@ -36,7 +36,7 @@ class JSON(sqltypes.JSON):
     pass
 
 
-class _FormatTypeMixin(object):
+class _FormatTypeMixin:
     def _format_value(self, value):
         raise NotImplementedError()
 
index 503c9614c0ae222ccd380d05c087d8adbe36d5d2..8d5b24f0ca37164c18126f9f48dce4ca0664d907 100644 (file)
@@ -17,7 +17,7 @@ from ... import types as sqltypes
 from ... import util
 
 
-class ReflectedState(object):
+class ReflectedState:
     """Stores raw information about a SHOW CREATE TABLE statement."""
 
     def __init__(self):
@@ -30,7 +30,7 @@ class ReflectedState(object):
 
 
 @log.class_logger
-class MySQLTableDefinitionParser(object):
+class MySQLTableDefinitionParser:
     """Parses the results of a SHOW CREATE TABLE statement."""
 
     def __init__(self, dialect, preparer):
index dee58b4a53143b87681b1d198e5134cd071757d5..abbf943a9a728b6a97e6e01aca051696f5979dd2 100644 (file)
@@ -12,7 +12,7 @@ from ... import types as sqltypes
 from ... import util
 
 
-class _NumericType(object):
+class _NumericType:
     """Base for MySQL numeric types.
 
     This is the base both for NUMERIC as well as INTEGER, hence
index c54179c8182cef3ea93d75ebf585e9b5494e4ebe..d141ee731c3d4ffa446b52cd95aa27b923c932bd 100644 (file)
@@ -10,7 +10,7 @@ from ... import types as sqltypes
 __all__ = ("INT4RANGE", "INT8RANGE", "NUMRANGE")
 
 
-class RangeOperators(object):
+class RangeOperators:
     """
     This mixin provides functionality for the Range Operators
     listed in Table 9-44 of the `PostgreSQL documentation`__ for Range
index 6c22c8ef3aec7699b8350b33a6d4dc630b7bad5c..7ded7397335e976a654100cca8bb9dc0f7189de6 100644 (file)
@@ -863,7 +863,7 @@ class _SQliteJson(JSON):
         return process
 
 
-class _DateTimeMixin(object):
+class _DateTimeMixin:
     _reg = None
     _storage_format = None
 
index 614f95405ff0bcd26ca8e4289a2448edc3af3570..b412fa5a52ed83f84d6a214ee2f04aa4a22b830c 100644 (file)
@@ -36,7 +36,7 @@ class JSON(sqltypes.JSON):
 # Note: these objects currently match exactly those of MySQL, however since
 # these are not generalizable to all JSON implementations, remain separately
 # implemented for each dialect.
-class _FormatTypeMixin(object):
+class _FormatTypeMixin:
     def _format_value(self, value):
         raise NotImplementedError()
 
index 24f8a8a87bdc0eaf0f2c187741f2cc29a99ddc1e..389270e45927c448d2fcb12d0243183c9398a5fd 100644 (file)
@@ -2603,7 +2603,7 @@ class Engine(ConnectionEventsTarget, log.Identified):
         return self.pool.connect()
 
 
-class OptionEngineMixin(object):
+class OptionEngineMixin:
     _sa_propagate_class_events = False
 
     def __init__(self, proxied, execution_options):
index 0099d69ffa63215ff10aa5199b0e2a9c95fcb708..54db9f6c270a9c6ec3500bc8080da8c8d29766e5 100644 (file)
@@ -692,7 +692,7 @@ class CursorResultMetaData(ResultMetaData):
             self._translated_indexes = self._tuplefilter = None
 
 
-class ResultFetchStrategy(object):
+class ResultFetchStrategy:
     """Define a fetching strategy for a result object.
 
 
@@ -1095,7 +1095,7 @@ class _NoResultMetaData(ResultMetaData):
 _NO_RESULT_METADATA = _NoResultMetaData()
 
 
-class BaseCursorResult(object):
+class BaseCursorResult:
     """Base class for database result objects."""
 
     out_parameters = None
index 9a138e69e735528c8bcca9d1f6271149a6b40866..3af24d913520f980e7b9ff1b32848c3614b7df23 100644 (file)
@@ -674,7 +674,7 @@ class DefaultDialect(interfaces.Dialect):
         return connection
 
 
-class _RendersLiteral(object):
+class _RendersLiteral:
     def literal_processor(self, dialect):
         def process(value):
             return "'%s'" % value
index 7150f386c5853cb30a85e0d2d9ca116b84c82286..6772a27bda531b52b013056d60dcee353cef960a 100644 (file)
@@ -11,7 +11,7 @@ from ..sql.compiler import Compiled  # noqa
 from ..sql.compiler import TypeCompiler  # noqa
 
 
-class Dialect(object):
+class Dialect:
     """Define the behavior of a specific database and DB-API combination.
 
     Any aspect of metadata definition, SQL query generation,
@@ -1109,7 +1109,7 @@ class Dialect(object):
         raise NotImplementedError()
 
 
-class CreateEnginePlugin(object):
+class CreateEnginePlugin:
     """A set of hooks intended to augment the construction of an
     :class:`_engine.Engine` object based on entrypoint names in a URL.
 
@@ -1343,7 +1343,7 @@ class CreateEnginePlugin(object):
         """
 
 
-class ExecutionContext(object):
+class ExecutionContext:
     """A messenger object for a Dialect that corresponds to a single
     execution.
 
@@ -1601,7 +1601,7 @@ class Connectable(ConnectionEventsTarget):
         raise NotImplementedError()
 
 
-class ExceptionContext(object):
+class ExceptionContext:
     """Encapsulate information about an error condition in progress.
 
     This object exists solely to be passed to the
@@ -1750,7 +1750,7 @@ class ExceptionContext(object):
     """
 
 
-class AdaptedConnection(object):
+class AdaptedConnection:
     """Interface of an adapted connection object to support the DBAPI protocol.
 
     Used by asyncio dialects to provide a sync-style pep-249 facade on top
index fed353e9cdea17a28327b86b529d048ac25a3e80..c918f15b3c28cf08983f912c5c0735d047453eb0 100644 (file)
@@ -58,7 +58,7 @@ def cache(fn, self, con, *args, **kw):
 
 
 @inspection._self_inspects
-class Inspector(object):
+class Inspector:
     """Performs database schema inspection.
 
     The Inspector acts as a proxy to the reflection methods of the
index 113cdcf352baf939a4bbc24ddbd875e08e070b4a..4187c6c13a51eae61a216bc5e720c9d237eea655 100644 (file)
@@ -35,7 +35,7 @@ else:
             return lambda row: (it(row),)
 
 
-class ResultMetaData(object):
+class ResultMetaData:
     """Base for metadata about result rows."""
 
     __slots__ = ()
@@ -655,7 +655,7 @@ class ResultInternal(InPlaceGenerative):
         return uniques, strategy
 
 
-class _WithKeys(object):
+class _WithKeys:
     # used mainly to share documentation on the keys method.
     def keys(self):
         """Return an iterable view which yields the string keys that would
@@ -1516,7 +1516,7 @@ class MappingResult(_WithKeys, FilterResult):
         )
 
 
-class FrozenResult(object):
+class FrozenResult:
     """Represents a :class:`.Result` object in a "frozen" state suitable
     for caching.
 
index e268cfec90296828dd8711468dc525bf649cd367..782fc21b8b72c6baf49c129d00dc313e080dd8e9 100644 (file)
@@ -53,7 +53,7 @@ try:
 except ImportError:
     _baserow_usecext = False
 
-    class BaseRow(object):
+    class BaseRow:
         __slots__ = ("_parent", "_data", "_keymap", "_key_style")
 
         def __init__(self, parent, processors, keymap, key_style, data):
index bda1c7fae9e915bffad25ff2d9dc0c10c2257d89..a1d76f2b0a555f49b000df06209bad8f84cbdf70 100644 (file)
@@ -13,5 +13,5 @@
 from .mock import MockConnection  # noqa
 
 
-class MockEngineStrategy(object):
+class MockEngineStrategy:
     MockConnection = MockConnection
index 36691504c54ca88d475e82cffd7a4b2164d46665..4467bafd355f66a2c8af448b249e5d0f12c5a0cf 100644 (file)
@@ -81,7 +81,7 @@ def _distill_raw_params(params):
         raise exc.ArgumentError("mapping or sequence expected for parameters")
 
 
-class TransactionalContext(object):
+class TransactionalContext:
     """Apply Python context manager behavior to transaction objects.
 
     Performs validation to ensure the subject of the transaction is not
index a0c2992213c34f9dedbf4dda7dd542d5a4d5ce85..77eb0472c7ddb44aff07c99ae6c90553c28ae7f8 100644 (file)
@@ -51,7 +51,7 @@ class RefCollection(util.MemoizedSlots):
         return weakref.ref(self, registry._collection_gced)
 
 
-class _empty_collection(object):
+class _empty_collection:
     def append(self, element):
         pass
 
index f8cbfbd7f629ba4f1bc80c053dd67f1728226dfd..b084207b4ef3e07308d93c7b436f8fa4e8b1bc4b 100644 (file)
@@ -38,7 +38,7 @@ def _is_event_name(name):
     ) or name.startswith("_sa_event")
 
 
-class _UnpickleDispatch(object):
+class _UnpickleDispatch:
     """Serializable callable that re-generates an instance of
     :class:`_Dispatch` given a particular :class:`.Events` subclass.
 
@@ -54,7 +54,7 @@ class _UnpickleDispatch(object):
             raise AttributeError("No class with a 'dispatch' member present.")
 
 
-class _Dispatch(object):
+class _Dispatch:
     """Mirror the event listening definitions of an Events class with
     listener collections.
 
@@ -275,7 +275,7 @@ class Events(util.with_metaclass(_EventMeta, object)):
         cls.dispatch._clear()
 
 
-class _JoinedDispatcher(object):
+class _JoinedDispatcher:
     """Represent a connection between two _Dispatch objects."""
 
     __slots__ = "local", "parent", "_instance_cls"
@@ -302,7 +302,7 @@ class _JoinedDispatcher(object):
         return self.parent._events
 
 
-class dispatcher(object):
+class dispatcher:
     """Descriptor used by target classes to
     deliver the _Dispatch class at the class level
     and produce new _Dispatch instances for target
index ca85f33684ea4e7e4a930d95c2c35ab9fdd80152..d81f27cd48c7bff12e0a38edf10e69f2bd00d0d8 100644 (file)
@@ -148,7 +148,7 @@ def _clear(owner, elements):
             del _key_to_collection[key]
 
 
-class _EventKey(object):
+class _EventKey:
     """Represent :func:`.listen` arguments."""
 
     __slots__ = (
index 7fa77120c6577533cda7210cfa36c5508dd9e897..ef246d04fb74a508b90d23d055cdf7037693c780 100644 (file)
@@ -19,7 +19,7 @@ from .util import compat
 _version_token = None
 
 
-class HasDescriptionCode(object):
+class HasDescriptionCode:
     """helper which adds 'code' as an attribute and '_code_str' as a method"""
 
     code = None
@@ -375,7 +375,7 @@ class UnboundExecutionError(InvalidRequestError):
     """SQL was attempted without a database connection to execute it on."""
 
 
-class DontWrapMixin(object):
+class DontWrapMixin:
     """A mixin class which, when applied to a user-defined Exception class,
     will not be wrapped inside of :exc:`.StatementError` if the error is
     emitted within the process of executing a statement.
index a93f2c22908d89df6c5256779054b7ab98017428..0aa836a3c79d22fa5ae4588747dbed3c0759908f 100644 (file)
@@ -306,7 +306,7 @@ class AssociationProxy(interfaces.InspectionAttrInfo):
         )
 
 
-class AssociationProxyInstance(object):
+class AssociationProxyInstance:
     """A per-class object that serves class- and object-specific results.
 
     This is used by :class:`.AssociationProxy` when it is invoked
@@ -936,7 +936,7 @@ class ColumnAssociationProxyInstance(
         )
 
 
-class _lazy_collection(object):
+class _lazy_collection:
     def __init__(self, obj, target):
         self.parent = obj
         self.target = target
@@ -952,7 +952,7 @@ class _lazy_collection(object):
         self.target = state["target"]
 
 
-class _AssociationCollection(object):
+class _AssociationCollection:
     def __init__(self, lazy_collection, creator, getter, setter, parent):
         """Constructs an _AssociationCollection.
 
index 7cb2c4400b4c3026e4e21b369ce90bddf6dc6c22..b62c514c7bd9c9b27afe71df19020cccd4f21e5c 100644 (file)
@@ -717,7 +717,7 @@ def generate_relationship(
         raise TypeError("Unknown relationship function: %s" % return_fn)
 
 
-class AutomapBase(object):
+class AutomapBase:
     """Base class for an "automap" schema.
 
     The :class:`.AutomapBase` class can be compared to the "declarative base"
index 61328fce95c46415892d61a5d7587f2ea5f480eb..efdafff9684a381ee4168adb762edf8d8b5642dc 100644 (file)
@@ -30,7 +30,7 @@ from ..util import collections_abc
 log = logging.getLogger(__name__)
 
 
-class Bakery(object):
+class Bakery:
     """Callable which returns a :class:`.BakedQuery`.
 
     This object is returned by the class method
@@ -52,7 +52,7 @@ class Bakery(object):
         return self.cls(self.cache, initial_fn, args)
 
 
-class BakedQuery(object):
+class BakedQuery:
     """A builder object for :class:`.query.Query` objects."""
 
     __slots__ = "steps", "_bakery", "_cache_key", "_spoiled"
@@ -309,7 +309,7 @@ class BakedQuery(object):
         return query
 
 
-class Result(object):
+class Result:
     """Invokes a :class:`.BakedQuery` against a :class:`.Session`.
 
     The :class:`_baked.Result` object is where the actual :class:`.query.Query`
index 354b0ca4a11e7dd0adbb118b8990d13d3fc6a5f9..d961e2c815a0a1b3c09ad88058a0de1dfa6bc406 100644 (file)
@@ -416,7 +416,7 @@ def deregister(class_):
         del class_._compiler_dispatcher
 
 
-class _dispatcher(object):
+class _dispatcher:
     def __init__(self):
         self.specs = {}
 
index 1a12b1205fc3f60fba5a35e875d4204fed5bc011..1862592f5c82ac436d36377a62394bfc70ddaa77 100644 (file)
@@ -37,7 +37,7 @@ def instrument_declarative(cls, cls_registry, metadata):
     )
 
 
-class ConcreteBase(object):
+class ConcreteBase:
     """A helper class for 'concrete' declarative mappings.
 
     :class:`.ConcreteBase` will use the :func:`.polymorphic_union`
@@ -315,7 +315,7 @@ class AbstractConcreteBase(ConcreteBase):
         )
 
 
-class DeferredReflection(object):
+class DeferredReflection:
     """A helper class for construction of mappings based on
     a deferred reflection step.
 
index eab3f2b7385707ae903217bfafb74f3fec5057de..67c42cde66728f186536d646688d8399e8dc55b9 100644 (file)
@@ -137,7 +137,7 @@ usage of the absolute value function::
 
     from sqlalchemy import func
 
-    class Interval(object):
+    class Interval:
         # ...
 
         @hybrid_property
@@ -166,7 +166,7 @@ object for class-level expressions::
    the new hybrid with the additional state will be attached to the class
    with the non-matching name. To use the example above::
 
-    class Interval(object):
+    class Interval:
         # ...
 
         @hybrid_property
@@ -189,7 +189,7 @@ Defining Setters
 Hybrid properties can also define setter methods.  If we wanted
 ``length`` above, when set, to modify the endpoint value::
 
-    class Interval(object):
+    class Interval:
         # ...
 
         @hybrid_property
@@ -231,7 +231,7 @@ accommodate a value passed to :meth:`_query.Query.update` which can affect
 this, using the :meth:`.hybrid_property.update_expression` decorator.
 A handler that works similarly to our setter would be::
 
-    class Interval(object):
+    class Interval:
         # ...
 
         @hybrid_property
@@ -267,7 +267,7 @@ above.
    of the hybrid must match that of how it is accessed.    Something
    like this wouldn't work::
 
-        class Interval(object):
+        class Interval:
             # ...
 
             def _get(self):
@@ -849,7 +849,7 @@ class hybrid_method(interfaces.InspectionAttrInfo):
 
             from sqlalchemy.ext.hybrid import hybrid_method
 
-            class SomeClass(object):
+            class SomeClass:
                 @hybrid_method
                 def value(self, x, y):
                     return self._value + x + y
@@ -902,7 +902,7 @@ class hybrid_property(interfaces.InspectionAttrInfo):
 
             from sqlalchemy.ext.hybrid import hybrid_property
 
-            class SomeClass(object):
+            class SomeClass:
                 @hybrid_property
                 def value(self):
                     return self._value
@@ -958,7 +958,7 @@ class hybrid_property(interfaces.InspectionAttrInfo):
         to be used without conflicting with the same-named attributes
         normally present on the :class:`.QueryableAttribute`::
 
-            class SuperClass(object):
+            class SuperClass:
                 # ...
 
                 @hybrid_property
index 54f3e64c5d519dc91b2cbd118188e401bc2c3bb4..72448fbdc8da3950f335b2fd820c45f1771b185b 100644 (file)
@@ -193,7 +193,7 @@ orm_instrumentation._instrumentation_factory = (
 orm_instrumentation.instrumentation_finders = instrumentation_finders
 
 
-class InstrumentationManager(object):
+class InstrumentationManager:
     """User-defined class instrumentation extension.
 
     :class:`.InstrumentationManager` can be subclassed in order
index 4eed3b2afe2b81fe938c1998de80147635441f87..7e277d37998af7452f7495ea6ea34c9c09bfdb27 100644 (file)
@@ -113,7 +113,7 @@ mapping against the ``my_data`` table::
 
     from sqlalchemy import mapper
 
-    class MyDataClass(object):
+    class MyDataClass:
         pass
 
     # associates mutation listeners with MyDataClass.data
@@ -286,7 +286,7 @@ objects to each of the ``Vertex.start`` and ``Vertex.end`` attributes::
         Column('y2', Integer),
         )
 
-    class Vertex(object):
+    class Vertex:
         pass
 
     mapper(Vertex, vertices, properties={
@@ -366,7 +366,7 @@ from ..sql.base import SchemaEventTarget
 from ..util import memoized_property
 
 
-class MutableBase(object):
+class MutableBase:
     """Common base class to :class:`.Mutable`
     and :class:`.MutableComposite`.
 
index 9ec3842a6df3652641f1177a56cd46bab6f2170d..2eb11750bb7b48fc2f44dee50e5a97ef1f9d3d47 100644 (file)
@@ -57,7 +57,7 @@ def class_logger(cls):
     return cls
 
 
-class Identified(object):
+class Identified:
     logging_name = None
 
     def _should_log_debug(self):
@@ -67,7 +67,7 @@ class Identified(object):
         return self.logger.isEnabledFor(logging.INFO)
 
 
-class InstanceLogger(object):
+class InstanceLogger:
     """A logger adapter (wrapper) for :class:`.Identified` subclasses.
 
     This allows multiple instances (e.g. Engine or Pool instances)
@@ -204,7 +204,7 @@ def instance_logger(instance, echoflag=None):
     instance.logger = logger
 
 
-class echo_property(object):
+class echo_property:
     __doc__ = """\
     When ``True``, enable log output for this element.
 
index 513144b8728dfe9db87968cbf08e0a4919efe8e1..dc5813866718ffbc836f121159e0476bd5a13e20 100644 (file)
@@ -637,7 +637,7 @@ OP_BULK_REPLACE = util.symbol("BULK_REPLACE")
 OP_MODIFIED = util.symbol("MODIFIED")
 
 
-class AttributeEvent(object):
+class AttributeEvent:
     """A token propagated throughout the course of a chain of attribute
     events.
 
@@ -690,7 +690,7 @@ class AttributeEvent(object):
 Event = AttributeEvent
 
 
-class AttributeImpl(object):
+class AttributeImpl:
     """internal implementation for instrumented attributes."""
 
     def __init__(
index 6553cf66981baffaf04bb83ffb3629e5044752c6..2cd4134d601ad35aa0355603d56c6bc31fd666fd 100644 (file)
@@ -450,7 +450,7 @@ def class_mapper(class_, configure=True):
         return mapper
 
 
-class InspectionAttr(object):
+class InspectionAttr:
     """A base class applied to all ORM objects that can be returned
     by the :func:`_sa.inspect` function.
 
@@ -563,7 +563,7 @@ class InspectionAttrInfo(InspectionAttr):
         return {}
 
 
-class _MappedAttribute(object):
+class _MappedAttribute:
     """Mixin for attributes which should be replaced by mapper-assigned
     attributes.
 
index 4ec31bcf74e8a9808e91b95f3145f6c2fbd3efc4..0d45fb40d458a2ffd34af5ddb9500f0a943079db 100644 (file)
@@ -118,7 +118,7 @@ def _key_is_empty(key, decl_class_registry, test):
         return not test(thing)
 
 
-class _MultipleClassMarker(object):
+class _MultipleClassMarker:
     """refers to multiple classes of the same name
     within _decl_class_registry.
 
@@ -182,7 +182,7 @@ class _MultipleClassMarker(object):
         self.contents.add(weakref.ref(item, self._remove_item))
 
 
-class _ModuleMarker(object):
+class _ModuleMarker:
     """Refers to a module name within
     _decl_class_registry.
 
@@ -239,7 +239,7 @@ class _ModuleMarker(object):
             existing.remove_item(cls)
 
 
-class _ModNS(object):
+class _ModNS:
     __slots__ = ("__parent",)
 
     def __init__(self, parent):
@@ -263,7 +263,7 @@ class _ModNS(object):
         )
 
 
-class _GetColumns(object):
+class _GetColumns:
     __slots__ = ("cls",)
 
     def __init__(self, cls):
@@ -297,7 +297,7 @@ inspection._inspects(_GetColumns)(
 )
 
 
-class _GetTable(object):
+class _GetTable:
     __slots__ = "key", "metadata"
 
     def __init__(self, key, metadata):
@@ -314,7 +314,7 @@ def _determine_container(key, value):
     return _GetColumns(value)
 
 
-class _class_resolver(object):
+class _class_resolver:
     __slots__ = (
         "cls",
         "prop",
index f9afd4ebfe611b544040745526ac378e167ce890..01d77e92b748829d10b8335ffe40b6b2f5b9c91b 100644 (file)
@@ -20,7 +20,7 @@ provided.  One is a bundle of generic decorators that map function arguments
 and return values to events::
 
   from sqlalchemy.orm.collections import collection
-  class MyClass(object):
+  class MyClass:
       # ...
 
       @collection.adds(1)
@@ -125,7 +125,7 @@ __all__ = [
 __instrumentation_mutex = util.threading.Lock()
 
 
-class _PlainColumnGetter(object):
+class _PlainColumnGetter:
     """Plain column getter, stores collection of Column objects
     directly.
 
@@ -160,7 +160,7 @@ class _PlainColumnGetter(object):
             return key[0]
 
 
-class _SerializableColumnGetter(object):
+class _SerializableColumnGetter:
     """Column-based getter used in version 0.7.6 only.
 
     Remains here for pickle compatibility with 0.7.6.
@@ -251,7 +251,7 @@ def column_mapped_collection(mapping_spec):
     return lambda: MappedCollection(keyfunc)
 
 
-class _SerializableAttrGetter(object):
+class _SerializableAttrGetter:
     def __init__(self, name):
         self.name = name
         self.getter = operator.attrgetter(name)
@@ -299,7 +299,7 @@ def mapped_collection(keyfunc):
     return lambda: MappedCollection(keyfunc)
 
 
-class collection(object):
+class collection:
     """Decorators for entity collection classes.
 
     The decorators fall into two groups: annotations and interception recipes.
@@ -567,7 +567,7 @@ collection_adapter = operator.attrgetter("_sa_adapter")
 """Fetch the :class:`.CollectionAdapter` for a collection."""
 
 
-class CollectionAdapter(object):
+class CollectionAdapter:
     """Bridges between the ORM and arbitrary Python collections.
 
     Proxies base-level collection operations (append, remove, iterate)
index 0a93d993af48935c79d51b8199f97290864e0db4..986daf7eb8155a06d1d416a38eaa49e758f6be3e 100644 (file)
@@ -47,7 +47,7 @@ _EMPTY_DICT = util.immutabledict()
 LABEL_STYLE_LEGACY_ORM = util.symbol("LABEL_STYLE_LEGACY_ORM")
 
 
-class QueryContext(object):
+class QueryContext:
     __slots__ = (
         "compile_state",
         "query",
@@ -2312,7 +2312,7 @@ def _legacy_determine_last_joined_entity(setup_joins, entity_zero):
     return None
 
 
-class _QueryEntity(object):
+class _QueryEntity:
     """represent an entity column returned within a Query result."""
 
     __slots__ = ()
index 94cda236d154c5487177480fa7c95ef98a88ad85..21bb9d81b2a3bb83a10dded0d80bd3832f31059f 100644 (file)
@@ -138,7 +138,7 @@ class declared_attr(interfaces._MappedAttribute, property):
     easily reused across different mappings.  The example below illustrates
     both::
 
-        class ProvidesUser(object):
+        class ProvidesUser:
             "A mixin that adds a 'user' relationship to classes."
 
             @declared_attr
@@ -271,7 +271,7 @@ class declared_attr(interfaces._MappedAttribute, property):
         Below, both MyClass as well as MySubClass will have a distinct
         ``id`` Column object established::
 
-            class HasIdMixin(object):
+            class HasIdMixin:
                 @declared_attr.cascading
                 def id(cls):
                     if has_inherited_table(cls):
@@ -477,7 +477,7 @@ def declarative_base(
     )
 
 
-class registry(object):
+class registry:
     """Generalized registry for mapping classes.
 
     The :class:`_orm.registry` serves as the basis for maintaining a collection
@@ -861,7 +861,7 @@ class registry(object):
             mapper_registry = registry()
 
             @mapper_registry.as_declarative_base()
-            class Base(object):
+            class Base:
                 @declared_attr
                 def __tablename__(cls):
                     return cls.__name__.lower()
@@ -1006,7 +1006,7 @@ def as_declarative(**kw):
         from sqlalchemy.orm import as_declarative
 
         @as_declarative()
-        class Base(object):
+        class Base:
             @declared_attr
             def __tablename__(cls):
                 return cls.__name__.lower()
index bf1bc537da47aa67a98fa2c92b759dce5f9fac3d..bab890b82896a187d58c2d20a137b1b0d08187f7 100644 (file)
@@ -151,7 +151,7 @@ def _check_declared_props_nocascade(obj, name, cls):
         return False
 
 
-class _MapperConfig(object):
+class _MapperConfig:
     __slots__ = ("cls", "classname", "properties", "declared_attr_reg")
 
     @classmethod
index 27919050eceaaccdcf8643a168a55e587d5dc1a9..220dc1bbb872dd3b3651c8fd15706b34169b331b 100644 (file)
@@ -22,7 +22,7 @@ from .. import sql
 from .. import util
 
 
-class DependencyProcessor(object):
+class DependencyProcessor:
     def __init__(self, prop):
         self.prop = prop
         self.cascade = prop.cascade
index 535067d88d0d300bc161cae2489df32c7f3a6c35..82946ca37dec8c7d51f0bbc55afc7a43efaa0ce0 100644 (file)
@@ -37,7 +37,7 @@ class DescriptorProperty(MapperProperty):
     def instrument_class(self, mapper):
         prop = self
 
-        class _ProxyImpl(object):
+        class _ProxyImpl:
             accepts_scalar_loader = False
             load_on_unexpire = True
             collection = False
@@ -523,7 +523,7 @@ class ConcreteInheritedProperty(DescriptorProperty):
                 % (self.parent, self.key, self.parent)
             )
 
-        class NoninheritedConcreteProp(object):
+        class NoninheritedConcreteProp:
             def __set__(s, obj, value):
                 warn()
 
@@ -595,7 +595,7 @@ class SynonymProperty(DescriptorProperty):
                 Column('job_status', String(50))
             )
 
-            class MyClass(object):
+            class MyClass:
                 @property
                 def _job_status_descriptor(self):
                     return "Status: %s" % self._job_status
index 405498aaf69a5d8476f2f61701b80c7b78f48a8b..67deb3b0196c375d58dd31f35ab5e951e4a1cf35 100644 (file)
@@ -263,7 +263,7 @@ class DynamicAttributeImpl(attributes.AttributeImpl):
         self.remove(state, dict_, value, initiator, passive=passive)
 
 
-class DynamicCollectionAdapter(object):
+class DynamicCollectionAdapter:
     """simplified CollectionAdapter for internal API consistency"""
 
     def __init__(self, data):
@@ -284,7 +284,7 @@ class DynamicCollectionAdapter(object):
     __nonzero__ = __bool__
 
 
-class AppenderMixin(object):
+class AppenderMixin:
     query_class = None
 
     def __init__(self, attr, state):
@@ -434,7 +434,7 @@ def mixin_user_query(cls):
     return type(name, (AppenderMixin, cls), {"query_class": cls})
 
 
-class CollectionHistory(object):
+class CollectionHistory:
     """Overrides AttributeHistory to receive append/remove events directly."""
 
     def __init__(self, attr, state, apply_to=None):
index fcc7368c41dcd205fb1b219d498c33613211f1da..19e0be9d07a0b691174bd3601de53993d9822940 100644 (file)
@@ -66,7 +66,7 @@ _notimplemented_ops = set(
 )
 
 
-class EvaluatorCompiler(object):
+class EvaluatorCompiler:
     def __init__(self, target_cls=None):
         self.target_cls = target_cls
 
index 2c8d155ad8870191ed1ec6c036d00228447c9df4..b358b8be355b6cf2692e510bbb45d42b2d40c46f 100644 (file)
@@ -122,7 +122,7 @@ class InstrumentationEvents(event.Events):
         """Called when an attribute is instrumented."""
 
 
-class _InstrumentationEventsHold(object):
+class _InstrumentationEventsHold:
     """temporary marker object used to transfer from _accept_with() to
     _listen() on the InstrumentationEvents class.
 
@@ -535,7 +535,7 @@ class _EventsHold(event.RefCollection):
     def _clear(cls):
         cls.all_holds.clear()
 
-    class HoldEvents(object):
+    class HoldEvents:
         _dispatch_target = None
 
         @classmethod
index 10d924b4850fa65a74d8491d2723f9d12f599c62..917a79f91f094c1f6b20f09a27e18d2902d56994 100644 (file)
@@ -11,7 +11,7 @@ from . import util as orm_util
 from .. import exc as sa_exc
 
 
-class IdentityMap(object):
+class IdentityMap:
     def __init__(self):
         self._dict = {}
         self._modified = set()
index 626643ce13a2c71a2fa17fdefb7ea6345692a0e8..cb330ea17f514c424e417c34b1e90c8f09b889aa 100644 (file)
@@ -470,7 +470,7 @@ class ClassManager(HasMemoized, dict):
         )
 
 
-class _SerializeManager(object):
+class _SerializeManager:
     """Provide serialization of a :class:`.ClassManager`.
 
     The :class:`.InstanceState` uses ``__init__()`` on serialize
@@ -504,7 +504,7 @@ class _SerializeManager(object):
         manager.dispatch.unpickle(state, state_dict)
 
 
-class InstrumentationFactory(object):
+class InstrumentationFactory:
     """Factory for new ClassManager instances."""
 
     def create_manager_for_cls(self, class_):
index 9eb362c437b4f8e9c95b9564a21f598fea2c6755..c425f012baaa4e1d5e792a6efa897bf79488f034 100644 (file)
@@ -859,7 +859,7 @@ class MapperOption(ORMOption):
         self.process_query(query)
 
 
-class LoaderStrategy(object):
+class LoaderStrategy:
     """Describe the loading behavior of a StrategizedProperty object.
 
     The ``LoaderStrategy`` interacts with the querying process in three
index d004db0a3b3f77b02c780f02eab94a1da2482312..94ad7b80dd82aaa3352ca490505cf0be91e3b5d1 100644 (file)
@@ -1304,7 +1304,7 @@ def _decorate_polymorphic_switch(
     return polymorphic_instance
 
 
-class PostLoad(object):
+class PostLoad:
     """Track loaders and states for "post load" operations."""
 
     __slots__ = "loaders", "states", "load_keys"
index c987f6b1665b90de4aa61fd34fbb350dfa608fbf..8cf253efb04d3d6095995245f2fd746d357a4c8c 100644 (file)
@@ -3408,7 +3408,7 @@ class AliasOption(interfaces.LoaderOption):
         pass
 
 
-class BulkUD(object):
+class BulkUD:
     """State used for the orm.Query version of update() / delete().
 
     This object is now specific to Query only.
index d021ac9a29881832e864493d9ca11d554826b6b9..b692daf21bf68aa8e355ebbd1cef7bb5f9cfa692 100644 (file)
@@ -2604,7 +2604,7 @@ def _annotate_columns(element, annotations):
     return element
 
 
-class JoinCondition(object):
+class JoinCondition:
     def __init__(
         self,
         parent_persist_selectable,
@@ -3677,7 +3677,7 @@ class JoinCondition(object):
         return lazywhere, bind_to_col, equated_columns
 
 
-class _ColInAnnotations(object):
+class _ColInAnnotations:
     """Serializable object that tests for a name in c._annotations."""
 
     __slots__ = ("name",)
index df3012df1e49ef468ac555ec16c97237090e0131..2d04ea32c576427948f5ac1434e6be1deea31b67 100644 (file)
@@ -18,7 +18,7 @@ from ..util import warn_deprecated
 __all__ = ["scoped_session", "ScopedSessionMixin"]
 
 
-class ScopedSessionMixin(object):
+class ScopedSessionMixin:
     @property
     def _proxied(self):
         return self.registry()
@@ -190,7 +190,7 @@ class scoped_session(ScopedSessionMixin):
 
             Session = scoped_session(sessionmaker())
 
-            class MyClass(object):
+            class MyClass:
                 query = Session.query_property()
 
             # after mappers are defined
@@ -207,7 +207,7 @@ class scoped_session(ScopedSessionMixin):
 
         """
 
-        class query(object):
+        class query:
             def __get__(s, instance, owner):
                 try:
                     mapper = class_mapper(owner)
index 8be5fbee72532cc871cb44da3f074544dd761d8f..e18e358471e6d7fe4b73add33079595dd7c59ee8 100644 (file)
@@ -65,7 +65,7 @@ def _state_session(state):
     return state.session
 
 
-class _SessionClassMethods(object):
+class _SessionClassMethods:
     """Class-level methods for :class:`.Session`, :class:`.sessionmaker`."""
 
     @classmethod
index 994cbe53e7b9d44067ef1576575fde5df3c04073..0434f5f325730cb903585bc95863a475810c0e56 100644 (file)
@@ -899,7 +899,7 @@ class InstanceState(interfaces.InspectionAttrInfo):
             state._strong_obj = None
 
 
-class AttributeState(object):
+class AttributeState:
     """Provide an inspection interface corresponding
     to a particular attribute on a particular mapped object.
 
@@ -997,7 +997,7 @@ class AttributeState(object):
         return self.state.get_history(self.key, PASSIVE_OFF ^ INIT_OK)
 
 
-class PendingCollection(object):
+class PendingCollection:
     """A writable placeholder for an unloaded collection.
 
     Stores items appended to and removed from a collection that has not yet
index 71c4a6976119d1f3a233d0fd8d2e831f46442ce2..130ff2d1ebd92bd1ceed0e218e60cd4b10552618 100644 (file)
@@ -535,7 +535,7 @@ class DeferredColumnLoader(LoaderStrategy):
         )
 
 
-class LoadDeferredColumns(object):
+class LoadDeferredColumns:
     """serializable loader object used by DeferredColumnLoader"""
 
     def __init__(self, key, raiseload=False):
@@ -1119,7 +1119,7 @@ class LazyLoader(AbstractRelationshipLoader, util.MemoizedSlots):
             populators["new"].append((self.key, reset_for_lazy_callable))
 
 
-class LoadLazyAttribute(object):
+class LoadLazyAttribute:
     """semi-serializable loader object used by LazyLoader
 
     Historically, this object would be carried along with instances that
@@ -1569,7 +1569,7 @@ class SubqueryLoader(PostLoader):
 
         return q
 
-    class _SubqCollections(object):
+    class _SubqCollections:
         """Given a :class:`_query.Query` used to emit the "subquery load",
         provide a load interface that executes the query at the
         first moment a value is needed.
index 23a8c4533235fb035855330c64313e5a4f09869c..997fca1ac25e9c3ef05e8af1e2ff444b1262a56a 100644 (file)
@@ -1186,7 +1186,7 @@ class _UnboundLoad(Load):
                 return None
 
 
-class loader_option(object):
+class loader_option:
     def __init__(self):
         pass
 
index f29d11bcd59b9969a7de2c863d122cf6d6dc59ea..03456e5723b8147d7d4f12eec79d7adfe2427fed 100644 (file)
@@ -150,7 +150,7 @@ def track_cascade_events(descriptor, prop):
     event.listen(descriptor, "set", set_, raw=True, retval=True)
 
 
-class UOWTransaction(object):
+class UOWTransaction:
     def __init__(self, session):
         self.session = session
 
@@ -477,7 +477,7 @@ class UOWTransaction(object):
             self.session._register_persistent(other)
 
 
-class IterateMappersMixin(object):
+class IterateMappersMixin:
     def _mappers(self, uow):
         if self.fromparent:
             return iter(
@@ -539,7 +539,7 @@ class Preprocess(IterateMappersMixin):
             return False
 
 
-class PostSortRec(object):
+class PostSortRec:
     __slots__ = ("disabled",)
 
     def __new__(cls, uow, *args):
index 0e8449068095180ee6e515b6954f1aa46b96eaa0..3295bd39e741126093155dd38995a4cd4fb00a51 100644 (file)
@@ -418,7 +418,7 @@ class ORMAdapter(sql_util.ColumnAdapter):
         return not entity or entity.isa(self.mapper)
 
 
-class AliasedClass(object):
+class AliasedClass:
     r"""Represents an "aliased" form of a mapped class for usage with Query.
 
     The ORM equivalent of a :func:`~sqlalchemy.sql.expression.alias`
@@ -881,7 +881,7 @@ class AliasedInsp(
             return "aliased(%s)" % (self._target.__name__,)
 
 
-class _WrapUserEntity(object):
+class _WrapUserEntity:
     """A wrapper used within the loader_criteria lambda caller so that
     we can bypass declared_attr descriptors on unmapped mixins, which
     normally emit a warning for such use.
index ec55da73035b03f71046a94af77114dd0820afe1..1a3dcd0e46e4964f48998996cb77ed0a961d1144 100644 (file)
@@ -25,7 +25,7 @@ reset_commit = util.symbol("reset_commit")
 reset_none = util.symbol("reset_none")
 
 
-class _ConnDialect(object):
+class _ConnDialect:
     """partial implementation of :class:`.Dialect`
     which provides DBAPI connection methods.
 
@@ -332,7 +332,7 @@ class Pool(log.Identified):
         raise NotImplementedError()
 
 
-class _ConnectionRecord(object):
+class _ConnectionRecord:
 
     """Internal object which maintains an individual DBAPI connection
     referenced by a :class:`_pool.Pool`.
@@ -781,7 +781,7 @@ def _finalize_fairy(
 _strong_ref_connection_records = {}
 
 
-class _ConnectionFairy(object):
+class _ConnectionFairy:
 
     """Proxies a DBAPI connection and provides return-on-dereference
     support.
index 7dfb59e36e93cab43bba06bb4eda9650c1a91b4f..e271d43fd71e1bc66af3b691e1302a4d72fff671 100644 (file)
@@ -61,7 +61,7 @@ def clear_managers():
     proxies.clear()
 
 
-class _DBProxy(object):
+class _DBProxy:
 
     """Layers connection pooling behavior on top of a standard DB-API module.
 
index e6618937a4fef1cd16d10e59d19d4394721a859a..88f045fe66d8febdff6674b948170c7a7379ad4e 100644 (file)
@@ -20,7 +20,7 @@ from .. import util
 EMPTY_ANNOTATIONS = util.immutabledict()
 
 
-class SupportsAnnotations(object):
+class SupportsAnnotations:
     _annotations = EMPTY_ANNOTATIONS
 
     @util.memoized_property
@@ -122,7 +122,7 @@ class SupportsWrappingAnnotations(SupportsAnnotations):
             return self
 
 
-class Annotated(object):
+class Annotated:
     """clones a SupportsAnnotated and applies an 'annotations' dictionary.
 
     Unlike regular clones, this clone also mimics __hash__() and
index 0c375b6d77ce77626ccc7035a2b6245e0d91f518..b57da3289baf98741c974e203fad7936448a4214 100644 (file)
@@ -35,7 +35,7 @@ type_api = None
 NO_ARG = util.symbol("NO_ARG")
 
 
-class Immutable(object):
+class Immutable:
     """mark a ClauseElement as 'immutable' when expressions are cloned."""
 
     _is_immutable = True
@@ -276,7 +276,7 @@ def _kw_reg_for_dialect(dialect_name):
     return dict(dialect_cls.construct_arguments)
 
 
-class DialectKWArgs(object):
+class DialectKWArgs:
     """Establish the ability for a class to have dialect-specific arguments
     with defaults and constructor validation.
 
@@ -451,7 +451,7 @@ class DialectKWArgs(object):
                     construct_arg_dictionary[arg_name] = kwargs[k]
 
 
-class CompileState(object):
+class CompileState:
     """Produces additional object state necessary for a statement to be
     compiled.
 
@@ -1056,7 +1056,7 @@ class prefix_anon_map(dict):
         return value
 
 
-class SchemaEventTarget(object):
+class SchemaEventTarget:
     """Base class for elements that are the targets of :class:`.DDLEvents`
     events.
 
@@ -1079,7 +1079,7 @@ class SchemaVisitor(ClauseVisitor):
     __traverse_options__ = {"schema_visitor": True}
 
 
-class ColumnCollection(object):
+class ColumnCollection:
     """Collection of :class:`_expression.ColumnElement` instances,
     typically for
     :class:`_sql.FromClause` objects.
index f888bad4cac77c09958683ec7d1869940368380c..f051ba12f30322d718e7d5c79e94dc070dfd0b4a 100644 (file)
@@ -235,7 +235,7 @@ def expect_col_expression_collection(role, expressions):
         yield resolved, column, strname, add_element
 
 
-class RoleImpl(object):
+class RoleImpl:
     __slots__ = ("_role_class", "name", "_use_inspection")
 
     def _literal_coercion(self, element, **kw):
@@ -282,7 +282,7 @@ class RoleImpl(object):
         util.raise_(exc.ArgumentError(msg, code=code), replace_context=err)
 
 
-class _Deannotate(object):
+class _Deannotate:
     __slots__ = ()
 
     def _post_coercion(self, resolved, **kw):
@@ -291,13 +291,13 @@ class _Deannotate(object):
         return _deep_deannotate(resolved)
 
 
-class _StringOnly(object):
+class _StringOnly:
     __slots__ = ()
 
     _resolve_literal_only = True
 
 
-class _ReturnsStringKey(object):
+class _ReturnsStringKey:
     __slots__ = ()
 
     def _implicit_coercions(
@@ -312,7 +312,7 @@ class _ReturnsStringKey(object):
         return element
 
 
-class _ColumnCoercions(object):
+class _ColumnCoercions:
     __slots__ = ()
 
     def _warn_for_scalar_subquery_coercion(self):
@@ -358,7 +358,7 @@ def _no_text_coercion(
     )
 
 
-class _NoTextCoercion(object):
+class _NoTextCoercion:
     __slots__ = ()
 
     def _literal_coercion(self, element, argname=None, **kw):
@@ -370,7 +370,7 @@ class _NoTextCoercion(object):
             self._raise_for_expected(element, argname)
 
 
-class _CoerceLiterals(object):
+class _CoerceLiterals:
     __slots__ = ()
     _coerce_consts = False
     _coerce_star = False
@@ -417,7 +417,7 @@ class LiteralValueImpl(RoleImpl):
         return element
 
 
-class _SelectIsNotFrom(object):
+class _SelectIsNotFrom:
     __slots__ = ()
 
     def _raise_for_expected(self, element, argname=None, resolved=None, **kw):
index 191a072991d01f58dd2ad03f73731aee1252d51c..482afb42f50636a5cc78190fa08bd7767968dbee 100644 (file)
@@ -357,7 +357,7 @@ class FromLinter(collections.namedtuple("FromLinter", ["froms", "edges"])):
                 util.warn(message)
 
 
-class Compiled(object):
+class Compiled:
 
     """Represent a compiled SQL or DDL expression.
 
@@ -4970,7 +4970,7 @@ class StrSQLTypeCompiler(GenericTypeCompiler):
             return get_col_spec(**kw)
 
 
-class IdentifierPreparer(object):
+class IdentifierPreparer:
 
     """Handle quoting and case-folding of identifiers based on options."""
 
index 03968d284b049b56886675aabe12bf42d19c4e40..e45c6b8883c1e2305b89396e35ec7c1d94ee7002 100644 (file)
@@ -1017,7 +1017,7 @@ class Insert(ValuesBase):
         self.select = coercions.expect(roles.DMLSelectRole, select)
 
 
-class DMLWhereBase(object):
+class DMLWhereBase:
     _where_criteria = ()
 
     @_generative
index a279f634ddba787718b156365b1bed053d5e8f97..6893d99eee018f3fd205b24d3e82371407c30e06 100644 (file)
@@ -1142,7 +1142,7 @@ class ColumnElement(
         return self._anon_label(label, add_hash=idx)
 
 
-class WrapsColumnExpression(object):
+class WrapsColumnExpression:
     """Mixin that defines a :class:`_expression.ColumnElement`
     as a wrapper with special
     labeling behavior for an expression that already has a name.
index 35b0cb7d78484f4060b2bdd90674cf063e7007cb..31f4fab0d43f8dac10781dc054926c462f5fdaa7 100644 (file)
@@ -662,7 +662,7 @@ class ScalarFunctionColumn(NamedColumn):
         self.type = sqltypes.to_instance(type_)
 
 
-class _FunctionGenerator(object):
+class _FunctionGenerator:
     """Generate SQL function expressions.
 
     :data:`.func` is a special object instance which generates SQL
index e7c19b9a0307c36b590d989d42196a843192c2a5..11026079933b3fb6174c73a5fd2578090a50a83f 100644 (file)
@@ -596,7 +596,7 @@ class LinkedLambdaElement(StatementLambdaElement):
         return fn(self.parent_lambda._resolved)
 
 
-class AnalyzedCode(object):
+class AnalyzedCode:
     __slots__ = (
         "track_closure_variables",
         "track_bound_values",
@@ -941,7 +941,7 @@ class AnalyzedCode(object):
         )
 
 
-class NonAnalyzedFunction(object):
+class NonAnalyzedFunction:
     __slots__ = ("expr",)
 
     closure_bindparams = None
@@ -955,7 +955,7 @@ class NonAnalyzedFunction(object):
         return self.expr
 
 
-class AnalyzedFunction(object):
+class AnalyzedFunction:
     __slots__ = (
         "analyzed_code",
         "fn",
index d01eabb5883d61e5865fe08f905cb2fe6f3f100b..3d86018eef7704b07dab4d9367a8c959102bfc36 100644 (file)
@@ -27,7 +27,7 @@ from .. import event
 from .. import exc
 
 
-class ConventionDict(object):
+class ConventionDict:
     def __init__(self, const, table, convention):
         self.const = const
         self._is_fk = isinstance(const, ForeignKeyConstraint)
index b64bea07a06fbbc0ac3fa61891fdb3476e5bcf6d..675048cd022581acae199eb5cf1e466cbbffcba3 100644 (file)
@@ -33,7 +33,7 @@ from operator import truediv
 from .. import util
 
 
-class Operators(object):
+class Operators:
     """Base of comparison and logical operators.
 
     Implements base methods
@@ -227,7 +227,7 @@ class Operators(object):
         raise NotImplementedError(str(op))
 
 
-class custom_op(object):
+class custom_op:
     """Represent a 'custom' operator.
 
     :class:`.custom_op` is normally instantiated when the
index 70ad4cefa7f9d153f535dd42c24e700c0f4228c2..4e009aa269c34d08f252689be3e502491f58dfc8 100644 (file)
@@ -8,7 +8,7 @@
 from .. import util
 
 
-class SQLRole(object):
+class SQLRole:
     """Define a "role" within a SQL statement structure.
 
     Classes within SQL Core participate within SQLRole hierarchies in order
@@ -23,12 +23,12 @@ class SQLRole(object):
     uses_inspection = False
 
 
-class UsesInspection(object):
+class UsesInspection:
     _post_inspect = None
     uses_inspection = True
 
 
-class AllowsLambdaRole(object):
+class AllowsLambdaRole:
     allows_lambda = True
 
 
index c8f26f906542d16b019013934617fd0dbc8fc83f..4bd49c468810d1d6e34194bb93121fc09169ff54 100644 (file)
@@ -2639,7 +2639,7 @@ class ColumnDefault(DefaultGenerator):
         return "ColumnDefault(%r)" % (self.arg,)
 
 
-class IdentityOptions(object):
+class IdentityOptions:
     """Defines options for a named database sequence or an identity column.
 
     .. versionadded:: 1.3.18
@@ -3173,7 +3173,7 @@ class Constraint(DialectKWArgs, SchemaItem):
         raise NotImplementedError()
 
 
-class ColumnCollectionMixin(object):
+class ColumnCollectionMixin:
 
     columns = None
     """A :class:`_expression.ColumnCollection` of :class:`_schema.Column`
index 350e55c49b94de2c207770ed9393162a77b2d688..a04b205b5f3aa8cdb4c86ffa9136633984710838 100644 (file)
@@ -228,7 +228,7 @@ class Selectable(ReturnsRows):
         )
 
 
-class HasPrefixes(object):
+class HasPrefixes:
     _prefixes = ()
 
     _has_prefixes_traverse_internals = [
@@ -284,7 +284,7 @@ class HasPrefixes(object):
         )
 
 
-class HasSuffixes(object):
+class HasSuffixes:
     _suffixes = ()
 
     _has_suffixes_traverse_internals = [
@@ -335,7 +335,7 @@ class HasSuffixes(object):
         )
 
 
-class HasHints(object):
+class HasHints:
     _hints = util.immutabledict()
     _statement_hints = ()
 
@@ -1549,7 +1549,7 @@ class Join(roles.DMLTableRole, FromClause):
         return [self] + self.left._from_objects + self.right._from_objects
 
 
-class NoInit(object):
+class NoInit:
     def __init__(self, *arg, **kw):
         raise NotImplementedError(
             "The %s class is not intended to be constructed "
@@ -3360,7 +3360,7 @@ class SelectStatementGrouping(GroupedElement, SelectBase):
         return self.element._from_objects
 
 
-class DeprecatedSelectBaseGenerations(object):
+class DeprecatedSelectBaseGenerations:
     """A collection of methods available on :class:`_sql.Select` and
     :class:`_sql.CompoundSelect`, these are all **deprecated** methods as they
     modify the object in-place.
@@ -4214,7 +4214,7 @@ class CompoundSelect(HasCompileState, GenerativeSelect):
         self._bind = bind
 
 
-class DeprecatedSelectGenerations(object):
+class DeprecatedSelectGenerations:
     """A collection of methods available on :class:`_sql.Select`, these
     are all **deprecated** methods as they modify the :class:`_sql.Select`
     object in -place.
@@ -4730,7 +4730,7 @@ class SelectState(util.MemoizedSlots, CompileState):
         return replace_from_obj_index
 
 
-class _SelectFromElements(object):
+class _SelectFromElements:
     def _iterate_from_elements(self):
         # note this does not include elements
         # in _setup_joins or _legacy_setup_joins
index 52033f5865d61fc7bc484451a22ca44752cae6d1..1687c9f29dd961fd0001e8eaa176341a39ebc154 100644 (file)
@@ -44,7 +44,7 @@ from ..util import OrderedDict
 from ..util import pickle
 
 
-class _LookupExpressionAdapter(object):
+class _LookupExpressionAdapter:
 
     """Mixin expression adaptations based on lookup tables.
 
@@ -75,7 +75,7 @@ class _LookupExpressionAdapter(object):
     comparator_factory = Comparator
 
 
-class Concatenable(object):
+class Concatenable:
 
     """A mixin that marks a type as supporting 'concatenation',
     typically strings."""
@@ -95,7 +95,7 @@ class Concatenable(object):
     comparator_factory = Comparator
 
 
-class Indexable(object):
+class Indexable:
     """A mixin that marks a type as supporting indexing operations,
     such as array or JSON structures.
 
index 3d377271f99b8418b215751461714b5d92c19d5f..6acd794aa3ac109965f06257c734a0f39f8743ea 100644 (file)
@@ -48,7 +48,7 @@ def _preconfigure_traversals(target_hierarchy):
             )
 
 
-class HasCacheKey(object):
+class HasCacheKey:
     _cache_key_traversal = NO_CACHE
     __slots__ = ()
 
@@ -713,7 +713,7 @@ class _CacheKey(ExtendedInternalTraversal):
 _cache_key_traversal_visitor = _CacheKey()
 
 
-class HasCopyInternals(object):
+class HasCopyInternals:
     def _clone(self, **kw):
         raise NotImplementedError()
 
index 5e929c4a950508fb853232004484b87e385d5cdb..01763f266219891500c586613ce7c1602b6b2120 100644 (file)
@@ -810,7 +810,7 @@ class VisitableCheckKWArg(util.EnsureKWArgType, TraversibleType):
     pass
 
 
-class ExternalType(object):
+class ExternalType:
     """mixin that defines attributes and behaviors specific to third-party
     datatypes.
 
@@ -1064,7 +1064,7 @@ class UserDefinedType(
         return self
 
 
-class Emulated(object):
+class Emulated:
     """Mixin for base types that emulate the behavior of a DB-native type.
 
     An :class:`.Emulated` type will use an available database type
@@ -1111,7 +1111,7 @@ class Emulated(object):
                 return super(Emulated, self).adapt(impltype, **kw)
 
 
-class NativeForEmulated(object):
+class NativeForEmulated:
     """Indicates DB-native types supported by an :class:`.Emulated` type.
 
     .. versionadded:: 1.2.0b3
index 7fcb45709f50c434ccfe3003ea2d13ac402a8b0f..6394c43a0e65c081c205937d7c6d8e7a654ca232 100644 (file)
@@ -461,7 +461,7 @@ def _quote_ddl_expr(element):
         return repr(element)
 
 
-class _repr_base(object):
+class _repr_base:
     _LIST = 0
     _TUPLE = 1
     _DICT = 2
@@ -969,7 +969,7 @@ class ColumnAdapter(ClauseAdapter):
         self.allow_label_resolve = allow_label_resolve
         self._wrap = None
 
-    class _IncludeExcludeMapping(object):
+    class _IncludeExcludeMapping:
         def __init__(self, parent, columns):
             self.parent = parent
             self.columns = columns
index 7111c5efd70be0babd915a5f0945147ec902825d..82cb7a253c4bb2a38b34a5aba3e751d755432aa0 100644 (file)
@@ -506,7 +506,7 @@ class ExtendedInternalTraversal(InternalTraversal):
     HasCacheKey objects."""
 
 
-class ExternalTraversal(object):
+class ExternalTraversal:
     """Base class for visitor objects which can traverse externally using
     the :func:`.visitors.traverse` function.
 
index 3aa2649f451b35596b4f83408b02ad36dfd3c48d..ed634befe38aaac4b33e1fd3ea1fe1da0eb72ee3 100644 (file)
@@ -368,7 +368,7 @@ def _assert_raises(
     return ec.error
 
 
-class _ErrorContainer(object):
+class _ErrorContainer:
     error = None
 
 
@@ -414,7 +414,7 @@ def expect_raises_message(except_cls, msg, check_context=True):
     return _expect_raises(except_cls, msg=msg, check_context=check_context)
 
 
-class AssertsCompiledSQL(object):
+class AssertsCompiledSQL:
     def assert_compile(
         self,
         clause,
@@ -496,14 +496,14 @@ class AssertsCompiledSQL(object):
         if compile_kwargs:
             kw["compile_kwargs"] = compile_kwargs
 
-        class DontAccess(object):
+        class DontAccess:
             def __getattribute__(self, key):
                 raise NotImplementedError(
                     "compiler accessed .statement; use "
                     "compiler.current_executable"
                 )
 
-        class CheckCompilerAccess(object):
+        class CheckCompilerAccess:
             def __init__(self, test_statement):
                 self.test_statement = test_statement
                 self._annotations = {}
@@ -596,7 +596,7 @@ class AssertsCompiledSQL(object):
             )
 
 
-class ComparesTables(object):
+class ComparesTables:
     def assert_tables_equal(self, table, reflected_table, strict_types=False):
         assert len(table.c) == len(reflected_table.c)
         for c, reflected_c in zip(table.c, reflected_table.c):
@@ -640,7 +640,7 @@ class ComparesTables(object):
         )
 
 
-class AssertsExecutionResults(object):
+class AssertsExecutionResults:
     def assert_result(self, result, class_, *objects):
         result = list(result)
         print(repr(result))
index 9816c99b7f32885af8ca09f8eef79903268655cf..485a13f82f562dcfa283f18d8c93d5828d395130 100644 (file)
@@ -16,7 +16,7 @@ from ..engine.default import DefaultDialect
 from ..schema import _DDLCompiles
 
 
-class AssertRule(object):
+class AssertRule:
 
     is_consumed = False
     errormessage = None
@@ -382,7 +382,7 @@ class Or(AllOf):
             self.errormessage = list(self.rules)[0].errormessage
 
 
-class SQLExecuteObserved(object):
+class SQLExecuteObserved:
     def __init__(self, context, clauseelement, multiparams, params):
         self.context = context
         self.clauseelement = clauseelement
@@ -408,7 +408,7 @@ class SQLCursorExecuteObserved(
     pass
 
 
-class SQLAsserter(object):
+class SQLAsserter:
     def __init__(self):
         self.accumulated = []
 
index 097eb94e4135971f875c623ee526442e6017f5fa..8faeea6341b1efe958087ee99cc5e2ff60cae681 100644 (file)
@@ -106,7 +106,7 @@ def mark_base_test_class():
     return _fixture_functions.mark_base_test_class()
 
 
-class Config(object):
+class Config:
     def __init__(self, db, db_opts, options, file_config):
         self._set_name(db)
         self.db = db
index 815009e78321972a7880f0e09328f804d6b367de..98de5df5c47fb0b0083caec2dfe2fb79a9928e79 100644 (file)
@@ -19,7 +19,7 @@ from .. import event
 from .. import pool
 
 
-class ConnectionKiller(object):
+class ConnectionKiller:
     def __init__(self):
         self.proxy_refs = weakref.WeakKeyDictionary()
         self.testing_engines = collections.defaultdict(set)
@@ -202,7 +202,7 @@ def all_dialects(exclude=None):
         yield mod.dialect()
 
 
-class ReconnectFixture(object):
+class ReconnectFixture:
     def __init__(self, dbapi):
         self.dbapi = dbapi
         self.connections = []
@@ -362,7 +362,7 @@ def mock_engine(dialect_name=None):
     return engine
 
 
-class DBAPIProxyCursor(object):
+class DBAPIProxyCursor:
     """Proxy a DBAPI cursor.
 
     Tests can provide subclasses of this to intercept
@@ -391,7 +391,7 @@ class DBAPIProxyCursor(object):
         return getattr(self.cursor, key)
 
 
-class DBAPIProxyConnection(object):
+class DBAPIProxyConnection:
     """Proxy a DBAPI connection.
 
     Tests can provide subclasses of this to intercept
index 9daa5c61f80f04f6cf95b8eb32d4ee169ac4aa8c..15b6388fb40a67270230d396c0cadc0474bcb523 100644 (file)
@@ -12,7 +12,7 @@ from ..util import compat
 _repr_stack = set()
 
 
-class BasicEntity(object):
+class BasicEntity:
     def __init__(self, **kw):
         for key, value in kw.items():
             setattr(self, key, value)
@@ -39,7 +39,7 @@ class BasicEntity(object):
 _recursion_stack = set()
 
 
-class ComparableMixin(object):
+class ComparableMixin:
     def __ne__(self, other):
         return not self.__eq__(other)
 
index e8fce5a4c876e7efc063c8c506c46efec32a7b52..7b2343128a45f3e73597098518f1a39fa7feb7b6 100644 (file)
@@ -31,7 +31,7 @@ def fails_if(predicate, reason=None):
     return rule
 
 
-class compound(object):
+class compound:
     def __init__(self):
         self.fails = set()
         self.skips = set()
@@ -186,7 +186,7 @@ def succeeds_if(predicate, reason=None):
     return fails_if(NotPredicate(predicate), reason)
 
 
-class Predicate(object):
+class Predicate:
     @classmethod
     def as_predicate(cls, predicate, description=None):
         if isinstance(predicate, compound):
index 1899e5b7cb70bc4c69d3ddfb2c93b93aec87ec3b..d5e8e376a3aeacf4e83a3a77ac197fe499ebb4f5 100644 (file)
@@ -26,7 +26,7 @@ from ..schema import sort_tables_and_constraints
 
 
 @config.mark_base_test_class()
-class TestBase(object):
+class TestBase:
     # A sequence of requirement names matching testing.requires decorators
     __requires__ = ()
 
@@ -299,7 +299,7 @@ class TestBase(object):
 _connection_fixture_connection = None
 
 
-class FutureEngineMixin(object):
+class FutureEngineMixin:
     """alembic's suite still using this"""
 
 
@@ -504,7 +504,7 @@ class TablesTest(TestBase):
                 )
 
 
-class NoCache(object):
+class NoCache:
     @config.fixture(autouse=True, scope="function")
     def _disable_cache(self):
         _cache = config.db._compiled_cache
@@ -513,7 +513,7 @@ class NoCache(object):
         config.db._compiled_cache = _cache
 
 
-class RemovesEvents(object):
+class RemovesEvents:
     @util.memoized_property
     def _event_fns(self):
         return set()
@@ -704,7 +704,7 @@ class DeclarativeMappedTest(MappedTest):
                 cls_registry[classname] = cls
                 DeclarativeMeta.__init__(cls, classname, bases, dict_)
 
-        class DeclarativeBasic(object):
+        class DeclarativeBasic:
             __table_cls__ = schema.Table
 
         _DeclBase = declarative_base(
index 430cb5fb68730f865ad8f0b12f347379aa91fc77..cf11ab03d6864925ca4117da5f8df8d24f997f1d 100644 (file)
@@ -45,13 +45,13 @@ class Parent(fixtures.ComparableEntity):
     pass
 
 
-class Screen(object):
+class Screen:
     def __init__(self, obj, parent=None):
         self.obj = obj
         self.parent = parent
 
 
-class Foo(object):
+class Foo:
     def __init__(self, moredata, stuff="im stuff"):
         self.data = "im data"
         self.stuff = stuff
@@ -67,7 +67,7 @@ class Foo(object):
         )
 
 
-class Bar(object):
+class Bar:
     def __init__(self, x, y):
         self.x = x
         self.y = y
@@ -104,7 +104,7 @@ class OldSchoolWithoutCompare:
         self.y = y
 
 
-class BarWithoutCompare(object):
+class BarWithoutCompare:
     def __init__(self, x, y):
         self.x = x
         self.y = y
@@ -113,7 +113,7 @@ class BarWithoutCompare(object):
         return "Bar(%d, %d)" % (self.x, self.y)
 
 
-class NotComparable(object):
+class NotComparable:
     def __init__(self, data):
         self.data = data
 
@@ -127,7 +127,7 @@ class NotComparable(object):
         return NotImplemented
 
 
-class BrokenComparable(object):
+class BrokenComparable:
     def __init__(self, data):
         self.data = data
 
index d2e4a0f690ab3e9aec211c5452d6456c68370226..b382e97f63018652625458fb65669a0ca3f064e8 100644 (file)
@@ -38,7 +38,7 @@ else:
     import ConfigParser as configparser
     import collections as collections_abc  # noqa
 
-    class ABC(object):
+    class ABC:
         __metaclass__ = abc.ABCMeta
 
 
index 10344c8d69067858ae61441f87776b8492d12c68..b6a6e75b178c7301f5e572dfeea19253fb8f4e90 100644 (file)
@@ -55,7 +55,7 @@ def _start_current_test(id_):
         _profile_stats.reset_count()
 
 
-class ProfileStatsFile(object):
+class ProfileStatsFile:
     """Store per-platform/fn profiling results in a file.
 
     There was no json module available when this was written, but now
index a911ba69ceea506fc2886834d0321046e5d6eba2..15613957c6611d12acd61388328d7a7649986a8c 100644 (file)
@@ -17,7 +17,7 @@ log = logging.getLogger(__name__)
 FOLLOWER_IDENT = None
 
 
-class register(object):
+class register:
     def __init__(self):
         self.fns = {}
 
index 43849efca04b029a1251477ed9810884ae039dcc..325c0a9bb08b2ec22e72cb91e4316560c1430ff2 100644 (file)
@@ -25,7 +25,7 @@ from .. import util
 from ..pool import QueuePool
 
 
-class Requirements(object):
+class Requirements:
     pass
 
 
index 9b5546ce782e933f5ebd2370a13e2331e61cdc31..60ea5284f91601fbc73fa3caa3aa3c518b49a18e 100644 (file)
@@ -88,7 +88,7 @@ def Column(*args, **kw):
     return col
 
 
-class eq_type_affinity(object):
+class eq_type_affinity:
     """Helper to compare types inside of datastructures based on affinity.
 
     E.g.::
@@ -125,7 +125,7 @@ class eq_type_affinity(object):
         return self.target._type_affinity is not other._type_affinity
 
 
-class eq_clause_element(object):
+class eq_clause_element:
     """Helper to compare SQL structures based on compare()"""
 
     def __init__(self, target):
index aa796df76c0e812e5ac2a2d6c0dc708c917b4ead..4a5396ed82a4723e70fcdf2099f20e29db87f878 100644 (file)
@@ -45,7 +45,7 @@ from ...orm import Session
 from ...util import u
 
 
-class _LiteralRoundTripFixture(object):
+class _LiteralRoundTripFixture:
     supports_whereclause = True
 
     @testing.fixture
index 54ed522d470f9858c447f60be754758d25d38d49..9efbeb7db49ec601fff7fb580d83d3c2ef67b94a 100644 (file)
@@ -24,7 +24,7 @@ from .compat import threading
 EMPTY_SET = frozenset()
 
 
-class ImmutableContainer(object):
+class ImmutableContainer:
     def _immutable(self, *arg, **kw):
         raise TypeError("%s object is immutable" % self.__class__.__name__)
 
@@ -140,7 +140,7 @@ class FacadeDict(ImmutableContainer, dict):
         return "FacadeDict(%s)" % dict.__repr__(self)
 
 
-class Properties(object):
+class Properties:
     """Provide a __getattr__/__setattr__ interface over a dict."""
 
     __slots__ = ("_data",)
@@ -454,7 +454,7 @@ class OrderedSet(set):
     __isub__ = difference_update
 
 
-class IdentitySet(object):
+class IdentitySet:
     """A set that considers only object id() for uniqueness.
 
     This strategy has edge cases for builtin types- it's possible to have
@@ -676,7 +676,7 @@ class IdentitySet(object):
         return "%s(%r)" % (type(self).__name__, list(self._members.values()))
 
 
-class WeakSequence(object):
+class WeakSequence:
     def __init__(self, __elements=()):
         # adapted from weakref.WeakKeyDictionary, prevent reference
         # cycles in the collection itself
@@ -780,7 +780,7 @@ def unique_list(seq, hashfunc=None):
         ]
 
 
-class UniqueAppender(object):
+class UniqueAppender:
     """Appends items to a collection ensuring uniqueness.
 
     Additional appends() of the same object are ignored.  Membership is
@@ -960,7 +960,7 @@ class LRUCache(dict):
             self._mutex.release()
 
 
-class ScopedRegistry(object):
+class ScopedRegistry:
     """A Registry that can store one or multiple instances of a single
     class on the basis of a "scope" function.
 
index 5749b33375b5e1669ac346657e1e561f16d5ca40..75b2a9a8df7191ed475deb7b5f7b5cd06cccd833 100644 (file)
@@ -47,7 +47,7 @@ FullArgSpec = collections.namedtuple(
 )
 
 
-class nullcontext(object):
+class nullcontext:
     """Context manager that does no additional processing.
 
     Vendored from Python 3.7.
@@ -244,7 +244,7 @@ else:
 
     from abc import ABCMeta
 
-    class ABC(object):
+    class ABC:
         __metaclass__ = ABCMeta
 
     try:
index 84c5fddec98883a15c83cfe26272336475fa0f08..ac2c6e6a4282d76d6db17dfa8c4ed65858ac0d59 100644 (file)
@@ -35,7 +35,7 @@ def md5_hex(x):
     return m.hexdigest()
 
 
-class safe_reraise(object):
+class safe_reraise:
     """Reraise an exception after invoking some
     handler code.
 
@@ -316,7 +316,7 @@ def %(name)s(%(args)s):
     return decorated
 
 
-class PluginLoader(object):
+class PluginLoader:
     def __init__(self, group, auto_fn=None):
         self.group = group
         self.impls = {}
@@ -845,7 +845,7 @@ def generic_repr(obj, additional_kw=(), to_inspect=None, omit_kwarg=()):
     return "%s(%s)" % (obj.__class__.__name__, ", ".join(output))
 
 
-class portable_instancemethod(object):
+class portable_instancemethod:
     """Turn an instancemethod into a (parent, name) pair
     to produce a serializable callable.
 
@@ -1063,7 +1063,7 @@ def as_interface(obj, cls=None, methods=None, required=None):
             % (obj, qualifier, ", ".join(interface))
         )
 
-    class AnonymousInterface(object):
+    class AnonymousInterface:
         """A callable-holding shell."""
 
     if cls:
@@ -1087,7 +1087,7 @@ def as_interface(obj, cls=None, methods=None, required=None):
     )
 
 
-class memoized_property(object):
+class memoized_property:
     """A read-only @property that is only evaluated once."""
 
     def __init__(self, fget, doc=None):
@@ -1132,7 +1132,7 @@ def memoized_instancemethod(fn):
     return update_wrapper(oneshot, fn)
 
 
-class HasMemoized(object):
+class HasMemoized:
     """A class that maintains the names of memoized elements in a
     collection for easy cache clearing, generative, etc.
 
@@ -1154,7 +1154,7 @@ class HasMemoized(object):
         self.__dict__[key] = value
         self._memoized_keys |= {key}
 
-    class memoized_attribute(object):
+    class memoized_attribute:
         """A read-only @property that is only evaluated once."""
 
         def __init__(self, fget, doc=None):
@@ -1188,7 +1188,7 @@ class HasMemoized(object):
         return update_wrapper(oneshot, fn)
 
 
-class MemoizedSlots(object):
+class MemoizedSlots:
     """Apply memoized items to an object using a __getattr__ scheme.
 
     This allows the functionality of memoized_property and
@@ -1420,7 +1420,7 @@ class classproperty(property):
         return desc.fget(cls)
 
 
-class hybridproperty(object):
+class hybridproperty:
     def __init__(self, func):
         self.func = func
         self.clslevel = func
@@ -1437,7 +1437,7 @@ class hybridproperty(object):
         return self
 
 
-class hybridmethod(object):
+class hybridmethod:
     """Decorate a function as cls- or instance- level."""
 
     def __init__(self, func):
@@ -1480,7 +1480,7 @@ class _symbol(int):
 _symbol.__name__ = "symbol"
 
 
-class symbol(object):
+class symbol:
     """A constant symbol.
 
     >>> symbol('foo') is symbol('foo')
index 518b215dd680ec93d1d52989a1f2b718af2911d4..a876108a6093c39238ef8454658cc32c33d4eaf4 100644 (file)
@@ -335,7 +335,7 @@ class MemUsageTest(EnsureZeroed):
 
     @testing.fails()
     def test_fixture_failure(self):
-        class Foo(object):
+        class Foo:
             pass
 
         stuff = []
@@ -356,7 +356,7 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
     # ensure a pure growing test trips the assertion
     @testing.fails_if(lambda: True)
     def test_fixture(self):
-        class Foo(object):
+        class Foo:
             pass
 
         x = []
@@ -556,7 +556,7 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
             *[Column("col%d" % i, Integer) for i in range(10)]
         )
 
-        class Wide(object):
+        class Wide:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -604,7 +604,7 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
             ),
         )
 
-        class SomeClass(object):
+        class SomeClass:
             pass
 
         self.mapper_registry.map_imperatively(SomeClass, some_table)
@@ -1021,7 +1021,7 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
             Column("t1id", ForeignKey("t1.id")),
         )
 
-        class T1(object):
+        class T1:
             pass
 
         t1_mapper = self.mapper_registry.map_imperatively(T1, t1)
@@ -1029,7 +1029,7 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
         @testing.emits_warning()
         @profile_memory()
         def go():
-            class T2(object):
+            class T2:
                 pass
 
             t2_mapper = self.mapper_registry.map_imperatively(T2, t2)
@@ -1065,10 +1065,10 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
             Column("t1id", Integer, ForeignKey("table1.id")),
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -1119,10 +1119,10 @@ class MemUsageWBackendTest(fixtures.MappedTest, EnsureZeroed):
             Column("t1id", Integer, ForeignKey("table1.id")),
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -1203,7 +1203,7 @@ class CycleTest(_fixtures.FixtureTest):
 
         users = self.tables.users
 
-        class Foo(object):
+        class Foo:
             @hybrid.hybrid_property
             def user_name(self):
                 return self.name
@@ -1593,7 +1593,7 @@ class CycleTest(_fixtures.FixtureTest):
         go()
 
     def test_weak_sequence(self):
-        class Foo(object):
+        class Foo:
             pass
 
         f = Foo()
index 3d6700542e3e238dac2a39f8d9e10e74aa85c192..4f811e69ad7009e41e233a08ba5b5459bbe5c1eb 100644 (file)
@@ -20,7 +20,7 @@ class EnumTest(fixtures.TestBase):
     __requires__ = ("cpython", "python_profiling_backend")
 
     def setup_test(self):
-        class SomeEnum(object):
+        class SomeEnum:
             # Implements PEP 435 in the minimal fashion needed by SQLAlchemy
 
             _members = {}
index 2b1a490c24f1121ca322434842e99c92917a7699..374fa23820bd7b9cd8b5403cd0f322d49fbddcfb 100644 (file)
@@ -10,7 +10,7 @@ pool = None
 class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults):
     __requires__ = ("cpython", "python_profiling_backend")
 
-    class Connection(object):
+    class Connection:
         def rollback(self):
             pass
 
index 83788ce4648c4b3b20ae9eb8ea0d8766bbc99593..1f777e42e43e2bc464799b2d93355310b54d9033 100644 (file)
@@ -211,7 +211,7 @@ class RowTest(fixtures.TestBase):
     __backend__ = True
 
     def _rowproxy_fixture(self, keys, processors, row, row_cls):
-        class MockMeta(object):
+        class MockMeta:
             def __init__(self):
                 pass
 
@@ -260,7 +260,7 @@ class RowTest(fixtures.TestBase):
         self._test_getitem_value_refcounts_new(tuple)
 
     def test_value_refcounts_custom_seq(self):
-        class CustomSeq(object):
+        class CustomSeq:
             def __init__(self, data):
                 self.data = data
 
index d38f61c1ea9d1947edd1a60b567e5ca3f1871122..c94de7dd511d9f3a6ec3935e4177ba9da7128510 100644 (file)
@@ -15,7 +15,7 @@ from sqlalchemy.testing.mock import Mock
 from sqlalchemy.testing.util import gc_collect
 
 
-class TearDownLocalEventsFixture(object):
+class TearDownLocalEventsFixture:
     def teardown_test(self):
         classes = set()
         for entry in event.base._registrars.values():
@@ -41,7 +41,7 @@ class EventsTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_three(self, x):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         self.Target = Target
@@ -269,7 +269,7 @@ class EventsTest(TearDownLocalEventsFixture, fixtures.TestBase):
 
 class SlotsEventsTest(fixtures.TestBase):
     def test_no_slots_dispatch(self):
-        class Target(object):
+        class Target:
             __slots__ = ()
 
         class TargetEvents(event.Events):
@@ -294,7 +294,7 @@ class SlotsEventsTest(fixtures.TestBase):
             event.listen(t1, "event_one", Mock())
 
     def test_slots_dispatch(self):
-        class Target(object):
+        class Target:
             __slots__ = ("_slots_dispatch",)
 
         class TargetEvents(event.Events):
@@ -331,7 +331,7 @@ class NamedCallTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_five(self, x, y, z, q):
                 pass
 
-        class TargetOne(object):
+        class TargetOne:
             dispatch = event.dispatcher(TargetEventsOne)
 
         return TargetOne
@@ -355,7 +355,7 @@ class NamedCallTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_five(self, x, y, z, q):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         return Target
@@ -453,7 +453,7 @@ class LegacySignatureTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_six(self, x, y):
                 pass
 
-        class TargetOne(object):
+        class TargetOne:
             dispatch = event.dispatcher(TargetEventsOne)
 
         self.TargetOne = TargetOne
@@ -556,7 +556,7 @@ class LegacySignatureTest(TearDownLocalEventsFixture, fixtures.TestBase):
     def test_legacy_accept_from_method(self):
         canary = Mock()
 
-        class MyClass(object):
+        class MyClass:
             def handler1(self, x, y):
                 canary(x, y)
 
@@ -612,7 +612,7 @@ class ClsLevelListenTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, x, y):
                 pass
 
-        class TargetOne(object):
+        class TargetOne:
             dispatch = event.dispatcher(TargetEventsOne)
 
         self.TargetOne = TargetOne
@@ -685,10 +685,10 @@ class AcceptTargetsTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, x, y):
                 pass
 
-        class TargetOne(object):
+        class TargetOne:
             dispatch = event.dispatcher(TargetEventsOne)
 
-        class TargetTwo(object):
+        class TargetTwo:
             dispatch = event.dispatcher(TargetEventsTwo)
 
         self.TargetOne = TargetOne
@@ -745,7 +745,7 @@ class CustomTargetsTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, x, y):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         self.Target = Target
@@ -775,7 +775,7 @@ class SubclassGrowthTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def some_event(self, x, y):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         self.Target = Target
@@ -813,7 +813,7 @@ class ListenOverrideTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, x, y):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         self.Target = Target
@@ -862,7 +862,7 @@ class PropagateTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_two(self, arg):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         self.Target = Target
@@ -893,7 +893,7 @@ class JoinTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, target, arg):
                 pass
 
-        class BaseTarget(object):
+        class BaseTarget:
             dispatch = event.dispatcher(TargetEvents)
 
         class TargetFactory(BaseTarget):
@@ -1113,7 +1113,7 @@ class DisableClsPropagateTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, target, arg):
                 pass
 
-        class BaseTarget(object):
+        class BaseTarget:
             dispatch = event.dispatcher(TargetEvents)
 
         class SubTarget(BaseTarget):
@@ -1171,7 +1171,7 @@ class RemovalTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_three(self, x):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         return Target
@@ -1192,7 +1192,7 @@ class RemovalTest(TearDownLocalEventsFixture, fixtures.TestBase):
             def event_one(self, x):
                 pass
 
-        class Target(object):
+        class Target:
             dispatch = event.dispatcher(TargetEvents)
 
         return Target
@@ -1235,7 +1235,7 @@ class RemovalTest(TearDownLocalEventsFixture, fixtures.TestBase):
     def test_instance(self):
         Target = self._fixture()
 
-        class Foo(object):
+        class Foo:
             def __init__(self):
                 self.mock = Mock()
 
index 252d0d9777dd9cbc0e8c0695cd705ee9f3047367..fd433ce99aa16499b41b80459f8efd200218e647 100644 (file)
@@ -8,7 +8,7 @@ from sqlalchemy.testing import eq_
 from sqlalchemy.testing import fixtures
 
 
-class TestFixture(object):
+class TestFixture:
     pass
 
 
@@ -45,7 +45,7 @@ class TestInspection(fixtures.TestBase):
         class SomeFoo(TestFixture):
             pass
 
-        class SomeFooInspect(object):
+        class SomeFooInspect:
             def __init__(self, target):
                 self.target = target
 
index 2393a7f913487fe000f1008f31954792a323bd40..c8c51b0b5f0b042874d23d89720ab4562212489a 100644 (file)
@@ -14,7 +14,7 @@ class DocTest(fixtures.TestBase):
     def _setup_logger(self):
         rootlogger = logging.getLogger("sqlalchemy.engine.Engine")
 
-        class MyStream(object):
+        class MyStream:
             def write(self, string):
                 sys.stdout.write(string)
                 sys.stdout.flush()
index 81e402d93dbc255dfdae0ed1801ec720351e0feb..8674f477968f6149d394ed310358a698581649ef 100644 (file)
@@ -35,7 +35,7 @@ from sqlalchemy.util import WeakSequence
 class WeakSequenceTest(fixtures.TestBase):
     @testing.requires.predictable_gc
     def test_cleanout_elements(self):
-        class Foo(object):
+        class Foo:
             pass
 
         f1, f2, f3 = Foo(), Foo(), Foo()
@@ -49,7 +49,7 @@ class WeakSequenceTest(fixtures.TestBase):
 
     @testing.requires.predictable_gc
     def test_cleanout_appended(self):
-        class Foo(object):
+        class Foo:
             pass
 
         f1, f2, f3 = Foo(), Foo(), Foo()
@@ -273,7 +273,7 @@ class MemoizedAttrTest(fixtures.TestBase):
     def test_memoized_property(self):
         val = [20]
 
-        class Foo(object):
+        class Foo:
             @util.memoized_property
             def bar(self):
                 v = val[0]
@@ -291,7 +291,7 @@ class MemoizedAttrTest(fixtures.TestBase):
     def test_memoized_instancemethod(self):
         val = [20]
 
-        class Foo(object):
+        class Foo:
             @util.memoized_instancemethod
             def bar(self):
                 v = val[0]
@@ -354,7 +354,7 @@ class WrapCallableTest(fixtures.TestBase):
         eq_(c.__doc__, None)
 
     def test_wrapping_update_wrapper_cls(self):
-        class MyFancyDefault(object):
+        class MyFancyDefault:
             """a fancy default"""
 
             def __call__(self):
@@ -368,7 +368,7 @@ class WrapCallableTest(fixtures.TestBase):
         eq_(c.__doc__, "run the fancy default")
 
     def test_wrapping_update_wrapper_cls_noclsdocstring(self):
-        class MyFancyDefault(object):
+        class MyFancyDefault:
             def __call__(self):
                 """run the fancy default"""
                 return 10
@@ -379,7 +379,7 @@ class WrapCallableTest(fixtures.TestBase):
         eq_(c.__doc__, "run the fancy default")
 
     def test_wrapping_update_wrapper_cls_nomethdocstring(self):
-        class MyFancyDefault(object):
+        class MyFancyDefault:
             """a fancy default"""
 
             def __call__(self):
@@ -391,7 +391,7 @@ class WrapCallableTest(fixtures.TestBase):
         eq_(c.__doc__, "a fancy default")
 
     def test_wrapping_update_wrapper_cls_noclsdocstring_nomethdocstring(self):
-        class MyFancyDefault(object):
+        class MyFancyDefault:
             def __call__(self):
                 return 10
 
@@ -1144,7 +1144,7 @@ class DedupeColumnCollectionTest(ColumnCollectionCommon, fixtures.TestBase):
 
 class LRUTest(fixtures.TestBase):
     def test_lru(self):
-        class item(object):
+        class item:
             def __init__(self, id_):
                 self.id = id_
 
@@ -1217,7 +1217,7 @@ class FlattenIteratorTest(fixtures.TestBase):
         assert list(util.flatten_iterator(iter_list)) == ["asdf", "x", "y"]
 
 
-class HashOverride(object):
+class HashOverride:
     def __init__(self, value=None):
         self.value = value
 
@@ -1225,14 +1225,14 @@ class HashOverride(object):
         return hash(self.value)
 
 
-class NoHash(object):
+class NoHash:
     def __init__(self, value=None):
         self.value = value
 
     __hash__ = None
 
 
-class EqOverride(object):
+class EqOverride:
     def __init__(self, value=None):
         self.value = value
 
@@ -1251,7 +1251,7 @@ class EqOverride(object):
             return True
 
 
-class HashEqOverride(object):
+class HashEqOverride:
     def __init__(self, value=None):
         self.value = value
 
@@ -1881,21 +1881,21 @@ class DictlikeIteritemsTest(fixtures.TestBase):
         self._notok(object())
 
     def test_duck_2(self):
-        class duck2(object):
+        class duck2:
             def items(duck):
                 return list(self.baseline)
 
         self._ok(duck2())
 
     def test_duck_4(self):
-        class duck4(object):
+        class duck4:
             def iterkeys(duck):
                 return iter(["a", "b", "c"])
 
         self._notok(duck4())
 
     def test_duck_5(self):
-        class duck5(object):
+        class duck5:
             def keys(duck):
                 return ["a", "b", "c"]
 
@@ -1905,7 +1905,7 @@ class DictlikeIteritemsTest(fixtures.TestBase):
         self._ok(duck5())
 
     def test_duck_6(self):
-        class duck6(object):
+        class duck6:
             def keys(duck):
                 return ["a", "b", "c"]
 
@@ -1914,7 +1914,7 @@ class DictlikeIteritemsTest(fixtures.TestBase):
 
 class DuckTypeCollectionTest(fixtures.TestBase):
     def test_sets(self):
-        class SetLike(object):
+        class SetLike:
             def add(self):
                 pass
 
@@ -1934,7 +1934,7 @@ class DuckTypeCollectionTest(fixtures.TestBase):
 
 class PublicFactoryTest(fixtures.TestBase):
     def _fixture(self):
-        class Thingy(object):
+        class Thingy:
             def __init__(self, value):
                 "make a thingy"
                 self.value = value
@@ -1969,7 +1969,7 @@ class PublicFactoryTest(fixtures.TestBase):
 
 class ArgInspectionTest(fixtures.TestBase):
     def test_get_cls_kwargs(self):
-        class A(object):
+        class A:
             def __init__(self, a):
                 pass
 
@@ -1981,7 +1981,7 @@ class ArgInspectionTest(fixtures.TestBase):
             def __init__(self, a11, **kw):
                 pass
 
-        class B(object):
+        class B:
             def __init__(self, b, **kw):
                 pass
 
@@ -2022,7 +2022,7 @@ class ArgInspectionTest(fixtures.TestBase):
         class CB2A(B2, A):
             pass
 
-        class D(object):
+        class D:
             pass
 
         class BA2(B, A):
@@ -2113,7 +2113,7 @@ class ArgInspectionTest(fixtures.TestBase):
         assert_raises(TypeError, get_callable_argspec, object)
 
     def test_callable_argspec_method(self):
-        class Foo(object):
+        class Foo:
             def foo(self, x, y, **kw):
                 pass
 
@@ -2125,7 +2125,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_instance_method_no_self(self):
-        class Foo(object):
+        class Foo:
             def foo(self, x, y, **kw):
                 pass
 
@@ -2135,7 +2135,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_unbound_method_no_self(self):
-        class Foo(object):
+        class Foo:
             def foo(self, x, y, **kw):
                 pass
 
@@ -2147,7 +2147,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_init(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, x, y):
                 pass
 
@@ -2159,7 +2159,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_init_no_self(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, x, y):
                 pass
 
@@ -2169,7 +2169,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_call(self):
-        class Foo(object):
+        class Foo:
             def __call__(self, x, y):
                 pass
 
@@ -2181,7 +2181,7 @@ class ArgInspectionTest(fixtures.TestBase):
         )
 
     def test_callable_argspec_call_no_self(self):
-        class Foo(object):
+        class Foo:
             def __call__(self, x, y):
                 pass
 
@@ -2335,7 +2335,7 @@ class SymbolTest(fixtures.TestBase):
         )
 
 
-class _Py3KFixtures(object):
+class _Py3KFixtures:
     def _kw_only_fixture(self):
         pass
 
@@ -2647,18 +2647,18 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase):
                 parsed = util.format_argspec_init(fn, grouped=grouped)
             eq_(parsed, wanted)
 
-        class Obj(object):
+        class Obj:
             pass
 
         test(Obj.__init__, object_spec)
 
-        class Obj(object):
+        class Obj:
             def __init__(self):
                 pass
 
         test(Obj.__init__, object_spec)
 
-        class Obj(object):
+        class Obj:
             def __init__(slef, a=123):
                 pass
 
@@ -2690,7 +2690,7 @@ class TestFormatArgspec(_Py3KFixtures, fixtures.TestBase):
 
 class GenericReprTest(fixtures.TestBase):
     def test_all_positional(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, c):
                 self.a = a
                 self.b = b
@@ -2699,7 +2699,7 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 2, 3)), "Foo(1, 2, 3)")
 
     def test_positional_plus_kw(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, c=5, d=4):
                 self.a = a
                 self.b = b
@@ -2709,7 +2709,7 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 2, 3, 6)), "Foo(1, 2, c=3, d=6)")
 
     def test_kw_defaults(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a=1, b=2, c=3, d=4):
                 self.a = a
                 self.b = b
@@ -2719,7 +2719,7 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 5, 3, 7)), "Foo(b=5, d=7)")
 
     def test_multi_kw(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, c=3, d=4):
                 self.a = a
                 self.b = b
@@ -2746,7 +2746,7 @@ class GenericReprTest(fixtures.TestBase):
         )
 
     def test_multi_kw_repeated(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a=1, b=2):
                 self.a = a
                 self.b = b
@@ -2762,7 +2762,7 @@ class GenericReprTest(fixtures.TestBase):
         )
 
     def test_discard_vargs(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, *args):
                 self.a = a
                 self.b = b
@@ -2771,7 +2771,7 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 2, 3, 4)), "Foo(1, 2)")
 
     def test_discard_vargs_kwargs(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, *args, **kw):
                 self.a = a
                 self.b = b
@@ -2780,7 +2780,7 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 2, 3, 4, x=7, y=4)), "Foo(1, 2)")
 
     def test_significant_vargs(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, a, b, *args):
                 self.a = a
                 self.b = b
@@ -2789,21 +2789,21 @@ class GenericReprTest(fixtures.TestBase):
         eq_(util.generic_repr(Foo(1, 2, 3, 4)), "Foo(1, 2, 3, 4)")
 
     def test_no_args(self):
-        class Foo(object):
+        class Foo:
             def __init__(self):
                 pass
 
         eq_(util.generic_repr(Foo()), "Foo()")
 
     def test_no_init(self):
-        class Foo(object):
+        class Foo:
             pass
 
         eq_(util.generic_repr(Foo()), "Foo()")
 
 
 class AsInterfaceTest(fixtures.TestBase):
-    class Something(object):
+    class Something:
         def _ignoreme(self):
             pass
 
@@ -2813,11 +2813,11 @@ class AsInterfaceTest(fixtures.TestBase):
         def bar(self):
             pass
 
-    class Partial(object):
+    class Partial:
         def bar(self):
             pass
 
-    class Object(object):
+    class Object:
         pass
 
     def test_no_cls_no_methods(self):
@@ -2931,10 +2931,10 @@ class TestClassHierarchy(fixtures.TestBase):
         eq_(set(util.class_hierarchy(object)), set((object,)))
 
     def test_single(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         eq_(set(util.class_hierarchy(A)), set((A, object)))
@@ -3009,7 +3009,7 @@ class ReraiseTest(fixtures.TestBase):
 
 class TestClassProperty(fixtures.TestBase):
     def test_simple(self):
-        class A(object):
+        class A:
             something = {"foo": 1}
 
         class B(A):
@@ -3269,7 +3269,7 @@ class TestModuleRegistry(fixtures.TestBase):
 
 class MethodOveriddenTest(fixtures.TestBase):
     def test_subclass_overrides_cls_given(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3280,7 +3280,7 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_true(util.method_is_overridden(Bar, Foo.bar))
 
     def test_subclass_overrides(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3291,7 +3291,7 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_true(util.method_is_overridden(Bar(), Foo.bar))
 
     def test_subclass_overrides_skiplevel(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3305,7 +3305,7 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_true(util.method_is_overridden(Bat(), Foo.bar))
 
     def test_subclass_overrides_twolevels(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3319,7 +3319,7 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_true(util.method_is_overridden(Bat(), Foo.bar))
 
     def test_subclass_doesnt_override_cls_given(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3329,7 +3329,7 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_false(util.method_is_overridden(Bar, Foo.bar))
 
     def test_subclass_doesnt_override(self):
-        class Foo(object):
+        class Foo:
             def bar(self):
                 pass
 
@@ -3339,10 +3339,10 @@ class MethodOveriddenTest(fixtures.TestBase):
         is_false(util.method_is_overridden(Bar(), Foo.bar))
 
     def test_subclass_overrides_multi_mro(self):
-        class Base(object):
+        class Base:
             pass
 
-        class Foo(object):
+        class Foo:
             pass
 
         class Bat(Base):
index 63b2551cd54a8c429ea9c17ccb8cb333b9aa7166..3576a9fc2a6b1c5eb48bff3a986f0b92fab8ae50 100644 (file)
@@ -373,7 +373,7 @@ class QueryTest(testing.AssertsExecutionResults, fixtures.TestBase):
         eq_(connection.scalar(table.select()), 7)
 
 
-class Foo(object):
+class Foo:
     def __init__(self, **kw):
         for k in kw:
             setattr(self, k, kw[k])
index 7bdf6f8ceb7557592ecad0cc3cbd99920986de6c..c83de7f49e9cf28129ae8a9cb7abd283ebda2b04 100644 (file)
@@ -778,7 +778,7 @@ class EnumSetTest(
     __dialect__ = mysql.dialect()
     __backend__ = True
 
-    class SomeEnum(object):
+    class SomeEnum:
         # Implements PEP 435 in the minimal fashion needed by SQLAlchemy
         __members__ = OrderedDict()
 
index cbbb7be7c9a00e8d9c622831b061397e5a193d01..7034720559c08c0636a093d64c0e32b54bf814d4 100644 (file)
@@ -64,7 +64,7 @@ class DialectTypesTest(fixtures.TestBase, AssertsCompiledSQL):
         from setting up cx_oracle.CLOBs on
         string-based bind params [ticket:793]."""
 
-        class FakeDBAPI(object):
+        class FakeDBAPI:
             def __getattr__(self, attr):
                 return attr
 
@@ -1190,7 +1190,7 @@ class SetInputSizesTest(fixtures.TestBase):
         )
         t3 = Table("t3", m, Column("foo", TestTypeDec()))
 
-        class CursorWrapper(object):
+        class CursorWrapper:
             # cx_oracle cursor can't be modified so we have to
             # invent a whole wrapping scheme
 
index 46adc62e52e79991799c544e9ebc5e27ee4a1f7e..93513c39dbe1e0f7b3dd5a3351a79fd0fe8c52b2 100644 (file)
@@ -2799,7 +2799,7 @@ class DistinctOnTest(fixtures.MappedTest, AssertsCompiledSQL):
     def test_query_on_columns_subquery(self):
         sess = Session()
 
-        class Foo(object):
+        class Foo:
             pass
 
         clear_mappers()
@@ -2817,7 +2817,7 @@ class DistinctOnTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_query_distinct_on_aliased(self):
-        class Foo(object):
+        class Foo:
             pass
 
         self.mapper_registry.map_imperatively(Foo, self.table)
index 47a4728b4300bafa19ee4d59ac009f341fa4d6f4..7d4ea2ced1455d5ca398d1830e53126764475178 100644 (file)
@@ -278,7 +278,7 @@ class PGCodeTest(fixtures.TestBase):
             eq_(errmsg.orig.sqlstate, "23505")
 
 
-class ExecuteManyMode(object):
+class ExecuteManyMode:
     __only_on__ = "postgresql+psycopg2"
     __backend__ = True
 
index 508f691c51413308bc5565bca1084a1df9b8bf2f..8adc91a17d9feafde2e3633eb69183a8cec4522d 100644 (file)
@@ -281,7 +281,7 @@ class OnConflictTest(fixtures.TablesTest):
     def test_on_conflict_do_update_clauseelem_as_key_set(self, connection):
         users = self.tables.users
 
-        class MyElem(object):
+        class MyElem:
             def __init__(self, expr):
                 self.expr = expr
 
index fa90ec212fcfaa03cd064aaa52df019f56eba48f..2bfce557fe876a130dde7710ba7169a364f31d04 100644 (file)
@@ -40,7 +40,7 @@ from sqlalchemy.testing.assertions import is_
 from sqlalchemy.testing.assertions import is_true
 
 
-class ReflectionFixtures(object):
+class ReflectionFixtures:
     @testing.fixture(
         params=[
             ("engine", True),
@@ -1773,7 +1773,7 @@ class ReflectionTest(
 
 
 class CustomTypeReflectionTest(fixtures.TestBase):
-    class CustomType(object):
+    class CustomType:
         def __init__(self, arg1=None, arg2=None):
             self.arg1 = arg1
             self.arg2 = arg2
index 473e144550801f8e7d2ffc105e275d4f98f2cbfe..4c0b91f93d11ff84af035e17bc750e6c8d4a8741 100644 (file)
@@ -1437,7 +1437,7 @@ AnEnum("Bar", 2)
 AnEnum("Baz", 3)
 
 
-class ArrayRoundTripTest(object):
+class ArrayRoundTripTest:
 
     __only_on__ = "postgresql"
     __backend__ = True
@@ -3189,7 +3189,7 @@ class HStoreRoundTripTest(fixtures.TablesTest):
         self._assert_data([{r"key \"foo\"": r'value \"bar"\ xyz'}], connection)
 
     def test_orm_round_trip(self, registry):
-        class Data(object):
+        class Data:
             def __init__(self, name, data):
                 self.name = name
                 self.data = data
@@ -3446,7 +3446,7 @@ class _RangeTypeRoundTrip(fixtures.TablesTest):
         eq_(data, [(self._data_obj().__class__(empty=True),)])
 
 
-class _Int4RangeTests(object):
+class _Int4RangeTests:
 
     _col_type = INT4RANGE
     _col_str = "INT4RANGE"
@@ -3458,7 +3458,7 @@ class _Int4RangeTests(object):
         return self.extras().NumericRange(1, 2)
 
 
-class _Int8RangeTests(object):
+class _Int8RangeTests:
 
     _col_type = INT8RANGE
     _col_str = "INT8RANGE"
@@ -3472,7 +3472,7 @@ class _Int8RangeTests(object):
         )
 
 
-class _NumRangeTests(object):
+class _NumRangeTests:
 
     _col_type = NUMRANGE
     _col_str = "NUMRANGE"
@@ -3486,7 +3486,7 @@ class _NumRangeTests(object):
         )
 
 
-class _DateRangeTests(object):
+class _DateRangeTests:
 
     _col_type = DATERANGE
     _col_str = "DATERANGE"
@@ -3500,7 +3500,7 @@ class _DateRangeTests(object):
         )
 
 
-class _DateTimeRangeTests(object):
+class _DateTimeRangeTests:
 
     _col_type = TSRANGE
     _col_str = "TSRANGE"
@@ -3515,7 +3515,7 @@ class _DateTimeRangeTests(object):
         )
 
 
-class _DateTimeTZRangeTests(object):
+class _DateTimeTZRangeTests:
 
     _col_type = TSTZRANGE
     _col_str = "TSTZRANGE"
index ca203ad8cbf3303bbb63a5394f37bb43e43fe897..f827533d48ac4c1ea31118ad70b8741d23bc14f6 100644 (file)
@@ -2962,7 +2962,7 @@ class OnConflictTest(fixtures.TablesTest):
     def test_on_conflict_do_update_clauseelem_keys(self, connection):
         users = self.tables.users
 
-        class MyElem(object):
+        class MyElem:
             def __init__(self, expr):
                 self.expr = expr
 
index 3ca763c320cf6dff89a2cf904a8e616c21892ec9..e1c86444d55ba2e0e3bc35270806034405688fde 100644 (file)
@@ -60,7 +60,7 @@ class SomeException(Exception):
     pass
 
 
-class Foo(object):
+class Foo:
     def __str__(self):
         return "foo"
 
index 1c730334aa37f4db58622b3124d91d14fb17b70a..b1a099d31f962084fc2649e766447e2c3688a506 100644 (file)
@@ -384,7 +384,7 @@ class PoolDialectTest(PoolTestBase):
     def _dialect(self):
         canary = []
 
-        class PoolDialect(object):
+        class PoolDialect:
             is_async = False
 
             def do_rollback(self, dbapi_connection):
index e18f1c446ac137822ae7b9b78ce83be7b1515f92..e3be847e8aa69cfa0b27f0cc0e6774217895a749 100644 (file)
@@ -1560,7 +1560,7 @@ class ConnectionCharacteristicTest(fixtures.TestBase):
         )
 
 
-class ResetFixture(object):
+class ResetFixture:
     @testing.fixture()
     def reset_agent(self, testing_engine):
         engine = testing_engine()
index 130c127389108e04e30c77f80022e04bcf0566d3..58ad2fced6cf07bbeb1e64b41f91abd60d34cb32 100644 (file)
@@ -13,7 +13,7 @@ from sqlalchemy.testing import is_true
 
 class TestInstrumentDeclarative(fixtures.TestBase):
     def test_ok(self):
-        class Foo(object):
+        class Foo:
             __tablename__ = "foo"
             id = sa.Column(sa.Integer, primary_key=True)
 
@@ -50,7 +50,7 @@ class DeprecatedImportsTest(fixtures.TestBase):
         with self._expect_warning("as_declarative"):
 
             @legacy_decl.as_declarative()
-            class Base(object):
+            class Base:
                 pass
 
         class Foo(Base):
@@ -61,7 +61,7 @@ class DeprecatedImportsTest(fixtures.TestBase):
 
     def test_has_inherited_table(self, registry):
         @registry.mapped
-        class Foo(object):
+        class Foo:
             __tablename__ = "foo"
             id = sa.Column(sa.Integer, primary_key=True)
 
@@ -80,7 +80,7 @@ class DeprecatedImportsTest(fixtures.TestBase):
         with self._expect_warning("synonym_for"):
 
             @registry.mapped
-            class Foo(object):
+            class Foo:
                 __tablename__ = "foo"
                 id = sa.Column(sa.Integer, primary_key=True)
 
index ee2f258cbef2a5354bb7f4acf65e5393e681b989..08f08f913c9bbd6475dcc72fc4b237a246b25f87 100644 (file)
@@ -11,7 +11,7 @@ from sqlalchemy.sql.schema import ForeignKey
 
 
 @as_declarative()
-class Base(object):
+class Base:
     updated_at = Column(Integer)
 
 
index efba8c362a5ab18b2a905062ac25aa3e33f8a7be..ba62e7276cc22d3d5a3f2c021a2b179d649d4cc3 100644 (file)
@@ -7,7 +7,7 @@ reg: registry = registry()
 
 
 @reg.as_declarative_base()
-class Base(object):
+class Base:
     updated_at = Column(Integer)
 
 
index c40dd273abb499c058584aee8a2605638d86fbfb..31696458ee614ccc329bef94f7491d404ee3172e 100644 (file)
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
 
 
 @as_declarative()
-class Base(object):
+class Base:
     @declared_attr
     def __tablename__(self) -> Mapped[str]:
         return self.__name__.lower()
index 0b05fe0387e16de3dfc985b2cb7878710ffadb1a..ae5e6c84837423e8b43fbd2814825ed7cbf10106 100644 (file)
@@ -60,7 +60,7 @@ class ListCollection(list):
     pass
 
 
-class ObjectCollection(object):
+class ObjectCollection:
     def __init__(self):
         self.values = list()
 
@@ -103,14 +103,14 @@ class AutoFlushTest(fixtures.MappedTest):
         )
 
     def _fixture(self, collection_class, is_dict=False):
-        class Parent(object):
+        class Parent:
             collection = association_proxy("_collection", "child")
 
-        class Child(object):
+        class Child:
             def __init__(self, name):
                 self.name = name
 
-        class Association(object):
+        class Association:
             if is_dict:
 
                 def __init__(self, key, child):
@@ -974,7 +974,7 @@ class ScalarTest(fixtures.MappedTest):
             Column("baz", String(128)),
         )
 
-        class Parent(object):
+        class Parent:
             foo = association_proxy("child", "foo")
             bar = association_proxy(
                 "child", "bar", creator=lambda v: Child(bar=v)
@@ -986,7 +986,7 @@ class ScalarTest(fixtures.MappedTest):
             def __init__(self, name):
                 self.name = name
 
-        class Child(object):
+        class Child:
             def __init__(self, **kw):
                 for attr in kw:
                     setattr(self, attr, kw[attr])
@@ -1095,14 +1095,14 @@ class ScalarTest(fixtures.MappedTest):
             Column("name", String(50)),
         )
 
-        class A(object):
+        class A:
             a2b_name = association_proxy("a2b_single", "name")
             b_single = association_proxy("a2b_single", "b")
 
-        class A2B(object):
+        class A2B:
             pass
 
-        class B(object):
+        class B:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -1136,12 +1136,12 @@ class ScalarTest(fixtures.MappedTest):
         get = Mock()
         set_ = Mock()
 
-        class Parent(object):
+        class Parent:
             foo = association_proxy(
                 "child", "foo", getset_factory=lambda cc, parent: (get, set_)
             )
 
-        class Child(object):
+        class Child:
             def __init__(self, foo):
                 self.foo = foo
 
@@ -1319,17 +1319,17 @@ class LazyLoadTest(fixtures.MappedTest):
         self.assert_(p._children is not None)
 
 
-class Parent(object):
+class Parent:
     def __init__(self, name):
         self.name = name
 
 
-class Child(object):
+class Child:
     def __init__(self, name):
         self.name = name
 
 
-class KVChild(object):
+class KVChild:
     def __init__(self, name, value):
         self.name = name
         self.value = value
@@ -1461,7 +1461,7 @@ class ReconstitutionTest(fixtures.MappedTest):
         # assert r2 == {'c1': 'c1', 'c2': 'c2'}
 
 
-class PickleKeyFunc(object):
+class PickleKeyFunc:
     def __init__(self, name):
         self.name = name
 
@@ -2483,7 +2483,7 @@ class AttributeAccessTest(fixtures.TestBase):
 
         Base = declarative_base()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def children(cls):
                 return association_proxy("_children", "value")
@@ -2620,7 +2620,7 @@ class AttributeAccessTest(fixtures.TestBase):
     def test_resolved_to_correct_class_five(self):
         Base = declarative_base()
 
-        class Mixin(object):
+        class Mixin:
             children = association_proxy("_children", "value")
 
         class Parent(Mixin, Base):
@@ -2650,7 +2650,7 @@ class AttributeAccessTest(fixtures.TestBase):
         foo._calc_owner(None, None)
         is_(foo.owning_class, None)
 
-        class Bat(object):
+        class Bat:
             foo = association_proxy("x", "y")
 
         Bat.foo
@@ -2677,7 +2677,7 @@ class AttributeAccessTest(fixtures.TestBase):
         is_(Bat.foo.owning_class, Bat)
 
 
-class ScalarRemoveTest(object):
+class ScalarRemoveTest:
     useobject = None
     cascade_scalar_deletes = None
     uselist = None
@@ -2938,7 +2938,7 @@ class InfoTest(fixtures.TestBase):
         eq_(assoc.info, {})
 
     def test_via_cls(self):
-        class Foob(object):
+        class Foob:
             assoc = association_proxy("a", "b")
 
         eq_(Foob.assoc.info, {})
index 977fb363909b618ce8d2e87ec775273068cbcdab..c40ee3395578555596cf32b39c4696eb9cfde516 100644 (file)
@@ -292,7 +292,7 @@ class LikeQueryTest(BakedTest):
     def test_get_pk_w_null(self):
         """test the re-implementation of logic to do get with IS NULL."""
 
-        class AddressUser(object):
+        class AddressUser:
             pass
 
         self.mapper_registry.map_imperatively(
index c762754bc58f4e885bfc4bdb26c04d74fe86d650..43443b7f64f2e72bc8cade6da210e409ee3ebc5c 100644 (file)
@@ -35,7 +35,7 @@ def modifies_instrumentation_finders(fn, *args, **kw):
         instrumentation.instrumentation_finders.extend(pristine)
 
 
-class _ExtBase(object):
+class _ExtBase:
     @classmethod
     def teardown_test_class(cls):
         instrumentation._reinstall_default_lookups()
@@ -107,7 +107,7 @@ class DisposeTest(_ExtBase, fixtures.TestBase):
 
                 return get
 
-        class MyClass(object):
+        class MyClass:
             __sa_instrumentation_manager__ = MyClassState
 
         assert attributes.manager_of_class(MyClass) is None
@@ -139,12 +139,12 @@ class UserDefinedExtensionTest(_ExtBase, fixtures.ORMTest):
     def setup_test_class(cls):
         global MyBaseClass, MyClass
 
-        class MyBaseClass(object):
+        class MyBaseClass:
             __sa_instrumentation_manager__ = (
                 instrumentation.InstrumentationManager
             )
 
-        class MyClass(object):
+        class MyClass:
 
             # This proves that a staticmethod will work here; don't
             # flatten this back to a class assignment!
@@ -523,7 +523,7 @@ class UserDefinedExtensionTest(_ExtBase, fixtures.ORMTest):
     def test_alternate_finders(self):
         """Ensure the generic finder front-end deals with edge cases."""
 
-        class Unknown(object):
+        class Unknown:
             pass
 
         class Known(MyBaseClass):
@@ -569,7 +569,7 @@ class UserDefinedExtensionTest(_ExtBase, fixtures.ORMTest):
 
 class FinderTest(_ExtBase, fixtures.ORMTest):
     def test_standard(self):
-        class A(object):
+        class A:
             pass
 
         register_class(A)
@@ -577,7 +577,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest):
         eq_(type(manager_of_class(A)), instrumentation.ClassManager)
 
     def test_nativeext_interfaceexact(self):
-        class A(object):
+        class A:
             __sa_instrumentation_manager__ = (
                 instrumentation.InstrumentationManager
             )
@@ -589,7 +589,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest):
         class Mine(instrumentation.ClassManager):
             pass
 
-        class A(object):
+        class A:
             __sa_instrumentation_manager__ = Mine
 
         register_class(A)
@@ -600,7 +600,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest):
         class Mine(instrumentation.ClassManager):
             pass
 
-        class A(object):
+        class A:
             pass
 
         def find(cls):
@@ -612,7 +612,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest):
 
     @modifies_instrumentation_finders
     def test_customfinder_pass(self):
-        class A(object):
+        class A:
             pass
 
         def find(cls):
@@ -626,7 +626,7 @@ class FinderTest(_ExtBase, fixtures.ORMTest):
 
 class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
     def test_none(self):
-        class A(object):
+        class A:
             pass
 
         register_class(A)
@@ -634,18 +634,18 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         def mgr_factory(cls):
             return instrumentation.ClassManager(cls)
 
-        class B(object):
+        class B:
             __sa_instrumentation_manager__ = staticmethod(mgr_factory)
 
         register_class(B)
 
-        class C(object):
+        class C:
             __sa_instrumentation_manager__ = instrumentation.ClassManager
 
         register_class(C)
 
     def test_single_down(self):
-        class A(object):
+        class A:
             pass
 
         register_class(A)
@@ -664,7 +664,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         )
 
     def test_single_up(self):
-        class A(object):
+        class A:
             pass
 
         # delay registration
@@ -688,7 +688,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         def mgr_factory(cls):
             return instrumentation.ClassManager(cls)
 
-        class A(object):
+        class A:
             pass
 
         class B1(A):
@@ -697,7 +697,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         class B2(A):
             __sa_instrumentation_manager__ = staticmethod(mgr_factory)
 
-        class C(object):
+        class C:
             pass
 
         assert_raises_message(
@@ -711,7 +711,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         def mgr_factory(cls):
             return instrumentation.ClassManager(cls)
 
-        class A(object):
+        class A:
             pass
 
         class B1(A):
@@ -720,7 +720,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         class B2(A):
             __sa_instrumentation_manager__ = staticmethod(mgr_factory)
 
-        class C(object):
+        class C:
             pass
 
         register_class(B2)
@@ -735,7 +735,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         def mgr_factory(cls):
             return instrumentation.ClassManager(cls)
 
-        class A(object):
+        class A:
             pass
 
         class B1(A):
@@ -744,7 +744,7 @@ class InstrumentationCollisionTest(_ExtBase, fixtures.ORMTest):
         class B2(A):
             __sa_instrumentation_manager__ = staticmethod(mgr_factory)
 
-        class C(object):
+        class C:
             pass
 
         register_class(C)
@@ -773,7 +773,7 @@ class ExtendedEventsTest(_ExtBase, fixtures.ORMTest):
             0, lambda cls: MyClassManager
         )
 
-        class A(object):
+        class A:
             pass
 
         register_class(A)
index edc2711b6f056cb7eb27da58c38241689351bd30..e25e8c8ab96061e43b6f1fd4e13edd9374334464 100644 (file)
@@ -35,7 +35,7 @@ from sqlalchemy.testing.engines import testing_engine
 from sqlalchemy.testing.engines import testing_reaper
 
 
-class ShardTest(object):
+class ShardTest:
     __skip_if__ = (lambda: util.win32,)
     __requires__ = ("sqlite",)
 
@@ -152,12 +152,12 @@ class ShardTest(object):
     def setup_mappers(cls):
         global WeatherLocation, Report
 
-        class WeatherLocation(object):
+        class WeatherLocation:
             def __init__(self, continent, city):
                 self.continent = continent
                 self.city = city
 
-        class Report(object):
+        class Report:
             def __init__(self, temperature, id_=None):
                 self.temperature = temperature
                 if id_:
index ad8d92b9b37f35e904399f76bb934b4343aa7a3b..f7524808fc4977879bbd3fdfbed7b44365ec0bbc 100644 (file)
@@ -137,7 +137,7 @@ class PropertyComparatorTest(fixtures.TestBase, AssertsCompiledSQL):
         """test :ticket:`6215`"""
         Base = declarative_base()
 
-        class SomeMixin(object):
+        class SomeMixin:
             @hybrid.hybrid_property
             def same_name(self):
                 return self.id
@@ -1163,7 +1163,7 @@ class SpecialObjectTest(fixtures.TestBase, AssertsCompiledSQL):
             for currency_from, rate in zip(symbols, values)
         )
 
-        class Amount(object):
+        class Amount:
             def __init__(self, amount, currency):
                 self.currency = currency
                 self.amount = amount
index 1d88deb7a0e63b1317237ba252873d1609e574aa..6545d45458384cf42b06b9c0b428cf0c1d63f370 100644 (file)
@@ -41,7 +41,7 @@ class SubFoo(Foo):
     pass
 
 
-class FooWithEq(object):
+class FooWithEq:
     def __init__(self, **kw):
         for k in kw:
             setattr(self, k, kw[k])
@@ -91,7 +91,7 @@ class MyPoint(Point):
         return value
 
 
-class _MutableDictTestFixture(object):
+class _MutableDictTestFixture:
     @classmethod
     def _type_fixture(cls):
         return MutableDict
@@ -312,7 +312,7 @@ class _MutableDictTestBase(_MutableDictTestFixture):
         eq_(f1.data, {"a": "b"})
 
 
-class _MutableListTestFixture(object):
+class _MutableListTestFixture:
     @classmethod
     def _type_fixture(cls):
         return MutableList
@@ -618,7 +618,7 @@ class _MutableListTestBase(_MutableListTestFixture):
             assert isinstance(obj, MutableList)
 
 
-class _MutableSetTestFixture(object):
+class _MutableSetTestFixture:
     @classmethod
     def _type_fixture(cls):
         return MutableSet
@@ -853,7 +853,7 @@ class _MutableSetTestBase(_MutableSetTestFixture):
         eq_(f1.data, set([1, 2]))
 
 
-class _MutableNoHashFixture(object):
+class _MutableNoHashFixture:
     @testing.fixture(autouse=True, scope="class")
     def set_class(self):
         global Foo
@@ -1057,7 +1057,7 @@ class MutableColumnCopyArrayTest(_MutableListTestBase, fixtures.MappedTest):
 
         Base = declarative_base(metadata=metadata)
 
-        class Mixin(object):
+        class Mixin:
             data = Column(MutableList.as_mutable(ARRAY(Integer)))
 
         class Foo(Mixin, Base):
@@ -1279,7 +1279,7 @@ class CustomMutableAssociationScalarJSONTest(
         eq_(type(f1.data), self._type_fixture())
 
 
-class _CompositeTestBase(object):
+class _CompositeTestBase:
     @classmethod
     def define_tables(cls, metadata):
         Table(
index 031613bc4d4bae11ee3ad8aca19b9dadf47d9a57..90c7f385789c3f3b617801c190fa51e8d2d0c2c0 100644 (file)
@@ -91,14 +91,14 @@ class OrderingListTest(fixtures.MappedTest):
             Column("text", String(128)),
         )
 
-        class Slide(object):
+        class Slide:
             def __init__(self, name):
                 self.name = name
 
             def __repr__(self):
                 return '<Slide "%s">' % self.name
 
-        class Bullet(object):
+        class Bullet:
             def __init__(self, text):
                 self.text = text
 
@@ -409,7 +409,7 @@ class OrderingListTest(fixtures.MappedTest):
         eq_([b.position for b in s1.bullets], [0, 1, 2])
 
     def test_funky_ordering(self):
-        class Pos(object):
+        class Pos:
             def __init__(self):
                 self.position = None
 
@@ -481,7 +481,7 @@ class OrderingListTest(fixtures.MappedTest):
             self.assert_(copy.__dict__ == olist.__dict__)
 
 
-class DummyItem(object):
+class DummyItem:
     def __init__(self, order=None):
         self.order = order
 
index 6715cb7feae203ad1d9b5224fd3751daae01cee5..094568a37626f54b4972b2317f215fb6bcca6169 100644 (file)
@@ -396,7 +396,7 @@ class FixtureTest(fixtures.MappedTest):
         return CannedResults(self)
 
 
-class CannedResults(object):
+class CannedResults:
     """Built on demand, instances use mappers in effect at time of call."""
 
     def __init__(self, test):
index 0e3a48458b3a88315160e15e7ccdeb41604fe88d..f8cbdee3659b071b8aca8a17975cca918af1d109 100644 (file)
@@ -191,7 +191,7 @@ class DeclarativeTest(DeclarativeTestBase):
     def test_dispose_attrs(self):
         reg = registry()
 
-        class Foo(object):
+        class Foo:
             __tablename__ = "some_table"
 
             id = Column(Integer, primary_key=True)
@@ -213,7 +213,7 @@ class DeclarativeTest(DeclarativeTestBase):
         )
 
     def test_deferred_reflection_default_error(self):
-        class MyExt(object):
+        class MyExt:
             @classmethod
             def prepare(cls):
                 "sample prepare method"
@@ -358,7 +358,7 @@ class DeclarativeTest(DeclarativeTestBase):
                 x = sa.sql.expression.column(Integer)
                 y = Column(Integer)
 
-        class MyMixin(object):
+        class MyMixin:
             x = sa.sql.expression.column(Integer)
             y = Column(Integer)
 
@@ -393,7 +393,7 @@ class DeclarativeTest(DeclarativeTestBase):
             r"non-schema 'sqlalchemy.sql.column\(\)' object; "
         ):
 
-            class MyMixin2(object):
+            class MyMixin2:
                 @declared_attr
                 def x(cls):
                     return sa.sql.expression.column(Integer)
@@ -1198,7 +1198,7 @@ class DeclarativeTest(DeclarativeTestBase):
             )
 
     def test_custom_base(self):
-        class MyBase(object):
+        class MyBase:
             def foobar(self):
                 return "foobar"
 
@@ -1614,7 +1614,7 @@ class DeclarativeTest(DeclarativeTestBase):
     def test_table_cls_attribute_return_none(self):
         from sqlalchemy.schema import Column, PrimaryKeyConstraint
 
-        class AutoTable(object):
+        class AutoTable:
             @declared_attr
             def __tablename__(cls):
                 return cls.__name__
@@ -2237,7 +2237,7 @@ class DeclarativeTest(DeclarativeTestBase):
         )
 
     def test_cls_docstring(self):
-        class MyBase(object):
+        class MyBase:
             """MyBase Docstring"""
 
         Base = declarative_base(cls=MyBase)
index b9d41ee5325b279f7695380e554151a10c962ed5..8c638147590c73a1a3f8e5602cd6ea38e20f08ff 100644 (file)
@@ -10,7 +10,7 @@ from sqlalchemy.testing import mock
 from sqlalchemy.testing.util import gc_collect
 
 
-class MockClass(object):
+class MockClass:
     def __init__(self, base, name):
         self._sa_class_manager = mock.Mock(registry=base)
         tokens = name.split(".")
@@ -19,7 +19,7 @@ class MockClass(object):
         self.metadata = MetaData()
 
 
-class MockProp(object):
+class MockProp:
     parent = "some_parent"
 
 
index 7267a9aa22b212c72aea21b46b5536bb3db63870..0727baefd680879481a89a13437cd970209ceee5 100644 (file)
@@ -45,7 +45,7 @@ class BoundMetadataDeclarativeTest(fixtures.MappedTest):
         reg = registry(_bind=testing.db)
 
         @reg.mapped
-        class User(object):
+        class User:
             __tablename__ = "user"
             id = Column(Integer, primary_key=True)
 
index 7e43e255954d203a29ce097e424b9a2cc0304dcf..ca3a6e6089fcc9182232a3b1f9c1983e3645bfed 100644 (file)
@@ -308,7 +308,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase):
             discriminator = Column("type", String(50))
             __mapper_args__ = {"polymorphic_on": discriminator}
 
-        class MyMixin(object):
+        class MyMixin:
 
             pass
 
@@ -324,7 +324,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase):
         assert class_mapper(Engineer).inherits is class_mapper(Person)
 
     def test_intermediate_abstract_class_on_classical(self):
-        class Person(object):
+        class Person:
             pass
 
         person_table = Table(
@@ -357,7 +357,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase):
         eq_(set(class_mapper(Manager).class_manager), {"id", "kind"})
 
     def test_intermediate_unmapped_class_on_classical(self):
-        class Person(object):
+        class Person:
             pass
 
         person_table = Table(
@@ -390,7 +390,7 @@ class DeclarativeInheritanceTest(DeclarativeTestBase):
         eq_(set(class_mapper(Manager).class_manager), {"id", "kind"})
 
     def test_class_w_invalid_multiple_bases(self):
-        class Person(object):
+        class Person:
             pass
 
         person_table = Table(
index f3feb5ddf23ac637ba11f983017adf74b5e1bd3a..3bad55d31217fb4a1d5ebda7c5642fb23e4668ca 100644 (file)
@@ -54,7 +54,7 @@ class DeclarativeTestBase(fixtures.TestBase, testing.AssertsExecutionResults):
 
 class DeclarativeMixinTest(DeclarativeTestBase):
     def test_simple_wbase(self):
-        class MyMixin(object):
+        class MyMixin:
 
             id = Column(
                 Integer, primary_key=True, test_needs_autoincrement=True
@@ -79,7 +79,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         eq_(obj.foo(), "bar1")
 
     def test_simple_wdecorator(self):
-        class MyMixin(object):
+        class MyMixin:
 
             id = Column(
                 Integer, primary_key=True, test_needs_autoincrement=True
@@ -138,7 +138,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         eq_(obj.foo(), "bar1")
 
     def test_unique_column(self):
-        class MyMixin(object):
+        class MyMixin:
 
             id = Column(Integer, primary_key=True)
             value = Column(String, unique=True)
@@ -213,7 +213,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
     def test_mixin_overrides_wbase(self):
         """test a mixin that overrides a column on a superclass."""
 
-        class MixinA(object):
+        class MixinA:
             foo = Column(String(50))
 
         class MixinB(MixinA):
@@ -233,7 +233,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
     def test_mixin_overrides_wdecorator(self):
         """test a mixin that overrides a column on a superclass."""
 
-        class MixinA(object):
+        class MixinA:
             foo = Column(String(50))
 
         class MixinB(MixinA):
@@ -330,10 +330,10 @@ class DeclarativeMixinTest(DeclarativeTestBase):
 
         reg = registry()
 
-        class B1(object):
+        class B1:
             metadata = m1
 
-        class B2(object):
+        class B2:
             metadata = m2
 
             def fullname(self):
@@ -361,7 +361,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
             username = Column(String)
 
         @reg.mapped
-        class BUser(object):
+        class BUser:
             __tablename__ = "user"
 
             id = Column(Integer, primary_key=True)
@@ -427,7 +427,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         eq_(MyModel.__table__.name, "mymodel")
 
     def test_classproperty_still_works(self):
-        class MyMixin(object):
+        class MyMixin:
             @classproperty
             def __tablename__(cls):
                 return cls.__name__.lower()
@@ -526,7 +526,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
 
         """
 
-        class MyMixin(object):
+        class MyMixin:
             foo = Column("foo", Integer)
             bar = Column("bar_newname", Integer)
 
@@ -559,7 +559,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
             __tablename__ = "person"
             id = Column(Integer, primary_key=True)
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def target_id(cls):
                 return cls.__table__.c.get(
@@ -607,7 +607,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
 
         """
 
-        class MyMixin(object):
+        class MyMixin:
             foo = Column("foo", Integer)
             bar = Column("bar_newname", Integer)
 
@@ -685,7 +685,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
     def test_declare_first_mixin(self):
         canary = mock.Mock()
 
-        class MyMixin(object):
+        class MyMixin:
             @classmethod
             def __declare_first__(cls):
                 canary.declare_first__(cls)
@@ -712,7 +712,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
     def test_declare_first_base(self):
         canary = mock.Mock()
 
-        class MyMixin(object):
+        class MyMixin:
             @classmethod
             def __declare_first__(cls):
                 canary.declare_first__(cls)
@@ -969,7 +969,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
     def test_mapper_args_custom_base(self):
         """test the @declared_attr approach from a custom base."""
 
-        class Base(object):
+        class Base:
             @declared_attr
             def __tablename__(cls):
                 return cls.__name__.lower()
@@ -1087,7 +1087,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         eq_(Joined.__table__.kwargs, {"mysql_engine": "InnoDB"})
 
     def test_col_copy_vs_declared_attr_joined_propagation(self):
-        class Mixin(object):
+        class Mixin:
             a = Column(Integer)
 
             @declared_attr
@@ -1108,7 +1108,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         assert "b" not in B.__table__.c
 
     def test_col_copy_vs_declared_attr_joined_propagation_newname(self):
-        class Mixin(object):
+        class Mixin:
             a = Column("a1", Integer)
 
             @declared_attr
@@ -1129,7 +1129,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         assert "b1" not in B.__table__.c
 
     def test_col_copy_vs_declared_attr_single_propagation(self):
-        class Mixin(object):
+        class Mixin:
             a = Column(Integer)
 
             @declared_attr
@@ -1309,12 +1309,12 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         assert model_col.type.__class__ is Integer
 
     def test_mixin_column_ordering(self):
-        class Foo(object):
+        class Foo:
 
             col1 = Column(Integer)
             col3 = Column(Integer)
 
-        class Bar(object):
+        class Bar:
 
             col2 = Column(Integer)
             col4 = Column(Integer)
@@ -1330,7 +1330,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         )
 
     def test_honor_class_mro_one(self):
-        class HasXMixin(object):
+        class HasXMixin:
             @declared_attr
             def x(self):
                 return Column(Integer)
@@ -1346,7 +1346,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         assert "x" not in Child.__table__.c
 
     def test_honor_class_mro_two(self):
-        class HasXMixin(object):
+        class HasXMixin:
             @declared_attr
             def x(self):
                 return Column(Integer)
@@ -1365,7 +1365,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
         assert C().x() == "hi"
 
     def test_arbitrary_attrs_one(self):
-        class HasMixin(object):
+        class HasMixin:
             @declared_attr
             def some_attr(cls):
                 return cls.__name__ + "SOME ATTR"
@@ -1398,7 +1398,7 @@ class DeclarativeMixinTest(DeclarativeTestBase):
             def __init__(self, filter_, **kw):
                 self.filter = filter_
 
-        class FilterMixin(object):
+        class FilterMixin:
             @declared_attr
             def _filters(cls):
                 return relationship(
@@ -1490,7 +1490,7 @@ class DeclarativeMixinPropertyTest(
     DeclarativeTestBase, testing.AssertsCompiledSQL
 ):
     def test_column_property(self):
-        class MyMixin(object):
+        class MyMixin:
             @declared_attr
             def prop_hoho(cls):
                 return column_property(Column("prop", String(50)))
@@ -1540,7 +1540,7 @@ class DeclarativeMixinPropertyTest(
 
         """
 
-        class MyMixin(object):
+        class MyMixin:
             @declared_attr
             def type_(cls):
                 """this is a document."""
@@ -1566,7 +1566,7 @@ class DeclarativeMixinPropertyTest(
         from sqlalchemy.ext.hybrid import hybrid_property
         from sqlalchemy import inspect
 
-        class Mixin(object):
+        class Mixin:
             @hybrid_property
             def hp1(cls):
                 return 42
@@ -1604,7 +1604,7 @@ class DeclarativeMixinPropertyTest(
     def test_correct_for_proxies_doesnt_impact_synonyms(self):
         from sqlalchemy import inspect
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def data_syn(cls):
                 return synonym("data")
@@ -1645,7 +1645,7 @@ class DeclarativeMixinPropertyTest(
         )
 
     def test_column_in_mapper_args(self):
-        class MyMixin(object):
+        class MyMixin:
             @declared_attr
             def type_(cls):
                 return Column(String(50))
@@ -1663,7 +1663,7 @@ class DeclarativeMixinPropertyTest(
         assert col.table is not None
 
     def test_column_in_mapper_args_used_multiple_times(self):
-        class MyMixin(object):
+        class MyMixin:
 
             version_id = Column(Integer)
             __mapper_args__ = {"version_id_col": version_id}
@@ -1686,7 +1686,7 @@ class DeclarativeMixinPropertyTest(
         )
 
     def test_deferred(self):
-        class MyMixin(object):
+        class MyMixin:
             @declared_attr
             def data(cls):
                 return deferred(Column("data", String(50)))
@@ -1709,7 +1709,7 @@ class DeclarativeMixinPropertyTest(
         assert "data" in d1.__dict__
 
     def _test_relationship(self, usestring):
-        class RefTargetMixin(object):
+        class RefTargetMixin:
             @declared_attr
             def target_id(cls):
                 return Column("target_id", ForeignKey("target.id"))
@@ -1774,7 +1774,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_singleton_behavior_within_decl(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def my_prop(cls):
                 counter(cls)
@@ -1824,7 +1824,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_singleton_gc(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def my_prop(cls):
                 counter(cls.__name__)
@@ -1851,7 +1851,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
         )
 
     def test_can_we_access_the_mixin_straight(self):
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def my_prop(cls):
                 return Column("x", Integer)
@@ -1866,7 +1866,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
         )
 
     def test_can_we_access_the_mixin_straight_special_names(self):
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def __table_args__(cls):
                 return (1, 2, 3)
@@ -1881,7 +1881,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_non_decl_access(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def __tablename__(cls):
                 counter(cls)
@@ -1914,7 +1914,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_property_noncascade(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def my_prop(cls):
                 counter(cls)
@@ -1934,7 +1934,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_property_cascade_mixin(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr.cascading
             def my_prop(cls):
                 counter(cls)
@@ -1954,7 +1954,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_property_cascade_mixin_override(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr.cascading
             def my_prop(cls):
                 counter(cls)
@@ -2000,7 +2000,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
         eq_(counter.mock_calls, [mock.call(A), mock.call(B)])
 
     def test_warn_cascading_used_w_tablename(self):
-        class Mixin(object):
+        class Mixin:
             @declared_attr.cascading
             def __tablename__(cls):
                 return "foo"
@@ -2021,7 +2021,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
 
         asserted = collections.defaultdict(set)
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr.cascading
             def my_attr(cls):
                 if has_inherited_table(cls):
@@ -2071,7 +2071,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
     def test_column_pre_map(self):
         counter = mock.Mock()
 
-        class Mixin(object):
+        class Mixin:
             @declared_attr
             def my_col(cls):
                 counter(cls)
@@ -2092,7 +2092,7 @@ class DeclaredAttrTest(DeclarativeTestBase, testing.AssertsCompiledSQL):
 
         counter = mock.Mock()
 
-        class HasAddressCount(object):
+        class HasAddressCount:
             id = Column(Integer, primary_key=True)
 
             @declared_attr
@@ -2168,7 +2168,7 @@ class AbstractTest(DeclarativeTestBase):
 
     def test_implicit_abstract_viadecorator(self):
         @mapper_registry.mapped
-        class A(object):
+        class A:
             __tablename__ = "a"
 
             id = Column(Integer, primary_key=True)
index 729e1ee0479578847b1cb62a562776b7e5ff9b4d..66a722ccf2dddd5f20e24a90ba1a6761e1adee25 100644 (file)
@@ -249,7 +249,7 @@ class RelationshipTest2(fixtures.MappedTest):
 
         if usedata:
 
-            class Data(object):
+            class Data:
                 def __init__(self, data):
                     self.data = data
 
@@ -553,7 +553,7 @@ class RelationshipTest4(fixtures.MappedTest):
         how to alias the primaryjoin to the polymorphic union ?"""
 
         # class definitions
-        class Person(object):
+        class Person:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -572,7 +572,7 @@ class RelationshipTest4(fixtures.MappedTest):
                     self.longer_status,
                 )
 
-        class Car(object):
+        class Car:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -731,7 +731,7 @@ class RelationshipTest5(fixtures.MappedTest):
         """test parent object with child relationship to an inheriting mapper,
         using eager loads, works when there are no child objects present"""
 
-        class Person(object):
+        class Person:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -750,7 +750,7 @@ class RelationshipTest5(fixtures.MappedTest):
                     self.longer_status,
                 )
 
-        class Car(object):
+        class Car:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -943,7 +943,7 @@ class RelationshipTest7(fixtures.MappedTest):
         """test that lazy load clause to a polymorphic child mapper generates
         correctly [ticket:493]"""
 
-        class PersistentObject(object):
+        class PersistentObject:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -1535,7 +1535,7 @@ class MultiLevelTest(fixtures.MappedTest):
         )
 
     def test_threelevels(self):
-        class Employee(object):
+        class Employee:
             def set(me, **kargs):
                 for k, v in kargs.items():
                     setattr(me, k, v)
@@ -1666,13 +1666,13 @@ class ManyToManyPolyTest(fixtures.MappedTest):
         aren't attempted to be matched to the target polymorphic
         selectable"""
 
-        class BaseItem(object):
+        class BaseItem:
             pass
 
         class Item(BaseItem):
             pass
 
-        class Collection(object):
+        class Collection:
             pass
 
         item_join = polymorphic_union(
@@ -1735,7 +1735,7 @@ class CustomPKTest(fixtures.MappedTest):
         """test that the primary_key attribute is propagated to the
         polymorphic mapper"""
 
-        class T1(object):
+        class T1:
             pass
 
         class T2(T1):
@@ -1783,7 +1783,7 @@ class CustomPKTest(fixtures.MappedTest):
         """test that a composite primary key attribute formed by a join
         is "collapsed" into its minimal columns"""
 
-        class T1(object):
+        class T1:
             pass
 
         class T2(T1):
index ac1661fdd16493a5c1f842ba397447d4ea2a565d..339a6b956696b5db6a48226bc54613d67363b77f 100644 (file)
@@ -76,7 +76,7 @@ class O2MTest(fixtures.MappedTest):
         )
 
     def test_basic(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, data=None):
                 self.data = data
 
@@ -686,7 +686,7 @@ class FalseDiscriminatorTest(fixtures.MappedTest):
         )
 
     def test_false_on_sub(self):
-        class Foo(object):
+        class Foo:
             pass
 
         class Bar(Foo):
@@ -707,7 +707,7 @@ class FalseDiscriminatorTest(fixtures.MappedTest):
         assert isinstance(sess.query(Foo).one(), Bar)
 
     def test_false_on_base(self):
-        class Ding(object):
+        class Ding:
             pass
 
         class Bat(Ding):
@@ -1480,10 +1480,10 @@ class FlushTest(fixtures.MappedTest):
             self.tables.user_roles,
         )
 
-        class User(object):
+        class User:
             pass
 
-        class Role(object):
+        class Role:
             pass
 
         class Admin(User):
@@ -1527,12 +1527,12 @@ class FlushTest(fixtures.MappedTest):
             self.tables.user_roles,
         )
 
-        class User(object):
+        class User:
             def __init__(self, email=None, password=None):
                 self.email = email
                 self.password = password
 
-        class Role(object):
+        class Role:
             def __init__(self, description=None):
                 self.description = description
 
@@ -2090,7 +2090,7 @@ class DistinctPKTest(fixtures.MappedTest):
             Column("person_id", Integer, ForeignKey("persons.id")),
         )
 
-        class Person(object):
+        class Person:
             def __init__(self, name):
                 self.name = name
 
@@ -2231,7 +2231,7 @@ class SyncCompileTest(fixtures.MappedTest):
         j1 = testing.resolve_lambda(j1, **locals())
         j2 = testing.resolve_lambda(j2, **locals())
 
-        class A(object):
+        class A:
             def __init__(self, **kwargs):
                 for key, value in list(kwargs.items()):
                     setattr(self, key, value)
@@ -2310,7 +2310,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
 
     def test_plain(self):
         # control case
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2331,7 +2331,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         # in particular, here we do a "manual" version of
         # what we'd like the mapper to do.
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2364,7 +2364,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         assert sess.get(Sub, 10) is s1
 
     def test_override_onlyinparent(self):
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2403,7 +2403,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         # this is originally [ticket:1111].
         # the pattern here is now disallowed by [ticket:1892]
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2428,7 +2428,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         assert_raises(sa_exc.InvalidRequestError, go)
 
     def test_pk_fk_different(self):
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2452,7 +2452,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         """test that descriptors prevent inheritance from propagating
         properties to subclasses."""
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2473,13 +2473,13 @@ class OverrideColKeyTest(fixtures.MappedTest):
         """test that descriptors prevent inheritance from propagating
         properties to subclasses."""
 
-        class MyDesc(object):
+        class MyDesc:
             def __get__(self, instance, owner):
                 if instance is None:
                     return self
                 return "im the data"
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2495,7 +2495,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         assert sess.query(Sub).one().data == "im the data"
 
     def test_sub_columns_over_base_descriptors(self):
-        class Base(object):
+        class Base:
             @property
             def subdata(self):
                 return "this is base"
@@ -2521,7 +2521,7 @@ class OverrideColKeyTest(fixtures.MappedTest):
         assert sess.get(Sub, s1.base_id).subdata == "this is sub"
 
     def test_base_descriptors_over_base_cols(self):
-        class Base(object):
+        class Base:
             @property
             def data(self):
                 return "this is base"
@@ -2814,7 +2814,7 @@ class OptimizedLoadTest(fixtures.MappedTest):
         class WithComp(Base):
             pass
 
-        class Comp(object):
+        class Comp:
             def __init__(self, a, b):
                 self.a = a
                 self.b = b
@@ -3022,7 +3022,7 @@ class NoPKOnSubTableWarningTest(fixtures.MappedTest):
     def test_warning_on_sub(self):
         parent, child = self._fixture()
 
-        class P(object):
+        class P:
             pass
 
         class C(P):
@@ -3042,7 +3042,7 @@ class NoPKOnSubTableWarningTest(fixtures.MappedTest):
     def test_no_warning_with_explicit(self):
         parent, child = self._fixture()
 
-        class P(object):
+        class P:
             pass
 
         class C(P):
@@ -3068,7 +3068,7 @@ class InhCondTest(fixtures.MappedTest):
             Column("owner_id", Integer, ForeignKey("owner.owner_id")),
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3094,7 +3094,7 @@ class InhCondTest(fixtures.MappedTest):
         )
         Table("order", m, Column("id", Integer, primary_key=True))
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3119,7 +3119,7 @@ class InhCondTest(fixtures.MappedTest):
             "derived", metadata, Column("id", Integer, primary_key=True)
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3154,7 +3154,7 @@ class InhCondTest(fixtures.MappedTest):
             Column("id", Integer, ForeignKey("base.id"), primary_key=True),
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3183,7 +3183,7 @@ class InhCondTest(fixtures.MappedTest):
             Column("id", Integer, ForeignKey("base.id"), primary_key=True),
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3216,7 +3216,7 @@ class InhCondTest(fixtures.MappedTest):
             Column("id", Integer, ForeignKey("base.q"), primary_key=True),
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class Derived(Base):
@@ -3260,11 +3260,11 @@ class PKDiscriminatorTest(fixtures.MappedTest):
     def test_pk_as_discriminator(self):
         parents, children = self.tables.parents, self.tables.children
 
-        class Parent(object):
+        class Parent:
             def __init__(self, name=None):
                 self.name = name
 
-        class Child(object):
+        class Child:
             def __init__(self, name=None):
                 self.name = name
 
@@ -3732,7 +3732,7 @@ class NameConflictTest(fixtures.MappedTest):
         )
 
     def test_name_conflict(self):
-        class Content(object):
+        class Content:
             pass
 
         class Foo(Content):
index d9dfa3d9e6cb383cfb45395a1818d2eeaea1c73a..fae146755a9edf931dad5d889733f38836a92dc3 100644 (file)
@@ -1400,7 +1400,7 @@ class ColKeysTest(fixtures.MappedTest):
             "pjoin",
         )
 
-        class Location(object):
+        class Location:
             pass
 
         class Refugee(Location):
index 60acab87d60d2e7a5c67d5ebda56853a2fec1565..e366a349cf1be077930260c1c4f7defa673e449e 100644 (file)
@@ -76,7 +76,7 @@ class InheritTest(fixtures.MappedTest):
         )
 
     def test_basic(self):
-        class Principal(object):
+        class Principal:
             def __init__(self, **kwargs):
                 for key, value in kwargs.items():
                     setattr(self, key, value)
@@ -151,7 +151,7 @@ class InheritTest2(fixtures.MappedTest):
         )
 
     def test_get(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, data=None):
                 self.data = data
 
@@ -173,7 +173,7 @@ class InheritTest2(fixtures.MappedTest):
         assert sess.get(Bar, b.id).id == b.id
 
     def test_basic(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, data=None):
                 self.data = data
 
@@ -281,7 +281,7 @@ class InheritTest3(fixtures.MappedTest):
         )
 
     def test_basic(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, data=None):
                 self.data = data
 
@@ -317,7 +317,7 @@ class InheritTest3(fixtures.MappedTest):
         eq_(found, compare)
 
     def test_advanced(self):
-        class Foo(object):
+        class Foo:
             def __init__(self, data=None):
                 self.data = data
 
index ef3466ddf764c38e81d5762d9f38f1a35efd1c57..a501e027a551aa44d3b4c9d9d76255cd7e144fa8 100644 (file)
@@ -71,7 +71,7 @@ class PolymorphicCircularTest(fixtures.MappedTest):
             join = table1.outerjoin(table2).outerjoin(table3).alias("pjoin")
             # join = None
 
-        class Table1(object):
+        class Table1:
             def __init__(self, name, data=None):
                 self.name = name
                 if data is not None:
@@ -94,7 +94,7 @@ class PolymorphicCircularTest(fixtures.MappedTest):
         class Table3(Table1):
             pass
 
-        class Data(object):
+        class Data:
             def __init__(self, data):
                 self.data = data
 
index 00537a1fc571b1814b57f78681b74397404c527d..fcaf470b45945c3e1009e00eac2a3ddd86fd94b4 100644 (file)
@@ -32,7 +32,7 @@ from ._poly_fixtures import Manager
 from ._poly_fixtures import Person
 
 
-class BaseAndSubFixture(object):
+class BaseAndSubFixture:
     use_options = False
 
     @classmethod
index cede0cbb5b1424dafe8bb291174c64e4b594f0e1..d7d8b9ec55a42a55e8d8cbad0c03467491175b41 100644 (file)
@@ -85,7 +85,7 @@ class InheritTest(fixtures.MappedTest):
             Column("size", Integer, default=0),
         )
 
-        class Product(object):
+        class Product:
             def __init__(self, name, mark=""):
                 self.name = name
                 self.mark = mark
@@ -110,7 +110,7 @@ class InheritTest(fixtures.MappedTest):
                     )
                 )
 
-        class SpecLine(object):
+        class SpecLine:
             def __init__(self, leader=None, follower=None, quantity=1):
                 self.leader = leader
                 self.follower = follower
@@ -123,7 +123,7 @@ class InheritTest(fixtures.MappedTest):
                     repr(self.follower),
                 )
 
-        class Document(object):
+        class Document:
             def __init__(self, name, data=None):
                 self.name = name
                 self.data = data
index 130e9807839809e049ae40e14e37db0e01259d3d..4d0a1b03ccedc64c4cf5219f1e56f50c73bdcee5 100644 (file)
@@ -37,10 +37,10 @@ def _set_callable(state, dict_, key, callable_):
 
 class AttributeImplAPITest(fixtures.MappedTest):
     def _scalar_obj_fixture(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         instrumentation.register_class(A)
@@ -49,10 +49,10 @@ class AttributeImplAPITest(fixtures.MappedTest):
         return A, B
 
     def _collection_obj_fixture(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         instrumentation.register_class(A)
@@ -212,10 +212,10 @@ class AttributesTest(fixtures.ORMTest):
     def setup_test(self):
         global MyTest, MyTest2
 
-        class MyTest(object):
+        class MyTest:
             pass
 
-        class MyTest2(object):
+        class MyTest2:
             pass
 
     def teardown_test(self):
@@ -223,7 +223,7 @@ class AttributesTest(fixtures.ORMTest):
         MyTest, MyTest2 = None, None
 
     def test_basic(self):
-        class User(object):
+        class User:
             pass
 
         instrumentation.register_class(User)
@@ -325,7 +325,7 @@ class AttributesTest(fixtures.ORMTest):
         """test that InstanceState always has a dict, even after host
         object gc'ed."""
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -340,10 +340,10 @@ class AttributesTest(fixtures.ORMTest):
 
     @testing.requires.predictable_gc
     def test_object_dereferenced_error(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             def __init__(self):
                 gc_collect()
 
@@ -362,7 +362,7 @@ class AttributesTest(fixtures.ORMTest):
         )
 
     def test_unmapped_instance_raises(self):
-        class User(object):
+        class User:
             pass
 
         instrumentation.register_class(User)
@@ -370,7 +370,7 @@ class AttributesTest(fixtures.ORMTest):
             User, "user_name", uselist=False, useobject=False
         )
 
-        class Blog(object):
+        class Blog:
             name = User.user_name
 
         def go():
@@ -383,7 +383,7 @@ class AttributesTest(fixtures.ORMTest):
         )
 
     def test_del_scalar_nonobject(self):
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -408,10 +408,10 @@ class AttributesTest(fixtures.ORMTest):
         )
 
     def test_del_scalar_object(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -435,10 +435,10 @@ class AttributesTest(fixtures.ORMTest):
         )
 
     def test_del_collection_object(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -458,7 +458,7 @@ class AttributesTest(fixtures.ORMTest):
         eq_(f1.b, [])
 
     def test_deferred(self):
-        class Foo(object):
+        class Foo:
             pass
 
         data = {"a": "this is a", "b": 12}
@@ -535,10 +535,10 @@ class AttributesTest(fixtures.ORMTest):
         eq_(m2.b, 12)
 
     def test_list(self):
-        class User(object):
+        class User:
             pass
 
-        class Address(object):
+        class Address:
             pass
 
         instrumentation.register_class(User)
@@ -602,10 +602,10 @@ class AttributesTest(fixtures.ORMTest):
 
         """
 
-        class Post(object):
+        class Post:
             pass
 
-        class Blog(object):
+        class Blog:
             pass
 
         instrumentation.register_class(Post)
@@ -665,10 +665,10 @@ class AttributesTest(fixtures.ORMTest):
         assert attributes.has_parent(Post, b2, "blog")
 
     def test_illegal_trackparent(self):
-        class Post(object):
+        class Post:
             pass
 
-        class Blog(object):
+        class Blog:
             pass
 
         instrumentation.register_class(Post)
@@ -695,7 +695,7 @@ class AttributesTest(fixtures.ORMTest):
     def test_inheritance(self):
         """tests that attributes are polymorphic"""
 
-        class Foo(object):
+        class Foo:
             pass
 
         class Bar(Foo):
@@ -733,7 +733,7 @@ class AttributesTest(fixtures.ORMTest):
     def test_no_double_state(self):
         states = set()
 
-        class Foo(object):
+        class Foo:
             def __init__(self):
                 states.add(attributes.instance_state(self))
 
@@ -754,13 +754,13 @@ class AttributesTest(fixtures.ORMTest):
         managed attributes of an object, if the object is of a
         descendant class with managed attributes in the parent class"""
 
-        class Foo(object):
+        class Foo:
             pass
 
         class Bar(Foo):
             pass
 
-        class Element(object):
+        class Element:
             _state = True
 
         instrumentation.register_class(Foo)
@@ -819,10 +819,10 @@ class AttributesTest(fixtures.ORMTest):
         )
 
     def test_parenttrack(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -862,18 +862,18 @@ class AttributesTest(fixtures.ORMTest):
         from ones implementing zope.interface.Interface). This is a
         simple regression test to prevent that defect."""
 
-        class des(object):
+        class des:
             def __get__(self, instance, owner):
                 raise AttributeError("fake attribute")
 
-        class Foo(object):
+        class Foo:
             A = des()
 
         instrumentation.register_class(Foo)
         instrumentation.unregister_class(Foo)
 
     def test_collectionclasses(self):
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -920,7 +920,7 @@ class AttributesTest(fixtures.ORMTest):
         assert isinstance(Foo().collection, MyDict)
         attributes.unregister_attribute(Foo, "collection")
 
-        class MyColl(object):
+        class MyColl:
             pass
 
         try:
@@ -938,7 +938,7 @@ class AttributesTest(fixtures.ORMTest):
                 "collection class"
             )
 
-        class MyColl(object):
+        class MyColl:
             @collection.iterator
             def __iter__(self):
                 return iter([])
@@ -965,7 +965,7 @@ class AttributesTest(fixtures.ORMTest):
             assert False
 
     def test_last_known_tracking(self):
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -1013,10 +1013,10 @@ class AttributesTest(fixtures.ORMTest):
 
 class GetNoValueTest(fixtures.ORMTest):
     def _fixture(self, expected):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         def lazy_callable(state, passive):
@@ -1083,10 +1083,10 @@ class GetNoValueTest(fixtures.ORMTest):
 
 class UtilTest(fixtures.ORMTest):
     def test_helpers(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -1114,10 +1114,10 @@ class UtilTest(fixtures.ORMTest):
         """test that set_committed_value->None to a uselist generates an
         empty list"""
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -1137,10 +1137,10 @@ class UtilTest(fixtures.ORMTest):
         eq_(f1.col_set, set())
 
     def test_initiator_arg(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -1173,10 +1173,10 @@ class UtilTest(fixtures.ORMTest):
 
 class BackrefTest(fixtures.ORMTest):
     def test_m2m(self):
-        class Student(object):
+        class Student:
             pass
 
-        class Course(object):
+        class Course:
             pass
 
         instrumentation.register_class(Student)
@@ -1208,10 +1208,10 @@ class BackrefTest(fixtures.ORMTest):
         self.assert_(c.students == [s2, s3])
 
     def test_o2m(self):
-        class Post(object):
+        class Post:
             pass
 
-        class Blog(object):
+        class Blog:
             pass
 
         instrumentation.register_class(Post)
@@ -1256,10 +1256,10 @@ class BackrefTest(fixtures.ORMTest):
         del p5.blog
 
     def test_o2o(self):
-        class Port(object):
+        class Port:
             pass
 
-        class Jack(object):
+        class Jack:
             pass
 
         instrumentation.register_class(Port)
@@ -1290,10 +1290,10 @@ class BackrefTest(fixtures.ORMTest):
 
         """
 
-        class Parent(object):
+        class Parent:
             pass
 
-        class Child(object):
+        class Child:
             pass
 
         class SubChild(Child):
@@ -1338,13 +1338,13 @@ class BackrefTest(fixtures.ORMTest):
         c2.parent = p1
 
     def test_symmetric_o2m_inheritance(self):
-        class Parent(object):
+        class Parent:
             pass
 
         class SubParent(Parent):
             pass
 
-        class Child(object):
+        class Child:
             pass
 
         p_token = object()
@@ -1431,13 +1431,13 @@ class CyclicBackrefAssertionTest(fixtures.TestBase):
         )
 
     def _scalar_fixture(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
-        class C(object):
+        class C:
             pass
 
         instrumentation.register_class(A)
@@ -1456,13 +1456,13 @@ class CyclicBackrefAssertionTest(fixtures.TestBase):
         return A, B, C
 
     def _collection_fixture(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
-        class C(object):
+        class C:
             pass
 
         instrumentation.register_class(A)
@@ -1482,10 +1482,10 @@ class CyclicBackrefAssertionTest(fixtures.TestBase):
         return A, B, C
 
     def _broken_collection_fixture(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         instrumentation.register_class(A)
@@ -1519,7 +1519,7 @@ class CyclicBackrefAssertionTest(fixtures.TestBase):
 
 class PendingBackrefTest(fixtures.ORMTest):
     def _fixture(self):
-        class Post(object):
+        class Post:
             def __init__(self, name):
                 self.name = name
 
@@ -1528,7 +1528,7 @@ class PendingBackrefTest(fixtures.ORMTest):
             def __eq__(self, other):
                 return other is not None and other.name == self.name
 
-        class Blog(object):
+        class Blog:
             def __init__(self, name):
                 self.name = name
 
@@ -3237,10 +3237,10 @@ class ListenerTest(fixtures.ORMTest):
     def test_receive_changes(self):
         """test that Listeners can mutate the given value."""
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         def append(state, child, initiator):
@@ -3282,10 +3282,10 @@ class ListenerTest(fixtures.ORMTest):
     def test_named(self):
         canary = Mock()
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -3335,10 +3335,10 @@ class ListenerTest(fixtures.ORMTest):
         )
 
     def test_collection_link_events(self):
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -3380,10 +3380,10 @@ class ListenerTest(fixtures.ORMTest):
 
         """
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -3423,7 +3423,7 @@ class ListenerTest(fixtures.ORMTest):
     def test_flag_modified(self):
         canary = Mock()
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -3441,7 +3441,7 @@ class ListenerTest(fixtures.ORMTest):
     def test_none_init_scalar(self):
         canary = Mock()
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -3457,7 +3457,7 @@ class ListenerTest(fixtures.ORMTest):
     def test_none_init_object(self):
         canary = Mock()
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -3473,10 +3473,10 @@ class ListenerTest(fixtures.ORMTest):
     def test_none_init_collection(self):
         canary = Mock()
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         instrumentation.register_class(Foo)
@@ -3584,7 +3584,7 @@ class EventPropagateTest(fixtures.TestBase):
         canary = []
 
         def make_a():
-            class A(object):
+            class A:
                 pass
 
             classes[0] = A
@@ -3602,7 +3602,7 @@ class EventPropagateTest(fixtures.TestBase):
             classes[2] = C
 
         def make_d():
-            class D(object):
+            class D:
                 pass
 
             classes[3] = D
@@ -3691,10 +3691,10 @@ class EventPropagateTest(fixtures.TestBase):
 
 class CollectionInitTest(fixtures.TestBase):
     def setup_test(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         self.A = A
@@ -3750,10 +3750,10 @@ class CollectionInitTest(fixtures.TestBase):
 
 class TestUnlink(fixtures.TestBase):
     def setup_test(self):
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         self.A = A
index 7fb232b0b8761b53e71e3816581ff6c8a4372992..5ed856a3c92f827ec2132a1e377d0eb74c4e92f7 100644 (file)
@@ -134,7 +134,7 @@ class CacheKeyTest(CacheKeyFixture, _fixtures.FixtureTest):
 
         from sqlalchemy import Column, Integer, String
 
-        class Foo(object):
+        class Foo:
             id = Column(Integer)
             name = Column(String)
 
@@ -152,7 +152,7 @@ class CacheKeyTest(CacheKeyFixture, _fixtures.FixtureTest):
     def test_loader_criteria_bound_param_thing(self):
         from sqlalchemy import Column, Integer
 
-        class Foo(object):
+        class Foo:
             id = Column(Integer)
 
         def go(param):
index 3617e3a5d5b0eadea6414e89cfd43b84c1087eb5..c64c5a03a2698a536e396ad9d275d2f4d205d242 100644 (file)
@@ -3593,14 +3593,14 @@ class OrphanCriterionTest(fixtures.MappedTest):
         r2_present,
         detach_event=True,
     ):
-        class Core(object):
+        class Core:
             pass
 
-        class RelatedOne(object):
+        class RelatedOne:
             def __init__(self, cores):
                 self.cores = cores
 
-        class RelatedTwo(object):
+        class RelatedTwo:
             def __init__(self, cores):
                 self.cores = cores
 
@@ -4492,7 +4492,7 @@ class CollectionCascadesNoBackrefTest(fixtures.TestBase):
     def cascade_fixture(self, registry):
         def go(collection_class):
             @registry.mapped
-            class A(object):
+            class A:
                 __tablename__ = "a"
 
                 id = Column(Integer, primary_key=True)
@@ -4504,7 +4504,7 @@ class CollectionCascadesNoBackrefTest(fixtures.TestBase):
                 )
 
             @registry.mapped
-            class B(object):
+            class B:
                 __tablename__ = "b_"
                 id = Column(Integer, primary_key=True)
                 a_id = Column(ForeignKey("a.id"))
index 90bb606cbcbeef006f562ecd3a463fb987a7bedd..ca14d7658f6740ef42e8ac6ec973713497ebe720 100644 (file)
@@ -27,7 +27,7 @@ from sqlalchemy.testing.schema import Column
 from sqlalchemy.testing.schema import Table
 
 
-class Canary(object):
+class Canary:
     def __init__(self):
         self.data = set()
         self.added = set()
@@ -77,14 +77,14 @@ class Canary(object):
         return value
 
 
-class OrderedDictFixture(object):
+class OrderedDictFixture:
     @testing.fixture
     def ordered_dict_mro(self):
         return type("ordered", (collections.MappedCollection,), {})
 
 
 class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
-    class Entity(object):
+    class Entity:
         def __init__(self, a=None, b=None, c=None):
             self.a = a
             self.b = b
@@ -117,7 +117,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -170,7 +170,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -206,7 +206,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -451,7 +451,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -525,7 +525,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         # or __delslice__ methods.  The __setitem__
         # and __delitem__ must therefore accept
         # slice objects (i.e. as in py3k)
-        class ListLike(object):
+        class ListLike:
             def __init__(self):
                 self.data = list()
 
@@ -581,7 +581,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(MyList, "_sa_instrumented") == id(MyList))
 
     def test_list_duck(self):
-        class ListLike(object):
+        class ListLike:
             def __init__(self):
                 self.data = list()
 
@@ -617,7 +617,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(ListLike, "_sa_instrumented") == id(ListLike))
 
     def test_list_emulates(self):
-        class ListIsh(object):
+        class ListIsh:
             __emulates__ = list
 
             def __init__(self):
@@ -658,7 +658,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -700,7 +700,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -968,7 +968,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1032,7 +1032,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(MySet, "_sa_instrumented") == id(MySet))
 
     def test_set_duck(self):
-        class SetLike(object):
+        class SetLike:
             def __init__(self):
                 self.data = set()
 
@@ -1068,7 +1068,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(SetLike, "_sa_instrumented") == id(SetLike))
 
     def test_set_emulates(self):
-        class SetIsh(object):
+        class SetIsh:
             __emulates__ = set
 
             def __init__(self):
@@ -1109,7 +1109,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.dictable_entity
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1170,7 +1170,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.dictable_entity
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1298,7 +1298,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.dictable_entity
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1421,7 +1421,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(MyOrdered, "_sa_instrumented") == id(MyOrdered))
 
     def test_dict_duck(self):
-        class DictLike(object):
+        class DictLike:
             def __init__(self):
                 self.data = dict()
 
@@ -1472,7 +1472,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(getattr(DictLike, "_sa_instrumented") == id(DictLike))
 
     def test_dict_emulates(self):
-        class DictIsh(object):
+        class DictIsh:
             __emulates__ = dict
 
             def __init__(self):
@@ -1528,7 +1528,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         if creator is None:
             creator = self.entity_maker
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1579,7 +1579,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         assert_eq()
 
     def test_object_duck(self):
-        class MyCollection(object):
+        class MyCollection:
             def __init__(self):
                 self.data = set()
 
@@ -1613,7 +1613,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         )
 
     def test_object_emulates(self):
-        class MyCollection2(object):
+        class MyCollection2:
             __emulates__ = None
 
             def __init__(self):
@@ -1654,7 +1654,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         )
 
     def test_recipes(self):
-        class Custom(object):
+        class Custom:
             def __init__(self):
                 self.data = []
 
@@ -1689,7 +1689,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
             def __iter__(self):
                 return iter(self.data)
 
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -1762,7 +1762,7 @@ class CollectionsTest(OrderedDictFixture, fixtures.ORMTest):
         self.assert_(dr3 is cr3)
 
     def test_lifecycle(self):
-        class Foo(object):
+        class Foo:
             pass
 
         canary = Canary()
@@ -2176,10 +2176,10 @@ class CustomCollectionsTest(fixtures.MappedTest):
         class MyList(list):
             pass
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -2199,10 +2199,10 @@ class CustomCollectionsTest(fixtures.MappedTest):
             self.tables.sometable,
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -2230,10 +2230,10 @@ class CustomCollectionsTest(fixtures.MappedTest):
             self.tables.sometable,
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         class AppenderDict(dict):
@@ -2274,10 +2274,10 @@ class CustomCollectionsTest(fixtures.MappedTest):
             self.tables.sometable,
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             def __init__(self, data):
                 self.data = data
 
@@ -2324,7 +2324,7 @@ class CustomCollectionsTest(fixtures.MappedTest):
         self._test_list(list)
 
     def test_list_no_setslice(self):
-        class ListLike(object):
+        class ListLike:
             def __init__(self):
                 self.data = list()
 
@@ -2374,10 +2374,10 @@ class CustomCollectionsTest(fixtures.MappedTest):
             self.tables.sometable,
         )
 
-        class Parent(object):
+        class Parent:
             pass
 
-        class Child(object):
+        class Child:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -2505,13 +2505,13 @@ class CustomCollectionsTest(fixtures.MappedTest):
             self.tables.sometable,
         )
 
-        class Parent(object):
+        class Parent:
             pass
 
-        class Child(object):
+        class Child:
             pass
 
-        class MyCollection(object):
+        class MyCollection:
             def __init__(self):
                 self.data = []
 
@@ -2566,7 +2566,7 @@ class CustomCollectionsTest(fixtures.MappedTest):
 
 class InstrumentationTest(fixtures.ORMTest):
     def test_uncooperative_descriptor_in_sweep(self):
-        class DoNotTouch(object):
+        class DoNotTouch:
             def __get__(self, obj, owner):
                 raise AttributeError
 
@@ -2580,7 +2580,7 @@ class InstrumentationTest(fixtures.ORMTest):
         collections._instrument_class(Touchy)
 
     def test_referenced_by_owner(self):
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
index 343881efc507fc479e534f565a12c22477035976..edf726f3c59c1ca281d4504f1dabbf3901c82b6a 100644 (file)
@@ -63,16 +63,16 @@ class CompileTest(fixtures.MappedTest):
             ),
         )
 
-        class Order(object):
+        class Order:
             pass
 
-        class Employee(object):
+        class Employee:
             pass
 
-        class Product(object):
+        class Product:
             pass
 
-        class OrderProduct(object):
+        class OrderProduct:
             pass
 
         order_join = order.select().alias("pjoin")
@@ -148,13 +148,13 @@ class CompileTest(fixtures.MappedTest):
             ),
         )
 
-        class Order(object):
+        class Order:
             pass
 
-        class Product(object):
+        class Product:
             pass
 
-        class OrderProduct(object):
+        class OrderProduct:
             pass
 
         order_join = order.select().alias("pjoin")
@@ -212,13 +212,13 @@ class CompileTest(fixtures.MappedTest):
         metadata.create_all(connection)
         connection.execute(node_table.insert(), dict(node_id=1, node_index=5))
 
-        class Node(object):
+        class Node:
             pass
 
-        class NodeName(object):
+        class NodeName:
             pass
 
-        class Host(object):
+        class Host:
             pass
 
         self.mapper_registry.map_imperatively(Node, node_table)
@@ -245,10 +245,10 @@ class CompileTest(fixtures.MappedTest):
             Column("a_id", Integer, ForeignKey("a.id")),
         )
 
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -273,10 +273,10 @@ class CompileTest(fixtures.MappedTest):
             Column("a_id", Integer, ForeignKey("a.id")),
         )
 
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         class C(B):
index 55a78ffcbc3eb82695b0cf045b08831449590285..67ffae75da661180566204f449eecf2be4d8e6c9 100644 (file)
@@ -442,7 +442,7 @@ class NestedTest(fixtures.MappedTest, testing.AssertsCompiledSQL):
         )
 
     def _fixture(self):
-        class AB(object):
+        class AB:
             def __init__(self, a, b, cd):
                 self.a = a
                 self.b = b
@@ -466,7 +466,7 @@ class NestedTest(fixtures.MappedTest, testing.AssertsCompiledSQL):
             def __ne__(self, other):
                 return not self.__eq__(other)
 
-        class CD(object):
+        class CD:
             def __init__(self, c, d):
                 self.c = c
                 self.d = d
@@ -484,7 +484,7 @@ class NestedTest(fixtures.MappedTest, testing.AssertsCompiledSQL):
             def __ne__(self, other):
                 return not self.__eq__(other)
 
-        class Thing(object):
+        class Thing:
             def __init__(self, ab):
                 self.ab = ab
 
index 5d66e339ab1af7e8714a13b8938153db0e557c5e..4bf196fa0d0e0e2ae9fe56d96b93d146416a34d0 100644 (file)
@@ -2290,7 +2290,7 @@ class RawSelectTest(QueryTest, AssertsCompiledSQL):
         )
 
     def test_col_prop_builtin_function(self):
-        class Foo(object):
+        class Foo:
             pass
 
         self.mapper_registry.map_imperatively(
index 5fd876474c554939d46614ca767622cd281d2069..962161f7b90946ab3a1a29de287dd9ea63263f16 100644 (file)
@@ -2870,7 +2870,7 @@ class DeprecatedMapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     __dialect__ = "default"
 
     def test_deferred_scalar_loader_name_change(self):
-        class Foo(object):
+        class Foo:
             pass
 
         def myloader(*arg, **kw):
@@ -3108,7 +3108,7 @@ class InstrumentationTest(fixtures.ORMTest):
                     for key, value in dictlike.items():
                         yield value + 5
 
-        class Foo(object):
+        class Foo:
             pass
 
         instrumentation.register_class(Foo)
@@ -3128,7 +3128,7 @@ class InstrumentationTest(fixtures.ORMTest):
             "AttributeEvents"
         ):
 
-            class Base(object):
+            class Base:
                 @collection.iterator
                 def base_iterate(self, x):
                     return "base_iterate"
@@ -3602,7 +3602,7 @@ class NonPrimaryMapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_illegal_non_primary_3(self):
         users, addresses = self.tables.users, self.tables.addresses
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -3668,7 +3668,7 @@ class NonPrimaryMapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_illegal_non_primary_3_legacy(self):
         users, addresses = self.tables.users, self.tables.addresses
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -4331,7 +4331,7 @@ class DeclarativeBind(fixtures.TestBase):
         ):
 
             @as_declarative(bind=testing.db)
-            class Base(object):
+            class Base:
                 @declared_attr
                 def __tablename__(cls):
                     return cls.__name__.lower()
@@ -5995,10 +5995,10 @@ class MultiplePathTest(fixtures.MappedTest, AssertsCompiledSQL):
             self.tables.t1,
         )
 
-        class T1(object):
+        class T1:
             pass
 
-        class T2(object):
+        class T2:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -6037,7 +6037,7 @@ class BindSensitiveStringifyTest(fixtures.MappedTest):
         # building a totally separate metadata /mapping here
         # because we need to control if the MetaData is bound or not
 
-        class User(object):
+        class User:
             pass
 
         m = MetaData()
@@ -8369,7 +8369,7 @@ class CollectionCascadesDespiteBackrefTest(fixtures.TestBase):
     def cascade_fixture(self, registry):
         def go(collection_class):
             @registry.mapped
-            class A(object):
+            class A:
                 __tablename__ = "a"
 
                 id = Column(Integer, primary_key=True)
@@ -8378,7 +8378,7 @@ class CollectionCascadesDespiteBackrefTest(fixtures.TestBase):
                 )
 
             @registry.mapped
-            class B(object):
+            class B:
                 __tablename__ = "b_"
                 id = Column(Integer, primary_key=True)
                 a_id = Column(ForeignKey("a.id"))
index e037ef19187b03d3f04fd82ba578e52ff5aac399..5ea6131976fdd0bb2b0434974c82125df7653074 100644 (file)
@@ -24,7 +24,7 @@ from sqlalchemy.testing.fixtures import fixture_session
 from test.orm import _fixtures
 
 
-class _DynamicFixture(object):
+class _DynamicFixture:
     def _user_address_fixture(self, addresses_args={}):
         users, Address, addresses, User = (
             self.tables.users,
@@ -628,7 +628,7 @@ class DynamicTest(_DynamicFixture, _fixtures.FixtureTest, AssertsCompiledSQL):
         )
         item_keywords = self.tables.item_keywords
 
-        class ItemKeyword(object):
+        class ItemKeyword:
             pass
 
         self.mapper_registry.map_imperatively(
index 32abc3b31c4160e8f382e2bfd7164cce00822108..9cefb51cbf898e06136ad3d462e7beccd19630dd 100644 (file)
@@ -5408,13 +5408,13 @@ class CyclicalInheritingEagerTestOne(fixtures.MappedTest):
     def test_basic(self):
         t2, t1 = self.tables.t2, self.tables.t1
 
-        class T(object):
+        class T:
             pass
 
         class SubT(T):
             pass
 
-        class T2(object):
+        class T2:
             pass
 
         class SubT2(T2):
index 39d1e8ad966de357f6c5ad1bf96635359cb17710..aa17f2b6ce8d3d2303b1e08e6a1a9baa9456c9aa 100644 (file)
@@ -48,7 +48,7 @@ from sqlalchemy.testing.util import gc_collect
 from test.orm import _fixtures
 
 
-class _RemoveListeners(object):
+class _RemoveListeners:
     @testing.fixture(autouse=True)
     def _remove_listeners(self):
         yield
@@ -645,7 +645,7 @@ class MapperEventsTest(_RemoveListeners, _fixtures.FixtureTest):
 
         canary = []
 
-        class A(object):
+        class A:
             pass
 
         class B(A):
@@ -734,7 +734,7 @@ class MapperEventsTest(_RemoveListeners, _fixtures.FixtureTest):
     def test_init_failure_hook(self):
         users = self.tables.users
 
-        class Thing(object):
+        class Thing:
             def __init__(self, **kw):
                 if kw.get("fail"):
                     raise Exception("failure")
@@ -1122,7 +1122,7 @@ class MapperEventsTest(_RemoveListeners, _fixtures.FixtureTest):
     def test_instrument_class_precedes_class_instrumentation(self):
         users = self.tables.users
 
-        class MyClass(object):
+        class MyClass:
             pass
 
         class MySubClass(MyClass):
@@ -1693,7 +1693,7 @@ class DeferredMapperEventsTest(_RemoveListeners, _fixtures.FixtureTest):
     def test_isolation_instrument_event(self):
         User = self.classes.User
 
-        class Bar(object):
+        class Bar:
             pass
 
         canary = []
@@ -1710,7 +1710,7 @@ class DeferredMapperEventsTest(_RemoveListeners, _fixtures.FixtureTest):
 
     @testing.requires.predictable_gc
     def test_instrument_event_auto_remove(self):
-        class Bar(object):
+        class Bar:
             pass
 
         dispatch = instrumentation._instrumentation_factory.dispatch
@@ -1858,7 +1858,7 @@ class RemovalTest(_fixtures.FixtureTest):
     def test_unmapped_listen(self):
         users = self.tables.users
 
-        class Foo(object):
+        class Foo:
             pass
 
         fn = Mock()
@@ -1894,7 +1894,7 @@ class RemovalTest(_fixtures.FixtureTest):
 
         fn = Mock()
 
-        class User(object):
+        class User:
             pass
 
         event.listen(User, "load", fn)
@@ -2130,7 +2130,7 @@ class SessionEventsTest(_RemoveListeners, _fixtures.FixtureTest):
         def my_listener_one(*arg, **kw):
             pass
 
-        class NotASession(object):
+        class NotASession:
             def __call__(self):
                 return fixture_session()
 
index 0917544cb61225bf69b15bf4a9a7207978bfb7f1..f468fc5c249cba206557da02e47cdc8bcfb3bbb7 100644 (file)
@@ -65,7 +65,7 @@ class TestORMInspection(_fixtures.FixtureTest):
         assert not insp.is_aliased_class
 
     def test_mapper_selectable_fixed(self):
-        class Foo(object):
+        class Foo:
             pass
 
         class Bar(Foo):
@@ -96,7 +96,7 @@ class TestORMInspection(_fixtures.FixtureTest):
         assert insp.is_aliased_class
 
     def test_not_mapped_class(self):
-        class Foo(object):
+        class Foo:
             pass
 
         assert_raises_message(
@@ -107,7 +107,7 @@ class TestORMInspection(_fixtures.FixtureTest):
         )
 
     def test_not_mapped_instance(self):
-        class Foo(object):
+        class Foo:
             pass
 
         assert_raises_message(
@@ -408,7 +408,7 @@ class TestORMInspection(_fixtures.FixtureTest):
         class Thing(InspectionAttr):
             pass
 
-        class AnonClass(object):
+        class AnonClass:
             __foo__ = "bar"
             __bat__ = Thing()
 
@@ -548,7 +548,7 @@ class %s(SuperCls):
         )
 
     def test_all_orm_descriptors_pep520_classical(self):
-        class MyClass(object):
+        class MyClass:
             pass
 
         from sqlalchemy import Table, MetaData, Column, Integer
index 9158b51151eab042cd12a78870a4f91843754453..6b999f9f866c6dbca1290681a5e03c0c7fc6d7d0 100644 (file)
@@ -44,7 +44,7 @@ class InitTest(fixtures.ORMTest):
     def test_ai(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -54,7 +54,7 @@ class InitTest(fixtures.ORMTest):
     def test_A(self):
         inits = []
 
-        class A(object):
+        class A:
             pass
 
         self.register(A, inits)
@@ -65,7 +65,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -77,7 +77,7 @@ class InitTest(fixtures.ORMTest):
     def test_ai_B(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -97,7 +97,7 @@ class InitTest(fixtures.ORMTest):
     def test_ai_Bi(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -119,7 +119,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_bi(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -141,7 +141,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_Bi(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -165,7 +165,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_B(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -187,7 +187,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_Bi_Ci(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -230,7 +230,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_bi_Ci(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -271,7 +271,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_b_Ci(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -302,7 +302,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_B_Ci(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -335,7 +335,7 @@ class InitTest(fixtures.ORMTest):
     def test_Ai_B_C(self):
         inits = []
 
-        class A(object):
+        class A:
             def __init__(self):
                 inits.append((A, "__init__"))
 
@@ -366,7 +366,7 @@ class InitTest(fixtures.ORMTest):
     def test_A_Bi_C(self):
         inits = []
 
-        class A(object):
+        class A:
             pass
 
         self.register(A, inits)
@@ -397,7 +397,7 @@ class InitTest(fixtures.ORMTest):
     def test_A_B_Ci(self):
         inits = []
 
-        class A(object):
+        class A:
             pass
 
         self.register(A, inits)
@@ -428,7 +428,7 @@ class InitTest(fixtures.ORMTest):
     def test_A_B_C(self):
         inits = []
 
-        class A(object):
+        class A:
             pass
 
         self.register(A, inits)
@@ -456,7 +456,7 @@ class InitTest(fixtures.ORMTest):
         eq_(inits, [(C, "init", C)])
 
     def test_defaulted_init(self):
-        class X(object):
+        class X:
             def __init__(self_, a, b=123, c="abc"):
                 self_.a = a
                 self_.b = b
@@ -469,10 +469,10 @@ class InitTest(fixtures.ORMTest):
         eq_(o.b, 123)
         eq_(o.c, "abc")
 
-        class Y(object):
+        class Y:
             unique = object()
 
-            class OutOfScopeForEval(object):
+            class OutOfScopeForEval:
                 def __repr__(self_):
                     # misleading repr
                     return "123"
@@ -502,7 +502,7 @@ class MapperInitTest(fixtures.MappedTest):
         )
 
     def test_partially_mapped_inheritance(self):
-        class A(object):
+        class A:
             pass
 
         class B(A):
@@ -521,7 +521,7 @@ class MapperInitTest(fixtures.MappedTest):
         assert_raises(sa.orm.exc.UnmappedClassError, class_mapper, C)
 
     def test_del_warning(self):
-        class A(object):
+        class A:
             def __del__(self):
                 pass
 
@@ -546,7 +546,7 @@ class OnLoadTest(fixtures.ORMTest):
 
         global A
 
-        class A(object):
+        class A:
             pass
 
         def canary(instance):
@@ -566,7 +566,7 @@ class OnLoadTest(fixtures.ORMTest):
 
 class NativeInstrumentationTest(fixtures.MappedTest):
     def test_register_reserved_attribute(self):
-        class T(object):
+        class T:
             pass
 
         instrumentation.register_class(T)
@@ -593,7 +593,7 @@ class NativeInstrumentationTest(fixtures.MappedTest):
             Column(instrumentation.ClassManager.STATE_ATTR, Integer),
         )
 
-        class T(object):
+        class T:
             pass
 
         assert_raises(KeyError, self.mapper_registry.map_imperatively, T, t)
@@ -606,7 +606,7 @@ class NativeInstrumentationTest(fixtures.MappedTest):
             Column(instrumentation.ClassManager.MANAGER_ATTR, Integer),
         )
 
-        class T(object):
+        class T:
             pass
 
         assert_raises(KeyError, self.mapper_registry.map_imperatively, T, t)
@@ -661,7 +661,7 @@ if util.py3k:
     exec(
         """
 def _kw_only_fixture(self):
-    class A(object):
+    class A:
         def __init__(self, a, *, b, c):
             self.a = a
             self.b = b
@@ -669,7 +669,7 @@ def _kw_only_fixture(self):
     return self._instrument(A)
 
 def _kw_plus_posn_fixture(self):
-    class A(object):
+    class A:
         def __init__(self, a, *args, b, c):
             self.a = a
             self.b = b
@@ -677,7 +677,7 @@ def _kw_plus_posn_fixture(self):
     return self._instrument(A)
 
 def _kw_opt_fixture(self):
-    class A(object):
+    class A:
         def __init__(self, a, *, b, c="c"):
             self.a = a
             self.b = b
@@ -701,7 +701,7 @@ class MiscTest(fixtures.MappedTest):
             Column("x", Integer),
         )
 
-        class A(object):
+        class A:
             pass
 
         self.mapper_registry.map_imperatively(A, t)
@@ -724,10 +724,10 @@ class MiscTest(fixtures.MappedTest):
             Column("t1_id", Integer, ForeignKey("t1.id")),
         )
 
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -739,7 +739,7 @@ class MiscTest(fixtures.MappedTest):
         assert not a.bs
 
     def test_uninstrument(self):
-        class A(object):
+        class A:
             pass
 
         manager = instrumentation.register_class(A)
@@ -767,7 +767,7 @@ class MiscTest(fixtures.MappedTest):
             Column("t1_id", Integer, ForeignKey("t1.id")),
         )
 
-        class Base(object):
+        class Base:
             def __init__(self, *args, **kwargs):
                 pass
 
@@ -810,11 +810,11 @@ class MiscTest(fixtures.MappedTest):
             Column("t1_id", Integer, ForeignKey("t1.id")),
         )
 
-        class Base(object):
+        class Base:
             def __init__(self):
                 pass
 
-        class Base_AKW(object):
+        class Base_AKW:
             def __init__(self, *args, **kwargs):
                 pass
 
index b9f036b1fea214e6d4e7ef7b828cf59471d1246f..988fad6629c8248ba4340943d8e1f1056942d555 100644 (file)
@@ -2086,7 +2086,7 @@ class CreateJoinsTest(fixtures.MappedTest, AssertsCompiledSQL):
             Column("id", Integer, ForeignKey("base.id"), primary_key=True),
         )
 
-        class Base(object):
+        class Base:
             pass
 
         class A(Base):
index 5274271d9facc679f1b7e444320a18026f8b11eb..53766c434da20c3e122770d68460803254a32c0b 100644 (file)
@@ -151,7 +151,7 @@ class LambdaTest(QueryTest, AssertsCompiledSQL):
             if use_indirect_access:
 
                 def query(names):
-                    class Foo(object):
+                    class Foo:
                         def __init__(self):
                             self.u1 = aliased(User)
 
index 3ebff5f43bc637fe94da99dca90b7337fb784eb7..7f22929868b238a38037d92b23005ed8270c9cce 100644 (file)
@@ -806,7 +806,7 @@ class LazyTest(_fixtures.FixtureTest):
         """
 
         @registry.mapped
-        class A(object):
+        class A:
             __tablename__ = "a"
 
             id = Column(Integer, primary_key=True)
@@ -815,7 +815,7 @@ class LazyTest(_fixtures.FixtureTest):
             b = relationship("B")
 
         @registry.mapped
-        class B(object):
+        class B:
             __tablename__ = "b"
 
             id = Column(Integer, primary_key=True)
index ec1ef37962756f4e8e95ba1064146a9cd4e5e3bf..073f48119105f875f069d96ca7b58b36ccfdb3ae 100644 (file)
@@ -167,7 +167,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         from sqlalchemy.orm.base import _is_mapped_class, _is_aliased_class
 
-        class Foo(object):
+        class Foo:
             x = "something"
 
             @property
@@ -206,7 +206,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         from sqlalchemy.orm.base import _entity_descriptor
 
-        class Foo(object):
+        class Foo:
             x = "something"
 
             @property
@@ -386,11 +386,11 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         users, addresses = self.tables.users, self.tables.addresses
 
-        class Foo(object):
+        class Foo:
             def __init__(self):
                 pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper(Foo, users)
@@ -406,7 +406,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         """
 
-        class Foo(object):
+        class Foo:
             def __init__(self, id_):
                 self.id = id_
 
@@ -547,7 +547,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_class_hier_only_instrument_once_multiple_configure(self):
         users, addresses = (self.tables.users, self.tables.addresses)
 
-        class A(object):
+        class A:
             pass
 
         class ASub(A):
@@ -556,7 +556,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         class ASubSub(ASub):
             pass
 
-        class B(object):
+        class B:
             pass
 
         from sqlalchemy.testing import mock
@@ -630,7 +630,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         users = self.tables.users
         Address = self.classes.Address
 
-        class MyComposite(object):
+        class MyComposite:
             pass
 
         for constructor, args in [
@@ -899,7 +899,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         assert_calls = []
 
-        class Address(object):
+        class Address:
             def _get_user(self):
                 assert_calls.append("get")
                 return self._user
@@ -941,7 +941,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
             Column("parent_id", Integer, ForeignKey("nodes.id")),
         )
 
-        class Node(object):
+        class Node:
             pass
 
         self.mapper(
@@ -1000,7 +1000,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
             Column("vendor_id", Integer),
         )
 
-        class Person(object):
+        class Person:
             pass
 
         class Vendor(Person):
@@ -1012,23 +1012,23 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         class Manager(Employee):
             pass
 
-        class Hoho(object):
+        class Hoho:
             pass
 
-        class Lala(object):
+        class Lala:
             pass
 
-        class Fub(object):
+        class Fub:
             pass
 
-        class Frob(object):
+        class Frob:
             pass
 
-        class HasDef(object):
+        class HasDef:
             def name(self):
                 pass
 
-        class Empty(object):
+        class Empty:
             pass
 
         self.mapper(
@@ -1170,7 +1170,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         t.create(connection)
 
-        class A(object):
+        class A:
             pass
 
         self.mapper(A, t, include_properties=["id"])
@@ -1179,7 +1179,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         s.commit()
 
     def test_we_dont_call_bool(self):
-        class NoBoolAllowed(object):
+        class NoBoolAllowed:
             def __bool__(self):
                 raise Exception("nope")
 
@@ -1192,7 +1192,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         assert s.get(NoBoolAllowed, u1.id) is u1
 
     def test_we_dont_call_eq(self):
-        class NoEqAllowed(object):
+        class NoEqAllowed:
             def __eq__(self, other):
                 raise Exception("nope")
 
@@ -1571,7 +1571,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         class extendedproperty(property):
             attribute = 123
 
-        class User(object):
+        class User:
             def _get_name(self):
                 assert_col.append(("get", self.name))
                 return self.name
@@ -1669,7 +1669,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         # synonym points to non-existent attrbute that hasn't been mapped yet.
         users = self.tables.users
 
-        class User(object):
+        class User:
             def _x(self):
                 return self.id
 
@@ -1691,7 +1691,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         assert hasattr(User.x, "comparator")
 
     def test_synonym_of_non_property_raises(self):
-        class User(object):
+        class User:
             @property
             def x(self):
                 return "hi"
@@ -1756,7 +1756,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         assert_col = []
 
-        class User(object):
+        class User:
             def _get_name(self):
                 assert_col.append(("get", self._name))
                 return self._name
@@ -1886,7 +1886,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class User(object):
+        class User:
             @reconstructor
             def reconstruct(self):
                 recon.append("go")
@@ -1903,7 +1903,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class A(object):
+        class A:
             @reconstructor
             def reconstruct(self):
                 assert isinstance(self, A)
@@ -1944,7 +1944,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class User(object):
+        class User:
             @reconstructor
             def __init__(self):
                 recon.append("go")
@@ -1965,11 +1965,11 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class recon_obj(object):
+        class recon_obj:
             def __call__(self, obj):
                 recon.append("go")
 
-        class User(object):
+        class User:
             __init__ = reconstructor(recon_obj())
 
         self.mapper(User, users)
@@ -1993,19 +1993,19 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class recon_obj(object):
+        class recon_obj:
             def __call__(self, obj):
                 recon.append("go")
 
             __sa_reconstructor__ = True
 
-        class recon_meth(object):
+        class recon_meth:
             __func__ = recon_obj()
 
             def __call__(self, *arg, **kw):
                 return self.__func__.__call__(*arg, **kw)
 
-        class User(object):
+        class User:
             __init__ = recon_meth()
 
         self.mapper(User, users)
@@ -2022,7 +2022,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class A(object):
+        class A:
             @reconstructor
             def __init__(self):
                 assert isinstance(self, A)
@@ -2063,7 +2063,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
 
         recon = []
 
-        class Base(object):
+        class Base:
             @reconstructor
             def reconstruct(self):
                 recon.append("go")
@@ -2163,7 +2163,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_unmapped_subclass_error_postmap(self):
         users = self.tables.users
 
-        class Base(object):
+        class Base:
             pass
 
         class Sub(Base):
@@ -2186,7 +2186,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_unmapped_subclass_error_premap(self):
         users = self.tables.users
 
-        class Base(object):
+        class Base:
             pass
 
         self.mapper(Base, users)
@@ -2213,7 +2213,7 @@ class MapperTest(_fixtures.FixtureTest, AssertsCompiledSQL):
         class OldStyle:
             pass
 
-        class NewStyle(object):
+        class NewStyle:
             pass
 
         class A(NewStyle, OldStyle):
@@ -2277,7 +2277,7 @@ class RequirementsTest(fixtures.MappedTest):
             Column("value", String(10)),
         )
 
-    class _ValueBase(object):
+    class _ValueBase:
         def __init__(self, value="abc", id_=None):
             self.id = id_
             self.value = value
@@ -2456,7 +2456,7 @@ class RequirementsTest(fixtures.MappedTest):
     def test_nonzero_len_recursion(self):
         ht1 = self.tables.ht1
 
-        class H1(object):
+        class H1:
             def __len__(self):
                 return len(self.get_value())
 
@@ -2464,7 +2464,7 @@ class RequirementsTest(fixtures.MappedTest):
                 self.value = "foobar"
                 return self.value
 
-        class H2(object):
+        class H2:
             def __bool__(self):
                 return bool(self.get_value())
 
@@ -2495,7 +2495,7 @@ class IsUserlandTest(fixtures.MappedTest):
         )
 
     def _test(self, value, instancelevel=None):
-        class Foo(object):
+        class Foo:
             someprop = value
 
         m = self.mapper(Foo, self.tables.foo)
@@ -2508,7 +2508,7 @@ class IsUserlandTest(fixtures.MappedTest):
         assert self.tables.foo.c.someprop not in m._columntoproperty
 
     def _test_not(self, value):
-        class Foo(object):
+        class Foo:
             someprop = value
 
         m = self.mapper(Foo, self.tables.foo)
@@ -2632,7 +2632,7 @@ class MagicNamesTest(fixtures.MappedTest):
                 Column(reserved, Integer),
             )
 
-            class T(object):
+            class T:
                 pass
 
             clear_mappers()
@@ -2655,7 +2655,7 @@ class MagicNamesTest(fixtures.MappedTest):
             sa.orm.instrumentation.ClassManager.MANAGER_ATTR,
         ):
 
-            class M(object):
+            class M:
                 pass
 
             clear_mappers()
@@ -2705,10 +2705,10 @@ class DocumentTest(fixtures.TestBase):
             ),
         )
 
-        class Foo(object):
+        class Foo:
             pass
 
-        class Bar(object):
+        class Bar:
             pass
 
         self.mapper(
@@ -2767,7 +2767,7 @@ class ComparatorFactoryTest(_fixtures.FixtureTest, AssertsCompiledSQL):
     def test_kwarg_accepted(self):
         users, Address = self.tables.users, self.classes.Address
 
-        class DummyComposite(object):
+        class DummyComposite:
             def __init__(self, x, y):
                 pass
 
@@ -2937,18 +2937,18 @@ class RegistryConfigDisposeTest(fixtures.TestBase):
         ab = bc = True
 
         @reg1.mapped
-        class A(object):
+        class A:
             __tablename__ = "a"
             id = Column(Integer, primary_key=True)
 
         @reg2.mapped
-        class B(object):
+        class B:
             __tablename__ = "b"
             id = Column(Integer, primary_key=True)
             a_id = Column(ForeignKey(A.id))
 
         @reg3.mapped
-        class C(object):
+        class C:
             __tablename__ = "c"
             id = Column(Integer, primary_key=True)
             b_id = Column(ForeignKey(B.id))
index bc79140278d1f145b113e4e04f3da5f4cf64c8f8..8866223cc8044f504310e9d2e4991caa515e8083 100644 (file)
@@ -1399,7 +1399,7 @@ class MergeTest(_fixtures.FixtureTest):
     def test_synonym(self):
         users = self.tables.users
 
-        class User(object):
+        class User:
             def _getValue(self):
                 return self._value
 
index 09b3cf51c00be3a5c245921d72130a0281e6867f..93480324424ccb3acb5f3145ad94e276018a29a4 100644 (file)
@@ -30,7 +30,7 @@ from .inheritance._poly_fixtures import Manager
 from .inheritance._poly_fixtures import Person
 
 
-class _PolymorphicTestBase(object):
+class _PolymorphicTestBase:
     __dialect__ = "default"
 
     def test_any_one(self):
index 1a2a5ba70f9a4267603fcb8251d7445dbd2d3f7f..dcb2103291d613e3cb11ffeae3dbaf6ed10f28b5 100644 (file)
@@ -75,7 +75,7 @@ class QueryTest(_fixtures.FixtureTest):
         )
 
 
-class PathTest(object):
+class PathTest:
     def _make_path(self, path):
         r = []
         for i, item in enumerate(path):
index 11d90bd590731142d72be5bbe595190a5194864a..2072b60e382c451bd7df717de16a11a519e75d97 100644 (file)
@@ -600,7 +600,7 @@ class PickleTest(fixtures.MappedTest):
         pickle.loads(pickle.dumps(screen2))
 
     def test_exceptions(self):
-        class Foo(object):
+        class Foo:
             pass
 
         users = self.tables.users
index 5c17cdaefb99950dbd8be41315c5696af4096ae3..5bbe150c051c6982257f291adca8035262da2ece 100644 (file)
@@ -1005,7 +1005,7 @@ class RowLabelingTest(QueryTest):
 
     @testing.fixture
     def uname_fixture(self):
-        class Foo(object):
+        class Foo:
             pass
 
         if False:
@@ -1341,7 +1341,7 @@ class GetTest(QueryTest):
     def test_unique_param_names(self):
         users = self.tables.users
 
-        class SomeUser(object):
+        class SomeUser:
             pass
 
         s = users.select().where(users.c.id != 12).alias("users")
@@ -7714,7 +7714,7 @@ class QueryClsTest(QueryTest):
         return MyQuery
 
     def _callable_fixture(self):
-        class MyQueryFactory(object):
+        class MyQueryFactory:
             def __call__(self, *arg, **kw):
                 return Query(*arg, **kw)
 
index 6f6b0d56dfefc843038b3f8be96e015cd6bfc9a9..dfce8e38294a9d60e323c2eecbf693e3ba1100e8 100644 (file)
@@ -24,7 +24,7 @@ from sqlalchemy.testing import is_
 from sqlalchemy.testing import mock
 
 
-class _JoinFixtures(object):
+class _JoinFixtures:
     @classmethod
     def setup_test_class(cls):
         m = MetaData()
index 7e2c6e04f9fe07fa2552ec882e19004711880994..b2c16da05736d5bc5cae13080507aa50d117d4a1 100644 (file)
@@ -104,7 +104,7 @@ class _Fixtures(_fixtures.FixtureTest):
     def mixin_fixture(self):
         users = self.tables.users
 
-        class HasFoob(object):
+        class HasFoob:
             name = Column(String)
 
         class UserWFoob(HasFoob, self.Comparable):
@@ -120,7 +120,7 @@ class _Fixtures(_fixtures.FixtureTest):
     def declattr_mixin_fixture(self):
         users = self.tables.users
 
-        class HasFoob(object):
+        class HasFoob:
             @declared_attr
             def name(cls):
                 return Column(String)
@@ -139,7 +139,7 @@ class _Fixtures(_fixtures.FixtureTest):
         orders, items = self.tables.orders, self.tables.items
         order_items = self.tables.order_items
 
-        class HasFoob(object):
+        class HasFoob:
             description = Column(String)
 
         class HasBat(HasFoob):
@@ -894,7 +894,7 @@ class LoaderCriteriaTest(_Fixtures, testing.AssertsCompiledSQL):
 class TemporalFixtureTest(testing.fixtures.DeclarativeMappedTest):
     @classmethod
     def setup_classes(cls):
-        class HasTemporal(object):
+        class HasTemporal:
             """Mixin that identifies a class as having a timestamp column"""
 
             timestamp = Column(
index 98de9abad7378e95a029561792cc2c437ad1a73e..94e74992fbe20e2bc1bbfb28865a260e14d00aa3 100644 (file)
@@ -47,7 +47,7 @@ from sqlalchemy.testing.schema import Table
 from test.orm import _fixtures
 
 
-class _RelationshipErrors(object):
+class _RelationshipErrors:
     def _assert_raises_no_relevant_fks(
         self, fn, expr, relname, primary, *arg, **kw
     ):
@@ -2516,10 +2516,10 @@ class JoinConditionErrorTest(fixtures.TestBase):
         )
         t2 = Table("t2", m, Column("id", Integer, primary_key=True))
 
-        class C1(object):
+        class C1:
             pass
 
-        class C2(object):
+        class C2:
             pass
 
         registry.map_imperatively(
@@ -2577,10 +2577,10 @@ class JoinConditionErrorTest(fixtures.TestBase):
             Column("t1id", Integer, ForeignKey("t1.id")),
         )
 
-        class C1(object):
+        class C1:
             pass
 
-        class C2(object):
+        class C2:
             pass
 
         registry.map_imperatively(C1, t1, properties={"c2": relationship(C2)})
@@ -2599,10 +2599,10 @@ class JoinConditionErrorTest(fixtures.TestBase):
             Column("t1id", Integer),
         )
 
-        class C1(object):
+        class C1:
             pass
 
-        class C2(object):
+        class C2:
             pass
 
         registry.map_imperatively(C1, t1, properties={"c2": relationship(C2)})
@@ -3507,10 +3507,10 @@ class ViewOnlyLocalRemoteM2M(fixtures.TestBase):
             Column("t2_id", Integer, ForeignKey("t2.id")),
         )
 
-        class A(object):
+        class A:
             pass
 
-        class B(object):
+        class B:
             pass
 
         registry.map_imperatively(B, t2)
@@ -5558,7 +5558,7 @@ class ActiveHistoryFlagTest(_fixtures.FixtureTest):
     def test_composite_property_flag(self):
         Order, orders = self.classes.Order, self.tables.orders
 
-        class MyComposite(object):
+        class MyComposite:
             def __init__(self, description, isopen):
                 self.description = description
                 self.isopen = isopen
index e31acf0246d58700ff6a266d9f27acae17a0b0ab..c11897ea55c85e6921af9906504060d58719e61c 100644 (file)
@@ -970,7 +970,7 @@ class SessionStateTest(_fixtures.FixtureTest):
 
         sess = fixture_session()
 
-        class Foo(object):
+        class Foo:
             def __init__(self):
                 sess.add(self)
 
@@ -1988,7 +1988,7 @@ class SessionInterface(fixtures.MappedTest):
 
         # flush will no-op without something in the unit of work
         def _():
-            class OK(object):
+            class OK:
                 pass
 
             self._map_it(OK)
@@ -2058,7 +2058,7 @@ class SessionInterface(fixtures.MappedTest):
         )
 
     def test_unmapped_instance(self):
-        class Unmapped(object):
+        class Unmapped:
             pass
 
         self._test_instance_guards(Unmapped())
@@ -2070,14 +2070,14 @@ class SessionInterface(fixtures.MappedTest):
             self._test_class_guards(prim, is_class=False)
 
     def test_unmapped_class_for_instance(self):
-        class Unmapped(object):
+        class Unmapped:
             pass
 
         self._test_instance_guards(Unmapped)
         self._test_class_guards(Unmapped)
 
     def test_mapped_class_for_instance(self):
-        class Mapped(object):
+        class Mapped:
             pass
 
         self._map_it(Mapped)
@@ -2086,7 +2086,7 @@ class SessionInterface(fixtures.MappedTest):
         # no class guards- it would pass.
 
     def test_missing_state(self):
-        class Mapped(object):
+        class Mapped:
             pass
 
         early = Mapped()
@@ -2096,7 +2096,7 @@ class SessionInterface(fixtures.MappedTest):
         self._test_class_guards(early, is_class=False)
 
     def test_refresh_arg_signature(self):
-        class Mapped(object):
+        class Mapped:
             pass
 
         self._map_it(Mapped)
index 5be0042b0dad3981ad36ad49a51de9f85f590542..e07da638f2c623b824be15faaeb78f259f35f202 100644 (file)
@@ -2831,13 +2831,13 @@ class CyclicalInheritingEagerTestOne(fixtures.MappedTest):
     def test_basic(self):
         t2, t1 = self.tables.t2, self.tables.t1
 
-        class T(object):
+        class T:
             pass
 
         class SubT(T):
             pass
 
-        class T2(object):
+        class T2:
             pass
 
         class SubT2(T2):
index 924ae674eb168bd76c063e0c959c171913b22d9d..796ad84f9868410e9d1e1cba18f83d45c475e7eb 100644 (file)
@@ -14,7 +14,7 @@ from sqlalchemy.testing.schema import Column
 from sqlalchemy.testing.schema import Table
 
 
-class AssertsUOW(object):
+class AssertsUOW:
     def _get_test_uow(self, session):
         uow = unitofwork.UOWTransaction(session)
         deleted = set(session._deleted)
index fa16d269a0e873249f98c8f1b977bb9f872a6199..3574c450746ce32bcf370e2c785f2275927dd230 100644 (file)
@@ -2455,7 +2455,7 @@ class NaturalPKRollbackTest(fixtures.MappedTest):
         assert s.identity_map[identity_key(User, ("u1",))] is u1
 
 
-class JoinIntoAnExternalTransactionFixture(object):
+class JoinIntoAnExternalTransactionFixture:
     """Test the "join into an external transaction" examples"""
 
     __leave_connections_for_teardown__ = True
@@ -2512,7 +2512,7 @@ class NewStyleJoinIntoAnExternalTransactionTest(
         # begin a non-ORM transaction
         self.trans = self.connection.begin()
 
-        class A(object):
+        class A:
             pass
 
         clear_mappers()
@@ -2579,7 +2579,7 @@ class LegacyJoinIntoAnExternalTransactionTest(
         # begin a non-ORM transaction
         self.trans = self.connection.begin()
 
-        class A(object):
+        class A:
             pass
 
         # TODO: py2 is not hitting this correctly for some reason,
index d3afab3269cd86cbd564b8320311b29b806d3fe5..4ae842c4be2520a29f538134c9064f125c028388 100644 (file)
@@ -37,7 +37,7 @@ from sqlalchemy.util import ue
 from test.orm import _fixtures
 
 
-class UnitOfWorkTest(object):
+class UnitOfWorkTest:
     pass
 
 
@@ -627,7 +627,7 @@ class ClauseAttributesTest(fixtures.MappedTest):
         eq_(hb.value, False)
 
     def test_clauseelement_accessor(self):
-        class Thing(object):
+        class Thing:
             def __init__(self, value):
                 self.value = value
 
@@ -2191,7 +2191,7 @@ class SaveTest(_fixtures.FixtureTest):
 
         names = []
 
-        class Events(object):
+        class Events:
             def before_insert(self, mapper, connection, instance):
                 self.current_instance = instance
                 names.append(instance.name)
@@ -3496,7 +3496,7 @@ class PartialNullPKTest(fixtures.MappedTest):
 
 
 class EnsurePKSortableTest(fixtures.MappedTest):
-    class SomeEnum(object):
+    class SomeEnum:
         # Implements PEP 435 in the minimal fashion needed by SQLAlchemy
         __members__ = OrderedDict()
 
index fac4897bbd890088df4fa9552faca79a984dec5d..efd581db2a320981a76d1ed75e171225eae58cee 100644 (file)
@@ -41,7 +41,7 @@ from sqlalchemy.testing.schema import Table
 from test.orm import _fixtures
 
 
-class AssertsUOW(object):
+class AssertsUOW:
     def _get_test_uow(self, session):
         uow = unitofwork.UOWTransaction(session)
         deleted = set(session._deleted)
@@ -2833,11 +2833,11 @@ class TypeWoBoolTest(fixtures.MappedTest, testing.AssertsExecutionResults):
     def define_tables(cls, metadata):
         from sqlalchemy import TypeDecorator
 
-        class NoBool(object):
+        class NoBool:
             def __nonzero__(self):
                 raise NotImplementedError("not supported")
 
-        class MyWidget(object):
+        class MyWidget:
             def __init__(self, text):
                 self.text = text
 
index 21863c57a522d95cc0e01da3b7903a553724fffe..b2743024ab4f62e880202dee30419441b9757939 100644 (file)
@@ -195,7 +195,7 @@ class UpdateDeleteTest(fixtures.MappedTest):
     def test_evaluate_clauseelement(self):
         User = self.classes.User
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return User.name.__clause_element__()
 
@@ -209,7 +209,7 @@ class UpdateDeleteTest(fixtures.MappedTest):
     def test_evaluate_invalid(self):
         User = self.classes.User
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return 5
 
@@ -236,7 +236,7 @@ class UpdateDeleteTest(fixtures.MappedTest):
         eq_(jill.name, "moonbeam")
 
     def test_evaluate_synonym_string(self):
-        class Foo(object):
+        class Foo:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -251,7 +251,7 @@ class UpdateDeleteTest(fixtures.MappedTest):
         eq_(jill.uname, "moonbeam")
 
     def test_evaluate_synonym_attr(self):
-        class Foo(object):
+        class Foo:
             pass
 
         self.mapper_registry.map_imperatively(
@@ -266,7 +266,7 @@ class UpdateDeleteTest(fixtures.MappedTest):
         eq_(jill.uname, "moonbeam")
 
     def test_evaluate_double_synonym_attr(self):
-        class Foo(object):
+        class Foo:
             pass
 
         self.mapper_registry.map_imperatively(
index ba16d7e9a5246e8074b355e8500051699e6da66a..748ef152dbb93e663235a52aad93557ae23b99fb 100644 (file)
@@ -46,7 +46,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         return table
 
     def test_simple(self):
-        class Point(object):
+        class Point:
             pass
 
         table = self._fixture(Point)
@@ -61,7 +61,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         assert alias.id.__clause_element__().table is not table
 
     def test_named_entity(self):
-        class Point(object):
+        class Point:
             pass
 
         self._fixture(Point)
@@ -73,7 +73,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_named_selectable(self):
-        class Point(object):
+        class Point:
             pass
 
         table = self._fixture(Point)
@@ -85,7 +85,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_not_instantiatable(self):
-        class Point(object):
+        class Point:
             pass
 
         self._fixture(Point)
@@ -94,7 +94,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         assert_raises(TypeError, alias)
 
     def test_instancemethod(self):
-        class Point(object):
+        class Point:
             def zero(self):
                 self.x, self.y = 0, 0
 
@@ -106,7 +106,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         assert getattr(alias, "zero")
 
     def test_classmethod(self):
-        class Point(object):
+        class Point:
             @classmethod
             def max_x(cls):
                 return 100
@@ -119,7 +119,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         assert Point.max_x() == alias.max_x() == 100
 
     def test_simple_property(self):
-        class Point(object):
+        class Point:
             @property
             def max_x(self):
                 return 100
@@ -133,7 +133,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         assert Point.max_x is alias.max_x
 
     def test_descriptors(self):
-        class descriptor(object):
+        class descriptor:
             def __init__(self, fn):
                 self.fn = fn
 
@@ -146,7 +146,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
             def method(self):
                 return "method"
 
-        class Point(object):
+        class Point:
             center = (0, 0)
 
             @descriptor
@@ -171,7 +171,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
                 assert child.table is table
 
     def test_hybrid_descriptor_one(self):
-        class Point(object):
+        class Point:
             def __init__(self, x, y):
                 self.x, self.y = x, y
 
@@ -191,7 +191,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_hybrid_descriptor_two(self):
-        class Point(object):
+        class Point:
             def __init__(self, x, y):
                 self.x, self.y = x, y
 
@@ -217,7 +217,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_hybrid_descriptor_three(self):
-        class Point(object):
+        class Point:
             def __init__(self, x, y):
                 self.x, self.y = x, y
 
@@ -289,7 +289,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_proxy_descriptor_one(self):
-        class Point(object):
+        class Point:
             def __init__(self, x, y):
                 self.x, self.y = x, y
 
@@ -407,7 +407,7 @@ class AliasedClassTest(fixtures.MappedTest, AssertsCompiledSQL):
         )
 
     def test_parententity_vs_parentmapper(self):
-        class Point(object):
+        class Point:
             pass
 
         self._fixture(Point, properties={"x_syn": synonym("x")})
index 1c491e75f6745580f6f9854e23a8cb08a7146e21..817d0fbc53d26aa0cb75e5867a42d17145475e07 100644 (file)
@@ -256,7 +256,7 @@ class ValidatorTest(_fixtures.FixtureTest):
         users = self.tables.users
         canary = Mock()
 
-        class SomeValidator(object):
+        class SomeValidator:
             def __call__(self, obj, key, name):
                 canary(key, name)
                 ne_(name, "fred")
@@ -272,7 +272,7 @@ class ValidatorTest(_fixtures.FixtureTest):
     def test_validator_multi_warning(self):
         users = self.tables.users
 
-        class Foo(object):
+        class Foo:
             @validates("name")
             def validate_one(self, key, value):
                 pass
@@ -290,7 +290,7 @@ class ValidatorTest(_fixtures.FixtureTest):
             users,
         )
 
-        class Bar(object):
+        class Bar:
             @validates("id")
             def validate_three(self, key, value):
                 return value + 10
index 5258d09b09c879e0b36067cddb675ff5d3fd99f8..814d9a2ad26b9bf7b4a153ae8c6f4e879a4bc470 100644 (file)
@@ -166,7 +166,7 @@ class MyType3(TypeDecorator):
         self.arg = arg
 
 
-class CoreFixtures(object):
+class CoreFixtures:
     # lambdas which return a tuple of ColumnElement objects.
     # must return at least two objects that should compare differently.
     # to test more varieties of "difference" additional objects can be added.
@@ -1049,7 +1049,7 @@ class CoreFixtures(object):
     ]
 
 
-class CacheKeyFixture(object):
+class CacheKeyFixture:
     def _compare_equal(self, a, b, compare_values):
         a_key = a._generate_cache_key()
         b_key = b._generate_cache_key()
index 2011744fbd73d2d77564e749b13f9bf6874627cc..f3260f2721d4c42db3b82657da2c5dc6039ae103 100644 (file)
@@ -140,11 +140,11 @@ class DefaultObjectTest(fixtures.TestBase):
         def fn2(x, y, z=3):
             pass
 
-        class fn3(object):
+        class fn3:
             def __init__(self, x, y):
                 pass
 
-        class FN4(object):
+        class FN4:
             def __call__(self, x, y):
                 pass
 
@@ -170,21 +170,21 @@ class DefaultObjectTest(fixtures.TestBase):
 
         fn5 = list
 
-        class fn6a(object):
+        class fn6a:
             def __init__(self, x):
                 eq_(x, "context")
 
-        class fn6b(object):
+        class fn6b:
             def __init__(self, x, y=3):
                 eq_(x, "context")
 
-        class FN7(object):
+        class FN7:
             def __call__(self, x):
                 eq_(x, "context")
 
         fn7 = FN7()
 
-        class FN8(object):
+        class FN8:
             def __call__(self, x, y=3):
                 eq_(x, "context")
 
@@ -396,7 +396,7 @@ class DefaultRoundTripTest(fixtures.TablesTest):
         use_function_defaults = testing.against("postgresql", "mssql")
         is_oracle = testing.against("oracle")
 
-        class MyClass(object):
+        class MyClass:
             @classmethod
             def gen_default(cls, ctx):
                 return "hi"
index 6f7b3f8f5d80659daf4bf96a8d909dc9cacb281a..45ead811fce499d5cc8c7707d8ddbb6ef8260e7f 100644 (file)
@@ -21,7 +21,7 @@ from sqlalchemy.testing.schema import Column
 from sqlalchemy.testing.schema import Table
 
 
-class _DeleteTestBase(object):
+class _DeleteTestBase:
     @classmethod
     def define_tables(cls, metadata):
         Table(
index 46c526c4b0ad414a4d1db955d6a33644cd33a5b2..89938ee5e180604230890bf64f0d30575752f476 100644 (file)
@@ -1811,7 +1811,7 @@ class FutureSelectTest(fixtures.TestBase, AssertsCompiledSQL):
     def test_new_calling_style_thing_ok_actually_use_iter(self, table_fixture):
         table1, table2 = table_fixture
 
-        class Thing(object):
+        class Thing:
             def __iter__(self):
                 return iter([table1.c.name, table1.c.description])
 
index 51045daac223bf4d78f42c5ef007977029733372..74a60bd215a4bdf2ba461c268ea6acfc08136174 100644 (file)
@@ -28,7 +28,7 @@ from sqlalchemy.testing import expect_warnings
 from sqlalchemy.testing import fixtures
 
 
-class ORMExpr(object):
+class ORMExpr:
     def __init__(self, col):
         self.col = col
 
@@ -36,7 +36,7 @@ class ORMExpr(object):
         return self.col
 
 
-class _InsertTestBase(object):
+class _InsertTestBase:
     @classmethod
     def define_tables(cls, metadata):
         Table(
index a2aa9705cb16c63509fa135de6d1577722452640..fd6b1eb41de2f0b1b821dbe8c61c2a81722148bf 100644 (file)
@@ -689,7 +689,7 @@ class LambdaElementTest(
         # refer to unknown types of objects inside the lambda.  these have
         # to be resolved outside of the lambda because we otherwise can't
         # be sure they can be safely used as cache keys.
-        class Thing(object):
+        class Thing:
             def __init__(self, col_expr):
                 self.col_expr = col_expr
 
@@ -713,7 +713,7 @@ class LambdaElementTest(
         # refer to unknown types of objects inside the lambda.  these have
         # to be resolved outside of the lambda because we otherwise can't
         # be sure they can be safely used as cache keys.
-        class Thing(object):
+        class Thing:
             def __init__(self, col_expr):
                 self.col_expr = col_expr
 
@@ -765,7 +765,7 @@ class LambdaElementTest(
         # test the above 'test_reject_plain_object' with the expected
         # workaround
 
-        class Thing(object):
+        class Thing:
             def __init__(self, col_expr):
                 self.col_expr = col_expr
 
@@ -1662,7 +1662,7 @@ class LambdaElementTest(
     def test_cache_key_instance_variable_issue_incorrect(self):
         t1 = table("t1", column("q"), column("p"))
 
-        class Foo(object):
+        class Foo:
             def __init__(self, value):
                 self.value = value
 
@@ -1681,7 +1681,7 @@ class LambdaElementTest(
     def test_cache_key_instance_variable_issue_correct_one(self):
         t1 = table("t1", column("q"), column("p"))
 
-        class Foo(object):
+        class Foo:
             def __init__(self, value):
                 self.value = value
 
@@ -1701,7 +1701,7 @@ class LambdaElementTest(
     def test_cache_key_instance_variable_issue_correct_two(self):
         t1 = table("t1", column("q"), column("p"))
 
-        class Foo(object):
+        class Foo:
             def __init__(self, value):
                 self.value = value
 
index bd921364795c54cb7cd7b896b0844a01520f2e46..e87063a907e45cd0e8f4d964ab7e7026242de34d 100644 (file)
@@ -354,7 +354,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables):
         )
 
     def test_fk_given_non_col_clauseelem(self):
-        class Foo(object):
+        class Foo:
             def __clause_element__(self):
                 return bindparam("x")
 
@@ -379,7 +379,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables):
     def test_fk_given_col_non_table_clauseelem(self):
         t = Table("t", MetaData(), Column("x", Integer))
 
-        class Foo(object):
+        class Foo:
             def __clause_element__(self):
                 return t.alias().c.x
 
@@ -2072,7 +2072,7 @@ class PKAutoIncrementTest(fixtures.TestBase):
 class SchemaTypeTest(fixtures.TestBase):
     __backend__ = True
 
-    class TrackEvents(object):
+    class TrackEvents:
         column = None
         table = None
         evt_targets = ()
@@ -2961,7 +2961,7 @@ class ConstraintTest(fixtures.TestBase):
     def test_clauseelement_extraction_one(self):
         t = Table("t", MetaData(), Column("x", Integer), Column("y", Integer))
 
-        class MyThing(object):
+        class MyThing:
             def __clause_element__(self):
                 return t.c.x + 5
 
@@ -2971,7 +2971,7 @@ class ConstraintTest(fixtures.TestBase):
     def test_clauseelement_extraction_two(self):
         t = Table("t", MetaData(), Column("x", Integer), Column("y", Integer))
 
-        class MyThing(object):
+        class MyThing:
             def __clause_element__(self):
                 return t.c.x + 5
 
@@ -2984,7 +2984,7 @@ class ConstraintTest(fixtures.TestBase):
 
         expr1 = t.c.x + 5
 
-        class MyThing(object):
+        class MyThing:
             def __clause_element__(self):
                 return expr1
 
@@ -3332,7 +3332,7 @@ class ConstraintTest(fixtures.TestBase):
     def test_column_accessor_clause_element(self):
         c1 = Column("x", Integer)
 
-        class CThing(object):
+        class CThing:
             def __init__(self, c):
                 self.c = c
 
@@ -3743,7 +3743,7 @@ class ConstraintTest(fixtures.TestBase):
         m = MetaData()
         t2 = Table("t2", m, Column("x", Integer))
 
-        class SomeClass(object):
+        class SomeClass:
             def __clause_element__(self):
                 return t2
 
@@ -3758,7 +3758,7 @@ class ConstraintTest(fixtures.TestBase):
 
     @testing.fixture
     def no_pickle_annotated(self):
-        class NoPickle(object):
+        class NoPickle:
             def __reduce__(self):
                 raise NotImplementedError()
 
index 45ea3054811e288705c756c56b501ca321edfa47..b86e8d075afa5a3b2e2555a40683ecc1bd2da0ba 100644 (file)
@@ -449,7 +449,7 @@ class CustomUnaryOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
         )
 
 
-class _CustomComparatorTests(object):
+class _CustomComparatorTests:
     def test_override_builtin(self):
         c1 = Column("foo", self._add_override_factory())
         self._assert_add_override(c1)
@@ -2126,7 +2126,7 @@ class InTest(fixtures.TestBase, testing.AssertsCompiledSQL):
         )
 
     def test_in_arbitrary_sequence(self):
-        class MySeq(object):
+        class MySeq:
             def __init__(self, d):
                 self.d = d
 
index cdc314e2f577979ac7abd7864be0aeda372f7b9c..9d4e14517efe97216cd463b5b84741436054b0cc 100644 (file)
@@ -359,7 +359,7 @@ class CursorResultTest(fixtures.TablesTest):
         result = connection.execute(select(1))
         row = result.first()
 
-        class unprintable(object):
+        class unprintable:
             def __str__(self):
                 raise ValueError("nope")
 
@@ -1410,7 +1410,7 @@ class CursorResultTest(fixtures.TablesTest):
 
         """
 
-        class MyList(object):
+        class MyList:
             def __init__(self, data):
                 self.internal_list = data
 
@@ -2885,7 +2885,7 @@ class AlternateCursorResultTest(fixtures.TablesTest):
         argnames="method_name",
     )
     def test_handle_error_in_fetch(self, strategy_cls, method_name):
-        class cursor(object):
+        class cursor:
             def raise_(self):
                 raise IOError("random non-DBAPI error during cursor operation")
 
index ff4f10f1ac837a0ba231214d099755ed1c0c526c..abbef8e280f20e6aed2e1bed9e0b17e7f1b390c5 100644 (file)
@@ -41,7 +41,7 @@ m = MetaData()
 t = Table("t", m, Column("q", Integer))
 
 
-class NotAThing1(object):
+class NotAThing1:
     pass
 
 
@@ -55,7 +55,7 @@ class NotAThing2(ClauseElement):
 not_a_thing2 = NotAThing2()
 
 
-class NotAThing3(object):
+class NotAThing3:
     def __clause_element__(self):
         return not_a_thing2
 
@@ -215,7 +215,7 @@ class RoleTest(fixtures.TestBase):
         def some_function():
             pass
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return some_function
 
index c9abb7fb8b451ab102df80fc73a130b933fe8d30..f79d95a650125a5a200f50dfd61e911c8a995a30 100644 (file)
@@ -67,7 +67,7 @@ class FutureSelectTest(fixtures.TestBase, AssertsCompiledSQL):
         )
 
     def test_new_calling_style_clauseelement_thing_that_has_iter(self):
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return table1
 
@@ -82,11 +82,11 @@ class FutureSelectTest(fixtures.TestBase, AssertsCompiledSQL):
         )
 
     def test_new_calling_style_inspectable_ce_thing_that_has_iter(self):
-        class Thing(object):
+        class Thing:
             def __iter__(self):
                 return iter(["a", "b", "c"])
 
-        class InspectedThing(object):
+        class InspectedThing:
             def __clause_element__(self):
                 return table1
 
index e0e0858a45093185ec7317108bd61646e4a06eb2..cab4f637112345074daab6720a3bbd19c5191e66 100644 (file)
@@ -14,7 +14,7 @@ from sqlalchemy.testing import eq_
 from sqlalchemy.testing import fixtures
 
 
-class _ExprFixture(object):
+class _ExprFixture:
     def _test_table(self, type_):
         test_table = Table(
             "test_table", MetaData(), Column("x", String), Column("y", type_)
@@ -363,7 +363,7 @@ class DerivedTest(_ExprFixture, fixtures.TestBase, AssertsCompiledSQL):
         )
 
 
-class RoundTripTestBase(object):
+class RoundTripTestBase:
     def test_round_trip(self, connection):
         connection.execute(
             self.tables.test_table.insert(),
index d57603622d43548df643c142774bc73cc8d44c7c..0891defc29fb1e83d4a0b12351f53ec255b7b095 100644 (file)
@@ -473,7 +473,7 @@ class PickleTypesTest(fixtures.TestBase):
             loads(dumps(meta))
 
 
-class _UserDefinedTypeFixture(object):
+class _UserDefinedTypeFixture:
     @classmethod
     def define_tables(cls, metadata):
         class MyType(types.UserDefinedType):
@@ -1064,7 +1064,7 @@ class TypeCoerceCastTest(fixtures.TablesTest):
 
         # test coerce from nulltype - e.g. use an object that
         # doesn't match to a known type
-        class MyObj(object):
+        class MyObj:
             def __str__(self):
                 return "THISISMYOBJ"
 
@@ -1190,7 +1190,7 @@ class TypeCoerceCastTest(fixtures.TablesTest):
         t = self.tables.t
         conn.execute(t.insert().values(data=coerce_fn("d1", MyType)))
 
-        class MyFoob(object):
+        class MyFoob:
             def __clause_element__(self):
                 return t.c.data
 
@@ -2323,7 +2323,7 @@ class EnumTest(AssertsCompiledSQL, fixtures.TablesTest):
         m1.create_all(testing.db)
 
     def test_non_native_constraint_custom_type(self):
-        class Foob(object):
+        class Foob:
             def __init__(self, name):
                 self.name = name
 
@@ -3202,7 +3202,7 @@ class ExpressionTest(
         class MyFoobarType(types.UserDefinedType):
             pass
 
-        class Foo(object):
+        class Foo:
             pass
 
         # unknown type + integer, right hand bind
@@ -3315,11 +3315,11 @@ class ExpressionTest(
 
     def test_detect_coercion_of_builtins(self):
         @inspection._self_inspects
-        class SomeSQLAThing(object):
+        class SomeSQLAThing:
             def __repr__(self):
                 return "some_sqla_thing()"
 
-        class SomeOtherThing(object):
+        class SomeOtherThing:
             pass
 
         assert_raises_message(
@@ -3629,7 +3629,7 @@ class BooleanTest(
         )
 
     def test_non_native_constraint_custom_type(self):
-        class Foob(object):
+        class Foob:
             def __init__(self, value):
                 self.value = value
 
index 93deae5565edb7749fb4e7347ae1b7aed59e067e..f59f02a7b15368c9ee7d2d21fac7ba127d562b47 100644 (file)
@@ -31,7 +31,7 @@ from sqlalchemy.testing.schema import Column
 from sqlalchemy.testing.schema import Table
 
 
-class _UpdateFromTestBase(object):
+class _UpdateFromTestBase:
     @classmethod
     def define_tables(cls, metadata):
         Table(
@@ -128,7 +128,7 @@ class UpdateTest(_UpdateFromTestBase, fixtures.TablesTest, AssertsCompiledSQL):
     def test_update_custom_key_thing(self):
         table1 = self.tables.mytable
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return table1.c.name
 
@@ -147,7 +147,7 @@ class UpdateTest(_UpdateFromTestBase, fixtures.TablesTest, AssertsCompiledSQL):
     def test_update_ordered_custom_key_thing(self):
         table1 = self.tables.mytable
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return table1.c.name
 
@@ -166,7 +166,7 @@ class UpdateTest(_UpdateFromTestBase, fixtures.TablesTest, AssertsCompiledSQL):
     def test_update_broken_custom_key_thing(self):
         table1 = self.tables.mytable
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return 5
 
@@ -180,7 +180,7 @@ class UpdateTest(_UpdateFromTestBase, fixtures.TablesTest, AssertsCompiledSQL):
     def test_update_ordered_broken_custom_key_thing(self):
         table1 = self.tables.mytable
 
-        class Thing(object):
+        class Thing:
             def __clause_element__(self):
                 return 5
 
index dcd32a6791ae30a6ab5dc9268001336824c386ae..f5ae9ea53d72aa641a92b6f9b7e23e9679b80b17 100644 (file)
@@ -168,7 +168,7 @@ class ValuesTest(fixtures.TablesTest, AssertsCompiledSQL):
 
     @testing.fixture
     def tricky_types_parameter_fixture(self):
-        class SomeEnum(object):
+        class SomeEnum:
             # Implements PEP 435 in the minimal fashion needed by SQLAlchemy
             __members__ = OrderedDict()