[issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource

2007-11-22 Thread Yitz Gale

Yitz Gale added the comment:

Oops, obvious typo, sorry:

-if source.getByteStream() is None:
+if source.getCharacterStream() is None and source.getByteStream() is 
None:

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1597404] sqlite timestamp converter bug (floating point)

2007-11-22 Thread Gerhard Häring

Gerhard Häring added the comment:

This has long been fixed in revision 53420. So it will be in Python 2.6
and 3.0.

--
resolution:  -> fixed
status: open -> closed
type:  -> behavior

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1706863] Failed to build Python 2.5.1 with sqlite3

2007-11-22 Thread Gerhard Häring

Gerhard Häring added the comment:

This is apparently a problem in setup.py. There seems to be a code path
where an object should be a string, but is None instead. I'll have to
review the relevant parts of setup.py.

--
nosy: +ghaering
type:  -> compile error

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1733085] sqlite3 module trigger problem

2007-11-22 Thread Gerhard Häring

Gerhard Häring added the comment:

We'll make sure there's an updated SQLite DLL in Python 2.6 and Python
3.0. It's not worth the effort for 2.5.2. There's always the workaround
of users installing an updated DLL themselves.

--
resolution:  -> later
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1734164] sqlite3 causes memory read error

2007-11-22 Thread Gerhard Häring

Gerhard Häring added the comment:

Ok, I'll modify the 2.5 maintenance line with this patch:
http://initd.org/tracker/pysqlite/changeset/426

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1402] Interpreter cleanup: order of _PyGILState_Fini and PyInterpreterState_Clear

2007-11-22 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The attached patch fixes the crash, but I haven't verified if the patch 
is actually correct. 

With this patch some PyThread API's are called after PyInterpreterState_Clear 
and I don't know if it is valid to do so. All 
unittests pass fine on OSX though.

Added file: http://bugs.python.org/file8793/pygilstate.patch

__
Tracker <[EMAIL PROTECTED]>

__Index: Python/pythonrun.c
===
--- Python/pythonrun.c  (revision 59115)
+++ Python/pythonrun.c  (working copy)
@@ -437,14 +437,15 @@
_Py_PrintReferences(stderr);
 #endif /* Py_TRACE_REFS */
 
+
+   /* Clear interpreter state */
+   PyInterpreterState_Clear(interp);
+
/* Cleanup auto-thread-state */
 #ifdef WITH_THREAD
_PyGILState_Fini();
 #endif /* WITH_THREAD */
 
