[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-06-18 Thread Mark Summerfield

Mark Summerfield [EMAIL PROTECTED] added the comment:

[snip]
 13) Implement a grouptuples(...) method as per Mark Summerfield's
 suggest on 2008-05-28 09:38.  grouptuples would take the same filtering
 parameters as the other group* functions, and would return a list of 3-
 tuples (unless only 1 group was requested).  It should default to all
 match groups (1..n, not group 0, the matching string).

:-)

[snip]
 Finally, I would like suggestions on how to handle name collisions when
 match group names are provided as attributes.  For instance, an
 expression like '(?Ppos.*)' would match more or less any string and
 assign it to the name pos.  But pos is already an attribute of the
 Match object, and therefore pos cannot be exposed as a named match group
 attribute, since match.pos will return the usual meaning of pos for a
 match object, not the value of the capture group names pos.

 I have 3 proposals as to how to handle this:

 a) Simply disallow the exposure of match group name attributes if the
 names collide with an existing member of the basic Match Object
 interface.

I don't like the prefix ideas and now that you've spelt it out I don't
like the sometimes m.foo will work and sometimes it won't. So I prefer
m['foo'] to be the canonical way because that guarantees your code is
always consistent.


BTW I wanted to do a simple regex to match a string that might or might
not be quoted, and that could contain quotes (but not those used to
delimit it). My first attempt was illegal:

