[issue2272] Segment Violation when using smtp with tls

2008-03-11 Thread David Harel

New submission from David Harel <[EMAIL PROTECTED]>:

Using Linux (Gentoo), when closing the socket of an smtp connection
using tls (you can use the example at:
http://snippets.dzone.com/posts/show/757).
Attached code example with my e-mail data. (I don't mind).
Also tested on Debian with Python 2.3.5 where everything seems OK.

--
components: Library (Lib)
files: t2.py
messages: 63460
nosy: hareldvd
severity: normal
status: open
title: Segment Violation when using smtp with tls
type: crash
versions: Python 2.4
Added file: http://bugs.python.org/file9654/t2.py

__
Tracker <[EMAIL PROTECTED]>

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



[issue2271] msi installs to the incorrect location (C drive)

2008-03-11 Thread Ross

Ross <[EMAIL PROTECTED]> added the comment:

log now attached

Added file: http://bugs.python.org/file9655/python.zip

__
Tracker <[EMAIL PROTECTED]>

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



[issue2273] test_decimal: possible thread lockup in test case

2008-03-11 Thread Jared Grubb

New submission from Jared Grubb <[EMAIL PROTECTED]>:

In Lib\test\test_decimal.py, attached is a bugfix for two bugs:
1) If the thfunc2 actually fails, then its thread will throw an
exception and never set the Events that thfunc1 is waiting for; thus,
thfunc1 never returns, causing the whole unittest to hang.
2) DecimalUseOfContextTest.test_threading should wait on both finish1
and finish2 (instead of waiting on finish1 twice).

--
components: Library (Lib)
files: test_decimal.patch
keywords: patch
messages: 63463
nosy: jaredgrubb
severity: normal
status: open
title: test_decimal: possible thread lockup in test case
type: crash
versions: Python 2.5
Added file: http://bugs.python.org/file9656/test_decimal.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2273] test_decimal: possible thread lockup in test case

2008-03-11 Thread Facundo Batista

Changes by Facundo Batista <[EMAIL PROTECTED]>:


--
assignee:  -> facundobatista
nosy: +facundobatista

__
Tracker <[EMAIL PROTECTED]>

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



[issue2273] test_decimal: possible thread lockup in test case

2008-03-11 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

This is a minor annoyance that's tripped me up before as well.  Only 
minor, since it only happens when there's something wrong with 
decimal.py.

The patch looks sound;  I've attached a regenerated version of it 
against the trunk.  (Note that the finish1 -> finish2 bug was already 
fixed in the trunk.)  I think it should be applied, and probably 
backported to 2.5 as well.

Jared, thanks for the report and the patch!  I'm curious to know how you 
encountered this;  if test_decimal is failing for a good reason, then 
there may be a Decimal bug to be fixed.

--
nosy: +marketdickinson
versions: +Python 2.6
Added file: http://bugs.python.org/file9657/test_decimal_thread.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2274] heapq API

2008-03-11 Thread Raymond Hettinger

New submission from Raymond Hettinger <[EMAIL PROTECTED]>:

The heapreplace() function has an irritating API.  Since the replacement
is unconditional, it usually obligates the caller to examine the top of
the heap to see if it is smaller or larger than the candidate
replacement item.  Typical calls look like this:

if item > heap[0]:
item = heapreplace(heap, item)

Instead of the current design "x=heappop(h); heappush(h, item); return
x", it would be better to have a function equivalent to
"heappush(h,item); return heappop(h)".  The above fragment then
simplifies to:

item = heappushpop(heap, item)

I propose to add heappushpop() to Py2.6 and to remove heapreplace() from
Py3.0:

def heappushpop(heap, item):
"""Fast version of a heappush followed by a heappop."""
if item > heap[0]:
item, heap[0] = heap[0], item
_siftup(heap, 0)
return item

--
components: Library (Lib)
messages: 63465
nosy: rhettinger
severity: normal
status: open
title: heapq API
type: feature request
versions: Python 2.5, 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



[issue2274] heapq API

2008-03-11 Thread Raymond Hettinger

Changes by Raymond Hettinger <[EMAIL PROTECTED]>:


--
versions: +Python 3.0 -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



[issue2275] urllib2 header capitalization

2008-03-11 Thread Hans-Peter Jansen

New submission from Hans-Peter Jansen <[EMAIL PROTECTED]>:

The urllib2 behavior related to headers is - hmm - improvable. 
It simply capitalize() the key, which leads to funny results like:
Accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
while this is seemingly conforming to the specs, it's simply different 
to every other implementation of such things.. 

And we can do better. How about:
--- /usr/lib/python/urllib2.py  2008-01-10 19:03:55.0 +0100
+++ urllib2.py  2008-03-11 21:25:33.523890670 +0100
@@ -261,13 +261,16 @@ class Request:
 def is_unverifiable(self):
 return self.unverifiable

+def _cap_header_key(self, key):
+return '-'.join((ck.capitalize() for ck in key.split('-')))
+
 def add_header(self, key, val):
 # useful for something like authentication
-self.headers[key.capitalize()] = val
+self.headers[self._cap_header_key(key)] = val

 def add_unredirected_header(self, key, val):
 # will not be added to a redirected request
-self.unredirected_hdrs[key.capitalize()] = val
+self.unredirected_hdrs[self._cap_header_key(key)] = val

 def has_header(self, header_name):
 return (header_name in self.headers or

I'm not happy with the _cap_header_key name, but you get the idea.
The patch is optimized to operate with maximum locality. It's also 
attached.

I would be very grateful, if something similar could be applied.

Opinions?

--
components: Library (Lib)
files: urllib2-cap-headers.diff
keywords: patch
messages: 63466
nosy: frispete
severity: minor
status: open
title: urllib2 header capitalization
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file9658/urllib2-cap-headers.diff

__
Tracker <[EMAIL PROTECTED]>

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



[issue1450] make modulator more general

2008-03-11 Thread Gabriel Wicke

Gabriel Wicke <[EMAIL PROTECTED]> added the comment:

Slightly adjusted and from top dir.

--
nosy: +gwicke
Added file: http://bugs.python.org/file9659/modulator-top.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue2273] test_decimal: possible thread lockup in test case

2008-03-11 Thread Jared Grubb

Jared Grubb <[EMAIL PROTECTED]> added the comment:

I ran into this bug because I created a context manager in one of my own
projects, and the regression tests in test_decimal looked like a good
start for my own regression tests... when some recent changes broke MY
code, I found the test bug too and realized that the test_decimal file
had the same problem. So, I figured I'd share the wealth :)

__
Tracker <[EMAIL PROTECTED]>

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



[issue2276] distutils out-of-date for runtime_library_dirs flag on OS X

2008-03-11 Thread Bill Janssen

New submission from Bill Janssen <[EMAIL PROTECTED]>:

The OS X linker now understands -R, but distutils continues to pass the
wrong flags back in
distutils.unixccompiler.runtime_library_dir_option().  I'm checking with
the Apple folks as to exactly what the right flag is.

--
assignee: janssen
components: Distutils
keywords: easy
messages: 63469
nosy: janssen
priority: normal
severity: normal
status: open
title: distutils out-of-date for runtime_library_dirs flag on OS X
type: behavior
versions: Python 2.5, Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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