Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Barry Scott wrote: | See http://code.google.com/p/python-incompatibility/source/checkout Thanks. I'm *VERY* interested in 2.6-3.0 migration guide for C module extensions. 3.0 is around the corner and the API is changing almost daily :-p. - --

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Georg Brandl
Jesus Cea schrieb: Barry Scott wrote: | See http://code.google.com/p/python-incompatibility/source/checkout Thanks. I'm *VERY* interested in 2.6-3.0 migration guide for C module extensions. 3.0 is around the corner and the API is changing almost daily :-p. So it's good that nobody has

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Lennart Regebro
On Mon, Jul 21, 2008 at 11:06, Jesus Cea [EMAIL PROTECTED] wrote: I'm *VERY* interested in 2.6-3.0 migration guide for C module extensions. 3.0 is around the corner and the API is changing almost daily :-p. It would be great if python-incompatibility would have examples of the C-api changes as

Re: [Python-Dev] [Python-3000] Removing bsddb module from py3k (was Re: No beta2 tonight)

2008-07-21 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Josiah Carlson wrote: | I'm still curious as to what deep features people are using in bsddb. | Anyone have any pointers to open source software? I'm using replication and distributed transactions. Database encryption and page integrity checks.

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Georg Brandl wrote: | So it's good that nobody has written a migration guide yet; he'd have | to rewrite it daily. Yes. I was delaying battling the 3.0 bsddb migration until RC to avoid redoing the same work 15 times XDD I'm not lazy, but

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lennart Regebro wrote: | On Mon, Jul 21, 2008 at 11:06, Jesus Cea [EMAIL PROTECTED] wrote: | I'm *VERY* interested in 2.6-3.0 migration guide for C module | extensions. 3.0 is around the corner and the API is changing almost | daily :-p. | | It would

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Lennart Regebro
On Mon, Jul 21, 2008 at 11:48, Jesus Cea [EMAIL PROTECTED] wrote: I can comment about some issues I had this weekend. I don't do C development myself, so comments aren't that useful for me, but code examples are, so we can stick them into python-incompatibility. Remember that my intention is

[Python-Dev] Subversion 1.5 and better merge support

