[issue1734164] sqlite3 causes memory read error

2007-08-23 Thread Gerhard Häring

Changes by Gerhard Häring:


--
type:  -> crash
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



[issue1734164] sqlite3 causes memory read error

2007-08-23 Thread Gerhard Häring

Gerhard Häring added the comment:

This was already reported upstream at 
http://initd.org/tracker/pysqlite/ticket/205

It's a bug in the SQLite version of the DLL is shipped with Python 2.5 
on Windows. Updating the DLL to a newer version would help.

In the meantime, users can just download the newest DLL from the SQLite 
site and replace the one shipped by Python with it.

--
assignee:  -> ghaering
nosy: +ghaering

_
Tracker <[EMAIL PROTECTED]>

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



[issue533281] bsddb185 module needs iterators

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Oops.  You're right.  This was referring to the legacy bsddb185 module
in Modules/bsddbmodule.c.  In 2.6 that is never built by default.  I'm
marking it as wont fix.

--
resolution: fixed -> wont fix
title: bsddb module needs iterators -> bsddb185 module needs iterators


Tracker <[EMAIL PROTECTED]>


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



[issue1686597] descrintro: error describing __new__ behavior

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in pydotorg rev. 10972.

--
assignee:  -> georg.brandl
nosy: +georg.brandl
resolution:  -> fixed
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



[issue1725856] bsddb.btopen . del of record doesn't update index

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Committed to HEAD as r57378
Committed to release25-maint as r57379
Committed to py3k as r57380

--
resolution:  -> fixed
status: pending -> closed

_
Tracker <[EMAIL PROTECTED]>

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



[issue1725856] bsddb.btopen . del of record doesn't update index

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

My first description wasn't quite accurate.  What was happening is that
the __delitem__(i) call by del was closing the existing cursor and
saving the key it was pointing to and the first() and last() methods
were creating a new cursor and trying to restore the new cursor to the
last known position saved when __delitem__ closed the previous cursor. 
This failed as that item no longer existed.  first() and last() by their
very nature don't need to restore the cursor position since they set it
to an absolute position.  Here's the patch to fix this:

--- Lib/bsddb/__init__.py   (revision 57289)
+++ Lib/bsddb/__init__.py   (working copy)
@@ -274,12 +274,16 @@
 
 def first(self):
 self._checkOpen()
+# fix 1725856: don't needlessly try to restore our cursor position
+self.saved_dbc_key = None
 self._checkCursor()
 rv = _DeadlockWrap(self.dbc.first)
 return rv
 
 def last(self):
 self._checkOpen()
+# fix 1725856: don't needlessly try to restore our cursor position
+self.saved_dbc_key = None
 self._checkCursor()
 rv = _DeadlockWrap(self.dbc.last)
 return rv

--
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



