[issue2833] __exit__ silences the active exception

2008-05-14 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Small typo in the snippet above, this should obviously read:

   try:
  raise Exception(foo)
   except Exception as e:
  try: raise KeyError(caught)
  except KeyError: pass
  raise e

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



[issue2833] __exit__ silences the active exception

2008-05-14 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

As Amaury said, lexically nested exception handlers make re-raising
behaviour buggy. In Py3k, a workaround is to instead write:

   try:
  raise Exception(foo)
   except Exception as :
  try: raise KeyError(caught)
  except KeyError: pass
  raise e

With the slight inconvenience that the raise e line will be appended
to the original traceback.

If we want bare raise statements to work as expected after a nested
exception handler, we'll need to add proper exception stacking, for
example by adding the exception value as a member of PyTryBlock. The
effect on performance should also be measured.

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



[issue1467929] %-formatting and dicts

2008-05-14 Thread Marc-Andre Lemburg

Marc-Andre Lemburg [EMAIL PROTECTED] added the comment:

I guess the patch was just forgotten after the 2.5 release was out.

I've added a 2.6 tag and assigned the patch to Sean.

--
assignee: anthonybaxter - jafo
versions: +Python 2.6

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



[issue2850] Augmenting the Windows build to support code signing.

2008-05-14 Thread Trent Nelson

New submission from Trent Nelson [EMAIL PROTECTED]:

Now that we've finally got a VeriSign code-signing certificate 
(hurrah!), we can look at how we want to integrate the aspect of code 
signing into our build process.

I'd like to propose augmenting the build process such that as a post-
link step for .exe|.pyd targets, a little helper Python code signing 
script will be run (i.e. trunk/pcbuild/signfile.py).  The first thing 
that this script will check is whether or not the environment variable 
PYTHON_CODESIGNING_CERT_NAME is defined.  If it is not defined or is 
empty, the script will simply exit.  This will be the case for the vast 
majority of users.

However, if the environment variable exists, it indicates to the 
signfile.py script that the target .exe|.pyd should be signed, using 
the identifier specified by the environment variable, with Microsoft's 
code-signing facilities (signtool.exe etc).

The net effect is that if a user has a valid code-signing certificate 
installed, they can get the standard Python build system to 
automatically sign all binaries by setting this environment variable.  
I think this approach is more useful than, say, having Martin manually 
sign each binary when it comes to release time, as it is automated (and 
as such, less error prone), and can be leveraged by anyone wishing to 
create signed Python distributions, not just the PSF (i.e. ActiveState, 
Enthought, etc).

Assuming there are no objections to this proposal, a couple of other 
things I'll provide:
   a) documentation on both what's required in order to produce a
  signed distribution, as well as guidelines for other companies
  wishing to obtain code-signing certificates for the purposes of
  signing their custom Python distributions (perhaps better suited
  to a wiki entry)
   b) a helper script in pcbuild/ that can a) augment existing .vcprojs
  and add the post-link signing step, and b) be run in such a way
  that it checks all existing .vcprojs for .exe|.pyd targets have
  the post-link event correctly configured

Comments/objections?

Trent.

--
assignee: Trent.Nelson
components: Build
messages: 66814
nosy: Trent.Nelson, loewis, tmick
priority: normal
severity: normal
status: open
title: Augmenting the Windows build to support code signing.
type: feature request
versions: Python 2.6, Python 3.0

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Quentin Gallet-Gilles

Quentin Gallet-Gilles [EMAIL PROTECTED] added the comment:

I'm working on renaming the ConfigParser module.

--
nosy: +quentin.gallet-gilles

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

I've somehow lost my xmlrpc* changes on my local machine - if someone else 
gets to it before me, feel free to work on it.

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



[issue2851] Eliminate Perl legacy in re flag names

2008-05-14 Thread Mark Summerfield

New submission from Mark Summerfield [EMAIL PROTECTED]:

The re module has the following flags (amongst others):

re.X == re.VERBOSE
re.S == re.DOTALL

The short forms of both these flags are clearly taken from Perl, but
they don't seem necessary for Python and are confusing since all the
other short names start with the same letter as the long name, e.g.,
re.I == re.IGNORECASE and re.M == re.MULTILINE.

Why not add re.V for re.VERBOSE and re.D for re.DOTALL and kill re.X and
re.S and say a final farewell to Perl?

