[issue1221] email.Utils.parseaddr("a(WRONG)@b")

2007-09-30 Thread helmut

New submission from helmut:

>>> email.Utils.parseaddr("a(WRONG)@b")
('WRONG WRONG', '[EMAIL PROTECTED]')

I believe this is wrong.

--
components: Library (Lib)
messages: 56199
nosy: helmut
severity: normal
status: open
title: email.Utils.parseaddr("a(WRONG)@b")
type: behavior
versions: Python 2.4, 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



[issue1222] locale.format bug if thousand separator is space (french separator as example)

2007-09-30 Thread de la Musse

Changes by de la Musse:


--
components: Library (Lib)
severity: normal
status: open
title: locale.format bug if thousand separator is space (french separator as 
example)
type: behavior
versions: Python 2.4

__
Tracker <[EMAIL PROTECTED]>

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



[issue1222] locale.format bug if thousand separator is space (french separator as example)

2007-09-30 Thread de la Musse

New submission from de la Musse:

locale.format function delete spaces in result which is a problem when
thousand separator is space (in French for example).

The problem seems in the code below (extract from locale.py):

145 while seps:
146 # If the number was formatted for a specific width, then it
147 # might have been filled with spaces to the left or right. If
148 # so, kill as much spaces as there where separators.
149 # Leading zeroes as fillers are not yet dealt with, as it is
150 # not clear how they should interact with grouping.
151 sp = result.find(" ")
152 if sp==-1:break
153 result = result[:sp]+result[sp+1:]
154 seps -= 1

Example :

>>> import locale
>>> locale.setlocale(locale.LC_NUMERIC)
'C'
>>> locale.setlocale(locale.LC_NUMERIC, "fr_FR.UTF-8")
'fr_FR.UTF-8'
>>> locale.format("%.2f", 12345.67, True)
'12345,67'

The correct result is '12 345,67' not '12345,67'

and if I call

>>> locale.format("%9.2f", 12345.67, True)
'12 345,67'

the result is correct

Is this behavior correct or a bug?

--
nosy: +edlm10

__
Tracker <[EMAIL PROTECTED]>

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



[issue1221] email.Utils.parseaddr("a(WRONG)@b")

2007-09-30 Thread Georg Brandl

Changes by Georg Brandl:


--
assignee:  -> barry
nosy: +barry

__
Tracker <[EMAIL PROTECTED]>

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



[issue1631171] implement warnings module in C

2007-09-30 Thread Brett Cannon

Changes by Brett Cannon:


--
assignee:  -> brett.cannon
nosy: +brett.cannon

_
Tracker <[EMAIL PROTECTED]>

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



[issue1686386] Python SEGFAULT on tuple.__repr__ and str()

2007-09-30 Thread Brett Cannon

Brett Cannon added the comment:

Applied in r58288.  If I did something stupid or people don't want the
overhead they can yell at the commit.  =)

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

_
Tracker <[EMAIL PROTECTED]>

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



[issue1686386] Python SEGFAULT on tuple.__repr__ and str()

2007-09-30 Thread Brett Cannon

Brett Cannon added the comment:

And fixed in r58289.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1223] httplib does not handle ssl end of file properly

2007-09-30 Thread Richie Ward

New submission from Richie Ward:

I was using httplib to power my xml rpc script.

I had problems when I wanted to use SSL and I got this error:
 File "/usr/lib/python2.5/httplib.py", line 1109, in recv
   return self._ssl.read(len)
socket.sslerror: (8, 'EOF occurred in violation of protocol')

I figured out this was because of poor error handling in python.

May I suggest this as a fix to this bug:
$ diff /usr/lib/python2.5/httplib.py /usr/lib/python2.5/httplib.py~
1109,1112c1109
< try:
< return self._ssl.read(len)
< except socket.sslerror:
< return
---
> return self._ssl.read(len)

Just a note. I am by no means a python expert, just good enough to get
my work done.
I use Ubuntu gutsy.

--
components: Library (Lib)
messages: 56203
nosy: Richie
severity: major
status: open
title: httplib does not handle ssl end of file properly
type: crash
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

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



[issue1223] httplib does not handle ssl end of file properly

2007-09-30 Thread Richie Ward

Changes by Richie Ward:


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