changeset 29890:31a6d5e14508

py3: remove use of *L syntax The int in Python 3 behaves as long so no need of L's in py3. Moreover we dont need long here.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 01 Sep 2016 02:29:46 +0530
parents 6f447b9ec263
children ca6940515485
files hgext/color.py mercurial/archival.py mercurial/commands.py tests/test-check-py3-compat.t
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/color.py	Tue Aug 30 09:22:53 2016 -0700
+++ b/hgext/color.py	Thu Sep 01 02:29:46 2016 +0530
@@ -558,8 +558,8 @@
                     ('srWindow', _SMALL_RECT),
                     ('dwMaximumWindowSize', _COORD)]
 
-    _STD_OUTPUT_HANDLE = 0xfffffff5L # (DWORD)-11
-    _STD_ERROR_HANDLE = 0xfffffff4L  # (DWORD)-12
+    _STD_OUTPUT_HANDLE = 0xfffffff5 # (DWORD)-11
+    _STD_ERROR_HANDLE = 0xfffffff4  # (DWORD)-12
 
     _FOREGROUND_BLUE = 0x0001
     _FOREGROUND_GREEN = 0x0002
--- a/mercurial/archival.py	Tue Aug 30 09:22:53 2016 -0700
+++ b/mercurial/archival.py	Thu Sep 01 02:29:46 2016 +0530
@@ -231,7 +231,7 @@
         if islink:
             mode = 0o777
             ftype = _UNX_IFLNK
-        i.external_attr = (mode | ftype) << 16L
+        i.external_attr = (mode | ftype) << 16
         # add "extended-timestamp" extra block, because zip archives
         # without this will be extracted with unexpected timestamp,
         # if TZ is not configured as GMT
--- a/mercurial/commands.py	Tue Aug 30 09:22:53 2016 -0700
+++ b/mercurial/commands.py	Thu Sep 01 02:29:46 2016 +0530
@@ -3381,9 +3381,9 @@
     nump2prev = 0
     chainlengths = []
 
-    datasize = [None, 0, 0L]
-    fullsize = [None, 0, 0L]
-    deltasize = [None, 0, 0L]
+    datasize = [None, 0, 0]
+    fullsize = [None, 0, 0]
+    deltasize = [None, 0, 0]
 
     def addsize(size, l):
         if l[0] is None or size < l[0]:
--- a/tests/test-check-py3-compat.t	Tue Aug 30 09:22:53 2016 -0700
+++ b/tests/test-check-py3-compat.t	Thu Sep 01 02:29:46 2016 +0530
@@ -26,7 +26,7 @@
   hgext/children.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/churn.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/clonebundles.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
-  hgext/color.py: invalid syntax: invalid syntax (<unknown>, line *)
+  hgext/color.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/convert/bzr.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/convert/common.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/convert/convcmd.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
@@ -79,7 +79,7 @@
   hgext/transplant.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/win32mbcs.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   hgext/win32text.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
-  mercurial/archival.py: invalid syntax: invalid syntax (<unknown>, line *)
+  mercurial/archival.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/bookmarks.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/branchmap.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/bundle2.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
@@ -88,7 +88,7 @@
   mercurial/changegroup.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/changelog.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/cmdutil.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
-  mercurial/commands.py: invalid syntax: invalid syntax (<unknown>, line *)
+  mercurial/commands.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/commandserver.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/config.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)
   mercurial/context.py: error importing: <TypeError> str expected, not bytes (error at encoding.py:*)