Re: [Python-Dev] Bug tracker house cleaning.

2009-02-25 Thread skip
Raymond> ISTM, that when closing duplicate bug reports, both should Raymond> reference one another so that the combined threads don't get Raymond> lost. RT has a merge feature which allows you to take a duplicate an merge it into another ticket. This merges the chain of comments, cc's

Re: [Python-Dev] PyCon 2009: Call for sprint projects

2009-02-25 Thread Roy H. Han
Hi Jacob, Will there be GeoDjango/OpenLayers subsprint in the Django sprint? Thanks, RHH On Mon, Feb 9, 2009 at 8:27 PM, Jacob Kaplan-Moss wrote: > Python-related projects: join the PyCon Development Sprints! > > The development sprints are a key part of PyCon, a chance for the contributors > t

[Python-Dev] New curses module method addchstr, etc.

2009-02-25 Thread Heracles
Hello, I submitted my first patch recently for the curses color_set and wcolor_set functions. I am now working on addchstr, addchnstr, mvaddchstr, mvaddchnstr, mvwaddchstr, mvwaddchnstr, waddchstr and waddchnstr. I have implemented the non window specific methods as follows: /* Window.addchstr

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Guido van Rossum
On Wed, Feb 25, 2009 at 1:46 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> However that's hardly an ABC. You need to provide a path for someone >> who wants to implement the ABC without inheriting your implementation. > > I may missing something, but it's exactly the same

Re: [Python-Dev] OS X Installer for 3.0.1 and supported versions

2009-02-25 Thread Russell E. Owen
In article , Ned Deily wrote: > Speaking of an OS X installer for 3.0.1, over the last few weeks I have > been working on tidying up the OS X installer build process. While the > basic OS X build/installer process is good, some cruft has accumulated > over the past years and a number of most

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Antoine Pitrou
Guido van Rossum python.org> writes: > > However that's hardly an ABC. You need to provide a path for someone > who wants to implement the ABC without inheriting your implementation. I may missing something, but it's exactly the same as today's io.py: if you derive the ABC, you inherit the imple

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Guido van Rossum
On Wed, Feb 25, 2009 at 1:31 PM, Nick Coghlan wrote: > Guido van Rossum wrote: >> On Wed, Feb 25, 2009 at 1:03 PM, Antoine Pitrou wrote: >>> Guido van Rossum python.org> writes: Without a shared ABC you'd defeat the whole point of having ABCs. However, importing ABCs (which are de

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Nick Coghlan
Guido van Rossum wrote: > On Wed, Feb 25, 2009 at 1:03 PM, Antoine Pitrou wrote: >> Guido van Rossum python.org> writes: >>> Without a shared ABC you'd defeat the whole point of having ABCs. >>> >>> However, importing ABCs (which are defined in Python) from C code >>> (especially such fundamental

Re: [Python-Dev] Allow __enter__() methods to skip the with statement body?

2009-02-25 Thread Nick Coghlan
Steven Bethard wrote: > If the problem is just the yield, can't this just be fixed by > implementing contextlib.nested() as a class rather than as a > @contextmanager decorated generator? Or is this a problem with class > based context managers too? It's a problem for class-based context managers

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Guido van Rossum
On Wed, Feb 25, 2009 at 1:03 PM, Antoine Pitrou wrote: > Guido van Rossum python.org> writes: >> >> Without a shared ABC you'd defeat the whole point of having ABCs. >> >> However, importing ABCs (which are defined in Python) from C code >> (especially such fundamental C code as the I/O library)

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Antoine Pitrou
Guido van Rossum python.org> writes: > > Without a shared ABC you'd defeat the whole point of having ABCs. > > However, importing ABCs (which are defined in Python) from C code > (especially such fundamental C code as the I/O library) is really > subtle and best avoided. > > In io.py I solved t

Re: [Python-Dev] Attention Bazaar mirror users

2009-02-25 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Feb 25, 2009, at 2:03 PM, Mark Dickinson wrote: On Wed, Feb 25, 2009 at 2:23 PM, Barry Warsaw wrote: This is now done. Please let me know if you have any problems with the mirrors. Is the cron job that's supposed to update the bzr reposit

Re: [Python-Dev] Attention Bazaar mirror users

2009-02-25 Thread Mark Dickinson
On Wed, Feb 25, 2009 at 2:23 PM, Barry Warsaw wrote: > This is now done. Please let me know if you have any problems with the > mirrors. Is the cron job that's supposed to update the bzr repository still running? I'm getting 'No revisions to pull' when I do 'bzr pull' for the py3k branch: Macin

Re: [Python-Dev] Allow __enter__() methods to skip the with statement body?

2009-02-25 Thread Steven Bethard
On Wed, Feb 25, 2009 at 4:24 AM, Nick Coghlan wrote: > An interesting discrepancy [1] has been noted when comparing > contextlib.nested (and contextlib.contextmanager) with the equivalent > nested with statements. > > Specifically, the following examples behave differently if > cmB().__enter__() r

Re: [Python-Dev] Allow __enter__() methods to skip the with statement body?

2009-02-25 Thread Brett Cannon
On Wed, Feb 25, 2009 at 04:24, Nick Coghlan wrote: > An interesting discrepancy [1] has been noted when comparing > contextlib.nested (and contextlib.contextmanager) with the equivalent > nested with statements. > > Specifically, the following examples behave differently if > cmB().__enter__() ra

Re: [Python-Dev] Attention Bazaar mirror users

2009-02-25 Thread Scott David Daniels
Barry Warsaw wrote: I've just upgraded the Bazaar mirrors on code.python.org to use bzr 1.12. We now have the opportunity to upgrade the repository format for better performance. Because of the bzr-svn requirement, we need a "rich root" format. Upgrading to 1.9-rich-root could buy us some s

Re: [Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Guido van Rossum
On Wed, Feb 25, 2009 at 7:35 AM, Antoine Pitrou wrote: > I would like to know if both IO implementations (the C one and the Python one) > should share their ABCs (IOBase, RawIOBase, etc.). It looks preferable to me > but > since I'm not very familiar with ABCs I'd like to be sure it's the good >

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread Heracles
I took the suggestion and fired up a debugger and now I'm eating crow. First of all, here is a complete listing of the method as it is written now: -- Snippet --- static PyObject * PyCurses_color_set(PyObject *self, PyObject *args) { short colo

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread anatoly techtonik
Please note that there is a pending change that will introduce curses module on Windows in http://bugs.python.org/issue2889 I would really like to see the patch in the issue integrated before it became invalid due to other patches to test curses on Windows. On Wed, Feb 25, 2009 at 5:34 PM, A.M. K

[Python-Dev] Paving the Way to Securing the Python Interpreter [Detailed Summary]

2009-02-25 Thread tav
Dear fellow Python lovers, I have written up a detailed summary on: http://tav.espians.com/paving-the-way-to-securing-the-python-interpreter.html Please read it. In the article I give the rationale for my patch, which I've updated at: * http://codereview.appspot.com/20051/show Please review

[Python-Dev] Shared ABCs for the IO implementation

2009-02-25 Thread Antoine Pitrou
Hello, I would like to know if both IO implementations (the C one and the Python one) should share their ABCs (IOBase, RawIOBase, etc.). It looks preferable to me but since I'm not very familiar with ABCs I'd like to be sure it's the good choice. (of course, the *implementations* won't be shared

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread A.M. Kuchling
On Wed, Feb 25, 2009 at 06:30:06AM -0800, Heracles wrote: > is commented back in it does fail. I am not sure exactly how a debugger will > help in this case since the color_set call goes directly to the ncurses > library. If in fact that the issue is the ncurses library then it seems > that there

Re: [Python-Dev] File Path retrieving problem

2009-02-25 Thread Paul Moore
2009/2/25 Sudhir Kakumanu : > Hi all, > I am new to Python, i have installed python 2.5.4 and it is my requirement. > I need to retrieve the path of filename in python. This list is for the developers of Python to discuss future changes to the language and its implementation. It is not the correct

[Python-Dev] File Path retrieving problem

2009-02-25 Thread Sudhir Kakumanu
Hi all, I am new to Python, i have installed python 2.5.4 and it is my requirement. I need to retrieve the path of filename in python. I have found some API's to get this: from os.path import realpath print realpath("NEWS.txt") # here NEWS.txt exists and it shows the path of the file as C:\Pyth

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread Heracles
Thank you for your reply, and no, that is not the exact code. I must have wiped out the return statement when I copied it in. The return statement is in the code. Also the code has been modified so that the call to color_set reads as follows: erg = color_set(color_pair_number, NULL); // Debati

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread Heracles
Ulrich, Thanks for the input. That is helpful to know. H Ulrich Berning-2 wrote: > > Heracles wrote: > >>Hello, >> >>I am working on a patch to add to the _cursesmodule.c file of the Python >>core libraries. I figured I would take on one of the implemented functions >>to try to get my feet

Re: [Python-Dev] Attention Bazaar mirror users

2009-02-25 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Feb 20, 2009, at 10:09 AM, Barry Warsaw wrote: I've just upgraded the Bazaar mirrors on code.python.org to use bzr 1.12. We now have the opportunity to upgrade the repository format for better performance. Because of the bzr-svn requirement,

[Python-Dev] Allow __enter__() methods to skip the with statement body?

2009-02-25 Thread Nick Coghlan
An interesting discrepancy [1] has been noted when comparing contextlib.nested (and contextlib.contextmanager) with the equivalent nested with statements. Specifically, the following examples behave differently if cmB().__enter__() raises an exception which cmA().__exit__() then handles (and suppr

Re: [Python-Dev] Adding support to curses library

2009-02-25 Thread Ulrich Berning
Heracles wrote: Hello, I am working on a patch to add to the _cursesmodule.c file of the Python core libraries. I figured I would take on one of the implemented functions to try to get my feet wet contributing to the project. At any rate, I have the following function defined in the 2.7.a ver