From d986f083dc22d2de6898dc9505cf68b546aa320c Mon Sep 17 00:00:00 2001 From: "Edwin Marshall (aspidites)" Date: Mon, 11 Jun 2012 10:09:00 -0700 Subject: [PATCH] - updated warning to use kivy.Logger - window_pygame no longer uses unicode internally --- kivy/core/window/__init__.py | 19 +++++++++---------- kivy/core/window/window_pygame.py | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/kivy/core/window/__init__.py b/kivy/core/window/__init__.py index 3b4e912d7..6a57fc59d 100755 --- a/kivy/core/window/__init__.py +++ b/kivy/core/window/__init__.py @@ -10,7 +10,6 @@ __all__ = ('Keyboard', 'WindowBase', 'Window') from os.path import join, exists from os import getcwd -from warnings import warn from kivy.core import core_select_lib from kivy.clock import Clock @@ -761,26 +760,26 @@ class WindowBase(EventDispatcher): Some providers may omit `scancode`, `codepoint` and/or `modifier`! ''' if 'unicode' in kwargs: - warn("The use of the unicode parameter is deprecated, and will be " - "removed in future versions. Use codepoint instead, which " - "has identical semantics.") + Logger.warning("The use of the unicode parameter is deprecated, " + "and will be removed in future versions. Use codepoint " + "instead, which has identical semantics.") def on_key_down(self, key, scancode=None, codepoint=None, modifier=None, **kwargs): '''Event called when a key is down (same arguments as on_keyboard)''' if 'unicode' in kwargs: - warn("The use of the unicode parameter is deprecated, and will be " - "removed in future versions. Use codepoint instead, which " - "has identical semantics.") + Logger.warning("The use of the unicode parameter is deprecated, " + "and will be removed in future versions. Use codepoint " + "instead, which has identical semantics.") def on_key_up(self, key, scancode=None, codepoint=None, modifier=None, **kwargs): '''Event called when a key is up (same arguments as on_keyboard)''' if 'unicode' in kwargs: - warn("The use of the unicode parameter is deprecated, and will be " - "removed in future versions. Use codepoint instead, which " - "has identical semantics.") + Logger.warning("The use of the unicode parameter is deprecated, " + "and will be removed in future versions. Use codepoint " + "instead, which has identical semantics.") def on_dropfile(self, filename): '''Event called when a file is dropped on the application. diff --git a/kivy/core/window/window_pygame.py b/kivy/core/window/window_pygame.py index 71bfe48cf..338d8b150 100644 --- a/kivy/core/window/window_pygame.py +++ b/kivy/core/window/window_pygame.py @@ -194,7 +194,7 @@ class WindowPygame(WindowBase): self.close() #not sure what to do here return True super(WindowPygame, self).on_keyboard(key, scancode, - unicode=codepoint, modifier=modifier) + codepoint=codepoint, modifier=modifier) def flip(self): pygame.display.flip()