[issue9455] platform test borked in 2.7 branch on Power PC

2010-08-02 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

On 2 Aug, 2010, at 21:49, Bill Janssen wrote:

> 
> Bill Janssen  added the comment:
> 
> So the problem is in the _mac_ver_xml() routine in Lib/platform.py, which 
> says:
> 
> 
>machine = os.uname()[4]
>if machine == 'ppc':
># for compatibility with the gestalt based code
>machine = 'PowerPC'
> 
> and perhaps should say:
> 
>machine = os.uname()[4]
>if machine in ('ppc', 'Power Macintosh'):
># for compatibility with the gestalt based code
>machine = 'PowerPC'

That's correct. Thanks for catching this, I will fix this asap.

Ronald

--
Added file: http://bugs.python.org/file18333/smime.p7s

___
Python tracker 

___

smime.p7s
Description: S/MIME cryptographic signature
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8739] Update to smtpd.py to RFC 5321

2010-08-02 Thread Richard Jones

Richard Jones  added the comment:

The smtpd module now has a test suite. Please add your unit tests to 
test_smtpd.py

--
nosy: +richard

___
Python tracker 

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



[issue2423] test_smtplib.py no longer butt slow

2010-08-02 Thread Richard Jones

Richard Jones  added the comment:

Merged mock socket from test_smtpd.py and committed.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue9444] argparse does not honor prefix_chars when adding default options

2010-08-02 Thread R. David Murray

R. David Murray  added the comment:

The combined patches look good to me, and I tested the tests and patch.  (I 
accidentally deleted the earlier fix patch, sorry).  It would be nice to add 
one more test case that does prefix="+-/" to make sure - is used when it isn't 
first.

Steven, I'd be happy to commit this if you are OK with it, since I was 
mentoring the people who wrote it.

--
nosy: +r.david.murray
stage: patch review -> commit review

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-02 Thread Brian Curtin

Brian Curtin  added the comment:

I'll have to investigate the possibility of the privilege occurring on XP -- 
I'm doubtful that it exists there, but I'll confirm.

Currently "os._symlink" is not exposed -- it gets swallowed up in Lib/os.py in 
the "nt" section starting on line 55 (it is available as nt._symlink, though). 
This is another point I need to confirm, but I don't think a process' available 
privileges can change during runtime, or at least I'm not familiar with that. 
For that reason, I just do the "enable_symlink()" on init and what happens 
there is what stays for the lifetime of the interpreter.

If available privileges can in fact change - and I'm not sure how we'd test 
that - "enable_symlink()" would have to be exposed.

--

___
Python tracker 

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



[issue8739] Update to smtpd.py to RFC 5321

2010-08-02 Thread Alberto Trevino

Alberto Trevino  added the comment:

On Monday, July 05, 2010 10:41:28 am you wrote:
> Yes, the fact that there are no unit tests for the new functionality.

Sorry to take so long to reply.  I have attached the latest version of the 
patch which does everything in rev. 2 of the patch, patches the setuid 
problem discussed in issue 9168, updates to the unit test to account for the 
changes and to test the new functionality, plus some little changes here and 
there.

Please review and advise.

--
Added file: 
http://bugs.python.org/file18332/smtpd.py-0.2-rfc5321-enhancements-4.diff

___
Python tracker 

___diff -aur Python-3.1.2.orig/Lib/smtpd.py Python-3.1.2/Lib/smtpd.py
--- Python-3.1.2.orig/Lib/smtpd.py  2009-02-21 13:59:32.0 -0700
+++ Python-3.1.2/Lib/smtpd.py   2010-08-02 08:23:04.424066197 -0600
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-"""An RFC 2821 smtp proxy.
+"""An RFC 5321 smtp proxy.
 
 Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
 
@@ -20,6 +20,11 @@
 Use `classname' as the concrete SMTP proxy class.  Uses `PureProxy' by
 default.
 
+--size limit
+-s limit
+Restrict the total size of the incoming message to "limit" number of
+bytes.  Defaults to 0 (no limit).
+
 --debug
 -d
 Turn on debugging prints.