--
components: Library (Lib)
messages: 66817
nosy: mark
severity: normal
status: open
title: Eliminate Perl legacy in re flag names
type: feature request
versions: Python 3.0

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



[issue2845] shutil.copy2() copies permission bits

2008-05-14 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

This seems to be a documentation issue.


shutil.copy2(src, dst)
Similar to copy(), but last access time and last modification time are 
copied as well. This is similar to the Unix command cp -p.
 -- http://docs.python.org/dev/library/shutil.html#shutil.copy2

Does not mention permissions while


$ pydoc shutil.copy2
shutil.copy2 = copy2(src, dst)
Copy data and all stat info (cp -p src dst).


implies that the permissions should be copied.

Maybe the documentation should simply recite the implementation: copy2 
is copyfile follwed by copystat.

--
nosy: +belopolsky

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



[issue2851] Eliminate Perl legacy in re flag names

2008-05-14 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Please keep them.  They correspond to the (?x) and (?s) syntax that is
supported inside the regex.

Perl compatibility is a feature, not a bug for the re module.

--
nosy: +gvanrossum
resolution:  - wont fix
status: open - closed

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



[issue2838] Verify callback for SSL

2008-05-14 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

On the client side, are you passing a ca_certs file with the self-signed
certificate in it?  If not, the library won't be able to validate the
certificate enough to be able to see the data in it.  But if you do
that, you should be able to see the bits of the certificate.  There's no
point to seeing the bits of an unvalidated certificate, because they may
be forged.  So the library doesn't allow you to see the bits of an
unvalidated certificate from the other side of the connection.

--
assignee:  - janssen
nosy: +janssen

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



[issue2852] sidebar directive fails

2008-05-14 Thread Noah Kantrowitz

New submission from Noah Kantrowitz [EMAIL PROTECTED]:

The normal ReST sidebar directive creates a div with the same class as the 
HTML sidebar. This makes it not render its contents correctly. Perhaps the 
default template/CSS should match on div#sphinxsidebar or similar?

--
assignee: georg.brandl
components: Documentation tools (Sphinx)
messages: 66821
nosy: coderanger, georg.brandl
severity: normal
status: open
title: sidebar directive fails
type: feature request

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Juracy Filho

Juracy Filho [EMAIL PROTECTED] added the comment:

I almost finished the http package patch, but I'm doubt about how I
would do it with Docs.

There are various doc files: basehttpserver.rst, cgihttpserver.rst,
httplib.rst and so on.

Would I join them into one's or only update their information (imports) ?

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



[issue2778] set_swap_bodies is unsafe

2008-05-14 Thread Adam Olsen

Adam Olsen [EMAIL PROTECTED] added the comment:

Revised again.  sets are only hashed after PyObject_Hash raises a TypeError.

This also fixes a regression in test_subclass_with_custom_hash.  Oddly,
it doesn't show up in trunk, but does when my previous patch is applied
to py3k.

Added file: http://bugs.python.org/file10321/python-setswap-3.diff

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



[issue2853] *** glibc detected *** python: double free or corruption

2008-05-14 Thread Michael Lang

New submission from Michael Lang [EMAIL PROTECTED]:

Hi,

i am trying to solve some problems we encounter, when locking files on a
NFS Storage using fcntl.
since this is a security related problem i just add some pseudo code
here that was used to create the problem

fh = os.open('filename')
fcntl.lockf(fh, fcntl.LOCK_EX)
fhw = os.fdopen(fh)
fhw
fcntl.lockf(fh, fcntl.LOCK_UN)
...

when using threads, it's possible to create following problems when
using a Solaris (openSolaris) NFS server:

*** glibc detected *** python: double free or corruption (!prev):
0x1bdbfb20 ***
=== Backtrace: =
/lib64/libc.so.6[0x32b086f4f4]
/lib64/libc.so.6(cfree+0x8c)[0x32b0872b1c]
/lib64/libc.so.6(fclose+0x14b)[0x32b085e75b]
/usr/lib64/libpython2.4.so.1.0[0x32c3e447ce]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalFrame+0x47c7)[0x32c3e947a7]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalFrame+0x44a6)[0x32c3e94486]
/usr/lib64/libpython2.4.so.1.0(PyEval_EvalCodeEx+0x925)[0x32c3e95905]
/usr/lib64/libpython2.4.so.1.0[0x32c3e4c263]
/usr/lib64/libpython2.4.so.1.0(PyObject_Call+0x10)[0x32c3e35f90]
/usr/lib64/libpython2.4.so.1.0[0x32c3e3c01f]
/usr/lib64/libpython2.4.so.1.0(PyObject_Call+0x10)[0x32c3e35f90]
/usr/lib64/libpython2.4.so.1.0(PyEval_CallObjectWithKeywords+0x6d)[0x32c3e8f55d]
/usr/lib64/libpython2.4.so.1.0[0x32c3ebb33d]
/lib64/libpthread.so.0[0x32b14062f7]
/lib64/libc.so.6(clone+0x6d)[0x32b08ce85d]
=== Memory map: 
0040-00401000 r-xp  fd:01 845448   
 /usr/bin/python
