diff options
author | Colin Watson <cjwatson@canonical.com> | 2019-11-10 21:23:01 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@canonical.com> | 2019-11-10 21:23:01 +0000 |
commit | 17ca4508af1ee8ad739b4cf8319e2313c91c5c86 (patch) | |
tree | 6dadb06c371b1dd2f7d148d1f99a84cb6f962e45 /bs4/builder/_htmlparser.py | |
parent | 8c57caece563f2c9aea0a6cc86bd5cee3c40877f (diff) |
Fix deprecation warning with Python >= 3.7.
Python >= 3.7 issues a deprecation warning when using collections.Callable
rather than collections.abc.Callable. Most of Beautiful Soup deals with
this by using a conditional import, but the automatic Python 3 conversion
apparently translates `callable(obj)` to `isinstance(obj,
collections.Callable)` which trips this deprecation warning.
`isinstance(obj, Callable)` works fine in Python 2 as well as 3, so just use
it directly.
Diffstat (limited to 'bs4/builder/_htmlparser.py')
0 files changed, 0 insertions, 0 deletions