(?Pquote['])?([^(?=quote)])+(?(quote)(?=quote))

It isn't hard to work round but it did highlight the fact that you can't
use captures inside character classes. I don't know if Perl allows this;
I guess if it doesn't then Python shouldn't either since GvR wants the
engine to be Perl compatible.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2931] optparse: various problems with unicode and gettext

2008-06-18 Thread Ivan Vilata i Balaguer

Ivan Vilata i Balaguer [EMAIL PROTECTED] added the comment:

The attached version of ``optparse_unicode.py`` doensn't depend on a
UTF-8 locale, sorry.

Added file: http://bugs.python.org/file10650/optparse_unicode2.py

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2931
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc [EMAIL PROTECTED]:

On windows, test_httpservers fails with the error:

  File C:\python\py3k\Lib\http\server.py, line 1104, in run_cgi
exec(open(scriptfile).read(), {__name__: __main__})
  File string, line 3, in module
  File C:\python\py3k\Lib\socket.py, line 222, in write
return self._sock.send(b)
  TypeError: send() argument 1 must be bytes or read-only buffer, not str

There are two problems there:
- Lib/http/server.py still looks for os.popen2 or os.popen3 to start a
subprocess; these functions have been removed, this code should be
rewritten using the subprocess module.
- the fallback method, which exec() the cgi script in the python
interpreter, fails because sys.stdout should be set to a TextIOWrapper,
not a binary socket file.

Certainly the fallback method could be removed: every platform
implements subprocess nowadays.

--
components: Library (Lib), Windows
messages: 68361
nosy: amaury.forgeotdarc
severity: normal
status: open
title: CGIHTTPRequestHandler does not work on windows
versions: Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

The attached patch uses subprocess when fork is not available.
test_httpservers now passes on windows

--
keywords: +patch
Added file: http://bugs.python.org/file10651/httpserver.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3111] multiprocessing ppc Debian/ ia64 Ubuntu compilation error

2008-06-18 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

I switched to a more aggressive skip as it doesn't seem /dev/shm is the culprit 
(at least from overnight runs). I committed it in r64375 on trunk 
and I am going to wait for the build bots to run on trunk before merging.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3111
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2008-06-18 Thread Raghuram Devarakonda

Raghuram Devarakonda [EMAIL PROTECTED] added the comment:

Richard, I see the following very clearly mentioned in the doc:

If you want a given stdin to be used, make sure to set the instance’s
use_rawinput attribute to False, otherwise stdin will be ignored.

Even though this seems like unnecessary, at least it is documented. If
you want to push for automatically setting use_rawinput when 'stdin' is
not None, you will need to submit a patch and convince some core
developer to agree with you.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread roudkerk

roudkerk [EMAIL PROTECTED] added the comment:

This patch to sharedctypes should fix the problem by adding a
__reduce_ex__() method to a shared ctype object instead of using copy_reg.

--
keywords: +patch
Added file: http://bugs.python.org/file10652/sharedctypes.py.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3004] Bug in slice.indices()

2008-06-18 Thread Arnaud Bergeron

Arnaud Bergeron [EMAIL PROTECTED] added the comment:

Would these do?

self.assertEqual(slice(None,   -10).indices(10), (0,  0,  1))
self.assertEqual(slice(None,   -11,   ).indices(10), (0,  0,  1))
self.assertEqual(slice(None,   -12, -1).indices(10), (9, -1, -1))

If yes, test_slice.patch adds them.

Added file: http://bugs.python.org/file10653/test_slice.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3004
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

But why this is win32 specific?

Is it because windows cannot fork(), so data has to be copied through
the pickle mechanism?
In this case let's remove the if win32 statement, and always execute
the body.

--
nosy: +amaury.forgeotdarc

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread roudkerk

roudkerk [EMAIL PROTECTED] added the comment:

 But why this is win32 specific?
 
 Is it because windows cannot fork(), so data has to be copied through
 the pickle mechanism?
 In this case let's remove the if win32 statement, and always execute
 the body.

Yes, on Windows pickling is needed to pass data to a child process.  In
other contexts these objects are NOT picklable because you would have to
worry about garbage collection of the original object before the copy is
rebuilt by the other process.  On unix pickling will always fail even if
it if win32 statement was removed.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

roudkerk schrieb:
 roudkerk [EMAIL PROTECTED] added the comment:
 
 This patch to sharedctypes should fix the problem by adding a
 __reduce_ex__() method to a shared ctype object instead of using copy_reg.

I can confirm that the patch fixes the problem on Windows (running test_ctypes
before test_multiprocessing).

However, the patch did not apply cleanly to current SVN trunk - I had to 
manually
patch the code.  I'll attach the patch that I have now when I run 'svn diff' as
multiprocessing.patch (hope it works, sending as email attachment).

Added file: http://bugs.python.org/file10654/multiprocessing.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___Index: Lib/multiprocessing/sharedctypes.py
===
--- Lib/multiprocessing/sharedctypes.py (revision 64378)
+++ Lib/multiprocessing/sharedctypes.py (working copy)
@@ -9,7 +9,6 @@
 import sys
 import ctypes
 import weakref
-import copy_reg
 
 from multiprocessing import heap, RLock
 from multiprocessing.forking import assert_spawning
@@ -33,17 +32,13 @@
 #
 #
 
-def _new_value(type_):
-size = ctypes.sizeof(type_)
-wrapper = heap.BufferWrapper(size)
-return rebuild_ctype(type_, wrapper, None)
-
 def RawValue(typecode_or_type, *args):
 '''
 Returns a ctypes object allocated from shared memory
 '''
 type_ = typecode_to_type.get(typecode_or_type, typecode_or_type)
-obj = _new_value(type_)
+type_size = ctypes.sizeof(type_)
+obj = build_ctype(type_, heap.BufferWrapper(type_size), None)
 ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj))
 obj.__init__(*args)
 return obj
@@ -53,14 +48,16 @@
 Returns a ctypes array allocated from shared memory
 '''
 type_ = typecode_to_type.get(typecode_or_type, typecode_or_type)
+type_size = ctypes.sizeof(type_)
 if isinstance(size_or_initializer, int):
-type_ = type_ * size_or_initializer
-return _new_value(type_)
+size = size_or_initializer
+obj = build_ctype(type_, heap.BufferWrapper(type_size*size), size)
+ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj))
 else:
-type_ = type_ * len(size_or_initializer)
-result = _new_value(type_)
-result.__init__(*size_or_initializer)
-return result
+size = len(size_or_initializer)
+obj = build_ctype(type_, heap.BufferWrapper(type_size*size), size)
+obj.__init__(*size_or_initializer)
+return obj
 
 def Value(typecode_or_type, *args, **kwds):
 '''
@@ -117,20 +114,18 @@
 # Functions for pickling/unpickling
 #
 
-def reduce_ctype(obj):
-assert_spawning(obj)
-if isinstance(obj, ctypes.Array):
-return rebuild_ctype, (obj._type_, obj._wrapper, obj._length_)
-else:
-return rebuild_ctype, (type(obj), obj._wrapper, None)
-
-def rebuild_ctype(type_, wrapper, length):
+def build_ctype(type_, wrapper, length):
 if length is not None:
-type_ = type_ * length
-if sys.platform == 'win32' and type_ not in copy_reg.dispatch_table:
-copy_reg.pickle(type_, reduce_ctype)
-obj = type_.from_address(wrapper.get_address())
+obj = (type_ * length).from_address(wrapper.get_address())
+else:
+obj = type_.from_address(wrapper.get_address())
 obj._wrapper = wrapper
+if sys.platform == 'win32':
+def __reduce_ex__(proto):
+return build_ctype, (type_, wrapper, length)
+# It appears that assigning to obj.__reduce_ex__ will override
+# type(obj).__reduce__, but that assigning to obj.__reduce__ will not.
+obj.__reduce_ex__ = __reduce_ex__
 return obj
 
 #
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3112] implement PEP 3134 exception reporting

2008-06-18 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


--
nosy: +gvanrossum

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3112] implement PEP 3134 exception reporting

2008-06-18 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Does anyone know why there is the following test in pythonrun.c:
http://hg.pitrou.net/public/py3k/py3k/file/c143699d8dee/Python/pythonrun.c#l1346

Can PyErr_Display be called with something else than a PyException instance?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

Thomas' patch applied and runs clean for me - does anyone have a problem 
with me submitting it?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2898] Add memory footprint query

2008-06-18 Thread Jean Brouwers

Jean Brouwers [EMAIL PROTECTED] added the comment:

Three questions on the sizeof.patch:

1) In the first line of function  dict_sizeof()

+   res = sizeof(PyDictObject) + sizeof(mp-ma_table);

is the  sizeof(mp-ma_table) counted twice?


2) Since functions  list_sizeof and  dict_sizeof return the allocated 
size, including the over-allocation, should function  string_sizeof not 
include the sentinel null character?


3) Are tuples left out on purpose?  If not, here is an implementation 
for Objects/tupleobject.c:


static PyObject *
tuple_sizeof(PyTupleObject *v)
{
Py_ssize_t res;

res = _PyObject_SIZE(PyTuple_Type) + Py_SIZE(v) * 
sizeof(void*);
return PyInt_FromSsize_t(res);
}

PyDoc_STRVAR(sizeof_doc,
T.__sizeof__() -- size of T in bytes);


static PyMethodDef tuple_methods[] = {
{__getnewargs__,  (PyCFunction)tuple_getnewargs,  
METH_NOARGS},
{__sizeof__,  (PyCFunction)tuple_sizeof, METH_NOARGS, 
sizeof_doc},


/Jean Brouwers

--
nosy: +MrJean1

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2898
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3134] shutil references undefined WindowsError symbol

2008-06-18 Thread David Vitek

New submission from David Vitek [EMAIL PROTECTED]:

If copystat fails in copytree on a non-windows box, you will get:

NameError: global name 'WindowsError' is not defined:
...
except WindowsError:

--
components: Library (Lib)
files: p.patch
keywords: patch
messages: 68373
nosy: dvitek
severity: normal
status: open
title: shutil references undefined WindowsError symbol
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file10655/p.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3134
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3134] shutil references undefined WindowsError symbol

2008-06-18 Thread Raghuram Devarakonda

Raghuram Devarakonda [EMAIL PROTECTED] added the comment:

This is same as #2549 which also reported the same problem. In fact, the
problem was originally found in #1545. As I said there, the proposed
patch has a very small problem. Can you please take a look?

--
nosy: +draghuram

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3134
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3112] implement PEP 3134 exception reporting

2008-06-18 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Two other questions:

1) Should I expose a PyErr_DisplaySingle API to display an exception
without chaining?

2) Should PyErr_Display return an integer value (0: success, -1:
failure) rather than void as it currently does?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

roudkerk wrote:
 Yes, on Windows pickling is needed to pass data to a child process.  In
 other contexts these objects are NOT picklable because you would have to
 worry about garbage collection of the original object before the copy is
 rebuilt by the other process.  On unix pickling will always fail even if
 it if win32 statement was removed.

I am not sure to understand. Can you elaborate?
How is memory management different between windows and unix?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3125
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2898] Add memory footprint query

2008-06-18 Thread Robert Schuppenies

