Skip to content

Commit

Permalink
fix several deprecation warnings
Browse files Browse the repository at this point in the history
adding -Werror flag to pytest configuration
so we can flush all of those with the test we have
so we won't have user of the driver running into those
and get them fixed address as soon as we support new
python versions
  • Loading branch information
fruch committed Jun 24, 2024
1 parent fee957a commit 258f5f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cassandra/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from cassandra import DriverException

DATETIME_EPOC = datetime.datetime(1970, 1, 1)
UTC_DATETIME_EPOC = datetime.datetime.utcfromtimestamp(0)
UTC_DATETIME_EPOC = datetime.datetime.fromtimestamp(0, tz=datetime.timezone.utc)

_nan = float('nan')

Expand Down
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ log_format = %(asctime)s.%(msecs)03d %(levelname)s [%(module)s:%(lineno)s]: %(me
log_level = DEBUG
log_date_format = %Y-%m-%d %H:%M:%S
xfail_strict=true


addopts =
-Werror
-W'ignore::pytest.PytestCollectionWarning'
-W'ignore:distutils Version classes are deprecated:DeprecationWarning:eventlet.support.greenlets'

0 comments on commit 258f5f6

Please sign in to comment.