summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-04-28 15:23:30 -0700
committerThomas A Caswell <tcaswell@gmail.com>2015-09-29 15:01:48 -0400
commit8d6456344b80fa5f8f745fc92e364ee8b6a75cbf (patch)
tree7bd2f38555b01d3f11f031595618c6c739bb3f9a /misc
parent2cfccfb860bbc8c5be77792012172bceb7e8b9e2 (diff)
downloadgobject-introspection-8d6456344b80fa5f8f745fc92e364ee8b6a75cbf.tar.gz
giscanner: Enable "true division" for all Python files
Import Python 3 compatible "true division" from the future (PEP 238). This changes the Python 2 classic division which uses floor division on integers to true division. Verfied we don't actually use the division operator anywhere in the code base so this a safety for supporting both Python 2 and 3. https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/update-glib-annotations.py1
-rw-r--r--misc/verbump.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/misc/update-glib-annotations.py b/misc/update-glib-annotations.py
index 71670a36..34fd3e89 100755
--- a/misc/update-glib-annotations.py
+++ b/misc/update-glib-annotations.py
@@ -4,6 +4,7 @@
# ./update-glib-annotations.py ../../glib ../../glib/_build
from __future__ import absolute_import
+from __future__ import division
import os
import sys
diff --git a/misc/verbump.py b/misc/verbump.py
index ac2e1b35..0db54452 100644
--- a/misc/verbump.py
+++ b/misc/verbump.py
@@ -4,6 +4,7 @@
# * Bump version in configure.ac and commit it
from __future__ import absolute_import
+from __future__ import division
import re
import os