-   /* Clear interpreter state */
-   PyInterpreterState_Clear(interp);
-
/* Now we decref the exception classes.  After this point nothing
   can raise an exception.  That's okay, because each Fini() method
   below has been checked to make sure no exceptions are ever
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1358] Compile error on OS X 10.5

2007-11-22 Thread Simon Percivall

Simon Percivall added the comment:

It has to do with the MACOSX_DEPLOYMENT_TARGET. If it's set to 10.4, the 
legacy version of setpgrp is used (with args), it it's 10.5, setpgrp 
expects no arguments. It seems configure won't detect the difference.

--
nosy: +percivall

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1462525] URI parsing library

2007-11-22 Thread vincent kraeutler

vincent kraeutler added the comment:

In the meantime, I have found a very nice parser combinator library for
Python (pyparse) and have implemented a validating parser for RFC 3986
URI's by more or less simply converting the complete ABNF grammar found
in the RFC. Obviously, this will never make it into the stdlib, due to a
dependency on an external library (pyparse), but it might be useful to
other people as well.

It's available here:
http://www.kraeutler.net/vincent/pub/netaddress/netaddress-0.1.tar.gz

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1485] Idle tab command completion

2007-11-22 Thread Grant Delaney

New submission from Grant Delaney:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
return self.func(*args)
  File "/usr/lib/python2.5/idlelib/AutoCompleteWindow.py", line 217, in
winconfig_event
x, y, cx, cy = self.widget.bbox(self.startindex)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2833, in bbox
self.tk.call((self._w, 'bbox') + args)) or None
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1030, in _getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(72,'

--
components: IDLE
messages: 57757
nosy: Mufasa
severity: normal
status: open
title: Idle tab command completion
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1485] Idle tab command completion

2007-11-22 Thread Facundo Batista

Facundo Batista added the comment:

This is not a bug report, just a copied traceback.

For a useful bug, put what you did so we can reproduce it, what you get,
and what you think you should got.

Thanks!

--
nosy: +facundobatista
resolution:  -> rejected
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1486] Idle tab command completion

2007-11-22 Thread Grant Delaney

New submission from Grant Delaney:

Running idle from a terminal window in desktop. 

Python 2.5.1 (r251:54863, Nov 22 2007, 13:55:16) 
[GCC 4.1.2] on linux2
Type "copyright", "credits" or "license()" for more information.


Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface.  This connection is not visible on any external
interface and no data is sent to or received from the Internet.


IDLE 1.2.1  
>>> import sys
>>> test = sys.<--- pressing tab should give you the available
options for that module/library.

The error in the console is as follows:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
return self.func(*args)
  File "/usr/lib/python2.5/idlelib/AutoCompleteWindow.py", line 217, in
winconfig_event
x, y, cx, cy = self.widget.bbox(self.startindex)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2833, in bbox
self.tk.call((self._w, 'bbox') + args)) or None
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1030, in _getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(128,'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
return self.func(*args)
  File "/usr/lib/python2.5/idlelib/AutoCompleteWindow.py", line 217, in
winconfig_event
x, y, cx, cy = self.widget.bbox(self.startindex)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2833, in bbox
self.tk.call((self._w, 'bbox') + args)) or None
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1030, in _getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(128,'
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1403, in __call__
return self.func(*args)
  File "/usr/lib/python2.5/idlelib/AutoCompleteWindow.py", line 217, in
winconfig_event
x, y, cx, cy = self.widget.bbox(self.startindex)
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 2833, in bbox
self.tk.call((self._w, 'bbox') + args)) or None
  File "/usr/lib/python2.5/lib-tk/Tkinter.py", line 1030, in _getints
return tuple(map(getint, self.tk.splitlist(string)))
ValueError: invalid literal for int() with base 10: '(128,'

--
components: IDLE
messages: 57759
nosy: Mufasa
severity: normal
status: open
title: Idle tab command completion
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1486] Idle tab command completion

2007-11-22 Thread Facundo Batista

Facundo Batista added the comment:

On IDLE and Python with the same exact version, but in Windows, this
works ok.

Don't have IDLE in Linux to try it, though.

--
nosy: +facundobatista

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1487] PEP 366 implementation

2007-11-22 Thread Nick Coghlan

New submission from Nick Coghlan:

Patch to implement PEP 366.

Note that it doesn't implement precisely the semantics described in the
version of the PEP posted in July, as some of those ideas didn't prove
feasible due to the fact that imp.new_module can't tell the difference
between normal modules and packages.

An updated version of the PEP will be posted shortly to correct those
problems.

--
components: Interpreter Core, Library (Lib)
files: pep_366_v1.diff
keywords: patch
messages: 57761
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: PEP 366 implementation
type: rfe
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file8794/pep_366_v1.diff

__
Tracker <[EMAIL PROTECTED]>

__Index: Python/import.c
===
--- Python/import.c (revision 59120)
+++ Python/import.c (working copy)
@@ -2106,7 +2106,8 @@
 {
static PyObject *namestr = NULL;
static PyObject *pathstr = NULL;
-   PyObject *modname, *modpath, *modules, *parent;
+   static PyObject *pkgstr = NULL;
+   PyObject *pkgname, *modname, *modpath, *modules, *parent;
 
if (globals == NULL || !PyDict_Check(globals) || !level)
return Py_None;
@@ -2121,44 +2122,103 @@
if (pathstr == NULL)
return NULL;
}
+   if (pkgstr == NULL) {
+   pkgstr = PyString_InternFromString("__package__");
+   if (pkgstr == NULL)
+   return NULL;
+   }
 
*buf = '\0';
*p_buflen = 0;
-   modname = PyDict_GetItem(globals, namestr);
-   if (modname == NULL || !PyString_Check(modname))
-   return Py_None;
+   pkgname = PyDict_GetItem(globals, pkgstr);
 
-   modpath = PyDict_GetItem(globals, pathstr);
-   if (modpath != NULL) {
-   Py_ssize_t len = PyString_GET_SIZE(modname);
-   if (len > MAXPATHLEN) {
+   if ((pkgname != NULL) && (pkgname != Py_None)) {
+   /* __package__ is set, so use it */
+   Py_ssize_t len;
+   if (!PyString_Check(pkgname)) {
PyErr_SetString(PyExc_ValueError,
-   "Module name too long");
+   "__package__ set to non-string");
return NULL;
}
-   strcpy(buf, PyString_AS_STRING(modname));
-   }
-   else {
-   char *start = PyString_AS_STRING(modname);
-   char *lastdot = strrchr(start, '.');
-   size_t len;
-   if (lastdot == NULL && level > 0) {
+   len = PyString_GET_SIZE(pkgname);
+   if (len == 0) {
+   if (level > 0) {
+   PyErr_SetString(PyExc_ValueError,
+   "Attempted relative import in 
non-package");
+   return NULL;
+   }
+   return Py_None;
+   }
+   if (len > MAXPATHLEN) {
PyErr_SetString(PyExc_ValueError,
-   "Attempted relative import in non-package");
+   "Package name too long");
return NULL;
}
-   if (lastdot == NULL)
+   strcpy(buf, PyString_AS_STRING(pkgname));
+   } else {
+   /* __package__ not set, so figure it out and set it */
+   modname = PyDict_GetItem(globals, namestr);
+   if (modname == NULL || !PyString_Check(modname))
return Py_None;
-   len = lastdot - start;
-   if (len >= MAXPATHLEN) {
-   PyErr_SetString(PyExc_ValueError,
-   "Module name too long");
-   return NULL;
+   
+   modpath = PyDict_GetItem(globals, pathstr);
+   if (modpath != NULL) {
+   /* __path__ is set, so modname is already the package 
name */
+   Py_ssize_t len = PyString_GET_SIZE(modname);
+   int error;
+   if (len > MAXPATHLEN) {
+   PyErr_SetString(PyExc_ValueError,
+   "Module name too long");
+   return NULL;
+   }
+   strcpy(buf, PyString_AS_STRING(modname));
+   error = PyDict_SetItem(globals, pkgstr, modname);
+   if (error) {
+   PyErr_SetString(PyExc_ValueError,
+   "Could not set __package__");
+

[issue1484] logging: callHandlers tests handler levels instead of logger levels?

2007-11-22 Thread Vinay Sajip

Vinay Sajip added the comment:

The behaviour you describe is intentional. To achieve what you want, you
can either set levels on the handlers or use Filters on loggers and/or
handlers (if level-based filtering is not sufficient for your needs).

--
nosy: +vsajip
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1475] test_popen fails when the directory contains a space

2007-11-22 Thread Peter Åstrand

Peter Åstrand added the comment:

>In Python 3.x os.popen is implemented based on subprocess. 

Oh, I see. 

>I believe it's still a problem with subprocess. 

I'm still not convinced of this. Isn't it better to do the quoting
outside subprocess; to let the caller do it? You say that "section 2" is 
our case, but how can we be sure of this: If subprocess is called with
args='"c:\program files\internet explorer\iexplore.exe"', then we have
case 1, right, and surrounding args with another pair of quotes would
mean failure, right?

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1488] PCBuild9 _ssl.vcproj improperly launches build

2007-11-22 Thread Christian Heimes

Christian Heimes added the comment:

Thanks, I'll check it later.

--
assignee:  -> tiran
keywords: +patch, py3k
priority:  -> normal
versions: +Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1488] PCBuild9 _ssl.vcproj improperly launches build

2007-11-22 Thread Joseph Armbruster

New submission from Joseph Armbruster:

When you attempt to build the _ssl project in release or debug you can
possibly encounter errors in the following scenarios:

1) having spaces in the build path

2) if you launch the build in debug, it attempts to run build_ssl.py
with the python.exe found in the path rather than that just built named
python_d.exe.  I believe the solution was designed to run build_ssl.py
with the binary that was built in the configuration.  If this is
correct, then this patch applies.