[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-23 Thread Eric V. Smith

Changes by Eric V. Smith:


--
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



[issue533281] bsddb module needs iterators

2007-08-23 Thread Martin v. Löwis

Martin v. Löwis added the comment:

It had indeed the status Fixed/Open on SF. It was marked as Fixed and
Closed by rhettinger, then reopened by rhettinger in response to my
comment in msg53513.

It does not refer to _bsddb.c, but bsddbmodule.c. Are you saying that
bsddbmodule.c supports __iter__? It does not look that way to me...


Tracker <[EMAIL PROTECTED]>


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



[issue1725856] bsddb.btopen . del of record doesn't update index

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

This code deletes the item that the internal database cursor created by
the db.first() call is pointing at.  Then when db.first() is called
again it tries to reuse the same cursor.  Now to decide if thats the
expected behavior or a real problem and how to fix it...

side note: I don't know why your backtraces contained the wrong strings.
 All of mine look fine here.

also: for a simpler test case to debug, change the 10 to 2 in the
testbtopen.py file.

--
nosy: +greg

_
Tracker <[EMAIL PROTECTED]>

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



[issue1725856] bsddb.btopen . del of record doesn't update index

2007-08-23 Thread Gregory P. Smith

Changes by Gregory P. Smith:


--
assignee:  -> greg

_
Tracker <[EMAIL PROTECTED]>

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



[issue533281] bsddb module needs iterators

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

this was marked 'open' and 'fixed' at the same time.  that should be an
invalid state.  it was indeed fixed eons ago.

--
nosy: +greg
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



[issue1771381] bsddb can't use unicode keys

2007-08-23 Thread Gregory P. Smith

Gregory P. Smith added the comment:

The BerkeleyDB library operates on bytes only.  Unicode doesn't make
sense as a key without converting it to a particular encoding first. 
Use the unicode object's encode() method if you need to use it as a
database key or create a wrapper object or subclass of the db that
automatically does that for you as appropriate.

--
assignee:  -> greg
nosy: +greg
resolution:  -> wont fix
status: open -> closed
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



[issue1721890] IDLE hangs in popup method completion

2007-08-23 Thread Kurt B. Kaiser

Kurt B. Kaiser added the comment:

fixed at 53042.

--
priority: high -> normal
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



[issue1008] Refactor test_signal.py to use unittest.

2007-08-23 Thread Atul Varma

New submission from Atul Varma:

This patch refactors test_signal.py to use unittest.  When this patch is
applied, Lib/test/output/test_signal can be removed.

I tried to refactor out individual tests from the original script and
place them in separate test cases.

--
components: Tests
files: refactored_test_signal.py.patch
messages: 55235
nosy: varmaa
severity: normal
status: open
title: Refactor test_signal.py to use unittest.
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__--- test_signal.py	2007-07-12 18:54:12.0 -0500
+++ test_signal_new.py	2007-07-13 03:13:00.0 -0500
@@ -1,167 +1,179 @@
-# Test the signal module
-from test.test_support import verbose, TestSkipped, TestFailed, vereq
+import unittest
+from test import test_support
 import signal
 import os, sys, time
 
-if sys.platform[:3] in ('win', 'os2') or sys.platform=='riscos':
-raise TestSkipped, "Can't test signal on %s" % sys.platform
+class InterProcessSignalTests(unittest.TestCase):
+MAX_DURATION = 20   # Entire test should last at most 20 sec.
 
-MAX_DURATION = 20   # Entire test should last at most 20 sec.
+# Set up a child to send signals to us (the parent) after waiting
+# long enough to receive the alarm.  It seems we miss the alarm
+# for some reason.  This will hopefully stop the hangs on
+# Tru64/Alpha.  Alas, it doesn't.  Tru64 appears to miss all the
+# signals at times, or seemingly random subsets of them, and
+# nothing done in force_test_exit so far has actually helped.
+def spawn_force_test_exit_process(self, parent_pid):
+# Sigh, both imports seem necessary to avoid errors.
+import os
+fork_pid = os.fork()
+if fork_pid:
+# In parent.
+return fork_pid
+
+# In child.
+import os, time
+try:
+# Wait 5 seconds longer than the expected alarm to give
+# enough time for the normal sequence of events to occur.
+# This is just a stop-gap to try to prevent the test from
+# hanging.
+time.sleep(self.MAX_DURATION + 5)
+print >> sys.__stdout__, '  child should not have to kill parent'
+for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM":
+os.kill(parent_pid, getattr(signal, signame))
+print >> sys.__stdout__, "child sent", signame, "to", \
+  parent_pid
+time.sleep(1)
+finally:
+os._exit(0)
 
-if verbose:
-x = '-x'
-else:
-x = '+x'
-
-pid = os.getpid()
-if verbose:
-print "test runner's pid is", pid
-
-# Shell script that will send us asynchronous signals
-script = """
- (
-set %(x)s
-sleep 2
-kill -HUP %(pid)d
-sleep 2
-kill -USR1 %(pid)d
-sleep 2
-kill -USR2 %(pid)d
- ) &
-""" % vars()
-
-a_called = b_called = False
-
-def handlerA(*args):
-global a_called
-a_called = True
-if verbose:
-print "handlerA invoked", args
-
-class HandlerBCalled(Exception):
-pass
-
-def handlerB(*args):
-global b_called
-b_called = True
-if verbose:
-print "handlerB invoked", args
-raise HandlerBCalled, args
-
-# Set up a child to send signals to us (the parent) after waiting long
-# enough to receive the alarm.  It seems we miss the alarm for some
-# reason.  This will hopefully stop the hangs on Tru64/Alpha.
-# Alas, it doesn't.  Tru64 appears to miss all the signals at times, or
-# seemingly random subsets of them, and nothing done in force_test_exit
-# so far has actually helped.
-def force_test_exit():
-# Sigh, both imports seem necessary to avoid errors.
-import os
-fork_pid = os.fork()
-if fork_pid:
-# In parent.
-return fork_pid
-
-# In child.
-import os, time
-try:
-# Wait 5 seconds longer than the expected alarm to give enough
-# time for the normal sequence of events to occur.  This is
-# just a stop-gap to try to prevent the test from hanging.
-time.sleep(MAX_DURATION + 5)
-print >> sys.__stdout__, '  child should not have to kill parent'
-for signame in "SIGHUP", "SIGUSR1", "SIGUSR2", "SIGALRM":
-os.kill(pid, getattr(signal, signame))
-print >> sys.__stdout__, "child sent", signame, "to", pid
-time.sleep(1)
-finally:
-os._exit(0)
-
-# Install handlers.
-hup = signal.signal(signal.SIGHUP, handlerA)
-usr1 = signal.signal(signal.SIGUSR1, handlerB)
-usr2 = signal.signal(signal.SIGUSR2, signal.SIG_IGN)
-alrm = signal.signal(signal.SIGALRM, signal.default_int_handler)
-
-try:
-
-signal.alarm(MAX_DURATION)
-vereq(signal.getsignal(signal.SIGHUP), handlerA)
-vereq(signal.getsignal(signal.SIGUSR1), handlerB)
-vereq(signal.getsignal(signal.SIGUSR2), signal.SIG_IGN)
-  

[issue1007] [py3k] Fix dumbdbm, which fixes test_shelve (for me); instrument other tests so we catch this sooner (and more directly)

2007-08-23 Thread Gregory P. Smith

Changes by Gregory P. Smith:


--
assignee:  -> greg

__
Tracker <[EMAIL PROTECTED]>

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



[issue1007] [py3k] Fix dumbdbm, which fixes test_shelve (for me); instrument other tests so we catch this sooner (and more directly)

2007-08-23 Thread Gregory P. Smith

Changes by Gregory P. Smith:


--
title: Fix dumbdbm, which fixes test_shelve (for me); instrument other tests so 
we catch this sooner (and more directly) -> [py3k] Fix dumbdbm, which fixes 
test_shelve (for me); instrument other tests so we catch this sooner (and more 
directly)

__
Tracker <[EMAIL PROTECTED]>

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



[issue1007] Fix dumbdbm, which fixes test_shelve (for me); instrument other tests so we catch this sooner (and more directly)

2007-08-23 Thread Larry Hastings

Larry Hastings added the comment:

Whoops, copy & paste error on the title, there.

--
title: ix dumbdbm, which fixes test_shelve (for me); instrument other tests so 
we catch this sooner (and more directly) -> Fix dumbdbm, which fixes 
test_shelve (for me); instrument other tests so we catch this sooner (and more 
directly)

__
Tracker <[EMAIL PROTECTED]>

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



[issue1006] Refactor test_winreg.py to use unittest.

2007-08-23 Thread Atul Varma

New submission from 
Atul Varma
:

This patch refactors test_winreg.py to use unittest.  When this patch is
applied, Lib/test/output/test_winreg can be removed.

I also made a few formatting changes to ensure that all lines are
constrained to 80-characters.

The original test_winreg.py took a command-line argument, "--remote", to
specify the name of a remote computer to run tests on.  For now, I've
added a unittest test called "testRemoteMachineRegistryWorks" which
raises a test_support.TestSkipped exception if the "--remote" argument
wasn't specified.  I'm not sure if this is optimal behavior; it can be
changed if not, of course.

--
components: Tests
files: refactor_test_winreg.py.patch
messages: 55232
nosy: varmaa
severity: normal
status: open
title: Refactor test_winreg.py to use unittest.
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1005] Patches to rename Queue module to queue