@@ -35,10 +40,9 @@
 and if remoteport is not given, then 25 is used.
 """
 
-
 # Overview:
 #
-# This file implements the minimal SMTP protocol as defined in RFC 821.  It
+# This file implements the minimal SMTP protocol as defined in RFC 5321.  It
 # has a hierarchy of classes which implement the backend functionality for the
 # smtpd.  A number of classes are provided:
 #
@@ -59,15 +63,18 @@
 #   gets forwarded to a real backend smtpd, as with PureProxy.  Again, errors
 #   are not handled correctly yet.
 #
-# Please note that this script requires Python 2.0
+# Please note that this script requires Python 3.0
 #
 # Author: Barry Warsaw 
 #
+# Contributors:
+#   Alberto Trevino 
+#
 # TODO:
 #
 # - support mailbox delivery
 # - alias files
-# - ESMTP
+# - Handle more ESMTP extensions
 # - handle error codes from the backend smtpd
 
 import sys
@@ -82,7 +89,7 @@
 __all__ = ["SMTPServer","DebuggingServer","PureProxy","MailmanProxy"]
 
 program = sys.argv[0]
-__version__ = 'Python SMTP proxy version 0.2'
+__version__ = 'Python SMTP proxy version 0.21'
 
 
 class Devnull:
@@ -96,7 +103,6 @@
 COMMASPACE = ', '
 
 
-
 def usage(code, msg=''):
 print(__doc__ % globals(), file=sys.stderr)
 if msg:
@@ -104,16 +110,16 @@
 sys.exit(code)
 
 
-
 class SMTPChannel(asynchat.async_chat):
 COMMAND = 0
 DATA = 1
 
-def __init__(self, server, conn, addr):
+def __init__(self, server, conn, addr, size):
 asynchat.async_chat.__init__(self, conn)
 self.__server = server
 self.__conn = conn
 self.__addr = addr
+self.__size = size
 self.__line = []
 self.__state = self.COMMAND
 self.__greeting = 0
@@ -122,6 +128,7 @@
 self.__data = ''
 self.__fqdn = socket.getfqdn()
 self.__peer = conn.getpeername()
+self.__8bitmime = False
 print('Peer:', repr(self.__peer), file=DEBUGSTREAM)
 self.push('220 %s %s' % (self.__fqdn, __version__))
 self.set_terminator(b'\r\n')
@@ -153,7 +160,7 @@
 arg = line[i+1:].strip()
 method = getattr(self, 'smtp_' + command, None)
 if not method:
-self.push('502 Error: command "%s" not implemented' % command)
+self.push('500 Error: command "%s" not recognized' % command)
 return
 method(arg)
 return
@@ -162,7 +169,7 @@
 self.push('451 Internal confusion')
 return
 # Remove extraneous carriage returns and de-transparency according
-# to RFC 821, Section 4.5.2.
+# to RFC 5321, Section 4.5.2.
 data = []
 for text in line.split('\r\n'):
 if text and text[0] == '.':
@@ -170,18 +177,39 @@
 else:
 data.append(text)
 self.__data = NEWLINE.join(data)
-status = self.__server.process_message(self.__peer,
-   self.__mailfrom,
-   self.__rcpttos,
-   self.__data)
-self.__rcpttos = []
-self.__mailfrom = None
-self.__state = self.COMMAND
-self.set_terminator(b'\r\n')
-if not status:
-self.push('250 Ok')
+
+# Enforce data size limit
+if self.__size == 0 or len(self.__data) <= self.__size:
+status = self.__server.process_message(sel

[issue9457] Wrong URL in Python-3.2a1/README

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83584.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8119] Minor comment error in configure.in ("malloc support" appears twice)

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83580.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9292] Dead code in Modules/pyexpat.c

2010-08-02 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue9444] argparse does not honor prefix_chars when adding default options

2010-08-02 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file18298/argparse_char_fix.patch

___
Python tracker 

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



[issue9458] xml.etree.ElementTree.write(): encoding handling problems

2010-08-02 Thread Uli Kunitz

New submission from Uli Kunitz :

If one wants to use the encoding parameter of ElementTree.write() the file must 
be opened with "wb". Without encoding parameter normal files can be used, but 
the should be opened with the encoding "UTF-8", because otherwise this may 
create an error.

Probably comparable problems exist with the parser side of things.

--
components: XML
messages: 112550
nosy: kune
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.write(): encoding handling problems
versions: Python 3.2

___
Python tracker 

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



[issue9292] Dead code in Modules/pyexpat.c

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

"fp" can probably be just removed?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue6696] Profile objects should be documented

2010-08-02 Thread Georg Brandl

Changes by Georg Brandl :


--
priority: normal -> high

___
Python tracker 

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



[issue9457] Wrong URL in Python-3.2a1/README

2010-08-02 Thread Uli Kunitz

New submission from Uli Kunitz :

The URL http://docs.python.org/dev/3.2/whatsnew/3.2.html is wrong. It should be 
replaced with http://docs.python.org/dev/whatsnew/3.2.html.

--
assignee: d...@python
components: Documentation
messages: 112548
nosy: d...@python, kune
priority: normal
severity: normal
status: open
title: Wrong URL in Python-3.2a1/README
versions: Python 3.2

___
Python tracker 

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



[issue4011] Create DAG for PEP 101

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

I'll probably get around to do this during the 3.2 period.

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

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-02 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I love it -- especially all of the '-' lines in the patch! Good work. Is it 
conceivable that a Windows XP user would have that privilege (and thus would 
have access to a non-functional os.symlink function)?

One thing I particularly like is this provides an interface (os._symlink) that 
developers can use if they expect privileges to change at runtime, but for the 
majority of use cases, the os.symlink interface is otherwise largely consistent.

--

___
Python tracker 

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



[issue9238] zipfile incorrectly documented as not supporting archive comments

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83575.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9239] zipfile: truncating comment can corrupt the zipfile

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Patch looks good to me.  Alan, can you comment?

--
assignee:  -> aimacintyre
nosy: +aimacintyre, georg.brandl
priority: normal -> high

___
Python tracker 

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



[issue6915] os.listdir inconsistenly releases the GIL on win32

2010-08-02 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee: loewis -> pitrou
nosy: +pitrou

___
Python tracker 

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



[issue6867] return value of epoll.register

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83574.

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

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-02 Thread Brian Curtin

Brian Curtin  added the comment:

Forgot to mention: I've only run this on Win7 at the moment. I'll need to take 
a look at how this works on older Windows.

--

___
Python tracker 

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



[issue9456] Apparent memory leak in PC/bdist_wininst/install.c

2010-08-02 Thread Zachary Blair

New submission from Zachary Blair :

>From inspecting the code in install.c's DeleteRegistryValue() and 
>DeleteRegistryKey() functions, it appears as though there can be a small 
>memory leak in the event that either function is passed an invalid argument.

This patch corrects this issue by making sure to free any allocated memory 
before returning, even when an invalid argument is passed in.

--
components: Windows
files: install_c.diff
keywords: patch
messages: 112541
nosy: Zachary.Blair
priority: normal
severity: normal
status: open
title: Apparent memory leak in PC/bdist_wininst/install.c
versions: Python 3.1
Added file: http://bugs.python.org/file18331/install_c.diff

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-02 Thread Brian Curtin

Brian Curtin  added the comment:

Here's a patch implementing a similar idea to what Jason mentioned, complete 
with the test updates and code removals. It initially adds win_symlink as 
"_symlink", and on module initialization it will be renamed to "symlink" if the 
privilege is available.

There are two test failures in test_tarfile that I'll have to work out. Other 
than that, how does this look?

--
stage:  -> patch review
Added file: http://bugs.python.org/file18330/issue9333.diff

___
Python tracker 

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



[issue7688] TypeError: __name__ must be set to a string object

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Out of date for Python 2.x, and strings are always unicode objects in 3.x.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue7797] base64 module docs should indicate that encode methods return bytes, not strings

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83569.

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

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-02 Thread Brian Curtin

Changes by Brian Curtin :


Removed file: http://bugs.python.org/file18132/enable_symlink.diff

___
Python tracker 

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



[issue9444] argparse does not honor prefix_chars when adding default options

2010-08-02 Thread R. David Murray

Changes by R. David Murray :


--
stage: unit test needed -> patch review

___
Python tracker 

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



[issue6728] To avoid hang up in using CGIXMLRPCRequestHandler under IIS 7.x

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Why would one read 2 bytes less than CONTENT_LENGTH?

--
nosy: +georg.brandl
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue9019] wsgiref.headers.Header() does not update headers list it was created with.

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83566.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9111] cmd.do_help documentation should mention docstrings

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83565.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9037] Add explanation as to how to raise a custom exception in the extending python intermezzo on exceptions

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Added in r83563. Thanks!

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue4280] Version Checker

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, removed in r83561.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9087] json docstrings on 3.x still use 'unicode' and 'str'

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83560.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: d...@python -> tjreedy
nosy:  -barry, d...@python
stage: commit review -> patch review
versions:  -Python 2.6

___
Python tracker 

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




[issue8648] The UTF-7 codec functions are undocumented

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r83558.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8562] hasattr(open, 'newlines') example gives incorrect results from PEP0278

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83556.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9455] platform test borked in 2.7 branch on Power PC

2010-08-02 Thread Bill Janssen

Bill Janssen  added the comment:

So the problem is in the _mac_ver_xml() routine in Lib/platform.py, which says:


machine = os.uname()[4]
if machine == 'ppc':
# for compatibility with the gestalt based code
machine = 'PowerPC'

and perhaps should say:

machine = os.uname()[4]
if machine in ('ppc', 'Power Macintosh'):
# for compatibility with the gestalt based code
machine = 'PowerPC'

--

___
Python tracker 

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



[issue9455] platform test borked in 2.7 branch on Power PC

2010-08-02 Thread Bill Janssen

Bill Janssen  added the comment:

This is on a PowerPC machine running Leopard:

>>> os.uname()[4]
'Power Macintosh'
>>>

--

___
Python tracker 

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



[issue8622] Add PYTHONFSENCODING environment variable

2010-08-02 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> haypo

___
Python tracker 

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



[issue8861] curses.wrapper : unnessesary code

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83555.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue7280] PCBuild instruction says to use nasmw.exe but it no longer exist

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83554.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9438] Clarify __debug__ restrictions

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83552.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue8590] test_httpservers.CGIHTTPServerTestCase failure on 3.1-maint Mac OS X

2010-08-02 Thread Michael Foord

Michael Foord  added the comment:

Yep:

test_post (__main__.CGIHTTPServerTestCase) ... Traceback (most recent call 
last):
  File 
"/private/var/folders/WD/WDk8J3uFE7OM9tRer5Oy4E+++TI/-Tmp-/tmp3KtUFW/cgi-bin/file2.py",
 line 2, in 
import cgi
  File "/compile/release31-maint/Lib/cgi.py", line 34, in 
from operator import attrgetter
ImportError: No module named operator
[28262 refs]
FAIL
test_url_collapse_path_split (__main__.CGIHTTPServerTestCase) ... ok

==
FAIL: test_post (__main__.CGIHTTPServerTestCase)
--
Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 379, in test_post
AssertionError: b'' != b'1, python, 123456\n'

--
Ran 23 tests in 1.315s

FAILED (failures=1)
Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 411, in 
test_main()
  File "Lib/test/test_httpservers.py", line 405, in test_main
CGIHTTPServerTestCase
  File "/compile/release31-maint/Lib/test/support.py", line 903, in run_unittest
_run_suite(suite)
  File "/compile/release31-maint/Lib/test/support.py", line 886, in _run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_httpservers.py", line 379, in test_post
AssertionError: b'' != b'1, python, 123456\n'

--

___
Python tracker 

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



[issue9451] Strengthen __*__ system name warning

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, applied in r83550.

--
dependencies:  -Clarify __debug__ restrictions
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Committed in release26-maint, r83549, to beat the rc1 deadline.   I'll comment 
on a few improvements that we can do for 3.x later.

Eli,

I needed to fix white space issues in your patch before committing.  Please run 
make patchcheck on your changes before posting a patch.

--

___
Python tracker 

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



[issue3849] FUD in documentation for urllib.urlopen()

2010-08-02 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee: georg.brandl -> d...@python
nosy: +d...@python

___
Python tracker 

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



[issue9452] configparser support for reading from strings and dictionaries

2010-08-02 Thread Łukasz Langa

Łukasz Langa  added the comment:

Corrected a simple mistake in the patch.

--
Added file: http://bugs.python.org/file18329/issue9452.diff

___
Python tracker 

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



[issue9452] configparser support for reading from strings and dictionaries

2010-08-02 Thread Łukasz Langa

Changes by Łukasz Langa :


Removed file: http://bugs.python.org/file18319/issue9452.diff

___
Python tracker 

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



[issue8172] Documentation of Property needs example

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83548.

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

___
Python tracker 

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



[issue7386] More precise document on os.path.normpath()

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83547.

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

___
Python tracker 

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



[issue7862] fileio.c: ValueError vs. IOError with impossible operations

2010-08-02 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> pitrou

___
Python tracker 

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



[issue7973] Wrong spelling of distutils options in error messages and docs

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r83546.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue9455] platform test borked in 2.7 branch on Power PC

2010-08-02 Thread Bill Janssen

New submission from Bill Janssen :

Looks like some test borked the 2.7 tests on the buildbots.  Here's the 
offending test:


test test_platform failed -- Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/2.7.parc-leopard-1/build/Lib/test/test_platform.py", 
line 196, in test_mac_ver
self.assertEquals(res[2], 'PowerPC')
AssertionError: 'Power Macintosh' != 'PowerPC'

Re-running test 'test_platform' in verbose mode
test_architecture (test.test_platform.PlatformTest) ... ok
test_architecture_via_symlink (test.test_platform.PlatformTest) ... [17052 refs]
[17052 refs]
ok
test_dist (test.test_platform.PlatformTest) ... ok
test_java_ver (test.test_platform.PlatformTest) ... ok
test_libc_ver (test.test_platform.PlatformTest) ... ok
test_mac_ver (test.test_platform.PlatformTest) ... FAIL
test_mac_ver_with_fork (test.test_platform.PlatformTest) ... ok
test_machine (test.test_platform.PlatformTest) ... ok
test_node (test.test_platform.PlatformTest) ... ok
test_parse_release_file (test.test_platform.PlatformTest) ... ok
test_platform (test.test_platform.PlatformTest) ... ok
test_processor (test.test_platform.PlatformTest) ... ok
test_release (test.test_platform.PlatformTest) ... ok
test_sys_version (test.test_platform.PlatformTest) ... ok
test_system (test.test_platform.PlatformTest) ... ok
test_system_alias (test.test_platform.PlatformTest) ... ok
test_uname (test.test_platform.PlatformTest) ... ok
test_uname_win32_ARCHITEW6432 (test.test_platform.PlatformTest) ... skipped 
'windows only test'
test_version (test.test_platform.PlatformTest) ... ok
test_win32_ver (test.test_platform.PlatformTest) ... ok

==
FAIL: test_mac_ver (test.test_platform.PlatformTest)
--
Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/2.7.parc-leopard-1/build/Lib/test/test_platform.py", 
line 196, in test_mac_ver
self.assertEquals(res[2], 'PowerPC')
AssertionError: 'Power Macintosh' != 'PowerPC'

--
Ran 20 tests in 6.468s

FAILED (failures=1, skipped=1)
test test_platform failed -- Traceback (most recent call last):
  File 
"/Users/buildbot/buildarea/2.7.parc-leopard-1/build/Lib/test/test_platform.py", 
line 196, in test_mac_ver
self.assertEquals(res[2], 'PowerPC')
AssertionError: 'Power Macintosh' != 'PowerPC'

--
assignee: ronaldoussoren
components: Library (Lib), Tests
messages: 112516
nosy: janssen, ronaldoussoren
priority: normal
severity: normal
status: open
title: platform test borked in 2.7 branch on Power PC
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue2609] Tests fail if ./@test is not writeable

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Out of date now -- regrtest now uses "with temp_cwd()", changing directory to 
either the Python build dir or a tempdir.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue8560] regrtest: add a minimal "progress bar"

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Committed patch adding the [x/y] style indicator in r83543.

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

___
Python tracker 

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



[issue8312] Add post/pre hooks for distutils commands

2010-08-02 Thread Konrad

Changes by Konrad :


--
nosy:  -Konrad.Delong

___
Python tracker 

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



[issue8312] Add post/pre hooks for distutils commands

2010-08-02 Thread Konrad Delong

Konrad Delong  added the comment:

I see no reasons to limit the command set to just these two.

--
nosy: +Konrad.Delong

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I cannot do commits yet, so please do it. I expected this to be picked up by a 
doc person.

--

___
Python tracker 

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



[issue5412] extend configparser to support mapping access(__*item__)

2010-08-02 Thread Fred L. Drake, Jr.

Changes by Fred L. Drake, Jr. :


--
nosy: +fdrake

___
Python tracker 

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



[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-08-02 Thread Catherine Devlin

Catherine Devlin  added the comment:

Here's a unit test for the simplest cases.

--
keywords: +patch
nosy: +catherine
Added file: http://bugs.python.org/file18328/test_pos_after_var_args.patch

___
Python tracker 

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



[issue9452] configparser support for reading from strings and dictionaries

2010-08-02 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

Reading from a string is certainly fairly common, though I'm pretty happy with 
using an io.StringIO seems reasonable and straightforward.

I've never stumbled over the need to "read" from dictionaries as described.

--
nosy: +fdrake

___
Python tracker 

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



[issue9451] Strengthen __*__ system name warning

2010-08-02 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
keywords: +patch

___
Python tracker 

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



[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Applied doc patch to 2.6 in r83539.

--
nosy: +georg.brandl
priority: release blocker -> critical
versions:  -Python 2.5, Python 2.6

___
Python tracker 

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



[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-08-02 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Unless someone can upload a specific patch to review in the next couple of 
hours, I'm going to reduce the priority for 2.6.6rc1.

--
nosy: +barry

___
Python tracker 

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



[issue1195571] simple callback system for Py_FatalError

2010-08-02 Thread James William Pye

Changes by James William Pye :


--
nosy:  -jwpye

___
Python tracker 

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



[issue2716] Reimplement audioop because of copyright issues

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Current status: no lawsuit yet.

--

___
Python tracker 

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



[issue7849] Improve "test_support.check_warnings()"

2010-08-02 Thread Ezio Melotti

Ezio Melotti  added the comment:

I backported this to 2.6 in r83537 in order to fix #7092. I used a leading 
underscore on _check_py3k_warnings to make it private because no new features 
should be added to 2.6.

--

___
Python tracker 

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



[issue6928] Doc: Class statements and metaclass = xxx

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Should be fixed in r83538.

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

___
Python tracker 

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



[issue8578] PyWeakref_GetObject

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

I added a note to the docs in r83536.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message

2010-08-02 Thread Catherine Devlin

Catherine Devlin  added the comment:

I'm attaching a unit test patch that does something vaguely like Steven 
suggests.  It definitely needs review.

Also, I'm assuming that it's OK to specify *fewer* metavars than nargs, just 
not more... but I'm not sure about that.

--
keywords: +patch
nosy: +catherine
Added file: http://bugs.python.org/file18327/wrong_metavars_test.patch

___
Python tracker 

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



[issue7372] Regression in pstats

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed with your patch in r83531.

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

___
Python tracker 

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



[issue8572] httplib getheader() throws error instead of default

2010-08-02 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

David, your suggested description was much better.
Modified the documentation in r83529 and r83530.

--
status: open -> closed

___
Python tracker 

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



[issue5510] patches for Modules/socketmodule.c for NetBSD

2010-08-02 Thread Piotr Meyer

Piotr Meyer  added the comment:

On Sun, Aug 01, 2010 at 12:27:50AM +, Éric Araujo wrote:
> 
> Éric Araujo  added the comment:
> 
> Does the bug still exist in 3.2 (branch named py3k in subversion)? Do
> the patch still apply? (The workflow is to patch the version in
> development and then backport fixes to stable branches.)

As far I see - yes, py3k still needs patch provided by wiz, even on 
NetBSD 5.1 (current RC stable). Oryginal diff doesn't apply, I made 
some amateur changes and "my" version of wiz's patch is in attachment. 

But we have another problem, use sem_timedwait in Python/thread_pthread.h 
- not directly connected with this case, but prevent py3k from build.  
I copy some lines from Modules/_multiprocessing/semaphore.c, but this is 
very ugly workaround and someone should look at this...

--
Added file: http://bugs.python.org/file18326/netbsd-wizs-mod.patch

___
Python tracker 

___--- Modules/socketmodule.c.orig 2010-08-02 18:48:32.0 +0200
+++ Modules/socketmodule.c  2010-08-02 18:59:51.0 +0200
@@ -382,7 +382,7 @@
 #define SOCKETCLOSE close
 #endif
 
-#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) &&  
!defined(__NetBSD__)
+#if defined(HAVE_BLUETOOTH_H) || defined(HAVE_BLUETOOTH_BLUETOOTH_H) &&  
!defined(__NetBSD__) && !defined(__DragonFly__)
 #define USE_BLUETOOTH 1
 #if defined(__FreeBSD__)
 #define BTPROTO_L2CAP BLUETOOTH_PROTO_L2CAP
@@ -396,11 +396,13 @@
 #define _BT_L2_MEMB(sa, memb) ((sa)->l2cap_##memb)
 #define _BT_RC_MEMB(sa, memb) ((sa)->rfcomm_##memb)
 #define _BT_HCI_MEMB(sa, memb) ((sa)->hci_##memb)
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__DragonFly__)
 #define sockaddr_l2 sockaddr_bt
 #define sockaddr_rc sockaddr_bt
 #define sockaddr_hci sockaddr_bt
 #define sockaddr_sco sockaddr_bt
+#define SOL_HCI BTPROTO_HCI
+#define HCI_DATA_DIR SO_HCI_DIRECTION
 #define _BT_L2_MEMB(sa, memb) ((sa)->bt_##memb)
 #define _BT_RC_MEMB(sa, memb) ((sa)->bt_##memb)
 #define _BT_HCI_MEMB(sa, memb) ((sa)->bt_##memb)
@@ -1040,9 +1042,13 @@
 case BTPROTO_HCI:
 {
 struct sockaddr_hci *a = (struct sockaddr_hci *) addr;
+#if defined(__NetBSD__) || defined(__DragonFly__)
+return makebdaddr(&_BT_HCI_MEMB(a, bdaddr));
+#else
 PyObject *ret = NULL;
 ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev));
 return ret;
+#endif
 }
 
 #if !defined(__FreeBSD__)
@@ -1326,12 +1332,25 @@
 case BTPROTO_HCI:
 {
 struct sockaddr_hci *addr = (struct sockaddr_hci *)addr_ret;
+#if defined(__NetBSD__) || defined(__DragonFly__)
+   char *straddr = PyBytes_AS_STRING(args);
+
+   _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
+if (straddr == NULL) {
+PyErr_SetString(socket_error, "getsockaddrarg: "
+"wrong format");
+return 0;
+}
+if (setbdaddr(straddr, &_BT_HCI_MEMB(addr, bdaddr)) < 0)
+return 0;
+#else
 _BT_HCI_MEMB(addr, family) = AF_BLUETOOTH;
 if (!PyArg_ParseTuple(args, "i", &_BT_HCI_MEMB(addr, dev))) {
 PyErr_SetString(socket_error, "getsockaddrarg: "
 "wrong format");
 return 0;
 }
+#endif
 *len_ret = sizeof *addr;
 return 1;
 }
@@ -4417,9 +4436,13 @@
 PyModule_AddIntConstant(m, "BTPROTO_L2CAP", BTPROTO_L2CAP);
 PyModule_AddIntConstant(m, "BTPROTO_HCI", BTPROTO_HCI);
 PyModule_AddIntConstant(m, "SOL_HCI", SOL_HCI);
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
 PyModule_AddIntConstant(m, "HCI_FILTER", HCI_FILTER);
+#endif
 #if !defined(__FreeBSD__)
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
 PyModule_AddIntConstant(m, "HCI_TIME_STAMP", HCI_TIME_STAMP);
+#endif
 PyModule_AddIntConstant(m, "HCI_DATA_DIR", HCI_DATA_DIR);
 PyModule_AddIntConstant(m, "BTPROTO_SCO", BTPROTO_SCO);
 #endif
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8042] mmap buffer implementation does not respect seek pos

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

If you want to slice into a writable buffer, you can use a memoryview:

>>> b = io.BytesIO(b"abc")
>>> m = mmap.mmap(-1, 10)
>>> b.readinto(memoryview(m)[5:])
3
>>> m[:]
b'\x00\x00\x00\x00\x00abc\x00\x00'

This only works on 3.x, though.
As for changing the mmap buffer implementation, it would break compatibility 
and is therefore not acceptable, sorry.

--
nosy: +georg.brandl
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue1195571] simple callback system for Py_FatalError

2010-08-02 Thread James William Pye

James William Pye  added the comment:

I guess it seemed so unlikely that (C) extensions should be installing the 
callback that installation should be restricted pre-Py_Initialize(); the area 
completely controlled by the embedding app.

However, I have no strong attachment to that.

--

___
Python tracker 

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



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2010-08-02 Thread W. Trevor King

W. Trevor King  added the comment:

As a workaround until the patch gets included, you can import this monkey patch 
module.

--
nosy: +labrat
Added file: http://bugs.python.org/file18325/minidom.py

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

The security issue mentioned previously has been known for years. And, it is 
easy to protect against. See 
http://docs.python.org/py3k/library/pickle.html#restricting-globals

Also I am against adding pickling support to code objects. Code objects have no 
backward-compatibility constraint unlike pickles.

Antoine is right about we should be using a method fully-qualified name to 
pickle it. However, the problem with this approach is a method doesn't always 
have fully-qualified name (see issue3657). ForkingPickler in 
Lib/multiprocessing/forking.py uses this approach to add pickling support to 
methods.

--

___
Python tracker 

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



[issue1195571] simple callback system for Py_FatalError

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This sounds like a good idea but why the strange semantics of needing it to be 
defined before calling PyInitialize()?

--
nosy: +pitrou

___
Python tracker 

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



[issue1195571] simple callback system for Py_FatalError

2010-08-02 Thread James William Pye

James William Pye  added the comment:

Would it be possible to require the embedding application to define the 
Py_FatalError symbol?

Admittedly, it would be nice to not have the callback installation code. =\

--

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Oh, this is not assigned to me.  Terry, do you need help with this?

--

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I'll try to meet the deadline. :-)

--

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

It *is* a feature request.  The signature of functions implemented in C is 
currently not exposed to introspection.

--
nosy: +georg.brandl
type: behavior -> feature request

___
Python tracker 

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-08-02 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Georg committed this patch to the 2.6 tree, and besides, this is doesn't seem 
like a blocking issue, so I'm kicking 2.6 off the list and knocking the 
priority down.

--
priority: release blocker -> high
versions:  -Python 2.6

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
priority: release blocker -> high

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-08-02 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

You have about 5 hours as of this writing to apply the doc patch for Python 
2.6.6 rc1 and then it will be too late to get it into Python 2.6.6 (though I 
might make an exception for doc-only patches like this, for post rc1).

While I haven't built the docs, I don't have any objections to the patches.  If 
the docs build and look right, JFDI!

--

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

> Note, however that since unbound methods have been removed in 3.x, it is not 
> trivial to find a fully qualified name of a method anymore.

This is a rather sad loss of functionality.

--

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +hinsen, loewis, obamausa8, rhettinger

___
Python tracker 

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



[issue558238] Pickling bound methods

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Let's continue the discussion on issue9276.

--
nosy:  -merwok
resolution:  -> duplicate
status: open -> closed
superseder:  -> pickle should support methods

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Yes, I think we have a consensus on this point. Note, however that
> since unbound methods have been removed in 3.x, it is not trivial to
> find a fully qualified name of a method anymore.

I suppose only bound methods should be pickleable:

>>> class C:
... def m(self): pass
... 
>>> c = C()
>>> c.m
>
>>> c.m.__self__.__module__
'__main__'

And perhaps class methods too:

>>> class C:
... @classmethod
... def cm(self): pass
... 
>>> C.cm
>
>>> C.cm.__self__

>>> C.cm.__self__.__module__
'__main__'


> Also we need to
> decide where to stop: should methods of nested classes be pickleable?

As we want, but they needn't be.

--

___
Python tracker 

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



[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2010-08-02 Thread Georg Brandl

Georg Brandl  added the comment:

Doc review: Small typo, Flase vs False.  Also, exceptions are "raised" rather 
than "thrown" in Python land (same for the docstring).  Both exception 
references should be :exc:`OSError`.

Otherwise, looks fine to me.

Raising priority; this should go into 3.2.

--
nosy: +georg.brandl
priority: normal -> critical

___
Python tracker 

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



[issue8634] get method for dbm interface

2010-08-02 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue8634] get method for dbm interface

2010-08-02 Thread Ray.Allen

Ray.Allen  added the comment:

+1 on generalize the dbm.gnu and gbm.ndbm, and also dbm.dumb. All of them 
should follow the Collections.MutableMapping ABC. I will work out a patch to 
fix this.

--
nosy: +ysj.ray

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue558238] Pickling bound methods

2010-08-02 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Mon, Aug 2, 2010 at 10:32 AM, Jean-Paul Calderone
 wrote:
>
> Jean-Paul Calderone  added the comment:
>
>> I also like Antoine's idea of pickling the function/method name instead of 
>> the whole code object.
>
> I like it too.  That's why I suggested it in the first comment on the ticket 
> (read the linked
> code).  I guess Alexander likes it too, since he basically said as much in 
> the second
> comment. ;)

Yes, I think we have a consensus on this point. Note, however that
since unbound methods have been removed in 3.x, it is not trivial to
find a fully qualified name of a method anymore.   Also we need to
decide where to stop: should methods of nested classes be pickleable?

--

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

There's already issue558238 on the same topic.

--

___
Python tracker 

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



[issue9373] pulldom has low code coverage

2010-08-02 Thread Mark Smith

Mark Smith  added the comment:

Added a patch to increase code coverage for the pulldom module to 90%.

This patch also includes 3 'expectedFailure' tests that I believe indicate 
erroneous behaviour, associated with issues #9453 (SAX2DOM doesn't like 
processing instructions before the root element), and #9371 (pulldom doesn't 
provide END_DOCUMENT or COMMENT nodes)

--
keywords: +patch
Added file: http://bugs.python.org/file18324/pulldom_tests.patch

___
Python tracker 

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



[issue8743] set() operators don't work with collections.Set instances

2010-08-02 Thread Ray.Allen

Ray.Allen  added the comment:

In my opinion, the set's operator should be a bit more liberal and accept any 
collections.Set instances. Given collections.Set is an ABC and isinstance(set, 
collections.Set) is True, the set methods should(strong recommended) follow all 
the generalized abstract semantic definition in the ABC. This according to PEP 
3119:
"""
In addition, the ABCs define a minimal set of methods that establish the 
characteristic behavior of the type. Code that discriminates objects based on 
their ABC type can trust that those methods will always be present. Each of 
these methods are accompanied by an generalized abstract semantic definition 
that is described in the documentation for the ABC. These standard semantic 
definitions are not enforced, but are strongly recommended.
"""

The collections.Set defines __or__() as this (for example):
"""
def __or__(self, other):
if not isinstance(other, Iterable):
return NotImplemented
chain = (e for s in (self, other) for e in s)
return self._from_iterable(chain)
"""
which means the "|" operator should accept all iterable. So I think it's better 
to make set's methods should be more liberal.

--
nosy: +ysj.ray

___
Python tracker 

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



[issue9276] pickle should support methods

2010-08-02 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

> I also like Antoine's idea of pickling the function/method name instead of 
> the whole code object.

I like it too.  That's why I suggested it in the first comment on the ticket 
(read the linked code).  I guess Alexander likes it too, since he basically 
said as much in the second comment. ;)

--

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2010-08-02 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Apparently this may have become Windows-specific at some point. I can't 
reproduce under Linux with Python 2.6.5, 2.7 or 3.2.

I get a strange warning with -v under 2.7, though:

$ touch b.py && ~/cpython/27/python -v a.py 2>&1 | grep b.py
# /home/antoine/py3k/__svn__/b.pyc has bad mtime
import b # from /home/antoine/py3k/__svn__/b.py
# wrote /home/antoine/py3k/__svn__/b.pyc

("bad mtime"??)

--
components: +Windows
nosy: +barry, pitrou
priority: critical -> normal

___
Python tracker 

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



  1   2   >