3) some of the dependency paths did not appear to point to the correct
place.  Please verify.

See attached patch

--
components: Windows
files: sslbuild.patch
messages: 57763
nosy: JosephArmbruster, tiran
severity: normal
status: open
title: PCBuild9 _ssl.vcproj improperly launches build
type: compile error
versions: Python 3.0
Added file: http://bugs.python.org/file8795/sslbuild.patch

__
Tracker <[EMAIL PROTECTED]>

__

sslbuild.patch
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1631171] implement warnings module in C

2007-11-22 Thread Brett Cannon

Brett Cannon added the comment:

Implementing warn_explicit() is going to be troublesome with the new
module_globals argument.  It requires not only to go through the hassle
of looking for a loader and calling get_source(), but it will most
likely require reworking the traceback function introduced to print out
the second line of output (it doesn't look like it directly supports
loaders, but I have not tried it personally).

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1486] Idle tab command completion

2007-11-22 Thread Quentin Gallet-Gilles

Quentin Gallet-Gilles added the comment:

Couldn't reproduce it either, with the following IDLE config:

Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32) 
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
IDLE 1.2.1   No Subprocess 

--
nosy: +quentin.gallet-gilles

__
Tracker <[EMAIL PROTECTED]>

__
___
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)

2007-11-22 Thread Paul Moore