0060-00601000 rw-p  fd:01 845448   
 /usr/bin/python
1bd4d000-1bdd rw-p 1bd4d000 00:00 0
4000-40001000 ---p 4000 00:00 0
40001000-40a01000 rw-p 40001000 00:00 0
40a01000-40a02000 ---p 40a01000 00:00 0
40a02000-41402000 rw-p 40a02000 00:00 0
41402000-41403000 ---p 41402000 00:00 0
41403000-41e03000 rw-p 41403000 00:00 0
41e03000-41e04000 ---p 41e03000 00:00 0
41e04000-42804000 rw-p 41e04000 00:00 0
42804000-42805000 ---p 42804000 00:00 0
42805000-43205000 rw-p 42805000 00:00 0
43205000-43206000 ---p 43205000 00:00 0
43206000-43c06000 rw-p 43206000 00:00 0
43c06000-43c07000 ---p 43c06000 00:00 0
43c07000-44607000 rw-p 43c07000 00:00 0
44607000-44608000 ---p 44607000 00:00 0
44608000-45008000 rw-p 44608000 00:00 0
45008000-45009000 ---p 45008000 00:00 0
45009000-45a09000 rw-p 45009000 00:00 0
45a09000-45a0a000 ---p 45a09000 00:00 0
45a0a000-4640a000 rw-p 45a0a000 00:00 0
32b040-32b041a000 r-xp  fd:00 127400   
 /lib64/ld-2.5.so
32b0619000-32b061a000 r--p 00019000 fd:00 127400   
 /lib64/ld-2.5.so
32b061a000-32b061b000 rw-p 0001a000 fd:00 127400   
 /lib64/ld-2.5.so
32b080-32b0946000 r-xp  fd:00 127417   
 /lib64/libc-2.5.so
32b0946000-32b0b46000 ---p 00146000 fd:00 127417   
 /lib64/libc-2.5.so
32b0b46000-32b0b4a000 r--p 00146000 fd:00 127417   
 /lib64/libc-2.5.so
32b0b4a000-32b0b4b000 rw-p 0014a000 fd:00 127417   
 /lib64/libc-2.5.so
32b0b4b000-32b0b5 rw-p 32b0b4b000 00:00 0
32b0c0-32b0c82000 r-xp  fd:00 127423   
 /lib64/libm-2.5.so
32b0c82000-32b0e81000 ---p 00082000 fd:00 127423   
 /lib64/libm-2.5.so
32b0e81000-32b0e82000 r--p 00081000 fd:00 127423   
 /lib64/libm-2.5.so
32b0e82000-32b0e83000 rw-p 00082000 fd:00 127423   
 /lib64/libm-2.5.so
32b100-32b1002000 r-xp  fd:00 127455   
 /lib64/libdl-2.5.so
32b1002000-32b1202000 ---p 2000 fd:00 127455   
 /lib64/libdl-2.5.so
32b1202000-32b1203000 r--p 2000 fd:00 127455   
 /lib64/libdl-2.5.so
32b1203000-32b1204000 rw-p 3000 fd:00 127455   
 /lib64/libdl-2.5.so
32b140-32b1415000 r-xp  fd:00 127463   
 /lib64/libpthread-2.5.so
32b1415000-32b1614000 ---p 00015000 fd:00 127463   
 /lib64/libpthread-2.5.so
32b1614000-32b1615000 r--p 00014000 fd:00 127463   
 /lib64/libpthread-2.5.so
32b1615000-32b1616000 rw-p 00015000 fd:00 127463   
 /lib64/libpthread-2.5.so
32b1616000-32b161a000 rw-p 32b1616000 00:00 0
32b640-32b640d000 r-xp  fd:00 127465   
 /lib64/libgcc_s-4.1.2-20070626.so.1
