Skip to content

logging.warn was dropped in favour of logging.warning in Python 3.13 #10

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

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions scc/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ def button_press(self, mapper):
Called when action is executed by pressing physical gamepad button.
'button_release' will be called later.
"""
log.warn("Action %s can't handle button press event", self.__class__.__name__)
log.warning("Action %s can't handle button press event", self.__class__.__name__)


def button_release(self, mapper):
"""
Called when action executed by pressing physical gamepad button is
expected to stop.
"""
log.warn("Action %s can't handle button release event", self.__class__.__name__)
log.warning("Action %s can't handle button release event", self.__class__.__name__)


def axis(self, mapper, position, what):
Expand All @@ -276,7 +276,7 @@ def axis(self, mapper, position, what):
'what' is one of LEFT, RIGHT or STICK (from scc.constants),
describing what is being updated
"""
log.warn("Action %s can't handle axis event", self.__class__.__name__)
log.warning("Action %s can't handle axis event", self.__class__.__name__)


def pad(self, mapper, position, what):
Expand Down Expand Up @@ -310,7 +310,7 @@ def whole(self, mapper, x, y, what):
'what' is one of LEFT, RIGHT, STICK (from scc.constants), describing what is
being updated
"""
log.warn("Action %s can't handle whole stick event", self.__class__.__name__)
log.warning("Action %s can't handle whole stick event", self.__class__.__name__)


def whole_blocked(self, mapper, x, y, what):
Expand All @@ -337,7 +337,7 @@ def change(self, mapper, dx, dy, what):

'what' can be None.
"""
log.warn("Action %s can't handle incremental changes", self.__class__.__name__)
log.warning("Action %s can't handle incremental changes", self.__class__.__name__)


def cancel(self, mapper):
Expand Down Expand Up @@ -397,7 +397,7 @@ def trigger(self, mapper, position, old_position):
'position' contains current trigger position.
'old_position' contains last known trigger position.
"""
log.warn("Action %s can't handle trigger event", self.__class__.__name__)
log.warning("Action %s can't handle trigger event", self.__class__.__name__)


class RangeOP(object):
Expand Down
2 changes: 1 addition & 1 deletion scc/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def on_profile_selected(self, ps, name, giofile):


def on_unknown_profile(self, ps, name):
log.warn("Daemon reported unknown profile: '%s'; Overriding.", name)
log.warning("Daemon reported unknown profile: '%s'; Overriding.", name)
if self.current_file is not None and ps.get_controller() is not None:
ps.get_controller().set_profile(self.current_file.get_path())

Expand Down
4 changes: 2 additions & 2 deletions scc/sccdaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def init_drivers(self):
if hasattr(mod, "init"):
to_init.append(mod)
else:
log.warn("Skipping disabled driver '%s'", modname)
log.warning("Skipping disabled driver '%s'", modname)

from scc.drivers import MOD_INIT_ORDER as order
index_fn = lambda n: order.index(n) if n in order else 1024
Expand Down Expand Up @@ -500,7 +500,7 @@ def fix_xinput(self, mapper):
d.float()
except OSError as e:
# Most likely 'xinput' executable not found
log.warn("Failed to deatach gamepad from xinput master: %s", e)
log.warning("Failed to deatach gamepad from xinput master: %s", e)


def load_default_profile(self, mapper=None):
Expand Down