Skip to content

Commit c30453e

Browse files
committed
Use Decimal/int for sub-second precision in datetime; fixes #525
1 parent cb86c29 commit c30453e

File tree

7 files changed

+900
-521
lines changed

7 files changed

+900
-521
lines changed

neo4j/meta.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ def get_user_agent():
3434
return template.format(*fields)
3535

3636

37+
def deprecation_warn(message):
38+
from warnings import warn
39+
warn(message, category=DeprecationWarning, stacklevel=2)
40+
41+
3742
def deprecated(message):
3843
""" Decorator for deprecating functions and methods.
3944
@@ -46,8 +51,7 @@ def foo(x):
4651
"""
4752
def f__(f):
4853
def f_(*args, **kwargs):
49-
from warnings import warn
50-
warn(message, category=DeprecationWarning, stacklevel=2)
54+
deprecation_warn(message)
5155
return f(*args, **kwargs)
5256
f_.__name__ = f.__name__
5357
f_.__doc__ = f.__doc__

0 commit comments

Comments
 (0)