Robert Schuppenies [EMAIL PROTECTED] added the comment:

Jean Brouwers wrote:
 1) In the first line of function  dict_sizeof()
 + res = sizeof(PyDictObject) + sizeof(mp-ma_table);
 is the  sizeof(mp-ma_table) counted twice?

Yes, you are right. I'll fix this. 

 2) Since functions  list_sizeof and  dict_sizeof return the allocated 
 size, including the over-allocation, should function  string_sizeof not 
 include the sentinel null character?

Isn't this addressed by taking PyStringObject.ob_sval into account? It
is allocated with 1 char length and thus always included. If I
understand the creation of strings correctly, the corresponding memory
is always allocated with

PyObject_MALLOC(sizeof(PyStringObject) + size)

which should mean that the space for the null terminating character is
included in the sizeof(PyStringObject).

 
 
 3) Are tuples left out on purpose?  

No, that slipped the initial patch. I corrected in r64230. 

 
 static PyObject *
 tuple_sizeof(PyTupleObject *v)
 {
   Py_ssize_t res;
 
   res = _PyObject_SIZE(PyTuple_Type) + Py_SIZE(v) * 
 sizeof(void*);
   return PyInt_FromSsize_t(res);
 }
 

Your implementation is like the applied changes from me, with one
difference. The basicsize of a tuple is defined as
sizeof(PyTupleObject) - sizeof(PyObject *)

When a tuple's memory is allocated, the required space is computed
roughly like this

(typeobj)-tp_basicsize + (nitems)*(typeobj)-tp_itemsize

Thus, I understand the memory allocated by a tuple to be

res = PyTuple_Type.tp_basicsize + Py_SIZE(v) * sizeof(PyObject *);

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2898
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3135] inspect.getcallargs()

2008-06-18 Thread George Sakkis

New submission from George Sakkis [EMAIL PROTECTED]:

I'd like to propose a new function for inclusion to the inspect module
-- getcallargs(func, *args, **kwds) -- that returns a dict which maps
the formal arguments of a function (or other callable) to the values
passed as args and kwds, just as Python has to do when calling
func(*args, **kwds). For example:

 def func(a, b='foo', c=None, *x, **y):
... pass
 sorted(getcallargs(func, 5, z=3, b=2).items())
 [('a', 5), ('b', 2), ('c', None), ('x', ()), ('y', {'z': 3})]

This is handy when writing decorators, or more generally when one would
want to do some minimal type checking without actually calling the function.

I have posted a recipe at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/551779; I can
clean it up and submit a proper patch if it's deemed useful enough for
the stdlib.

--
components: Library (Lib)
messages: 68378
nosy: gsakkis
severity: normal
status: open
title: inspect.getcallargs()
type: feature request
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3135
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3133] CGIHTTPRequestHandler does not work on windows

2008-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Committed change r64389.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3133
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3112] implement PEP 3134 exception reporting

2008-06-18 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Here is a draft patch for those who want to take a look.

(it works but the final cleanup is waiting for the API decisions
mentioned above)

--
keywords: +patch
Added file: http://bugs.python.org/file10656/exc_reporting.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3112
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1489] test_socket_ssl hanhs on Windows (deadlock)

2008-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:

Kind of fixed: test_socket_ssl was removed in both trunk and py3k branches.

tests are now in test_ssl.py

--
nosy: +amaury.forgeotdarc
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1489
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2885] Create the urllib package

2008-06-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Seems this was done in r64385.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2885
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2775] Implement PEP 3108

2008-06-18 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
dependencies:  -Create the urllib package

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2775
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3088] test_multiprocessing hangs on OS X 10.5.3

2008-06-18 Thread Barry A. Warsaw

Barry A. Warsaw [EMAIL PROTECTED] added the comment:

I'm going to knock this one down to critical since it's working for me
now on OS X and buildbot looks green.  We can address any additional
patches after the beta release.

--
priority: release blocker - critical

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3088
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3089] All 3.0 buildbots are red

2008-06-18 Thread Barry A. Warsaw

Barry A. Warsaw [EMAIL PROTECTED] added the comment:

There are green buildbots now so I'm releasing beta 1.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3089] All 3.0 buildbots are red

2008-06-18 Thread Barry A. Warsaw

Barry A. Warsaw [EMAIL PROTECTED] added the comment:

