[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-18 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Updated patch.

Added file: http://bugs.python.org/file11514/bitfields-2.patch

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



[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-18 Thread Thomas Heller

Changes by Thomas Heller [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11513/bitfields.patch

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



[issue3187] os.listdir can return byte strings

2008-09-18 Thread Helmut Jarausch

Helmut Jarausch [EMAIL PROTECTED] added the comment:

Hi,
is this assumed to be fixed in 3.0rc1 ?

with SVN 66506  (3.0rc1+) 
for dirname, subdirs, files in os.walk(bytes(Top,'iso-8859-1')) :

still gives an error here:

for dirname, subdirs, files in os.walk(bytes(Top,'iso-8859-1')) :
  File /usr/local/lib/python3.0/os.py, line 268, in walk
if isdir(join(top, name)):
  File /usr/local/lib/python3.0/posixpath.py, line 64, in join
if b.startswith('/'):
TypeError: expected an object with the buffer interface

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



[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-18 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Updated the unittest so that it works on Windows, too.

Added file: http://bugs.python.org/file11515/bitfields-3.patch

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



[issue3547] Ctypes is confused by bitfields of varying integer types

2008-09-18 Thread Thomas Heller

Changes by Thomas Heller [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11514/bitfields-2.patch

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



[issue3897] collections

2008-09-18 Thread Dieter Kadelka

New submission from Dieter Kadelka [EMAIL PROTECTED]:

Line 179 in Setup.dist should be replaced by

#_collections _collectionsmodule.c # Container types

_collectionsmodule.c doesn't exist any longer

--
components: Extension Modules
messages: 73365
nosy: kadelka
severity: normal
status: open
title: collections
type: compile error
versions: Python 2.6

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



[issue3862] test_array fails on FreeBSD7 amd64

2008-09-18 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

Thanks, Alan.  I realised my answer was a shallow one after reading (too
late!) the thread you started on python-dev.

However, I have a suspicion that that particular array test
(test_alloc_overflow) was merely meant to test the code in
newarrayobject, at around line 427 of arraymodule.c, which looks like:

/* Check for overflow */
if (nbytes / descr-itemsize != (size_t)size) {
return PyErr_NoMemory();
}

and that the test dated from an era when it was fairly safe to assume
that a size_t was at most 32 bits.  I'd guess that test_alloc_overflow
was never intended to be a test of OS malloc failure behaviour.

So the array test is wrong, and I think this patch should be applied
anyway.  I admit this doesn't help with the much more interesting
question of what's going on with malloc on FreeBSD.

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



[issue3893] timedelta overflows in a surprising way

2008-09-18 Thread Shannon -jj Behrens

Shannon -jj Behrens [EMAIL PROTECTED] added the comment:

Yes, that makes perfect sense.  Sorry, I missed that part of the docs. 
Please feel free to close this bug.

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



[issue3862] test_array fails on FreeBSD7 amd64

2008-09-18 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

s/Alan/Andrew/.  Need more coffee.  Apologies.

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



[issue3879] 2.6 regression in urllib.getproxies_environment

2008-09-18 Thread vila

vila [EMAIL PROTECTED] added the comment:

Here you are

Added file: http://bugs.python.org/file11516/issue3879.patch

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



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-18 Thread Jesús Cea Avión

Jesús Cea Avión [EMAIL PROTECTED] added the comment:

Adding Nelson to the nosy list, since I'm unable to debug any Windows
issue by myself.

I'm very interested in the report saying that MS Windows Berkeley DB
correctly sends the db.DB_EVENT_REP_STARTUPDONE event in his setup. That
could indicate some issue in the buildbot.

Barry, I don't consider this a release blocker for 2.6.0. This is a
very advanced feature (database replication). This must be solved, but
2.6 doesn't need to be delayed for it.

--
nosy: +Trent.Nelson

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



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-18 Thread Jesús Cea Avión

Jesús Cea Avión [EMAIL PROTECTED] added the comment:

¿Somebody can try this issue in a Windows box?. It could be a Berkeley
DB bug in that platform, but I would like to verify this before
informing Oracle.

Thanks.

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



[issue3879] 2.6 regression in urllib.getproxies_environment

2008-09-18 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
keywords: +needs review
priority:  - release blocker

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



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-18 Thread Ralf Schmitt

Ralf Schmitt [EMAIL PROTECTED] added the comment:

http://bugs.python.org/issue3026 is about the same issue (with a working
patch added 2 months ago). It's really sad that it sat there for so
long. I could have spent that time on something else...

(btw. my patch also made the hash functions interruptible, this is
something you might consider).

--
nosy: +schmir

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



[issue3026] integer overflow in hashlib causes wrong results for cryptographic hash functions [was: mmap broken with large files on 64bit system]

2008-09-18 Thread Ralf Schmitt

Ralf Schmitt [EMAIL PROTECTED] added the comment:

same issue in http://bugs.python.org/issue3886.
it's sad that no one took a look at the patch...
now, it should probably be closed...

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



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-18 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

As a security issue, the patch should also be backport to 2.5 (and 2.4
if applicable)

--
nosy: +loewis
versions: +Python 2.4, Python 2.5

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



[issue3026] integer overflow in hashlib causes wrong results for cryptographic hash functions [was: mmap broken with large files on 64bit system]

2008-09-18 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Ok, closing. Thanks for the patch, anyway.

--
resolution:  - out of date
status: open - closed

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



[issue3666] atexit.register with bad input segfaults on exit

2008-09-18 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

Why not just have atexit_callfuncs call atexit_cleanup at the end of its
execution?

--
nosy: +skip.montanaro

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



[issue3898] 3.0 documentation fails to build

2008-09-18 Thread Martin v. Löwis

New submission from Martin v. Löwis [EMAIL PROTECTED]:

In 3.0rc1, I get, for make htmlhelp

... contents copyright distutils/apiref Exception occurred:
  File
/cygdrive/c/loewis/3k/python/Doc/tools/pygments/lexers/__init__.py, lin
e 83, in get_lexer_by_name
raise ClassNotFound('no lexer for alias %r found' % _alias)
ClassNotFound: no lexer for alias 'python3' found

The full traceback is

Traceback (most recent call last):
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/__init__.py, line
128, in main
app.build(all_files, filenames)
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/application.py,
line 122, in build
self.builder.build_update()
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/builder.py, line
242, in build_update
'out of date' % len(to_build))
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/builder.py, line
282, in build
self.write(docnames, updated_docnames, method)
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/builder.py, line
319, in write
self.write_doc(docname, doctree)
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/builder.py, line
510, in write_doc
self.docwriter.write(doctree, destination)
  File
/cygdrive/c/loewis/3k/python/Doc/tools/docutils/writers/__init__.py,
line 78, in write
self.translate()
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/htmlwriter.py,
line 32, in translate
self.document.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
159, in walkabout
child.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
159, in walkabout
child.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
159, in walkabout
child.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
159, in walkabout
child.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
159, in walkabout
child.walkabout(visitor)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
151, in walkabout
visitor.dispatch_visit(self)
  File /cygdrive/c/loewis/3k/python/Doc/tools/docutils/nodes.py, line
1502, in dispatch_visit
return method(node)
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/htmlwriter.py,
line 191, in visit_literal_block
lang, linenos))
  File /cygdrive/c/loewis/3k/python/Doc/tools/sphinx/highlighting.py,
line 169, in highlight_block
lexer = lexers[lang] = get_lexer_by_name(lang)
  File
/cygdrive/c/loewis/3k/python/Doc/tools/pygments/lexers/__init__.py,
line 83, in get_lexer_by_name
raise ClassNotFound('no lexer for alias %r found' % _alias)
ClassNotFound: no lexer for alias 'python3' found

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 73377
nosy: georg.brandl, loewis
severity: normal
status: open
title: 3.0 documentation fails to build

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



[issue3666] atexit.register with bad input segfaults on exit

2008-09-18 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

The attached patch causes an exception to print
at exit on my Mac:

 import sys, atexit
 atexit.register(lambda: 1, 0, 0, (x for x in (1,2)), 0, 0)
function lambda at 0x5c91e0
 sys.exit()
Error in atexit._run_exitfuncs:
TypeError: print_exception(): Exception expected for value, str found

Without the patch I get the same TypeError but it's
followed by a Bus error.

I don't know if the patch is right or wrong, better or worse than the
status quo, but I'll toss it out there for consideration.  It
certainly seems to subscribe to Christian's theme of calling
atexit_cleanup() earlier.

--
keywords: +patch
Added file: http://bugs.python.org/file11517/atexit.diff

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



[issue3898] 3.0 documentation fails to build

2008-09-18 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

You'll have to update the Pygments library; try a rm -r tools/pygments;
make update.

--
resolution:  - works for me
status: open - closed

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



[issue3899] test_ssl.py doesn't properly test ssl integration with asyncore

2008-09-18 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' [EMAIL PROTECTED]:

The AsyncoreEchoServer class in test_ssl.py doesn't actually test a real
integration with asyncore since the do_handshake_on_connect flag is set
to True and hence temporarily blocks the asyncore polling loop as long
as the ssl handshake finishes.
The patch in attachment subclasses some asyncore internals so that a
non-blocking ssl handshake takes place.

Tested under Windows XP SP3, Python 2.6rc1.

--
components: Library (Lib)
files: test_ssl.patch
keywords: patch
messages: 73382
nosy: giampaolo.rodola, janssen, josiah.carlson, josiahcarlson
severity: normal
status: open
title: test_ssl.py doesn't properly test ssl integration with asyncore
type: behavior
versions: Python 2.6, Python 3.1
Added file: http://bugs.python.org/file11518/test_ssl.patch

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



[issue3102] ctypes defines global symbols

2008-09-18 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Is it too late to fix this for Python 2.6 and Python 3.0?

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



[issue3666] atexit.register with bad input segfaults on exit

2008-09-18 Thread Skip Montanaro

Skip Montanaro [EMAIL PROTECTED] added the comment:

New patch.  This also makes the various atexit_*
functions static.

Added file: http://bugs.python.org/file11519/atexit.diff

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



[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor

New submission from STINNER Victor [EMAIL PROTECTED]:

Our application server running on top of Twisted crashs 1 to 3 times 
per day. It uses a ctypes binding for libnetfilter_conntrack (dump 
Linux conntrack table) which is running in a dedicated thread. So we 
get:
 - Python 2.5.2
 - Twisted 8.1.0-3
 - Linux 2.6.26-1-amd64 SMP x86_64

The crash does not occur in the ctypes thread but it the main thread 
(another CPython thread). The backtrace is incoherent which means that 
it's a multithreading problem. So I used helgrind (Valgrind tool) to 
watch invalid memory accesses, and here is one:

==30545== Possible data race during write of size 4 at 0x4EC1E60
==30545==at 0x808F616: PyString_FromStringAndSize 
(stringobject.c:78)
==30545==by 0x4D3CBD9: string_at (_ctypes.c:4568)
==30545==by 0x4D4654E: ffi_call_SYSV (sysv.S:60)
==30545==by 0x4D46396: ffi_call (ffi.c:221)
==30545==by 0x4D3E9F1: _call_function_pointer (callproc.c:668)
==30545==by 0x4D3F147: _CallProc (callproc.c:991)
==30545==by 0x4D3B0DA: CFuncPtr_call (_ctypes.c:3373)
==30545==by 0x8060E0A: PyObject_Call (abstract.c:1861)
==30545==by 0x80CB391: do_call (ceval.c:3784)
==30545==by 0x80CAD69: call_function (ceval.c:3596)
==30545==by 0x80C7B6F: PyEval_EvalFrameEx (ceval.c:2272)
==30545==by 0x80C9329: PyEval_EvalCodeEx (ceval.c:2836)
==30545==   Old state: shared-readonly by threads #1, #4
==30545==   New state: shared-modified by threads #1, #4
==30545==   Reason:this thread, #1, holds no consistent locks
==30545==   Location 0x4EC1E60 has never been protected by any lock

In _CallProc() the test ((flags  FUNCFLAG_PYTHONAPI) == 0) is True, 
which means that the GIL is released. But it's a bug because as you 
can see, string_at() uses PyString_FromStringAndSize() which requires 
the GIL!

Finally, the bug comes from ctypes module, not _ctypes: ctypes just 
uses the wrong calling convention. Using PYFUNCPTR() instead of 
CFUNCPTR(), the Helgrind warning goes away ;-)

Note about Helgrind: This tools really rocks!!!

--
components: Library (Lib)
files: ctypes_string_at.patch
keywords: patch
messages: 73385
nosy: haypo
severity: normal
status: open
title: ctypes: wrong calling convention for _string_at
versions: Python 2.5, Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11520/ctypes_string_at.patch

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



[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor

Changes by STINNER Victor [EMAIL PROTECTED]:


--
type:  - crash

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



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-18 Thread Hirokazu Yamamoto

Hirokazu Yamamoto [EMAIL PROTECTED] added the comment:

I've tried this issue on VC6 + db4.7.25.0 + win2k, and I could reproduce
error.

I added following patch for investigation.

Index: Lib/bsddb/test/test_replication.py
===
--- Lib/bsddb/test/test_replication.py  (revision 66483)
+++ Lib/bsddb/test/test_replication.py  (working copy)
@@ -40,6 +40,7 @@
 self.confirmed_master=True

 def client_startupdone(a,b,c) :
+print DBReplicationManager:, (a, b, c)
 if b==db.DB_EVENT_REP_STARTUPDONE :
 self.client_startupdone=True

@@ -201,6 +202,7 @@
 self.confirmed_master = True

 def client_startupdone(a,b,c) :
+print DBBaseReplication:, (a, b, c)
 if b == db.DB_EVENT_REP_STARTUPDONE :
 self.client_startupdone = True

And this is result.

DBReplicationManager: (DBEnv object at 0x00A80148, 2, None)
DBReplicationManager: (DBEnv object at 0x00A80148, 5, 0)
DBBaseReplication: (DBEnv object at 0x00B35CD0, 2, None)
DBBaseReplication: (DBEnv object at 0x00B35CD0, 5, 13)
DBBaseReplication: (DBEnv object at 0x00B35CD0, 7, None)
DBBaseReplication: (DBEnv object at 0x00B49658, 2, None)
DBBaseReplication: (DBEnv object at 0x00B49658, 5, 13)
DBBaseReplication: (DBEnv object at 0x00B49730, 2, None)
DBBaseReplication: (DBEnv object at 0x00B49730, 5, 13)

--
nosy: +ocean-city

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



[issue3885] errors on _bsddb creation and dealloc

2008-09-18 Thread Jesús Cea Avión

Jesús Cea Avión [EMAIL PROTECTED] added the comment:

 Not only in these functions, but anywhere dummy= is followed by a
 Py_XDECREF(dummy);

Please, clarify this. I don't see your point.

 And code like this must also be changed (in DB_open):
if (makeDBError(err)) {
PyObject *dummy;

dummy=DB_close_internal(self,0);
Py_XDECREF(dummy);
return NULL;
}
 if DB_close_internal() raises an exception it will replace the
 original error set by makeDBError(). I'm not sure this is desirable.

I agree this could be an issue that need to be studied. Please, post a
new bug report for that (to be addressed in 2.6.1, I think, since this
issue doesn't crash the interpreter).

I post a patch for the bugs originally indicated in this bug report, an
another one (db.verify() regression).

*Please Review*. I will update python 2.6 svn when the review is done.
Thanks.

Added file: http://bugs.python.org/file11521/bsddb.patch

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



[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

This is already fixed in SVN, see issue #3554.

--
assignee:  - theller
nosy: +theller
resolution:  - duplicate
status: open - closed

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



[issue3900] ctypes: wrong calling convention for _string_at

2008-09-18 Thread STINNER Victor

STINNER Victor [EMAIL PROTECTED] added the comment:

 This is already fixed in SVN, see issue #3554

Oh... cool because next release will fix it, and fuck because it took 
me hours to found this bug...

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



[issue3885] errors on _bsddb creation and dealloc

2008-09-18 Thread Amaury Forgeot d'Arc

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

  Not only in these functions, but anywhere dummy= is followed by a
  Py_XDECREF(dummy);
 
 Please, clarify this. I don't see your point.

If dummy is NULL, a pending exception has been set (with PyErr_SetString
or another similar function). If you simply ignore this, your function
will return a valid object, but PyErr_Occurred() returns True. This is
not correct and will fail in subtle ways (like with gc.collect()); in
debug mode, a message XXX undetected error is printed.
You must either clear the exception, or return NULL from your function.

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



[issue3901] Slight readme.txt fix (VC9)

2008-09-18 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto [EMAIL PROTECTED]:

I'm not VC9 guy, but it looks not up-to-date on _bsddb section.

--
assignee: georg.brandl
components: Documentation
files: slight_readme_fix.patch
keywords: patch
messages: 73391
nosy: georg.brandl, ocean-city
severity: normal
status: open
title: Slight readme.txt fix (VC9)
versions: Python 2.6
Added file: http://bugs.python.org/file11522/slight_readme_fix.patch

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



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-18 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Sorry about missing your work, Ralf. In the rush to getting a fix in for
2.6rc2 we went with the patch Apple sent to the security mailing list
when the CVE was reported to us.

And 2.5 has already been patched by r66497, so removing that as a
version that needs a patch.

--
versions:  -Python 2.5

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



[issue3902] distutils does not correctly create packages for compiled extensions

2008-09-18 Thread Eyal Lotem

New submission from Eyal Lotem [EMAIL PROTECTED]:

When using either the ext_package keyword argument to setup, or when
using the pkg.name module name notation to Extension instances,
distutils installs the compiled extensions into the appropriate package
directory.

However, distutils does not create an __init__.py file in that
directory, so it is not actually a package and is not importable.

--
components: Distutils
messages: 73393
nosy: Peaker
severity: normal
status: open
title: distutils does not correctly create packages for compiled extensions
type: behavior
versions: Python 2.5

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



[issue3853] Windows SQLite DLL should be built with multithreading enabled

2008-09-18 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

I agree with Amaury's analysis (except that the preferred way to
override it is to define SQLITE_THREADSAFE directly). If it's not
defined, it defaults to 1.

Closing as works-for-me.

--
resolution:  - works for me
status: open - closed

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



[issue3885] errors on _bsddb creation and dealloc

2008-09-18 Thread Jesús Cea Avión

Jesús Cea Avión [EMAIL PROTECTED] added the comment:

Very good point, Amaury.

I would open a new bug to track this (probably for 2.6.1 time). Can you?.

In the meanwhile, I need review for the inmediate patch, since the crash
is 100% reproductible.

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



[issue3887] Python 2.6 doesn't run after installation on amd64

2008-09-18 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

I can't reproduce the problem. Did you install for all users, or just
for you? Do you have the CRT already installed or not?

Can you try replacing the manifest with the attached one (not sure why
it says x86)? You then also need to replace the manifest in DLLs, and
fix the  file name to ../msvcr90.dll.

Added file: http://bugs.python.org/file11523/Microsoft.VC90.CRT.manifest

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



[issue3887] Python 2.6 doesn't run after installation on amd64

2008-09-18 Thread John Ehresman

John Ehresman [EMAIL PROTECTED] added the comment:

This is on a fresh Vista Ultimate install.  There is no msvcr90.dll
anywhere on the system, if windows file search according to windows file
search (I did check the hidden / system file box).

The first report is from a for me install.  After installing for all
users, there's no dll in \python26 and the error log error message of:
Activation context generation failed for C:\Python26\python.exe.
Dependent Assembly
Microsoft.VC90.CRT,processorArchitecture=amd64,publicKeyToken=1fc8b3b9a1e18e3b,type=win32,version=9.0.21022.8
could not be found. Please use sxstrace.exe for detailed diagnosis.

I tried using changing the .manifest and got a null pointer access error:
Faulting application python.exe, version 0.0.0.0, time stamp 0x48cb6bcf,
faulting module ntdll.dll, version 6.0.6001.18000, time stamp
0x4791adec, exception code 0xc07b, fault offset 0x000b1188,
process id 0xa28, application start time 0x01c919c8f9746f89.

I wonder if the x86 dll is being installed rather than the amd64 one.

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



[issue3899] test_ssl.py doesn't properly test ssl integration with asyncore

2008-09-18 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

The server wasn't meant to be non-blocking.  The non-blocking test is
performed when the client (which is non-blocking) connects to it.

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



[issue3903] pickle error in python3.0rc1

2008-09-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Pickled files should *always* be used in binary mode.

The 3.0 pickle documentation states this:

Be sure to always open pickle files created with protocols = 1 in
binary mode. For the old ASCII-based pickle protocol 0 you can use
either text mode or binary mode as long as you stay consistent.

A pickle file written with protocol 0 in binary mode will contain lone
linefeeds as line terminators and therefore will look “funny” when
viewed in Notepad or other editors which do not support this format.


[1] http://docs.python.org/dev/3.0/library/pickle.html#usage

--
nosy: +benjamin.peterson
resolution:  - invalid
status: open - closed

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



[issue3893] timedelta overflows in a surprising way

2008-09-18 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
resolution:  - invalid
status: open - closed

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



[issue3897] collections

2008-09-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Why do you think it doesn't exist? It appears to be alive and healthy in
Modules/_collectionsmodule.c.

--
nosy: +benjamin.peterson

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



[issue2550] SO_REUSEADDR doesn't have the same semantics on Windows as on Unix

2008-09-18 Thread Forest Wilkinson

Changes by Forest Wilkinson [EMAIL PROTECTED]:


--
nosy: +forest

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



[issue3723] Py_NewInterpreter does not work

2008-09-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Maybe, I'm not seeing the whole problem, but can't we just add
_PySys_Init and _PyBuiltin_Init to config.c like in the attached patch?
Obviously, we will eventually want to make a separate state to store
module globals in, but I think this will work for 3.0 final.

--
keywords: +patch
nosy: +benjamin.peterson
Added file: http://bugs.python.org/file11524/add_init_funcs.patch

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



[issue3102] ctypes defines global symbols

2008-09-18 Thread Martin v. Löwis

Martin v. Löwis [EMAIL PROTECTED] added the comment:

Formally, I can't answer that question; you need to ask the RM.

Informally, I think only serious bugs can be fixed now; this bug is not
serious.

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



[issue3904] asynchat async_chat __init__() arguments changed in python 2.6

2008-09-18 Thread Forest Wilkinson

New submission from Forest Wilkinson [EMAIL PROTECTED]:

In python 2.6rc2, the async_chat.__init__() parameters have changed. 
The first arg was called 'conn' in python 2.5, and it is now called
'sock'.  This change breaks code that worked with previous python 2.x
versions, if that code followed the example in the official docs:

  class http_request_handler(asynchat.async_chat):
def __init__(self, conn, addr, sessions, log):
  asynchat.async_chat.__init__(self, conn=conn)

The change also breaks the 2.6 docs, as they have not been updated to
reflect the newly renamed parameter.
http://docs.python.org/dev/library/asynchat.html#id1

The change appears to come from Nadeem Vawda as part of issue1519.  (See
msg57989.)

I expect that existing python code could be modified to work around the
problem by using positional args instead of keyword args.  However, I
didn't expect to have to update my working code to accommodate such a
change in the python 2.x code line.  I agree that 'sock' is a better
name for the parameter, especially since it matches the same in
asyncore.dispatcher, but should the change really happen before python
3.0?  If so, let's at least update the docs.

--
components: Library (Lib)
messages: 73405
nosy: forest, nvawda
severity: normal
status: open
title: asynchat async_chat __init__() arguments changed in python 2.6
versions: Python 2.6

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



[issue3886] Integer overflow in _hashopenssl.c (CVE-2008-2316)

2008-09-18 Thread Gregory P. Smith

Gregory P. Smith [EMAIL PROTECTED] added the comment:

Python 2.4 uses an 'int' for ob_size so it does not appear at first
glance that its sha module (what hashlib was derived from) is
susceptible to this bug when compiled as 64-bit.

--
keywords: +64bit
nosy: +gregory.p.smith
versions:  -Python 2.4

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



[issue3904] asynchat async_chat __init__() arguments changed in python 2.6

2008-09-18 Thread Benjamin Peterson

Changes by Benjamin Peterson [EMAIL PROTECTED]:


--
assignee:  - josiahcarlson
nosy: +josiahcarlson

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



[issue3708] os.urandom(1.1): infinite loop

2008-09-18 Thread Roumen Petrov

Roumen Petrov [EMAIL PROTECTED] added the comment:

It seems to me that test case will fail on windows and vms platforms.
The case contain os.urandom(1.1) but in posixmodule.c for urandon
functions (windows and vms) exits:
  PyArg_ParseTuple(args, i:urandom, howMany))

./python.exe -c 'import os; print %s %(os.urandom(1.9))' =
-c:1: DeprecationWarning: integer argument expected, got float

--
nosy: +rpetrov

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



[issue3905] subprocess failing in GUI applications on Windows

2008-09-18 Thread Todd Whiteman

Todd Whiteman [EMAIL PROTECTED] added the comment:

This seems to be somewhat related to issue1124861:
http://bugs.python.org/issue1124861

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



[issue3879] 2.6 regression in urllib.getproxies_environment

2008-09-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Georg, you applied the offending patch. Can you comment?

--
assignee:  - georg.brandl
nosy: +georg.brandl

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



[issue586680] -S hides standard dynamic modules

2008-09-18 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

If we think once can reliably add the directory based purely on whether
it starts with build/lib., and then potentially check for a suffix of
-pydebug if we are in a debug build, I will support adding this to
getpath.c to ditch the distutils import used by site.py.

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



[issue3906] lib2to3\main.py will not run

2008-09-18 Thread Roger Upole

New submission from Roger Upole [EMAIL PROTECTED]:

On first try:

  File H:\Python-3.0rc1\Lib\lib2to3\main.py, line 10, in module
from . import refactor
ValueError: Attempted relative import in non-package

And after changing that line to
from lib2to3 import refactor
it still dies with

  File H:\Python-3.0rc1\Lib\lib2to3\main.py, line 86, in module
sys.exit(main())
TypeError: main() takes at least 1 positional argument (0 given)

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 73412
nosy: collinwinter, rupole
severity: normal
status: open
title: lib2to3\main.py will not run
versions: Python 3.0

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



[issue3904] asynchat async_chat __init__() arguments changed in python 2.6

2008-09-18 Thread Josiah Carlson

Josiah Carlson [EMAIL PROTECTED] added the comment:

Fixed documentation in revision 66510.  Also, the parameters changed 
long before rc2. ;)

--
resolution:  - fixed
status: open - closed

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



[issue586680] -S hides standard dynamic modules

2008-09-18 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

On Thu, Sep 18, 2008 at 6:58 PM, Brett Cannon [EMAIL PROTECTED] wrote:

 Brett Cannon [EMAIL PROTECTED] added the comment:

 If we think once can reliably add the directory based purely on whether
 it starts with build/lib., and then potentially check for a suffix of
 -pydebug if we are in a debug build,

... and if there is more than one match in the build directory, either
error out or choose one of the directories somehow. I guess the real
question is how often to people actually have multiple versions of
their built libraries in build/.

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



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-18 Thread Mark Hammond

Mark Hammond [EMAIL PROTECTED] added the comment:

We are seeing one more error almost identical to the one I fixed (even
the method name is the same), but its at line 315 - this is the last
error in the Windows buildbot!  Please let me know if you would like me
to make a similar fix to this line, or if you think you will be able
to back out my hack or skip the test some other way.

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



[issue1641] asyncore delayed calls feature

2008-09-18 Thread Josiah Carlson

Josiah Carlson [EMAIL PROTECTED] added the comment:

I have an updated sched.py module which significantly improves the 
performance of the cancel() operation on scheduled events (amortized 
O(log(n)), as opposed to O(n) as it is currently).  This is sufficient 
to make sched.py into the equivalent of a pair heap.

From there, it's all a matter of desired API and features.

My opinion on the matter: it would be very nice to have the asyncore 
loop handle all of the scheduled events internally.  However, being able 
to schedule and reschedule events is a generally useful feature, and 
inserting the complete functionality into asyncore would unnecessarily 
hide the feature and make it less likely to be used by the Python 
community.

In asyncore, I believe that it would be sufficient to offer the ability 
to call a function within asyncore.loop() before the asyncore.poll() 
call, whose result (if it is a number greater than zero, but less than 
the normal timeout) is the timeout passed to asyncore.poll().  Obviously  
the function scheduler would be written with this asyncore API in mind.

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



[issue3899] test_ssl.py doesn't properly test ssl integration with asyncore

2008-09-18 Thread Josiah Carlson

Josiah Carlson [EMAIL PROTECTED] added the comment:

Being able to test the async features of both sides of the SSL 
connection is a good thing.

Also, the subclass provides a useful example for users who want to use 
asyncore and ssl servers without blocking on an incoming connection.

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



[issue3906] lib2to3\main.py will not run

2008-09-18 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

lib2to3/main.py is not an entry point. You should use the top level 2to3
script.

--
nosy: +benjamin.peterson
resolution:  - invalid
status: open - closed

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



[issue3907] for line in file doesn't work for pipes

2008-09-18 Thread endolith

New submission from endolith [EMAIL PROTECTED]:

One of the principles of Python is that There should be one-- and
preferably only one --obvious way to do it.  It seems that the for
line in file idiom is The Way to iterate over the lines of a file, and
older more explicit methods are deprecated.  PEP 234 says that this:

for line in file:
...

is equivalent to this:

for line in iter(file.readline, ):
...

or this:

while 1:
line = file.readline()
if not line:
break
...

However, for line in file does not behave the same as the other two if
the file is a named pipe.  This is presumably due to the hidden
read-ahead buffer in the low-level implementation of the next() method
of the file iterator
(http://docs.python.org/lib/bltin-file-objects.html), meant to increase
the speed at which it reads regular physical files.  Since not enough
data exists in the pipe to fill the buffer yet, the lines are only read
in a burst after the buffer has been filled or when the pipe is closed.
 My application is monitoring a pipe for new lines from a logging
program, and I want each line read as soon as it is written.  Sure,
there are other ways to get this functionality, but I don't see why for
line in file shouldn't behave the same way for any file-like object.

I wonder if it can be made to internally use the read-ahead buffer for
closed physical files, and a different method for open named pipes.  I
wonder if reading pipes character-by-character causes any significant
slowdown compared to the read-ahead buffer when the pipe resides in
memory instead of a disk.

Forgive me if this is not really a bug, but it seems to my beginner eyes
that things are not working the way they should.

http://python-forum.org/pythonforum/viewtopic.php?t=9300
http://ubuntuforums.org/showthread.php?t=916518

--
components: Interpreter Core
messages: 73419
nosy: endolith
severity: normal
status: open
title: for line in file doesn't work for pipes
type: behavior
versions: Python 2.5

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



[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.

2008-09-18 Thread Guilherme Polo

Changes by Guilherme Polo [EMAIL PROTECTED]:


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



[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.

2008-09-18 Thread Guilherme Polo

Changes by Guilherme Polo [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11483/issue_3851.diff

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



[issue3905] subprocess failing in GUI applications on Windows

2008-09-18 Thread Trent Mick

Trent Mick [EMAIL PROTECTED] added the comment:

The failure is in the DuplicateHandle call that subprocess makes on, in
this case, the stdin handle (as returned by
`GetStdHandle(STD_INPUT_HANDLE)`) call earlier.

Two cases here:

1. When this is run in a subsystem:windows process (like PythonWin or
IDLE) that is launched from Windows Explorer (e.g. from a Start Menu
shortcut or Desktop shortcut) then `GetStdHandle(STD_INPUT_HANDLE)`
returns None. 

[http://msdn.microsoft.com/en-us/library/ms683231(VS.85).aspx]
 If an application does not have associated standard handles,
 such as a service running on an interactive desktop, and has
 not redirected them, the return value is NULL.

In this case you *don't* get the error that Todd described, because the
code path taken in subprocess.py then use CreatePipe for the `p2cread`
variable on which `DuplicateHandle` is called.

2. However, when the subsystem:windows process is launched from the
cmd.exe shell the `GetStdHandle` call returns a value -- in Todd's and
my testing, the value 3.

The code path in subprocess.py then calls `DuplicateHandle` on this in
`Popen._make_inheritable`. This fails with traceback Todd posted.

My *guess* at what the problem is stems from this comment in the MSDN
docs on console handles:

[http://msdn.microsoft.com/en-us/library/ms682075(VS.85).aspx]
 A process can use the DuplicateHandle function to create a 
 duplicate console handle that has different access or 
 inheritability from the original handle. Note, however,
 that a process can create a duplicate console handle only
 for its own use. This differs from other handle types (such
 as file, pipe, or mutex objects), for which DuplicateHandle
 can create a duplicate that is valid for a different process.

My guess is that the stdin handle (3) is inherited from the shell
(cmd.exe) and attempting to `DuplicateHandle` on it violates the clause
that you can on dupe a console handle of your own. I'm not sure of that
though.

Anyone else have more light to shed on this?

If this is the case I'm not sure what a possible or good solution could
be for subprocess.

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



[issue3892] bsddb: test01_basic_replication fails on Windows sometimes

2008-09-18 Thread Gregory P. Smith

Gregory P. Smith [EMAIL PROTECTED] added the comment:

just make a similar fix for now.

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