Python 2 compatibility for Eric 5.

Sun, 29 Sep 2013 16:03:40 +0200

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sun, 29 Sep 2013 16:03:40 +0200
changeset 3
551bd94613ac
parent 2
f2746ef237ae
child 4
a27bb7a06650

Python 2 compatibility for Eric 5.

ChangeLog file | annotate | diff | comparison | revisions
PluginApis.e4p file | annotate | diff | comparison | revisions
PluginApis.py file | annotate | diff | comparison | revisions
PluginApis.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sun Jun 09 17:22:07 2013 +0200
+++ b/ChangeLog	Sun Sep 29 16:03:40 2013 +0200
@@ -1,4 +1,8 @@
 ChangeLog
 ---------
+Version 1.1.0:
+- Python 2 compatibility for Eric 5
+- Enabled for very old Python2 projects
+
 Version 1.0.0:
 - first release
--- a/PluginApis.e4p	Sun Jun 09 17:22:07 2013 +0200
+++ b/PluginApis.e4p	Sun Sep 29 16:03:40 2013 +0200
@@ -1,13 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE Project SYSTEM "Project-5.1.dtd">
 <!-- eric5 project file for project PluginApis -->
+<!-- Saved: 2013-09-29, 16:03:29 -->
+<!-- Copyright (C) 2013 Detlev Offenbach, detlev@die-offenbachs.de -->
 <Project version="5.1">
   <Language>en</Language>
   <Hash>cffb199a6e080ec1818b2abf07afc11ca0592e10</Hash>
   <ProgLanguage mixed="0">Python3</ProgLanguage>
   <ProjectType>E4Plugin</ProjectType>
   <Description>This plug-in provides API files for auto-completion and calltips, that are not delivered in some distributions.</Description>
-  <Version>1.0</Version>
+  <Version>1.1.0</Version>
   <Author>Detlev Offenbach</Author>
   <Email>detlev@die-offenbachs.de</Email>
   <Eol index="1"/>
--- a/PluginApis.py	Sun Jun 09 17:22:07 2013 +0200
+++ b/PluginApis.py	Sun Sep 29 16:03:40 2013 +0200
@@ -7,6 +7,8 @@
 Module implementing the APIs plugin.
 """
 
+from __future__ import unicode_literals    # __IGNORE_WARNING__
+
 import os
 import glob
 
@@ -17,7 +19,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "1.0.0"
+version = "1.1.0"
 className = "PluginApis"
 packageName = "APIs"
 shortDescription = "API files for auto-completion and call tips."
@@ -36,7 +38,7 @@
     
     @return list of API filenames (list of string)
     """
-    if language in ["Python3",  "Python2"]:
+    if language in ["Python3",  "Python2", "Python"]:
         apisDir = \
             os.path.join(os.path.dirname(__file__), "APIs", "Python")
         apis = glob.glob(os.path.join(apisDir, '*.api'))
@@ -63,7 +65,7 @@
         
         @param ui reference to the user interface object (UI.UserInterface)
         """
-        super().__init__(ui)
+        super(PluginApis, self).__init__(ui)
         self.__ui = ui
     
     def activate(self):
Binary file PluginApis.zip has changed

eric ide

mercurial