This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository python-efl.

View the commit online.

commit eb255fe3fea7bceb975867b08287d64be0f792de
Author: Dave Andreoli <[email protected]>
AuthorDate: Sat Aug 30 23:17:43 2025 +0200

    Remove old python2-only code
---
 setup.py                     |  1 -
 src/efl/ecore_fd_handler.pxi |  2 +-
 src/efl/edje_object.pxi      |  8 +++----
 src/efl/evas.pyx             |  2 +-
 src/efl/evas_canvas.pxi      |  2 +-
 src/efl/evas_object.pxi      | 42 ++++++++++++++++-----------------
 src/efl/evas_rect.pxi        | 56 ++++++++++++++++++++++----------------------
 7 files changed, 56 insertions(+), 57 deletions(-)

diff --git a/setup.py b/setup.py
index 5917395..5bdf21c 100755
--- a/setup.py
+++ b/setup.py
@@ -237,7 +237,6 @@ if {'build', 'build_ext', 'install', 'bdist', 'bdist_wheel', 'sdist'} & set(sys.
                 # 'c_string_encoding': 'utf-8',
                 'embedsignature': True,
                 'binding': True,
-                'language_level': 2,
             }
         )
 
diff --git a/src/efl/ecore_fd_handler.pxi b/src/efl/ecore_fd_handler.pxi
index ce3124a..246f597 100644
--- a/src/efl/ecore_fd_handler.pxi
+++ b/src/efl/ecore_fd_handler.pxi
@@ -96,7 +96,7 @@ cdef class FdHandler(object):
         self.kargs = kargs
         self._prepare_callback = None
         if self.obj == NULL:
-            if not isinstance(fd, (int, long)):
+            if not isinstance(fd, int):
                 try:
                     fd = fd.fileno()
                 except AttributeError:
diff --git a/src/efl/edje_object.pxi b/src/efl/edje_object.pxi
index a5d0ed8..35a24b5 100644
--- a/src/efl/edje_object.pxi
+++ b/src/efl/edje_object.pxi
@@ -1379,14 +1379,14 @@ cdef class Edje(Object):
                 raise TypeError("every element of data should be the "
                                 "same type '%s'" % item_type.__name__)
         head = data[0]
-        if isinstance(head, (int, long)):
+        if isinstance(head, int):
             self.message_send_int_set(id, data)
         elif isinstance(head, float):
             self.message_send_float_set(id, data)
         elif isinstance(head, str):
             if issubclass(item_type, str):
                 self.message_send_str_set(id, data)
-            elif item_type == int or item_type == long:
+            elif item_type == int:
                 if len(data) == 2:
                     self.message_send_str_int(id, head, second_item)
                 else:
@@ -1412,7 +1412,7 @@ cdef class Edje(Object):
 
         :raise TypeError: if data has no supported EdjeMessage counterpart.
         """
-        if isinstance(data, (long, int)):
+        if isinstance(data, int):
             self.message_send_int(id, data)
         elif isinstance(data, float):
             self.message_send_float(id, data)
@@ -1425,7 +1425,7 @@ cdef class Edje(Object):
                 self.message_send(id, data[0])
                 return
 
-            if not isinstance(data[0], (long, int, float, str)):
+            if not isinstance(data[0], (int, float, str)):
                 raise TypeError("invalid message list type '%s'" %
                                 type(data[0]).__name__)
 
diff --git a/src/efl/evas.pyx b/src/efl/evas.pyx
index 7a2db69..b2d5052 100644
--- a/src/efl/evas.pyx
+++ b/src/efl/evas.pyx
@@ -1290,7 +1290,7 @@ def color_parse(desc, is_premul=None):
         else:
             raise ValueError("Invalid color description")
 
-    elif isinstance(desc, (int, long)):
+    elif isinstance(desc, int):
         c = desc
         a = (c >> 24) & 0xff
         r = (c >> 16) & 0xff
diff --git a/src/efl/evas_canvas.pxi b/src/efl/evas_canvas.pxi
index 11422c3..57dd162 100644
--- a/src/efl/evas_canvas.pxi
+++ b/src/efl/evas_canvas.pxi
@@ -135,7 +135,7 @@ cdef class Canvas(Eo):
         """
         cdef int engine_id
 
