Skip to content

Commit 36efd3b

Browse files
authored
Merge pull request #854 from kam193/fix/python_3.8.4
Subclass meta mixins from `type`
2 parents d257601 + a2f2e95 commit 36efd3b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGES.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 2.4.4
2+
-------------
3+
4+
Unreleased
5+
6+
- Change base class of meta mixins to ``type``. This fixes an issue
7+
caused by a regression in CPython 3.8.4. :issue:`852`
8+
9+
110
Version 2.4.3
211
-------------
312

flask_sqlalchemy/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _join(match):
5959
return camelcase_re.sub(_join, name).lstrip('_')
6060

6161

62-
class NameMetaMixin(object):
62+
class NameMetaMixin(type):
6363
def __init__(cls, name, bases, d):
6464
if should_set_tablename(cls):
6565
cls.__tablename__ = camel_to_snake_case(cls.__name__)
@@ -111,7 +111,7 @@ def __table_cls__(cls, *args, **kwargs):
111111
del cls.__tablename__
112112

113113

114-
class BindMetaMixin(object):
114+
class BindMetaMixin(type):
115115
def __init__(cls, name, bases, d):
116116
bind_key = (
117117
d.pop('__bind_key__', None)

0 commit comments

Comments
 (0)