2007-08-23 Thread Paul Smith

Paul Smith added the comment:

Patches 2to3/fixes/fix_imports.py.

Note that patch to Lib doesn't include `svn mv Lib/Queue.py
Lib/queue.py` (issue reporter without commit privileges).

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1005] Patches to rename Queue module to queue

2007-08-23 Thread Paul Smith

New submission from Paul Smith:

Renamed Lib/Queue.py to Lib/queue.py.

--
components: Library (Lib)
files: rename-queue.diff
messages: 55230
nosy: paulsmith
severity: normal
status: open
title: Patches to rename Queue module to queue
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1766304] improve xrange.__contains__

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
keywords: +py3k

_
Tracker <[EMAIL PROTECTED]>

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



[issue1779550] Remove redundancies inside class logging.Logger

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Thanks, applied as rev. 57357.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution:  -> accepted
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



[issue1031213] Use correct encoding for printing SyntaxErrors

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
title: Patch for bug #780725  -> Use correct encoding for printing SyntaxErrors

_
Tracker <[EMAIL PROTECTED]>

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



[issue780725] Compile error messages and PEP-263

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

#1031213 contains a patch, marking as superseder.

--
nosy: +gbrandl
resolution:  -> duplicate
status: open -> closed
superseder:  -> Patch for bug #780725 


Tracker <[EMAIL PROTECTED]>


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



[issue1743846] Examples dropped from PDF version of SQLite docs

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Obsolete now, the toolset that generated these PDFs is no longer used
for new versions.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1742164] Incorrect docs for optparse OptionParser add_help_option

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

This is finally fixed with the new sources and toolset.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1758696] Documentation of descriptors needs more detail

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Added a footnote in rev. 57355.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1625381] re module documentation on search/match is unclear

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Clarified in rev. 57354.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1421839] Inconsistency in Programming FAQ

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in my pydotorg tree, will commit ASAP.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1630515] doc misleading in re.compile

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Normal usage is to create a RE object and then using its methods. Why
would you pass a RE object to a module-level function instead?

Therefore, documenting this possibility would just confuse the reader.
Closing as "won't fix".

--
nosy: +gbrandl
resolution:  -> wont fix
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



[issue1688564] os.path.join.__doc__ should mention absolute paths

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57353.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1699759] pickle example contains errors

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

The example is already fixed; also, a note is in the docs that you must
use binary mode for protocols >= 1.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1708326] imp.find_module doc ambiguity

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

IMO it is your responsibility to make sure that the module name you pass
is a valid Python module name.

--
nosy: +gbrandl
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



[issue1707497] generation errors in PDF-A4 tags for lib.pdf

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Obsolete; the sources from which these PDFs are generated are no longer
used.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-08-23 Thread Paul Smith

Paul Smith added the comment:

Note that patch doesn't include `svn mv Lib/HTMLParser.py
Lib/html_parser.py`.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1734111] struct.Struct.size is not documented

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57352.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1752332] getaddrinfo no longer used in httplib

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57351.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1635217] Add example of distutils setup() with "requires" argument

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
title: Little mistake in docs -> Add example of distutils setup() with 
"requires" argument

_
Tracker <[EMAIL PROTECTED]>

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



[issue1119439] Python Programming FAQ should be updated for Python 2.4

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in my pydotorg tree, will commit as soon as I find out how :)

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1095328] Add 'update FAQ' to release checklist

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Updated FAQ once again; there is an item in PEP 101 already.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1594966] doctest simple usage recipe is misleading

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57348.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1003] zipfile password fails validation

2007-08-23 Thread David W

New submission from David W:

This is in python2.5: zipfile.py SVN rev-56308
When testing a zipfile.Zipfile().read() with a password protected zip
file, I would continually get exceptions.  So I tracked this down to 
line 796-797: 
if ord(h[11]) != ((zinfo.CRC>>24)&255):
raise RuntimeError, "Bad password for file %s" % name

scope related data:
bytes = `)¶G\x02ùû¬&\x1E#çÕ`
h[11] = `¯`
zinfo.CRC = `1554440319`