-        if isinstance(method, (int, long)):
+        if isinstance(method, int):
             engine_id = method
         elif isinstance(method, unicode):
             method = PyUnicode_AsUTF8String(method)
diff --git a/src/efl/evas_object.pxi b/src/efl/evas_object.pxi
index 7873ebf..132ccd0 100644
--- a/src/efl/evas_object.pxi
+++ b/src/efl/evas_object.pxi
@@ -924,7 +924,7 @@ cdef class Object(Eo):
             cdef int x, y, w
             x, y = spec
             evas_object_geometry_get(self.obj, NULL, NULL, &w, NULL)
-            evas_object_move(self.obj, x - w/2, y)
+            evas_object_move(self.obj, x - w//2, y)
 
     def top_center_get(self):
         cdef int x, y, w
@@ -933,7 +933,7 @@ cdef class Object(Eo):
     def top_center_set(self, int x, int y):
         cdef int w
         evas_object_geometry_get(self.obj, NULL, NULL, &w, NULL)
-        evas_object_move(self.obj, x - w/2, y)
+        evas_object_move(self.obj, x - w//2, y)
 
     property top_right:
         """Object's top-right corner coordinates.
@@ -970,13 +970,13 @@ cdef class Object(Eo):
         def __get__(self): # replicated to avoid performance hit
             cdef int x, y, h
             evas_object_geometry_get(self.obj, &x, &y, NULL, &h)
-            return (x, y + h/2)
+            return (x, y + h//2)
 
         def __set__(self, spec):
             cdef int x, y, h
             x, y = spec
             evas_object_geometry_get(self.obj, NULL, NULL, NULL, &h)
-            evas_object_move(self.obj, x, y - h/2)
+            evas_object_move(self.obj, x, y - h//2)
 
     def left_center_get(self):
         cdef int x, y, h
@@ -985,7 +985,7 @@ cdef class Object(Eo):
     def left_center_set(self, int x, int y):
         cdef int h
         evas_object_geometry_get(self.obj, NULL, NULL, NULL, &h)
-        evas_object_move(self.obj, x, y - h/2)
+        evas_object_move(self.obj, x, y - h//2)
 
     property right_center:
         """The coordinates of the right-center position.
@@ -1002,7 +1002,7 @@ cdef class Object(Eo):
             cdef int x, y, w, h
             x, y = spec
             evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-            evas_object_move(self.obj, x - w, y - h/2)
+            evas_object_move(self.obj, x - w, y - h//2)
 
     def right_center_get(self):
         cdef int x, y, w, h
@@ -1011,7 +1011,7 @@ cdef class Object(Eo):
     def right_center_set(self, int x, int y):
         cdef int w, h
         evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-        evas_object_move(self.obj, x - w, y - h/2)
+        evas_object_move(self.obj, x - w, y - h//2)
 
     property bottom_left:
         """Object's bottom-left corner coordinates.
@@ -1048,22 +1048,22 @@ cdef class Object(Eo):
         def __get__(self): # replicated to avoid performance hit
             cdef int x, y, w, h
             evas_object_geometry_get(self.obj, &x, &y, &w, &h)
-            return (x + w/2, y + h)
+            return (x + w//2, y + h)
 
         def __set__(self, spec):
             cdef int x, y, w, h
             x, y = spec
             evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-            evas_object_move(self.obj, x - w/2, y - h)
+            evas_object_move(self.obj, x - w//2, y - h)
 
     def bottom_center_get(self):
         cdef int x, y, w, h
         evas_object_geometry_get(self.obj, &x, &y, &w, &h)
-        return (x + w/2, y + h)
+        return (x + w//2, y + h)
     def bottom_center_set(self, int x, int y):
         cdef int w, h
         evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-        evas_object_move(self.obj, x - w/2, y - h)
+        evas_object_move(self.obj, x - w//2, y - h)
 
     property bottom_right:
         """Object's bottom-right corner coordinates.
@@ -1100,29 +1100,29 @@ cdef class Object(Eo):
         def __get__(self): # replicated to avoid performance hit
             cdef int x, y, w, h, x2, y2
             evas_object_geometry_get(self.obj, &x, &y, &w, &h)
-            x2 = x + w/2
-            y2 = y + h/2
+            x2 = x + w//2
+            y2 = y + h//2
             return (x2, y2)
 
         def __set__(self, spec):
             cdef int x, y, w, h, x2, y2
             x, y = spec
             evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-            x2 = x - w/2
-            y2 = y - h/2
+            x2 = x - w//2
+            y2 = y - h//2
             evas_object_move(self.obj, x2, y2)
 
     def center_get(self):
         cdef int x, y, w, h, x2, y2
         evas_object_geometry_get(self.obj, &x, &y, &w, &h)
-        x2 = x + w/2
-        y2 = y + h/2
+        x2 = x + w//2
+        y2 = y + h//2
         return (x2, y2)
     def center_set(self, int x, int y):
         cdef int w, h, x2, y2
         evas_object_geometry_get(self.obj, NULL, NULL, &w, &h)
-        x2 = x - w/2
-        y2 = y - h/2
+        x2 = x - w//2
+        y2 = y - h//2
         evas_object_move(self.obj, x2, y2)
 
     property rect:
@@ -1151,9 +1151,9 @@ cdef class Object(Eo):
             ret._w = w
             ret._h = h
             ret.x1 = x + w
-            ret.cx = x + w/2
+            ret.cx = x + w//2
             ret.y1 = y + h
-            ret.cy = y + h/2
+            ret.cy = y + h//2
             return ret
 
         def __set__(self, spec):
diff --git a/src/efl/evas_rect.pxi b/src/efl/evas_rect.pxi
index 6ab802f..20abd84 100644
--- a/src/efl/evas_rect.pxi
+++ b/src/efl/evas_rect.pxi
@@ -130,10 +130,10 @@ cdef class Rect(object):
                         self.y0 = self.y1 - self._h
 
         self.x1 = self.x0 + self._w
-        self.cx = self.x0 + self._w/2
+        self.cx = self.x0 + self._w//2
 
         self.y1 = self.y0 + self._h
-        self.cy = self.y0 + self._h/2
+        self.cy = self.y0 + self._h//2
 
     def __str__(self):
         return "%s(x=%d, y=%d, w=%d, h=%d)" % \
@@ -151,7 +151,7 @@ cdef class Rect(object):
         def __set__(self, int x):
             self.x0 = x
             self.x1 = x + self._w
-            self.cx = x + self._w/2
+            self.cx = x + self._w//2
 
     property left: # same as "x"
         """:type: int"""
@@ -161,7 +161,7 @@ cdef class Rect(object):
         def __set__(self, int x):
             self.x0 = x
             self.x1 = x + self._w
-            self.cx = x + self._w/2
+            self.cx = x + self._w//2
 
     property right:
         """:type: int"""
@@ -171,7 +171,7 @@ cdef class Rect(object):
         def __set__(self, int x):
             self.x0 = x - self._w
             self.x1 = x
-            self.cx = self.x0 + self._w/2
+            self.cx = self.x0 + self._w//2
 
     property center_x:
         """:type: int"""
@@ -179,7 +179,7 @@ cdef class Rect(object):
             return self.cx
 
         def __set__(self, int cx):
-            self.x0 = cx - self._w/2
+            self.x0 = cx - self._w//2
             self.x1 = self.x0 + self._w
             self.cx = cx
 
@@ -191,7 +191,7 @@ cdef class Rect(object):
         def __set__(self, int y):
             self.y0 = y
             self.y1 = y + self._h
-            self.cy = y + self._h/2
+            self.cy = y + self._h//2
 
     property top: # same as "y"
         """:type: int"""
@@ -201,7 +201,7 @@ cdef class Rect(object):
         def __set__(self, int y):
             self.y0 = y
             self.y1 = y + self._h
-            self.cy = y + self._h/2
+            self.cy = y + self._h//2
 
     property bottom:
         """:type: int"""
@@ -211,7 +211,7 @@ cdef class Rect(object):
         def __set__(self, int y):
             self.y0 = y - self._h
             self.y1 = y
-            self.cy = self.y0 + self._h/2
+            self.cy = self.y0 + self._h//2
 
     property center_y:
         """:type: int"""
@@ -219,7 +219,7 @@ cdef class Rect(object):
             return self.cy
 
         def __set__(self, int cy):
-            self.y0 = cy - self._h/2
+            self.y0 = cy - self._h//2
             self.y1 = self.y0 + self._h
             self.cy = cy
 
@@ -231,7 +231,7 @@ cdef class Rect(object):
         def __set__(self, int w):
             self._w = w
             self.x1 = self.x0 + w
-            self.cx = self.x0 + w/2
+            self.cx = self.x0 + w//2
 
     property width:
         """:type: int"""
@@ -241,7 +241,7 @@ cdef class Rect(object):
         def __set__(self, int w):
             self._w = w
             self.x1 = self.x0 + w
-            self.cx = self.x0 + w/2
+            self.cx = self.x0 + w//2
 
     property h:
         """:type: int"""
@@ -251,7 +251,7 @@ cdef class Rect(object):
         def __set__(self, int h):
             self._h = h
             self.y1 = self.y0 + h
-            self.cy = self.y0 + h/2
+            self.cy = self.y0 + h//2
 
     property height:
         """:type: int"""
@@ -261,7 +261,7 @@ cdef class Rect(object):
         def __set__(self, int h):
             self._h = h
             self.y1 = self.y0 + h
-            self.cy = self.y0 + h/2
+            self.cy = self.y0 + h//2
 
     property center:
         """:type: (int **x**, int **y**)"""
@@ -273,11 +273,11 @@ cdef class Rect(object):
 
             cx, cy = spec
 
-            self.x0 = cx - self._w/2
+            self.x0 = cx - self._w//2
             self.x1 = self.x0 + self._w
             self.cx = cx
 
-            self.y0 = cy - self._h/2
+            self.y0 = cy - self._h//2
             self.y1 = self.y0 + self._h
             self.cy = cy
 
@@ -292,11 +292,11 @@ cdef class Rect(object):
 
             self.x0 = x
             self.x1 = x + self._w
-            self.cx = x + self._w/2
+            self.cx = x + self._w//2
 
             self.y0 = y
             self.y1 = y + self._h
-            self.cy = y + self._h/2
+            self.cy = y + self._h//2
 
     property top_right:
         """:type: (int **x**, int **y**)"""
@@ -309,11 +309,11 @@ cdef class Rect(object):
 
             self.x0 = x - self._w
             self.x1 = x
-            self.cx = self.x0 + self._w/2
+            self.cx = self.x0 + self._w//2
 
             self.y0 = y
             self.y1 = y + self._h
-            self.cy = y + self._h/2
+            self.cy = y + self._h//2
 
     property bottom_left:
         """:type: (int **x**, int **y**)"""
@@ -326,11 +326,11 @@ cdef class Rect(object):
 
             self.x0 = x
             self.x1 = x + self._w
-            self.cx = x + self._w/2
+            self.cx = x + self._w//2
 
             self.y0 = y - self._h
             self.y1 = y
-            self.cy = self.y0 + self._h/2
+            self.cy = self.y0 + self._h//2
 
     property bottom_right:
         """:type: (int **x**, int **y**)"""
@@ -343,11 +343,11 @@ cdef class Rect(object):
 
             self.x0 = x - self._w
             self.x1 = x
-            self.cx = self.x0 + self._w/2
+            self.cx = self.x0 + self._w//2
 
             self.y0 = y - self._h
             self.y1 = y
-            self.cy = self.y0 + self._h/2
+            self.cy = self.y0 + self._h//2
 
     property pos:
         """:type: (int **x**, int **y**)"""
@@ -360,11 +360,11 @@ cdef class Rect(object):
 
             self.x0 = x
             self.x1 = x + self._w
-            self.cx = x + self._w/2
+            self.cx = x + self._w//2
 
             self.y0 = y
             self.y1 = y + self._h
-            self.cy = y + self._h/2
+            self.cy = y + self._h//2
 
     property size:
         """:type: (int **w**, int **h**)"""
@@ -377,11 +377,11 @@ cdef class Rect(object):
 
             self._w = w
             self.x1 = self.x0 + w
-            self.cx = self.x0 + w/2
+            self.cx = self.x0 + w//2
 
             self._h = h
             self.y1 = self.y0 + h
-            self.cy = self.y0 + h/2
+            self.cy = self.y0 + h//2
 
     property area:
         """:type: (int **w**, int **h**)"""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to