Skip to content

Commit

Permalink
Merge pull request pallets-eco#937 from pallets/2.7-compat
Browse files Browse the repository at this point in the history
get_ident compat for Python 2.7
  • Loading branch information
davidism authored Mar 18, 2021
2 parents c11fe63 + 0ac1040 commit 59ede18
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 2.5.1
-------------

Unreleased

- Fix compatibility with Python 2.7.


Version 2.5.0
-------------

Expand Down
6 changes: 5 additions & 1 deletion flask_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
try:
from greenlet import getcurrent as _ident_func
except ImportError:
from threading import get_ident as _ident_func
try:
from threading import get_ident as _ident_func
except ImportError:
# Python 2.7
from thread import get_ident as _ident_func

__version__ = "2.5.0"

Expand Down

0 comments on commit 59ede18

Please sign in to comment.