ord(h[11]) == 175
((zinfo.CRC>>24)&255) == 92


When I commented out the error check, the script extracted 150 JPGs with
no corruption or errors in any of the images...so its just seems like an
issue with the error check.

--
components: Library (Lib)
messages: 55210
nosy: djw
severity: normal
status: open
title: zipfile password fails validation
type: crash
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



[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9

2007-08-23 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

In http://gcc.gnu.org/ml/gcc/2005-12/msg00368.html, Mike Stump
<[EMAIL PROTECTED]> said "This flag [-no-cpp-precomp] should be removed from
the compile, it hasn't been needed in a long while (since gcc-3.1)."
which was released in 2002.

I'm happy to remove -mno-fused-madd if you say it's unnecessary.

Ronald, do you mean "Removing that option [-Wno-long-double] seems to be
harmless"? Keeping it harms compiles with non-apple gcc's, but I could
add it to a block like -mno-fused-madd.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1694833] Bad documentation for existing imp methods

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the report, fixed in rev. 57347.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1573854] sqlite3 documentation on rowcount is contradictory

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed now in rev. 57345.

--
nosy: +gbrandl
resolution:  -> fixed
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



[issue1293788] python.sty correction - verbatim environment

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Obsolete now that we're using reST sources.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1293790] python.sty: [EMAIL PROTECTED] correction

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Obsolete now that we're using reST sources.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1697820] __getslice__ still used in built-in types

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57343.

--
assignee: rhettinger -> gbrandl
nosy: +gbrandl
resolution:  -> fixed
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



[issue1767242] os.chmod failure

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
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



[issue547537] cStringIO should provide a binary option

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

I think this can be closed, cStringIO won't change and Py3k won't have
StringIO unicode problems anyway.

--
nosy: +gbrandl
resolution:  -> wont fix
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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-08-23 Thread Paul Smith

Paul Smith added the comment:

Patch to 2to3 fix_imports.

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue881765] configure warning / sys/un.h: present but cannot be compiled

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

No followup for 3 years, so this can probably be closed.

--
nosy: +gbrandl
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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-08-23 Thread Paul Smith

New submission from Paul Smith:

HTMLParser is renamed to html_parser.

--
components: Library (Lib)
files: rename-html-parser.diff
messages: 55200
nosy: paulsmith
severity: normal
status: open
title: Patch to rename HTMLParser module to lower_case
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue924771] work around to compile \r\n file

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

The offending open() call in trace.py is fixed, so closing this.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

Adrian Holovaty added the comment:

(Sorry, the previous error snippet isn't a traceback as I had said. It's
the error text.)

__
Tracker <[EMAIL PROTECTED]>

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



[issue765228] Subclassing from Modules

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

In 2.5, the message says "module.__init__() takes at most 2 arguments (3
given)", which is at least a bit more specific.

You get similar errors when "deriving" from other arbitrary objects, so
I don't know if a special case makes sense here.

--
nosy: +gbrandl


Tracker <[EMAIL PROTECTED]>


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



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

New submission from Adrian Holovaty:

The 2to3 Python 3k migration utility crashes with the following
traceback on any input file that does *not* have a trailing newline. It
doesn't seem to matter whether the input file needs modifications or not.


RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad
input: type=0, value='', context=('\n', (2, 0))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse /path/to/testing2.py: ParseError: bad
input: type=0, value='', context=('\n', (2, 0))

--
nosy: +adrianholovaty

__
Tracker <[EMAIL PROTECTED]>

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



[issue1086642] Compile of _socket fails on IRIX with 2.4

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
title: Compile of _socket fails on 2.4 -> Compile of _socket fails on IRIX with 
2.4

_
Tracker <[EMAIL PROTECTED]>

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



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Brett Cannon

Changes by Brett Cannon:


--
keywords: +py3k

__
Tracker <[EMAIL PROTECTED]>

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



[issue1675334] Draft implementation for PEP 364

2007-08-23 Thread Brett Cannon

Changes by Brett Cannon:


--
keywords: +py3k

_
Tracker <[EMAIL PROTECTED]>

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



[issue1001] 2to3 crashes on input files with no trailing newlines

2007-08-23 Thread Adrian Holovaty

Changes by Adrian Holovaty:


--
components: Demos and Tools
severity: normal
status: open
title: 2to3 crashes on input files with no trailing newlines
type: crash

__
Tracker <[EMAIL PROTECTED]>

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



[issue698900] Provide "plucker" format docs.

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Plucker seems to be dead for at least two years, so closing.

--
nosy: +gbrandl
resolution:  -> out of date
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



[issue547537] cStringIO should provide a binary option

2007-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Unassigning: I've never had a need for this in the past years.

--
assignee: lemburg -> 


Tracker <[EMAIL PROTECTED]>


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



[issue1001895] Adding missing ISO 8859 codecs, especially Thai

2007-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Not sure why this is still open. The patches were checked in a long time
ago.

--
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



[issue880951] "ez" format code for ParseTuple()

2007-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Closing. There doesn't seem to be much interest in this.

--
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



[issue225476] Codec naming scheme and aliasing support

2007-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Closing this request as the encodings package search function should not
be used import external codecs (this poses a security risk).

--
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



[issue1000] Patch to rename *Server modules to lower-case

2007-08-23 Thread Jason Prado

New submission from Jason Prado:

Here's a patcher for the 2to3 fixer. After I add this ticket I'll try to 
add another file for the py3k/Lib directory.

--
components: Library (Lib)
files: fixer-server-imports.patch
messages: 55188
nosy: jasonpjason
severity: normal
status: open
title: Patch to rename *Server modules to lower-case
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__Index: fixes/fix_imports.py
===
--- fixes/fix_imports.py(revision 57338)
+++ fixes/fix_imports.py(working copy)
@@ -11,9 +11,35 @@
 from fixes import basefix
 from fixes.util import Name, attr_chain, any, set
 
-MAPPING = {"StringIO":  ("io", ["StringIO"]),
-   "cStringIO": ("io", ["StringIO"]),
-   "md5":   ("hashlib", ["md5"])}
+MAPPING = {"StringIO":  ("io", ["StringIO"]),
+   "cStringIO": ("io", ["StringIO"]),
+   "md5":   ("hashlib", ["md5"]),
+   "BaseHTTPServer":("base_http_server",
+ ["HTTPServer", "BaseHTTPRequestHandler"]),
+   "SimpleHTTPServer":  ("simple_http_server",
+ ["SimpleHTTPRequestHandler"]),
+   "CGIHTTPServer": ("cgi_http_server",
+ ["CGIHTTPRequestHandler"]),
+   "DocXMLRPCServer":   ("doc_xmlrpc_server",
+ ["DocXMLRPCServer",
+  "DocCGIXMLRPCRequestHandler",
+  "DocXMLRPCRequestHandler"]),
+   "SimpleXMLRPCServer":("simple_xmlrpc_server",
+ ["SimpleXMLRPCServer",
+  "CGIXMLRPCRequestHandler",
+  "SimpleXMLRPCRequestHandler"]),
+   "SocketServer":  ("socket_server",
+ ["TCPServer", "UDPServer",
+  "ForkingUDPServer","ForkingTCPServer",
+   "ThreadingUDPServer", "ThreadingTCPServer",
+   "BaseRequestHandler",
+   "StreamRequestHandler",
+   "DatagramRequestHandler", "ThreadingMixIn",
+   "ForkingMixIn", "UnixStreamServer",
+   "UnixDatagramServer", 
+   "ThreadingUnixStreamServer",
+   "ThreadingUnixDatagramServer"]),
+   }
 
 
 def alternates(members):
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue223599] Need user-centered info for Windows users.

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

issue469773 subsumes this.

--
nosy: +gbrandl -nobody
resolution:  -> duplicate
status: open -> closed
superseder:  -> Write 'Using Python on Platform X' documents


Tracker <[EMAIL PROTECTED]>


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



[issue447143] exception item from mapped function

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Closing, see PEP 3134.

--
nosy: +gbrandl
status: open -> closed
title: exception item from mapped function  -> exception item from mapped 
function


Tracker <[EMAIL PROTECTED]>


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



[issue714469] Easy tutorial printing should be possible

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Assigning to me to remind myself about writing a PDF-producing Sphinx
builder.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution: invalid -> 


Tracker <[EMAIL PROTECTED]>


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



[issue514532] Add "eu#" parser marker

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

I guess this can be closed in the light of Py3k.

--
nosy: +gbrandl
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



[issue457493] include SQL interface module

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

With DB API and sqlite3 in the stdlib, I think this can be closed.

--
nosy: +gbrandl
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



[issue1771381] bsddb can't use unicode keys

2007-08-23 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

Unassigning since I don't know the details of bsddb.

--
assignee: lemburg -> 

_
Tracker <[EMAIL PROTECTED]>

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



[issue1752703] chown() does not handle UID > INT_MAX

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Closing, superseder has more information and same patch.