32b640d000-32b660d000 ---p d000 fd:00 127465   
 /lib64/libgcc_s-4.1.2-2Segmentation fault

python imported modules/functions
from threading import Thread
import fcntl
from os import O_APPEND, O_CREAT, O_EXCL, O_LARGEFILE, O_NDELAY, ...
from time import asctime, localtime, sleep
from os import open as oopen
from os import fdopen
import sys

is this a python bug ? or am i doing something wrong ... the real code
will be available to troubleshoot the problem on request
regards

 import sys
 sys.version
'2.4.3 (#1, Mar 14 2007, 19:01:42) 

[issue2850] Augmenting the Windows build to support code signing.

2008-05-14 Thread Martin v. Löwis

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

Objection. I don't see the point of signing the binaries; signing the
MSI files should be enough.

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



[issue2838] Verify callback for SSL

2008-05-14 Thread Ruben Kerkhof

Ruben Kerkhof [EMAIL PROTECTED] added the comment:

Hi Bill,

When I include the server certificate in ca_certs, verification
succeeds, and I can view the peer certificate dict with getpeercert(False)

When I set ca_certs to none and ssl.CERT_NONE, I can still call
getpeercert(True) and call DER_cert_to_PEM_cert to get the same PEM
certificate.

SSL is all new to me, so forgive me if I talk nonsense, but what I'm
trying to do is the following:

I receive a key from Bob which is a digest of his servers certificate.
To make sure I'm really talking to Bob I need to decrypt his servers
signature with his public key and check the resulting digest against my
key. So I have to ignore failures like
X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT and
X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, but detect things like
X509_V_ERR_CERT_SIGNATURE_FAILURE.