2008-07-21 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Subversion 1.5 solves the repeated merge problem. At last!!. Somebody is considering upgrading python svn to 1.5, and allowing only commits coming from 1.5 clients?. - -- Jesus Cea Avion _/_/ _/_/_/_/_/_/ [EMAIL

[Python-Dev] Syntax error in python2.6

2008-07-21 Thread Bristow Thankachan
Hi everybody, During the porting of Zope2 to Python2.6, I am stuck with a syntax error in the module AccessControl, which is given below. def reorder(s, with=None, without=()): ^ SyntaxError: invalid syntax in line 56 of

Re: [Python-Dev] Syntax error in python2.6

2008-07-21 Thread Jesse Noller
Because as of 2.6 the 'with' word is now part of the with statement, see pep 343. On Jul 21, 2008, at 7:13 AM, Bristow Thankachan [EMAIL PROTECTED] wrote: Hi everybody, During the porting of Zope2 to Python2.6, I am stuck with a syntax error in the module AccessControl, which is given

Re: [Python-Dev] [Zope-dev] Syntax error in python2.6

2008-07-21 Thread Bristow Thankachan
Thank you for the quick response. I made the change and got the syntax error corrected. with regards Bristow. On Mon, Jul 21, 2008 at 4:57 PM, Tino Wildenhain [EMAIL PROTECTED] wrote: Bristow Thankachan wrote: Hi everybody, During the porting of Zope2 to Python2.6, I am stuck with a

Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-21 Thread M.-A. Lemburg
On 2008-07-20 22:45, Victor Stinner wrote: Le Saturday 19 July 2008 21:52:09 A.M. Kuchling, vous avez écrit : Excellent work! Another fruitful area for fuzzing might be the miniature virtual machine used by the re module. It's possible to import _sre and call the compile() function directly

Re: [Python-Dev] [Zope-dev] Syntax error in python2.6

2008-07-21 Thread Tino Wildenhain
Bristow Thankachan wrote: Hi everybody, During the porting of Zope2 to Python2.6, I am stuck with a syntax error in the module AccessControl, which is given below. def reorder(s, with=None, without=()): ^ SyntaxError: invalid syntax in line 56 of

Re: [Python-Dev] Syntax error in python2.6

2008-07-21 Thread Bristow Thankachan
hi all, I changed the attribute 'with' in /home/zope/ztrunk26/lib/python/RestrictedPython/Utilities.py to 'wit' and I ran the tests in python2.4 and I got the following result. Running tests at level 1 Running unit tests: Running: Ran 285 tests with 0 failures and 0 errors in 6.587

[Python-Dev] import error in python2.6

2008-07-21 Thread Bristow Thankachan
Hi all, During the porting of Zope2, I am stuck with import errors in many modules. The same code works well in python2.5 and 2.4. Can anybody give the details of this import error in python2.6 and how to get the error corrected? with regards Bristow

Re: [Python-Dev] import error in python2.6

2008-07-21 Thread Quentin Gallet-Gilles
Hi Bristow, You didn't provide any broken code that could help us give an explanation. Also this kind of question is best answered on the python-users mailing list. Python-dev is reserved for discussion about the evolution of Python, not its use. Cheers, Quentin On Mon, Jul 21, 2008 at 2:12 PM,

Re: [Python-Dev] Syntax error in python2.6

2008-07-21 Thread Lennart Regebro
On Mon, Jul 21, 2008 at 14:09, Bristow Thankachan [EMAIL PROTECTED] wrote: Can anybody tell me whether this implies it is backward compatible in python2.4? If you change the API it isn't backwards compatible. The question is if this is a problem or not, if anything outside Zope itself is using

Re: [Python-Dev] Syntax error in python2.6

2008-07-21 Thread Malthe Borch
Lennart Regebro wrote: 2. Using **kw in the argument and looking for noth with and with_, that way, which will be backwards compatible. +1 \malthe ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev

Re: [Python-Dev] Subversion 1.5 and better merge support

2008-07-21 Thread Benjamin Peterson
On Mon, Jul 21, 2008 at 5:07 AM, Jesus Cea [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Subversion 1.5 solves the repeated merge problem. At last!!. Somebody is considering upgrading python svn to 1.5, and allowing only commits coming from 1.5 clients?. While

Re: [Python-Dev] import error in python2.6

2008-07-21 Thread Benjamin Peterson
On Mon, Jul 21, 2008 at 7:20 AM, Quentin Gallet-Gilles [EMAIL PROTECTED] wrote: Hi Bristow, You didn't provide any broken code that could help us give an explanation. Also this kind of question is best answered on the python-users mailing list. Python-dev is reserved for discussion about the

Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-21 Thread A.M. Kuchling
On Sun, Jul 20, 2008 at 10:45:39PM +0200, Victor Stinner wrote: Hum... how can I say it? It's trivial to crash _sre :-) So I blacklisted _sre.compile() in my fuzzer. We should certainly try to fix those issues, then; people usually assume the re module is safe for use inside a sandbox and

Re: [Python-Dev] import error in python2.6

2008-07-21 Thread Fred Drake
On Jul 21, 2008, at 9:20 AM, Benjamin Peterson wrote: Since this is prelease software, it's probably ok to talk about issues with it. You could file a bug next time. However, AFAIK, Zope hasn't even been ported to 2.5. Many people are using Zope 3 with Python 2.5 without problems, though

Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-21 Thread Victor Stinner
Le Monday 21 July 2008 15:33:19 A.M. Kuchling, vous avez écrit : On Sun, Jul 20, 2008 at 10:45:39PM +0200, Victor Stinner wrote: Hum... how can I say it? It's trivial to crash _sre :-) So I blacklisted _sre.compile() in my fuzzer. We should certainly try to fix those issues, then; people

[Python-Dev] import error in python2.6

2008-07-21 Thread Bristow Thankachan
Hi all, I asked about the import error in python2.6 while trying to port zope2. The error message is given below. File /home/zope/ztrunk26/lib/python/AccessControl/ImplC.py, line 30, in module from ImplPython import RestrictedDTML, SecurityManager, ZopeSecurityPolicy ImportError: No module

Re: [Python-Dev] [Zope-dev] import error in python2.6

2008-07-21 Thread Lennart Regebro
On Mon, Jul 21, 2008 at 15:56, Bristow Thankachan [EMAIL PROTECTED] wrote: Hi all, I asked about the import error in python2.6 while trying to port zope2. The error message is given below. File /home/zope/ztrunk26/lib/python/AccessControl/ImplC.py, line 30, in module from ImplPython

Re: [Python-Dev] Syntax error in python2.6

2008-07-21 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Malthe Borch wrote: Lennart Regebro wrote: 2. Using **kw in the argument and looking for noth with and with_, that way, which will be backwards compatible. +1 The implementation of this function is already so obscure that using keywords should

Re: [Python-Dev] Deprecate parser's ast functions?

2008-07-21 Thread Benjamin Peterson
On Sat, Jun 7, 2008 at 3:13 PM, Georg Brandl [EMAIL PROTECTED] wrote: The parser module exports each function and type twice, once with AST in the name, once with ST. Since AST now has a different meaning for Python code compilation, I propose to deprecate the ast variants in 2.6 and remove

Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-21 Thread Antoine Pitrou
Victor Stinner victor.stinner at haypocalc.com writes: Le Monday 21 July 2008 15:33:19 A.M. Kuchling, vous avez écrit : On Sun, Jul 20, 2008 at 10:45:39PM +0200, Victor Stinner wrote: Hum... how can I say it? It's trivial to crash _sre So I blacklisted _sre.compile() in my fuzzer.

Re: [Python-Dev] Fuzzing bugs: most bugs are closed

2008-07-21 Thread A.M. Kuchling
yOn Mon, Jul 21, 2008 at 03:53:18PM +, Antoine Pitrou wrote: The underscore at the beginning of _sre clearly indicates that the module is not recommended for direct consumption, IMO. Even the functions that don't themselves start with an underscore... Sure, but if someone is trying to

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Brett Cannon
On Mon, Jul 21, 2008 at 2:34 AM, Jesus Cea [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Georg Brandl wrote: | So it's good that nobody has written a migration guide yet; he'd have | to rewrite it daily. Yes. I was delaying battling the 3.0 bsddb migration until RC

Re: [Python-Dev] Subversion 1.5 and better merge support

2008-07-21 Thread Brett Cannon
On Mon, Jul 21, 2008 at 6:16 AM, Benjamin Peterson [EMAIL PROTECTED] wrote: On Mon, Jul 21, 2008 at 5:07 AM, Jesus Cea [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Subversion 1.5 solves the repeated merge problem. At last!!. Somebody is considering upgrading python

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Benjamin Peterson
On Mon, Jul 21, 2008 at 1:16 PM, Brett Cannon [EMAIL PROTECTED] wrote: On Mon, Jul 21, 2008 at 2:34 AM, Jesus Cea [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Georg Brandl wrote: | So it's good that nobody has written a migration guide yet; he'd have | to

[Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Victor Stinner
Hi, Since Python 2.4 (maybe 2.2 or older), fileobj.read(4.2) displays an error and works as fileobj.read(4). i=open('/etc/issue') i.read(4.2) __main__:1: DeprecationWarning: integer argument expected, got float It should raises an error instead of a warning, it has no sense to read a

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Benjamin Peterson
On Mon, Jul 21, 2008 at 2:17 PM, Victor Stinner [EMAIL PROTECTED] wrote: Hi, Since Python 2.4 (maybe 2.2 or older), fileobj.read(4.2) displays an error and works as fileobj.read(4). i=open('/etc/issue') i.read(4.2) __main__:1: DeprecationWarning: integer argument expected, got float

Re: [Python-Dev] [Zope-dev] Syntax error in python2.6

2008-07-21 Thread Stephan Richter
On Monday 21 July 2008, Tino Wildenhain wrote: btw, shouldn't this already give a warning in 2.5? It does. I see it. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. Zope Stephan Richter ___ Python-Dev

Re: [Python-Dev] import error in python2.6

2008-07-21 Thread Martin Aspeli
Fred Drake wrote: On Jul 21, 2008, at 9:20 AM, Benjamin Peterson wrote: Since this is prelease software, it's probably ok to talk about issues with it. You could file a bug next time. However, AFAIK, Zope hasn't even been ported to 2.5. Many people are using Zope 3 with Python 2.5 without

Re: [Python-Dev] Python VM

2008-07-21 Thread Terry Reedy
Jakob Sievers wrote: Hi, I've been reading the Python VM sources over the last few afternoons and I took some notes, which I thought I'd share (and if anyone familiar with the VM internals could have a quick look at them, I'd really appreciate it). This is the CPython VM. Other

Re: [Python-Dev] Any PEP about 2.6 - 3000 code transition?

2008-07-21 Thread Lennart Regebro
On Mon, Jul 21, 2008 at 20:16, Brett Cannon [EMAIL PROTECTED] wrote: But waiting until all the betas have gone out totally defeats the purpose of the betas! I agree. Writing an actual *guide* can wait, but documenting the differences with code examples is a work that can start now, and I agree

Re: [Python-Dev] Python VM

2008-07-21 Thread Martin v. Löwis
Jakob, This looks fairly correct. A few comments below. Control Flow The calling sequence is: main() (in python.c) - Py_Main() (main.c) - PyRun_FooFlags() (pythonrun.c) - run_bar() (pythonrun.c) - PyEval_EvalCode() (ceval.c) - PyEval_EvalCodeEx() (ceval.c) -

Re: [Python-Dev] Python VM

2008-07-21 Thread Thomas Lee
Martin v. Löwis wrote: Jakob, This looks fairly correct. A few comments below. Control Flow The calling sequence is: main() (in python.c) - Py_Main() (main.c) - PyRun_FooFlags() (pythonrun.c) - run_bar() (pythonrun.c) - PyEval_EvalCode() (ceval.c) - PyEval_EvalCodeEx()

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Martin v. Löwis
Well, the real problem is os.urandom(4.2) which goes to an unlimited loop: while len(bytes) n: bytes += read(_urandomfd, n - len(bytes)) because read(0.2) works as read(0) :-/ I can't quite accept that as a bug in the library. If you give invalid parameters, Python should not

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Alex Martelli
I thought that's what we had __index__ for -- reject arguments that don't SMOOTHLY turn into integers when an integer is actually required! Alex On Mon, Jul 21, 2008 at 10:01 PM, Martin v. Löwis [EMAIL PROTECTED] wrote: Well, the real problem is os.urandom(4.2) which goes to an unlimited loop:

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Martin v. Löwis
Alex Martelli wrote: I thought that's what we had __index__ for -- reject arguments that don't SMOOTHLY turn into integers when an integer is actually required! Sure. However, using that would create an incompatibility, that's why you only get a warning when it falls back to not using

Re: [Python-Dev] fileobj.read(float): warning or error?

2008-07-21 Thread Cameron Simpson
On 21Jul2008 21:17, Victor Stinner [EMAIL PROTECTED] wrote: | Well, the real problem is os.urandom(4.2) which goes to an unlimited loop: | while len(bytes) n: | bytes += read(_urandomfd, n - len(bytes)) | because read(0.2) works as read(0) :-/ Leaving aside the 0.2 = 0 converstion,