[gnue] r10230 - in trunk/gnue-common: . src/apps src/base src/rpc/drivers/xmlrpc
[email protected] Tue, 2 Nov 2010 04:21:52 -0500 (CDT)
| Newsgroups | gmane.comp.cms.gnue.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: reinhard Date: 2010-11-02 04:21:52 -0500 (Tue, 02 Nov 2010) New Revision: 10230 Modified: trunk/gnue-common/ trunk/gnue-common/setup-bzr.py trunk/gnue-common/setup.py trunk/gnue-common/src/apps/GBaseApp.py trunk/gnue-common/src/base/log.py trunk/gnue-common/src/base/setup.py trunk/gnue-common/src/rpc/drivers/xmlrpc/typeconv.py Log: Require Python 2.5. Property changes on: trunk/gnue-common ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-10-28 17:26:19.497999907 +0200 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: common + timestamp: 2010-11-02 09:57:44.948999882 +0100 committer: Reinhard M=C3=BCller <[email protected]> properties:=20 branch-nick: common Name: bzr:file-ids - src/datasources/drivers/Base/ResultSet.py 4887@3a364389-8fce-0310-8f= 11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2FBase%2F= ResultSet.py + setup-bzr.py 9621@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-= common:setup-svn.py setup.py 946@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:set= up.py src/apps/GBaseApp.py 1799@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgn= ue-common:src%2Fapps%2FGBaseApp.py src/base/log.py 9758@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-co= mmon:src%2Fbase%2Flog.py src/base/setup.py 9934@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-= common:src%2Fbase%2Fsetup.py src/rpc/drivers/xmlrpc/typeconv.py 7888@3a364389-8fce-0310-8f11-cc363fde1= 6c7:trunk%2Fgnue-common:src%2Frpc%2Fdrivers%2Fxmlrpc%2Ftypeconv.py Name: bzr:revision-id:v4 - 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] + 3116 [email protected] 3117 [email protected] 3118 [email protected] 3119 [email protected] 3120 [email protected] 3121 [email protected] 3122 [email protected] 3123 [email protected] 3124 [email protected] 3125 [email protected] 3126 [email protected] 3127 [email protected] 3128 [email protected] 3129 [email protected] 3130 [email protected] 3131 [email protected] 3132 [email protected] 3133 [email protected] 3134 [email protected] 3135 [email protected] 3136 [email protected] Name: bzr:text-parents -=20 + setup-bzr.py [email protected]= rvzaz setup.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-= cc363fde16c7:trunk%2Fgnue-common:10066 src/apps/GBaseApp.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fc= e-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10038 src/base/log.py [email protected]= byv src/base/setup.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0= 310-8f11-cc363fde16c7:trunk%2Fgnue-common:10034 src/rpc/drivers/xmlrpc/typeconv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24= .:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 Modified: trunk/gnue-common/setup-bzr.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/setup-bzr.py 2010-10-28 20:59:53 UTC (rev 10229) +++ trunk/gnue-common/setup-bzr.py 2010-11-02 09:21:52 UTC (rev 10230) @@ -260,7 +260,7 @@ =20 # First of all, make sure this is a current enough Python release. try: - if sys.hexversion < 0x02000000: + if sys.hexversion < 0x02050000: raise AttributeError except AttributeError: =20 @@ -268,12 +268,12 @@ print """ You are running Python %s. =20 - GNU Enterprise requires at least Python 2.0 (recommended: 2.1+). + GNU Enterprise requires at least Python 2.5. If you have a later version installed, you should run setup.py - against that version. For example, if you have Python 2.1 + against that version. For example, if you have Python 2.5 installed, you may need to run: =20 - python2.1 %s + python2.5 %s """ % (string.split(sys.version)[0], sys.argv[0]) print "-" * 70 =20 Modified: trunk/gnue-common/setup.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/setup.py 2010-10-28 20:59:53 UTC (rev 10229) +++ trunk/gnue-common/setup.py 2010-11-02 09:21:52 UTC (rev 10230) @@ -149,19 +149,19 @@ # ----------------------------------------------------------------------= ------- =20 try: - if sys.hexversion < 0x02030000: + if sys.hexversion < 0x02050000: raise AttributeError except AttributeError: print "-" * 70 print """ You are running Python %s. =20 -GNU Enterprise requires at least Python 2.3. +GNU Enterprise requires at least Python 2.5. If you have a later version installed, you should run setup.py -against that version. For example, if you have Python 2.3 +against that version. For example, if you have Python 2.5 installed, you may need to run: =20 -python2.3 setup.py +python2.5 setup.py """ % sys.version.split()[0] print "-" * 70 sys.exit(1) Modified: trunk/gnue-common/src/apps/GBaseApp.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/src/apps/GBaseApp.py 2010-10-28 20:59:53 UTC (rev 1= 0229) +++ trunk/gnue-common/src/apps/GBaseApp.py 2010-11-02 09:21:52 UTC (rev 1= 0230) @@ -229,10 +229,10 @@ os.path.join(paths.config, "connections.conf")) ] =20 # Python version check - if not hasattr(sys, 'hexversion') or sys.hexversion < 0x02030000= : - msg =3D u_("This application requires Python 2.3 or greater.= ") + if not hasattr(sys, 'hexversion') or sys.hexversion < 0x02050000= : + msg =3D u_("This application requires Python 2.5 or greater.= ") if hasattr(sys, 'version'): - msg =3D u_("This application requires Python 2.3 or grea= ter. " + msg =3D u_("This application requires Python 2.5 or grea= ter. " "You are running Python %s") % sys.version[:5] =20 raise errors.AdminError, msg Modified: trunk/gnue-common/src/base/log.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/src/base/log.py 2010-10-28 20:59:53 UTC (rev 10229) +++ trunk/gnue-common/src/base/log.py 2010-11-02 09:21:52 UTC (rev 10230) @@ -129,16 +129,11 @@ If this decorator is applied to a function, every call to that funct= ion is logged on C{DEBUG} level. =20 - Usage with Python 2.4 or later:: + Usage:: @logged_f myfunction(self, foo, bar): : =20 - Usage with Python 2.3:: - myfunction(self, foo, bar): - : - myfunction=3Dlogged_f(myfunction) - @param func: Function to put the logging wrapper around. @type func: function @return: Function with the logging wrapper. @@ -162,16 +157,11 @@ If this decorator is applied to a function, every call to that funct= ion issues a deprecation warning. =20 - Usage with Python 2.4 or later:: + Usage:: @deprecated_f myfunction(self, foo, bar): : =20 - Usage with Python 2.3:: - myfunction(self, foo, bar): - : - myfunction=3Ddeprecated_f(myfunction) - @param func: Function to put the deprecation warning wrapper around. @type func: function @return: Function with the deprecation warning wrapper. @@ -196,16 +186,11 @@ If this decorator is applied to a function, every call to that funct= ion is logged on C{DEBUG} level. =20 - Usage with Python 2.4 or later:: + Usage:: @logged_f_n('my.logger.name') myfunction(self, foo, bar): : =20 - Usage with Python 2.3:: - myfunction(self, foo, bar): - : - myfunction=3Dlogged_f_n('my.logger.name')(myfunction) - @param name: Logger name to use. @type name: string @return: A function that accepts a function as argument and returns = the @@ -232,16 +217,11 @@ If this decorator is applied to a function, every call to that funct= ion issues a deprecation warning. =20 - Usage with Python 2.4 or later:: + Usage:: @deprecated_f_n('my.logger.name') myfunction(self, foo, bar): : =20 - Usage with Python 2.3:: - myfunction(self, foo, bar): - : - myfunction=3Ddeprecated_f_n('my.logger.name')(myfunction) - @param name: Logger name to use. @type name: string @return: A function that accepts a function as argument and returns = the Modified: trunk/gnue-common/src/base/setup.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/src/base/setup.py 2010-10-28 20:59:53 UTC (rev 1022= 9) +++ trunk/gnue-common/src/base/setup.py 2010-11-02 09:21:52 UTC (rev 1023= 0) @@ -152,7 +152,7 @@ # ----------------------------------------------------------------------= ------- =20 try: - if sys.hexversion < 0x02030000: + if sys.hexversion < 0x02050000: raise AttributeError =20 except AttributeError: @@ -160,12 +160,12 @@ print """ You are running Python %s. =20 -GNU Enterprise requires at least Python 2.3. +GNU Enterprise requires at least Python 2.5. If you have a later version installed, you should run setup.py -against that version. For example, if you have Python 2.3 +against that version. For example, if you have Python 2.5 installed, you may need to run: =20 -python2.3 setup.py +python2.5 setup.py """ % sys.version.split()[0] print "-" * 70 sys.exit(1) Modified: trunk/gnue-common/src/rpc/drivers/xmlrpc/typeconv.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/gnue-common/src/rpc/drivers/xmlrpc/typeconv.py 2010-10-28 20:59= :53 UTC (rev 10229) +++ trunk/gnue-common/src/rpc/drivers/xmlrpc/typeconv.py 2010-11-02 09:21= :52 UTC (rev 10230) @@ -132,13 +132,8 @@ result =3D {} =20 for (key, val) in value.items (): - # Workaround for a bug xmlrpclib <=3D Python 2.3.4: No Unicode str= ings - # possible as dictionary keys. - if isinstance (key, unicode): - key =3D key.encode ('utf-8') - - # Another deficiency in xmlrpclib: No <None> values as dictionary = keys - elif key is None: + # A deficiency in xmlrpclib: No <None> values as dictionary keys + if key is None: key =3D '' =20 elif not isinstance (key, str):