Re: [Python-Dev] [Python-checkins] cpython: #11781: update windows build script to account for move of email tests

2011-06-19 Thread Martin v. Löwis
>>   # This should contain all non-.svn files listed in
>> subversion
> 
> Should this be mercurial

Perhaps.

> 
>>   for f in os.listdir(lib.absolute):
>>   if f.endswith(".txt") or f==".svn":continue
> 
> and this .hg?

No.

Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: edit and rewrite

2011-06-19 Thread Victor Stinner
Le samedi 18 juin 2011 à 02:51 +0200, benjamin.peterson a écrit :
>  .. function:: dump_traceback(file=sys.stderr, all_threads=True)
>  
> -   Dump the traceback of all threads, or of the current thread if 
> *all_threads*
> -   is ``False``, into *file*.
> +   Dump the traceback of all threads into *file*. If *all_threads* is 
> ``True``,
> +   produce tracebacks for every running thread. Otherwise, dump only the 
> current
> +   thread.

The first sentence is confusing. I suggest:

Dump the traceback of all threads into *file*. If *all_threads* is
``False``, dump the traceback of only the current thread.

or

Dump the traceback into *file*. If *all_threads* is ``True``, produce
tracebacks for every running thread. Otherwise, dump only the current
thread.

> @@ -69,15 +75,14 @@
>  .. function:: dump_tracebacks_later(timeout, repeat=False, file=sys.stderr, 
> exit=False)
>  
> Dump the tracebacks of all threads, after a timeout of *timeout* seconds, 
> or
> -   each *timeout* seconds if *repeat* is ``True``.  If *exit* is True, call
> -   :c:func:`_exit` with status=1 after dumping the tracebacks to terminate
> -   immediatly the process, which is not safe.  For example, :c:func:`_exit`
> -   doesn't flush file buffers.  If the function is called twice, the new call
> -   replaces previous parameters (resets the timeout). The timer has a
> -   sub-second resolution.
> +   every *timeout* seconds if *repeat* is ``True``.  If *exit* is ``True``, 
> call
> +   :c:func:`_exit` with status=1 after dumping the tracebacks.  (Note
> +   :c:func:`_exit` doesn't flush file buffers.) If the function is called 
> twice,
> +   the new call replaces previous parameters and resets the timeout. The 
> timer
> +   has a sub-second resolution.

You removed "to terminate immediatly the process, which is not safe"
sentence which is very important. It doesn't exit like sys.exit(): it
exits immediatly. Not flushing file buffers is just an example.

Anyway, thank you for rephrasing the doc.

Victor

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] devguide: Fix copy-paste glitch :)

2011-06-19 Thread Nick Coghlan
On Mon, Jun 20, 2011 at 12:57 AM, eric.araujo
 wrote:
> http://hg.python.org/devguide/rev/f55ad3dc4526
> changeset:   434:f55ad3dc4526
> user:        Éric Araujo 
> date:        Sun Jun 19 16:56:58 2011 +0200
> summary:
>  Fix copy-paste glitch :)
>
> files:
>  committing.rst |  2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/committing.rst b/committing.rst
> --- a/committing.rst
> +++ b/committing.rst
> @@ -16,7 +16,7 @@
>   (using Tools/scripts/reindent-rst.py)
>  * Has the documentation been updated?
>  * Has the test suite been updated?
> -* Has ``Misc/ACKS`` been updated?
> +* Has ``Misc/NEWS`` been updated?
>  * Has ``Misc/ACKS`` been updated?
>  * Has the test suite been run?

D'oh! I had it right at one point, too, but then I rearranged it and
must have clobbered the wrong line in the process. Thanks for fixing
it :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] devguide: Add a communications section to the devguide FAQ (closes #11690)

2011-06-19 Thread Victor Stinner
Le dimanche 19 juin 2011 à 16:51 +0200, nick.coghlan a écrit :
> +Where should I ask general Python questions?
> +
> +
> +General Python questions should still go to `python-list`_ or `python-tutor`_
> +or similar resources, such as StackOverflow_ or ``#python`` on IRC.

You should mention the IRC server, I suppose that you are talking about
the Freenode server.

There are other channels in other languages, like #python-fr (on
Freenode).

You may also add a reference to the #python-dev chanel. I am connected
most of the time, but not always available.

Victor

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: #6771: Move wrapper function into __init__ and eliminate wrapper module

2011-06-19 Thread Jim Jewett
Does this really need to be a bare except?

On Sat, Jun 18, 2011 at 8:21 PM, r.david.murray
 wrote:
> http://hg.python.org/cpython/rev/9c96c3adbcd1
> changeset:   70867:9c96c3adbcd1
> user:        R David Murray 
> date:        Sat Jun 18 20:21:09 2011 -0400
> summary:
>  #6771: Move wrapper function into __init__ and eliminate wrapper module
>
> Andrew agreed in the issue that eliminating the module file made sense.
> Wrapper has only been exposed as a function, and so there is no (easy)
> way to access the wrapper module, which in any case only had the one
> function in it.  Since __init__ already contains a couple wrapper
> functions, it seems to make sense to just move wrapper there instead of
> importing it from a single function module.
>
> files:
>  Lib/curses/__init__.py |  46 +++-
>  Lib/curses/wrapper.py  |  50 --
>  Misc/NEWS              |   4 ++
>  3 files changed, 49 insertions(+), 51 deletions(-)
>
>
> diff --git a/Lib/curses/__init__.py b/Lib/curses/__init__.py
> --- a/Lib/curses/__init__.py
> +++ b/Lib/curses/__init__.py
> @@ -13,7 +13,6 @@
>  __revision__ = "$Id$"
>
>  from _curses import *
> -from curses.wrapper import wrapper
>  import os as _os
>  import sys as _sys
>
> @@ -57,3 +56,48 @@
>     has_key
>  except NameError:
>     from has_key import has_key
> +
> +# Wrapper for the entire curses-based application.  Runs a function which
> +# should be the rest of your curses-based application.  If the application
> +# raises an exception, wrapper() will restore the terminal to a sane state so
> +# you can read the resulting traceback.
> +
> +def wrapper(func, *args, **kwds):
> +    """Wrapper function that initializes curses and calls another function,
> +    restoring normal keyboard/screen behavior on error.
> +    The callable object 'func' is then passed the main window 'stdscr'
> +    as its first argument, followed by any other arguments passed to
> +    wrapper().
> +    """
> +
> +    try:
> +        # Initialize curses
> +        stdscr = initscr()
> +
> +        # Turn off echoing of keys, and enter cbreak mode,
> +        # where no buffering is performed on keyboard input
> +        noecho()
> +        cbreak()
> +
> +        # In keypad mode, escape sequences for special keys
> +        # (like the cursor keys) will be interpreted and
> +        # a special value like curses.KEY_LEFT will be returned
> +        stdscr.keypad(1)
> +
> +        # Start color, too.  Harmless if the terminal doesn't have
> +        # color; user can test with has_color() later on.  The try/catch
> +        # works around a minor bit of over-conscientiousness in the curses
> +        # module -- the error return from C start_color() is ignorable.
> +        try:
> +            start_color()
> +        except:
> +            pass
> +
> +        return func(stdscr, *args, **kwds)
> +    finally:
> +        # Set everything back to normal
> +        if 'stdscr' in locals():
> +            stdscr.keypad(0)
> +            echo()
> +            nocbreak()
> +            endwin()
> diff --git a/Lib/curses/wrapper.py b/Lib/curses/wrapper.py
> deleted file mode 100644
> --- a/Lib/curses/wrapper.py
> +++ /dev/null
> @@ -1,50 +0,0 @@
> -"""curses.wrapper
> -
> -Contains one function, wrapper(), which runs another function which
> -should be the rest of your curses-based application.  If the
> -application raises an exception, wrapper() will restore the terminal
> -to a sane state so you can read the resulting traceback.
> -
> -"""
> -
> -import curses
> -
> -def wrapper(func, *args, **kwds):
> -    """Wrapper function that initializes curses and calls another function,
> -    restoring normal keyboard/screen behavior on error.
> -    The callable object 'func' is then passed the main window 'stdscr'
> -    as its first argument, followed by any other arguments passed to
> -    wrapper().
> -    """
> -
> -    try:
> -        # Initialize curses
> -        stdscr = curses.initscr()
> -
> -        # Turn off echoing of keys, and enter cbreak mode,
> -        # where no buffering is performed on keyboard input
> -        curses.noecho()
> -        curses.cbreak()
> -
> -        # In keypad mode, escape sequences for special keys
> -        # (like the cursor keys) will be interpreted and
> -        # a special value like curses.KEY_LEFT will be returned
> -        stdscr.keypad(1)
> -
> -        # Start color, too.  Harmless if the terminal doesn't have
> -        # color; user can test with has_color() later on.  The try/catch
> -        # works around a minor bit of over-conscientiousness in the curses
> -        # module -- the error return from C start_color() is ignorable.
> -        try:
> -            curses.start_color()
> -        except:
> -            pass
> -
> -        return func(stdscr, *args, **kwds)
> -    finally:
> -        # Set everything back to normal
> -        if 'stdscr' in locals():
> -            stdscr.keypad(0)
> -            cu

Re: [Python-Dev] [Python-checkins] cpython (3.1): Fix closes issue12261 - Minor documention changes in the urllib.parse.rst

2011-06-19 Thread Éric Araujo
Hi,

Remember that 3.1 is in security mode, and as such will not get new
documentation releases.  See the previous threads about 2.6 docs or
security releases for more info.

Regards
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython (3.1): Fix closes issue12261 - Minor documention changes in the urllib.parse.rst

2011-06-19 Thread Senthil Kumaran
On Sun, Jun 19, 2011 at 10:59:26PM +0200, Éric Araujo wrote:
> 
> Remember that 3.1 is in security mode, and as such will not get new
> documentation releases.  See the previous threads about 2.6 docs or
> security releases for more info.

Thanks for the information. I missed that somehow. Noted and that
check that thread.

-- 
Senthil
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython: #6771: Move wrapper function into __init__ and eliminate wrapper module

2011-06-19 Thread R. David Murray
On Sun, 19 Jun 2011 15:40:01 -0400, Jim Jewett  wrote:
> Does this really need to be a bare except?

No, but that's a separate bug report, which you are welcome to
file.  The issue I closed was about moving the existing code.

--
R. David Murray   http://www.bitdance.com
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com