New submission from Paul Moore:

When running the test suite on Windows, test_socket_ssl hangs.

After a bit of investigation, it appears that the test is hanging at
line 184 (if self.s.stdout.readline() != "ERROR\n":) in
OpenSSLServer._external.

The problem is that the test assumes it can read a line of stdout from
the openssl.exe process. However, the openssl.exe on my PC (from the
GnuWin32 project) appears to buffer its output, so the Python process
deadlocks waiting for a response.

An easy (if clumsy) fix is to simply skip the check on the output of the
server. I have attached a patch which does this for win32 only (on the
assumption that other platforms don't have this issue).

I guess that other openssl builds don't have the same problem - however,
I can't see an easy way of testing for this.

--
components: Tests
files: test_socket_ssl.diff
messages: 57768
nosy: pmoore
severity: normal
status: open
title: test_socket_ssl hanhs on Windows (deadlock)
versions: Python 2.6
Added file: http://bugs.python.org/file8796/test_socket_ssl.diff

__
Tracker <[EMAIL PROTECTED]>

__

test_socket_ssl.diff
Description: Binary data
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1490] Bug in eval() function

2007-11-22 Thread Arunkumar

New submission from Arunkumar:

PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
(Intel)] on win32.
Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' 
for further copyright information.
>>> 
>>> 
>>> eval("02*2")
4
>>> 
>>> eval("08*2")
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
08*2
 ^
SyntaxError: invalid token
>>> eval("09*2")
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1
09*2
 ^
SyntaxError: invalid token
>>> 
>>> 
>>> eval("07*2")
14
>>> 
>>> eval("010*2")
16
>>> eval("9*2")
18
>>>

--
messages: 57769
nosy: arunkumarrajan
severity: urgent
status: open
title: Bug in eval() function
type: compile error
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
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)

2007-11-22 Thread Guido van Rossum

Changes by Guido van Rossum:


--
assignee:  -> janssen
nosy: +janssen

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1488] PCBuild9 _ssl.vcproj improperly launches build

2007-11-22 Thread Christian Heimes

Christian Heimes added the comment:

I've fixed (1) and (2) in r59130. I don't understand what you mean with (3).

--
resolution:  -> fixed
status: open -> pending

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com