There are green buildbots now so I'm releasing beta 1.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3089
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2885] Create the urllib package

2008-06-18 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

And I don't know if the proper additions to 2to3 and a warning in
urllib.urlopen() in 2.6 has been done (is urllib.urlopen() so different
from urllib2.urlopen() that the warning should be from any usage, or
only if incompatible arguments are used?).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2885
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers

2008-06-18 Thread Leandro Lucarella

New submission from Leandro Lucarella [EMAIL PROTECTED]:

When using logging.config.fileConfig() in a large project, with several
nested loggers, is very counterintuitive and annoying that this function
disable all non-configured-via-fileConfig() loggers, because it forces
the config file to configure *all* the loggers there, which makes the
file unmaintainable, and throws the beauty of hierarchical loggers to
the trash.

Attached is a sample patch that adds a new option
disable_existing_loggers to fileConfig() function (defaulting to True,
to make it backward-compatible) to control this behavior. If you like
the idea I can update the documentation and add some testcases too.

You can see a simple example about the problem and solution here:
log.py:  http://pastebin.lugmen.org.ar/4204
log.ini: http://pastebin.lugmen.org.ar/4205

without the patch, the output is:
logger:DEBUG: log debug
logger:INFO: log info
logger:WARNING: log warning
logger:ERROR: log error
logger:CRITICAL: log critical

With the patch (and passing disable_existing_loggers=False to
fileConfig()) yields this output:
logger:DEBUG: log debug
logger:INFO: log info
logger:WARNING: log warning
logger:ERROR: log error
logger:CRITICAL: log critical
logger.sublogger:DEBUG: sublog debug
logger.sublogger:INFO: sublog info
logger.sublogger:WARNING: sublog warning
logger.sublogger:ERROR: sublog error
logger.sublogger:CRITICAL: sublog critical

As one could expect when reading the logging module docs:

getLogger() returns a reference to a logger instance with the specified
if it it is provided, or root if not. The names are period-separated
hierarchical structures. Multiple calls to getLogger() with the same
name will return a reference to the same logger object. Loggers that are
further down in the hierarchical list are children of loggers higher up
in the list. For example, given a logger with a name of foo, loggers
with names of foo.bar, foo.bar.baz, and foo.bam are all children of foo.
Child loggers propagate messages up to their parent loggers. Because of
this, it is unnecessary to define and configure all the loggers an
application uses. It is sufficient to configure a top-level logger and
create child loggers as needed.


--
components: Library (Lib)
files: logging.config.disable_existing_loggers.patch
keywords: patch
messages: 68388
nosy: llucax
severity: normal
status: open
title: [PATCH] logging.config.fileConfig() compulsivly disable all existing 
loggers
versions: Python 2.5
Added file: 
http://bugs.python.org/file10657/logging.config.disable_existing_loggers.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3136
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3136] [PATCH] logging.config.fileConfig() compulsivly disable all existing loggers

2008-06-18 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
assignee:  - vsajip
nosy: +vsajip

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3136
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3009] 3.0a5 tarballs contain the code twice

2008-06-18 Thread Barry A. Warsaw

Barry A. Warsaw [EMAIL PROTECTED] added the comment:

This must have been a packaging snafu for 3.0a5.  The candidate 3.0b1
tarball looks fine.

--
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3009
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2571] cmd.py always uses raw_input, even when another stdin is specified

2008-06-18 Thread Richard King

Richard King [EMAIL PROTECTED] added the comment:

There were some other things I wanted too so I just made my own cmd.py.
-Rick

Raghuram Devarakonda wrote:
 Raghuram Devarakonda [EMAIL PROTECTED] added the comment:

 Richard, I see the following very clearly mentioned in the doc:

 If you want a given stdin to be used, make sure to set the instance’s
 use_rawinput attribute to False, otherwise stdin will be ignored.

 Even though this seems like unnecessary, at least it is documented. If
 you want to push for automatically setting use_rawinput when 'stdin' is
 not None, you will need to submit a patch and convince some core
 developer to agree with you.

 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue2571
 ___
 


 No virus found in this incoming message.
 Checked by AVG. 
 Version: 8.0.100 / Virus Database: 270.4.0/1506 - Release Date: 6/17/2008 
 4:30 PM


___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2571
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com