The idea is based on what foolscap is doing with FURLS
(http://foolscap.lothar.com/trac)

Am I making sense?

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Brett Cannon

New submission from Brett Cannon [EMAIL PROTECTED]:

gestalt was removed as part of the stdlib cleanup for Mac code. But it 
turns out that gestalt is one of those modules that is just needed. Either 
the original version needs to be added back in or a ctypes version needs 
to be implemented. Either way, something to get system info needs to be 
added back into the stdlib (and probably go into plat-darwin).

--
components: Library (Lib)
messages: 66828
nosy: brett.cannon
priority: release blocker
severity: normal
status: open
title: Add gestalt back into Python 3.0
type: behavior
versions: Python 3.0

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



[issue2855] lookkey should INCREF/DECREF startkey around PyObject_RichCompareBool

2008-05-14 Thread Adam Olsen

New submission from Adam Olsen [EMAIL PROTECTED]:

sets are based on dicts' code, so they have the same problem as bug
1517.  Patch attached.

--
files: python-lookkeycompare.diff
keywords: patch
messages: 66829
nosy: Rhamphoryncus
severity: normal
status: open
title: lookkey should INCREF/DECREF startkey around PyObject_RichCompareBool
Added file: http://bugs.python.org/file10322/python-lookkeycompare.diff

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Brett Cannon

Changes by Brett Cannon [EMAIL PROTECTED]:


--
dependencies: +Add gestalt back into Python 3.0

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



[issue2855] lookkey should INCREF/DECREF startkey around PyObject_RichCompareBool

2008-05-14 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

FWIW, I periodically update setobject.c based on patches made to 
dictobject.c so there is usually no need to post separate bug reports.

--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

Actually, the plat-darwin comment is not right if the original C version 
is kept since that would just end up in Modules.

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

Does it have to be public? How about _gestalt?

--
nosy: +benjamin.peterson

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



[issue2778] set_swap_bodies is unsafe

2008-05-14 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

By replacing temporary immutability with temporary hashability, does 
this approach create the possibility that someone could mutate the key-
set during a search?  Is it possible to get the __eq__ check out-of-
sync with the __hash__ value?

Also, after a quick look at the patch, I'm not too keen on any 
modifications to set_swap_bodies() nor with changing the signature of 
set_contains_key().

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



[issue2838] Verify callback for SSL

2008-05-14 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Yep, it looks like you're on the right track.  I'll close this bug.

Bill

On Wed, May 14, 2008 at 12:51 PM, Ruben Kerkhof [EMAIL PROTECTED]
wrote:


 Ruben Kerkhof [EMAIL PROTECTED] added the comment:

 Hi Bill,

 When I include the server certificate in ca_certs, verification
 succeeds, and I can view the peer certificate dict with getpeercert(False)

 When I set ca_certs to none and ssl.CERT_NONE, I can still call
 getpeercert(True) and call DER_cert_to_PEM_cert to get the same PEM
 certificate.

 SSL is all new to me, so forgive me if I talk nonsense, but what I'm
 trying to do is the following:

 I receive a key from Bob which is a digest of his servers certificate.
 To make sure I'm really talking to Bob I need to decrypt his servers
 signature with his public key and check the resulting digest against my
 key. So I have to ignore failures like
 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT and
 X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, but detect things like
 X509_V_ERR_CERT_SIGNATURE_FAILURE.

 The idea is based on what foolscap is doing with FURLS
 (http://foolscap.lothar.com/trac)

 Am I making sense?

 __
 Tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue2838
 __


Added file: http://bugs.python.org/file10323/unnamed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2838
__Yep, it looks like you#39;re on the right track.nbsp; I#39;ll close this 
bug.brbrBillbrbrdiv class=gmail_quoteOn Wed, May 14, 2008 at 12:51 
PM, Ruben Kerkhof lt;a href=mailto:[EMAIL PROTECTED][EMAIL 
PROTECTED]/agt; wrote:br
blockquote class=gmail_quote style=border-left: 1px solid rgb(204, 204, 
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;br
Ruben Kerkhof lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt; 
added the comment:br
br
Hi Bill,br
br
When I include the server certificate in ca_certs, verificationbr
succeeds, and I can view the peer certificate dict with getpeercert(False)br
br
When I set ca_certs to none and ssl.CERT_NONE, I can still callbr
getpeercert(True) and call DER_cert_to_PEM_cert to get the same PEMbr
certificate.br
br
SSL is all new to me, so forgive me if I talk nonsense, but what I#39;mbr
trying to do is the following:br
br
I receive a key from Bob which is a digest of his servers certificate.br
To make sure I#39;m really talking to Bob I need to decrypt his serversbr
signature with his public key and check the resulting digest against mybr
key. So I have to ignore failures likebr
X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT andbr
X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN, but detect things likebr
X509_V_ERR_CERT_SIGNATURE_FAILURE.br
br
The idea is based on what foolscap is doing with FURLSbr
(a href=http://foolscap.lothar.com/trac; 
target=_blankhttp://foolscap.lothar.com/trac/a)br
br
Am I making sense?br
divdiv/divdiv class=Wj3C7cbr
__br
Tracker lt;a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/agt;br
lt;a href=http://bugs.python.org/issue2838; 
target=_blankhttp://bugs.python.org/issue2838/agt;br
__br
/div/div/blockquote/divbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2838] Verify callback for SSL

2008-05-14 Thread Bill Janssen

Changes by Bill Janssen [EMAIL PROTECTED]:


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

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



[issue2778] set_swap_bodies is unsafe

2008-05-14 Thread Adam Olsen

Adam Olsen [EMAIL PROTECTED] added the comment:

There is no temporary hashability.  The hash value is calculated, but
never stored in the set's hash field, so it will never become out of
sync.  Modification while __hash__ or __eq__ is running is possible, but
for __eq__ that applies to any mutable type.

set_contains_key only has two callers, one for each value of the
treat_set_key_as_frozen argument, so I could inline it if you'd prefer that?

set_swap_bodies has only one remaining caller, which uses a normal set,
not a frozenset.  Using set_swap_bodies on a frozenset would be visible
except in a few special circumstances (ie it only contains builtin
types), so a sanity check against that seems appropriate.  The old code
reset -hash to -1 in case one of the arguments was a frozenset -
impossible now, so I sanity check that it's always -1.

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



[issue2632] performance problem in socket._fileobject.read

2008-05-14 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
priority: critical - release blocker

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

On Wed, May 14, 2008 at 1:37 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:

 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 Does it have to be public? How about _gestalt?


That's fine by me. If someone really cares enough they can document it
themselves.

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Benjamin Peterson

Benjamin Peterson [EMAIL PROTECTED] added the comment:

I feel kinda bad about removing the module without noting how it was
used in platform.py, so I'll deal with this.

--
assignee:  - benjamin.peterson

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



[issue2854] Add gestalt back into Python 3.0

2008-05-14 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

On Wed, May 14, 2008 at 6:01 PM, Benjamin Peterson
[EMAIL PROTECTED] wrote:

 Benjamin Peterson [EMAIL PROTECTED] added the comment:

 I feel kinda bad about removing the module without noting how it was
 used in platform.py, so I'll deal with this.


While I am not going to stop you dealing with it, you shouldn't feel
bad. It would have been best had a test case in test_platform picked
this up (if you can it would be great to toss a test in).

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



[issue2856] os.listdir doc should mention that Unicode decoding can fail

2008-05-14 Thread Brodie Rao

New submission from Brodie Rao [EMAIL PROTECTED]:

The documentation for os.listdir should mention that there's a 
possibility that it can fail to decode paths to unicode objects and that 
it returns str objects for those paths it couldn't decode.

The documentation should also explain when this might happen, and 
perhaps how to deal with it. The cases that this could happen or how to 
work around it are beyond my knowledge, but #683592 does mention 
something about resetting the locale. I don't know if that comment is 
still relevant, or if it applies to all cases of decoding failure, 
however.

I don't know if this behavior still exists in Python 2.6. If it does, 
the documentation for 2.6 should be amended as well.

--
assignee: georg.brandl
components: Documentation
messages: 66839
nosy: brodierao, georg.brandl
severity: normal
status: open
title: os.listdir doc should mention that Unicode decoding can fail
type: behavior
versions: Python 2.3, Python 2.4, Python 2.5

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Juracy Filho

Juracy Filho [EMAIL PROTECTED] added the comment:

I've finished a patch for http package, but I've doubts about how to
make a patch.

I've used a svn diff and svn status to make the patch and status file
respectively.

Added file: http://bugs.python.org/file10324/http_package_on_py3k.diff

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Juracy Filho

Juracy Filho [EMAIL PROTECTED] added the comment:

Output for svn status of http package patch.

Added file: http://bugs.python.org/file10325/http_package_on_py3k.status

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



[issue2775] Implement PEP 3108

2008-05-14 Thread Brett Cannon

Brett Cannon [EMAIL PROTECTED] added the comment:

On Wed, May 14, 2008 at 6:33 PM, Juracy Filho [EMAIL PROTECTED] wrote:

 Juracy Filho [EMAIL PROTECTED] added the comment:

 I've finished a patch for http package, but I've doubts about how to
 make a patch.

 I've used a svn diff and svn status to make the patch and status file
 respectively.

That should be enough. Thanks, Juracy!

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



[issue2857] add coded for java modified utf-8

2008-05-14 Thread paul rubin

New submission from paul rubin [EMAIL PROTECTED]:

For object serialization and some other purposes, Java encodes unicode
strings with a modified version of utf-8:

http://en.wikipedia.org/wiki/UTF-8#Java
http://java.sun.com/javase/6/docs/api/java/io/DataInput.html#modified-utf-8

It is used in Lucene index files among other places.

It would be useful if Python had a codec for this, maybe called UTF-8J
or something like that.

--
components: Library (Lib)
messages: 66843
nosy: phr
severity: normal
status: open
title: add coded for java modified utf-8
versions: Python 2.5

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



[issue2819] Full precision summation

2008-05-14 Thread Raymond Hettinger

Raymond Hettinger [EMAIL PROTECTED] added the comment:

When you need full precision, the Kahan approach helps but doesn't make 
guarantees and can sometimes hurt (it makes some assumptions about the 
data).  One use case in is computing stats like a mean where many of 
the larger magnitude entries tend to cancel out but only after clipping 
bits off of the lower magnitude components.

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



[issue2858] bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes

2008-05-14 Thread Gregory P. Smith

New submission from Gregory P. Smith [EMAIL PROTECTED]:

I disabled the Lib/bsddb/test/test_lock.py test03_set_timeout test as it
crashes the interpreter when compiled in debug mode with an UNREF test.
 It appears to happen on all platforms according to the buildbots.

This is not a new problem, it exists in 2.5 if a backport the recent
updates to this test.

I did a little bit of debugging and it looks like the UNREF failure
occurs when the call to DBEnv.lock_get is has exited and Python is
freeing the internal callargs tuple passed as arguments to the method.

A pointer in the callargs._ob_prev structure had the 0xdbdbdbdb value
which I believe is a sign of BerkeleyDB overwriting the memory.

Jesus, can you look into this one?

--
components: Extension Modules
messages: 66845
nosy: gregory.p.smith, jcea
priority: high
severity: normal
status: open
title: bsddb.db.DBEnv.lock_get test_lock.test03_set_timeout crashes
type: crash
versions: Python 2.5, Python 2.6

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