Skip to content

Commit 4b34926

Browse files
authored
Use Decimal/int for sub-second precision in datetime values; fixes #525 (#551)
1 parent 38b2a21 commit 4b34926

File tree

8 files changed

+902
-601
lines changed

8 files changed

+902
-601
lines changed

neo4j/meta.py

+6-2
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)