--
nosy: +gbrandl
resolution:  -> duplicate
status: open -> closed
superseder:  -> chown broken on 64bit

_
Tracker <[EMAIL PROTECTED]>

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



[issue1209562] add single html files

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

The new docs (see http://docs.python.org/dev) have much longer
individual HTML pages, perhaps this is already enough for your needs (a
single Library Reference page would be several Megabytes in size...)

--
nosy: +gbrandl
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



[issue1757072] Zipfile robustness

2007-08-23 Thread Georg Brandl

Changes by Georg Brandl:


--
assignee: aimacintyre -> 

_
Tracker <[EMAIL PROTECTED]>

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



[issue1753395] struni: assertion in Windows debug build

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Attaching a patch, should fix this.

--
nosy: +gbrandl

_
Tracker <[EMAIL PROTECTED]>

_Index: Objects/typeobject.c
===
--- Objects/typeobject.c(Revision 57337)
+++ Objects/typeobject.c(Arbeitskopie)
@@ -1563,28 +1563,16 @@
 static int
 valid_identifier(PyObject *s)
 {
-   Py_UNICODE *p;
-   Py_ssize_t i, n;
-
if (!PyUnicode_Check(s)) {
PyErr_Format(PyExc_TypeError,
 "__slots__ items must be strings, not '%.200s'",
 Py_Type(s)->tp_name);
return 0;
}
-   p = PyUnicode_AS_UNICODE(s);
-   n = PyUnicode_GET_SIZE(s);
-   /* We must reject an empty name.  As a hack, we bump the
-  length to 1 so that the loop will balk on the trailing \0. */
-   if (n == 0)
-   n = 1;
-   for (i = 0; i < n; i++, p++) {
-   if (*p > 127 ||
-   (!(i == 0 ? isalpha(*p) : isalnum(*p)) && *p != '_')) {
-   PyErr_SetString(PyExc_TypeError,
-   "__slots__ must be identifiers");
-   return 0;
-   }
+   if (!PyUnicode_IsIdentifier(s)) {
+   PyErr_SetString(PyExc_TypeError,
+   "__slots__ must be identifiers");
+   return 0;
}
return 1;
 }
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1764044] copy 2

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Which "time" is that? Windows three timestamps, IIRC: creation,
modification, access.

--
nosy: +gbrandl

_
Tracker <[EMAIL PROTECTED]>

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



[issue1749583] expanduser("~") on Windows looks for HOME first

2007-08-23 Thread Ralf Schmitt

Ralf Schmitt added the comment:

As a user of msys I would expect that python returns the value of HOME.
If I didn't start python from msys, HOME would either not be set, or I
had set in some windows dialog (and then I would expect python to also
use that).

--
nosy: +schmir

_
Tracker <[EMAIL PROTECTED]>

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



[issue1757072] Zipfile robustness

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Alan?

--
assignee:  -> aimacintyre
nosy: +gbrandl

_
Tracker <[EMAIL PROTECTED]>

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



[issue1209562] add single html files

2007-08-23 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Might be nice, but it's obvious I've not gotten to this, so removing
myself from the issue.

--
assignee: fdrake -> 

_
Tracker <[EMAIL PROTECTED]>

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



[issue1756389] reference count discrepancy, PyErr_Print vs. PyErr_Clear

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Closing as invalid.

--
nosy: +gbrandl
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



[issue1757118] utilize 2.5 try/except/finally in contextlib

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Committed in rev. 57331.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution:  -> accepted
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



[issue1752175] fixing 2.5.1 build with unicode and dynamic loading disabled

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Okay, fixed both and backported in rev. 57328, 57330.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution:  -> fixed
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



[issue870479] Scripts need platform-dependent handling

2007-08-23 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Removing the assignment to me, since I'm not going to resolve the
fundamental disagreements about what "the right thing" is.  Someone else
can argue with the wrong-headed.

--
assignee: fdrake -> 


Tracker <[EMAIL PROTECTED]>


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



[issue469773] Write 'Using Python on Platform X' documents

2007-08-23 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr.:


--
assignee: fdrake -> 


Tracker <[EMAIL PROTECTED]>


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



[issue1766421] poll() returns "status code", not "return code"

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the report, fixed in rev. 57326, 57327.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution:  -> fixed
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



[issue1768121] Byte code WITH_CLEANUP missing, MAKE_CLOSURE wrong

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in rev. 57324, thanks for the report.

--
assignee:  -> gbrandl
nosy: +gbrandl
resolution:  -> fixed
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



[issue1772481] urllib2 hangs with some documents.

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

The fix seems safe to apply.

--
nosy: +gbrandl

_
Tracker <[EMAIL PROTECTED]>

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



[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Raising priority.

--
priority: normal -> urgent
severity: normal -> major
title: Move initial args assignment to BaseException.__new__ -> Fix exception 
pickling: Move initial args assignment to BaseException.__new__
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



[issue1744398] Improve exception pickling support

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Closing in favor of #1692335.

--
nosy: +gbrandl
status: open -> closed
superseder:  -> Move initial args assignment to BaseException.__new__

_
Tracker <[EMAIL PROTECTED]>

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



[issue1742889] Pickling of exceptions broken

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

Closing in favor of #1692335.

--
status: open -> closed
superseder:  -> Move initial args assignment to BaseException.__new__

_
Tracker <[EMAIL PROTECTED]>

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



[issue1776696] tempfile.TemporaryFile differs between platforms

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

I agree with tiran.  TemporaryFile(...) returns a file-like object, the
details are implementation specific.

--
nosy: +gbrandl
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



[issue1779871] Make python build with gcc-4.2 on OS X 10.4.9

2007-08-23 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Why does you patch test for -mno-fused-madd? If it isn't actually needed 
for something I'd rather not have that logic in the configure file, 
determining which bits of that file are actually needed for supported 
OS-es is hard enough as it is.

-Wno-long-double is needed when compiling on old versions of OSX, where 
"long double" worked but wasn't actually useful. Keeping that option 
seems to be harmless.

-no-cpp-precomp was necessary for several packages on older releases of 
OSX. I'll test on a 10.3 box when I have time (which is the oldest I can 
test on).

--
assignee:  -> ronaldoussoren
nosy: +ronaldoussoren

_
Tracker <[EMAIL PROTECTED]>

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



[issue1753371] Open always create new tab or new browser

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

With Firefox, that's probably because you have set the default behavior
to "open a new tab", so there's nothing webbrowser.py can do about that.

In Windows, os.startfile() is used, which doesn't allow remote settings
like "new window" etc., so there's nothing webbrowser.py can do about
that, too.

Setting tentatively to "Won't fix".

--
nosy: +gbrandl
resolution:  -> wont fix
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



[issue1624674] webbrowser.open_new() suggestion

2007-08-23 Thread Georg Brandl

Georg Brandl added the comment:

webbrowser uses the default GNOME browser if a GNOME session is running
and kfmclient if a KDE session is running. Closing as "works for me".

--
resolution:  -> works for me
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



[ python-Bugs-1757062 ] Pickle fails on BeautifulSoup's navigableString instances

2007-08-23 Thread SourceForge.net
Bugs item #1757062, was opened at 2007-07-19 20:23
Message generated for change (Comment added) made by altherac
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1757062&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tal Einat (taleinat)
Assigned to: Nobody/Anonymous (nobody)
Summary: Pickle fails on BeautifulSoup's navigableString instances

Initial Comment:
Trying to pickle an instance of BeautifulSoup's NavigableString class, this is 
the result:
"RuntimeError: maximum recursion depth exceeded"


Diagnosis: The problem arises when trying to pickle such instances - pickle 
enters an endless loop and reaches the max recursion limit (eventually). This 
happens regardless of the protocol used.

Possibly related to SF bug #1581183: "pickle protocol 2 failure on int subclass"
http://sourceforge.net/tracker/index.php?funchttp://sourceforge.net/tracker/index.php?func=detail&aid=1581183&group_id=5470&atid=105470=detail&aid=1512695&group_id=5470&atid=105470


See http://mail.python.org/pipermail/idle-dev/2007-July/002600.html (originally 
a bug report for IDLE on the IDLE-dev list) for details (including how to 
recreate the error).

