diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-08-14 23:48:11 +0300 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2018-08-14 23:55:40 +0300 |
commit | d00b3e413dc689314f2da33ec6f277824ee68338 (patch) | |
tree | ade8b83875bbf1dccd09f1862daa067a7e3cc672 | |
parent | ee7fbd65cb5e35ec26a50f3dbe23ba353e6b3227 (diff) | |
download | apscheduler-d00b3e413dc689314f2da33ec6f277824ee68338.tar.gz |
Fixed callable name detection for methods in old style classes
-rw-r--r-- | apscheduler/util.py | 3 | ||||
-rw-r--r-- | docs/versionhistory.rst | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apscheduler/util.py b/apscheduler/util.py index 88254ff..3c48e55 100644 --- a/apscheduler/util.py +++ b/apscheduler/util.py @@ -5,6 +5,7 @@ from __future__ import division from datetime import date, datetime, time, timedelta, tzinfo from calendar import timegm from functools import partial +from inspect import isclass import re from pytz import timezone, utc, FixedOffset @@ -224,7 +225,7 @@ def get_callable_name(func): # class methods, bound and unbound methods f_self = getattr(func, '__self__', None) or getattr(func, 'im_self', None) if f_self and hasattr(func, '__name__'): - f_class = f_self if isinstance(f_self, type) else f_self.__class__ + f_class = f_self if isclass(f_self) else f_self.__class__ else: f_class = getattr(func, 'im_class', None) diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst index 32b5843..fba72a8 100644 --- a/docs/versionhistory.rst +++ b/docs/versionhistory.rst @@ -4,6 +4,12 @@ Version history To find out how to migrate your application from a previous version of APScheduler, see the :doc:`migration section <migration>`. +3.5.3 +----- + +* Fixed callable name detection for methods in old style classes + + 3.5.2 ----- |