Merge pull request #748 from danpalmer/patch-2

Fix warning output
This commit is contained in:
Syrus Akbary 2018-05-30 09:35:03 -07:00 committed by GitHub
commit 7bd77a0817
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,13 +6,11 @@ string_types = (type(b''), type(u''))
def warn_deprecation(text):
warnings.simplefilter('always', DeprecationWarning)
warnings.warn(
text,
category=DeprecationWarning,
stacklevel=2
)
warnings.simplefilter('default', DeprecationWarning)
def deprecated(reason):