Related IDLE bug report: #1757057
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1757057&group_id=5470


--

Comment By: Christophe Michel (altherac)
Date: 2007-08-23 16:02

Message:
Logged In: YES 
user_id=562686
Originator: NO

Let's use the following sample code. It's the most minimalistic one, and
isolates the cause of the bug.

--8<--8<--

#!/usr/bin/env python

import pickle, sys

class EvilString(unicode):
def __unicode__(self):
return self

n = EvilString("")
pickle.dump(n, sys.stdout)

--8<--8<--

The evil recursion proceeds as follows :

>>  File "C:\Python25\lib\pickle.py", line 1364, in dump
>>Pickler(file, protocol).dump(obj)

Initial call to dump(), as intended.

>>  File "C:\Python25\lib\pickle.py", line 224, in dump
>>self.save(obj)

save() calls obj.__reduce_ex(), obj being our EvilString instance.

This function is defined in copyreg.py, line 58 and following my example,
returns a tuple containing three elements:
1) the _reconstructor function, as defined in copyreg.py, line 46
2) a tuple : (, ,
<'__main__.EvilString' instance at 0x>)
   First element is the actual class of obj, second is the base class, and
third is the current instance (known as state).

3) an empty dict {}

>>  File "C:\Python25\lib\pickle.py", line 331, in save
>>self.save_reduce(obj=obj, *rv)

save_reduce() calls self.save() twice:
- first on the func argument, which is the _reconstructor function. This
call works as intended
- next on the tuple (, ,
<'__main__.EvilString' instance at 0x>)

>>  File "C:\Python25\lib\pickle.py", line 403, in save_reduce
>>save(args)
>>  File "C:\Python25\lib\pickle.py", line 286, in save
>>f(self, obj) # Call unbound method with explicit self

save() finds out its argument is a Tuple, and calls save_tuple()
appropriately

>>  File "C:\Python25\lib\pickle.py", line 564, in save_tuple
>>save(element)

