parkouss / webmacs

webmacs - keyboard driven (emacs key bindings) browser, https://webmacs.readthedocs.io/en/latest/
GNU General Public License v3.0
157 stars 21 forks source link

Avoid warning in Python 3.8 #132

Closed stefanhusmann closed 1 year ago

stefanhusmann commented 4 years ago

Launching Webmacs under Python 3.8 gives a warning about line 70 in minibuffer/init.py about deprecation of implicit conversion to an integer.

This seems to fix it:

diff --git a/webmacs/minibuffer/__init__.py b/webmacs/minibuffer/__init__.py
index 8ee3b13..80d1e13 100644
--- a/webmacs/minibuffer/__init__.py
+++ b/webmacs/minibuffer/__init__.py
@@ -65,7 +65,7 @@ class Popup(QTableView):
         # Split the columns width, nicer when we have at least two of them.
         cols = self.model().columnCount()
         if cols > 0:
-            col_width = w / cols
+            col_width = w // cols
             for i in range(cols):
                 self.setColumnWidth(i, col_width)
parkouss commented 1 year ago

I fixed the issue with 1410aa1.