Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1655 fix deprecation warnings in python bindings #1656

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Bindings~/python/alttester/commands/base_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
import abc
import json
import time
from datetime import datetime
from datetime import datetime, timezone

from loguru import logger

import alttester.exceptions as exceptions
from alttester.by import By


EPOCH = datetime.utcfromtimestamp(0)
EPOCH = datetime.fromtimestamp(0, timezone.utc)


def validate_coordinates_3(coordinates):
Expand Down Expand Up @@ -153,7 +153,7 @@ class BaseCommand(Command):
def __init__(self, connection, command_name):
self.connection = connection
self.command_name = command_name
self.message_id = str((datetime.utcnow() - EPOCH).total_seconds())
self.message_id = str((datetime.now(timezone.utc) - EPOCH).total_seconds())

@property
def _parameters(self):
Expand Down