... and save_tuple() calls save() on each element of the tuple.
See what's wrong ?
This means calling save() again on the EvilString instance. Which, in
turn, will call save_reduce() on it, and so on.

The problem lies in _reduce_ex(), in the definition of the state of the
object:

copyreg.py, lines 65 to 70:
if base is object:
state = None
else:
if base is self.__class__:
raise TypeError, "can't pickle %s objects" % base.__name__
state = base(self)

When this code gets executed on an EvilString instance, base is the type
'unicode'.
Since it's not an object, and since it's not the actual class EvilString
either, the following line gets executed:
state=base(self)

Which corresponds to unicode(self), or self.__unicode__, which returns an
EvilString instance, not a variable of type unicode.
And there starts the recursion.

I don't know if this is flaw in the design of _reduce_ex, or a flaw
inherent to having __unicode__(self) returning self.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1757062&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1757057 ] IDLE + BeautifulSoup = Error

2007-08-23 Thread SourceForge.net
Bugs item #1757057, was opened at 2007-07-19 20:17
Message generated for change (Comment added) made by altherac
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1757057&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tal Einat (taleinat)
Assigned to: Nobody/Anonymous (nobody)
Summary: IDLE + BeautifulSoup = Error

Initial Comment:
This bug manifests only when running with a subprocess.

Trying to display an instance of BeautifulSoup's NavigableString class, this is 
the result:

RuntimeError: maximum recursion depth exceeded

See http://mail.python.org/pipermail/idle-dev/2007-July/002600.html for details 
(including how to recreate the error).


Diagnosis: The problem arises when trying to pickle such instances - pickle 
enters an endless loop and reaches the max recursion limit (eventually). This 
happens regardless of the protocol used.

IDLE is probably trying to pickle them because their class, NavigableString, 
inherits from unicode, so isinstance(, basestring) 
return True.

Possibly related to SF bug #1581183: "pickle protocol 2 failure on int subclass"
http://sourceforge.net/tracker/index.php?funchttp://sourceforge.net/tracker/index.php?func=detail&aid=1581183&group_id=5470&atid=105470=detail&aid=1512695&group_id=5470&atid=105470


Fix: IDLE should check for any exception when trying to pickle, not just 
pickle.PicklingError, to avoid such errors. If pickle doesn't work, for 
whatever reason, IDLE can still work around it with str() and repr().


I'll post a bug report for Pickle as well.

--

Comment By: Christophe Michel (altherac)
Date: 2007-08-23 16:00

Message:
Logged In: YES 
user_id=562686
Originator: NO

Let's use the following sample code. It's the most minimalistic one, and
isolates the cause of the bug.

--8<--8<--

#!/usr/bin/env python

import pickle, sys

class EvilString(unicode):
def __unicode__(self):
return self

n = EvilString("")
pickle.dump(n, sys.stdout)

--8<--8<--

The evil recursion proceeds as follows :

>>  File "C:\Python25\lib\pickle.py", line 1364, in dump
>>Pickler(file, protocol).dump(obj)

Initial call to dump(), as intended.

>>  File "C:\Python25\lib\pickle.py", line 224, in dump
>>self.save(obj)

save() calls obj.__reduce_ex(), obj being our EvilString instance.

This function is defined in copyreg.py, line 58 and following my example,
returns a tuple containing three elements:
1) the _reconstructor function, as defined in copyreg.py, line 46
2) a tuple : (, ,
<'__main__.EvilString' instance at 0x>)
   First element is the actual class of obj, second is the base class, and
third is the current instance (known as state).

3) an empty dict {}

>>  File "C:\Python25\lib\pickle.py", line 331, in save
>>self.save_reduce(obj=obj, *rv)

save_reduce() calls self.save() twice:
- first on the func argument, which is the _reconstructor function. This
call works as intended
- next on the tuple (, ,
<'__main__.EvilString' instance at 0x>)

>>  File "C:\Python25\lib\pickle.py", line 403, in save_reduce
>>save(args)
>>  File "C:\Python25\lib\pickle.py", line 286, in save
>>f(self, obj) # Call unbound method with explicit self

save() finds out its argument is a Tuple, and calls save_tuple()
appropriately

>>  File "C:\Python25\lib\pickle.py", line 564, in save_tuple
>>save(element)

... and save_tuple() calls save() on each element of the tuple.
See what's wrong ?
This means calling save() again on the EvilString instance. Which, in
turn, will call save_reduce() on it, and so on.

The problem lies in _reduce_ex(), in the definition of the state of the
object:

copyreg.py, lines 65 to 70:
if base is object:
state = None
else:
if base is self.__class__:
raise TypeError, "can't pickle %s objects" % base.__name__
state = base(self)

When this code gets executed on an EvilString instance, base is the type
'unicode'.
Since it's not an object, and since it's not the actual class EvilString
either, the following line gets executed:
state=base(self)

Which corresponds to unicode(self), or self.__unicode__, which returns an
EvilString instance, not a variable of type unicode.
And there starts the recursion.

I don't know if this is flaw in the design of _reduce_ex, or a flaw
inherent to having __unicode__(self) returning self.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1757057&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mai