[issue1194] The reduce() documentation is lost in Python 3.0a1

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

This is already fixed in SVN.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

Indeed, and I can remember trying to get around that, but didn't achieve
anything... I'll close it as won't fix.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

At the very least could you change the "--" to be the verbatim class
that shows up properly beneath? There has to be another solution that
would result in the docs at least being correct even if we can't get
LaTeX to do exactly what we want.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Michael Hoffman

Michael Hoffman added the comment:

Also, see http://bugs.python.org/issue798006 which shows how to fix a
similar problem elsewhere in the docs.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-09-24 Thread Fan Decheng

Fan Decheng added the comment:

A note about reproducing: since Windows 2000 all language packs can be 
installed easily using the Regional Options in the Control Panel. Even 
on an English version of Windows, character set mappings and fonts of 
other languages can be installed.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Rebecca Breu

New submission from Rebecca Breu:

Run the program:

while True:
try:
s = raw_input('> ')
except:
pass


Press Ctrl-D and then Ctrl-C, and you get

Traceback (most recent call last):
  File "test.py", line 5, in ?
s = raw_input('> ')
KeyboardInterrupt

Pressing just Ctrl-D or Ctrl-C continues the loop as expected, Ctrl-D
after Ctrl-C works, too. Only Ctrl-C after Ctrl-D sucks, even when you
try to catch "EOFError" and "KeybordInterrupt" explicitly.

The problem occurs with Python 2.4 and 2.5 on Debian testing, friends
confirmed the error under Ubuntu/2.5 and Gentoo/?.

The error does not occur when you import readline first.


Ah, and by the way: http://docs.python.org/lib/reporting-bugs.html
still links to the sourceforce bucktracker.

--
components: None
messages: 56109
nosy: Rebecca
severity: normal
status: open
title: Problems on Linux with Ctrl-D and Ctrl-C during raw_input
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1196] int() documentation does not specify default radix

2007-09-24 Thread Tim Delaney

New submission from Tim Delaney:

The int() documentation (section 2.1) does not specify the default 
radix used. Alternatively, it does not specify the default behaviour 
for string parsing.

Experimentally, it's parsing with a default radix of 10 - I recall in 
an earlier version of Python it parsed with a default radix of zero 
(i.e. dependent on the string contents).

I would suggest the following text:

int( [x[, radix]]) 

Convert a string or number to a plain integer. If the argument is a 
string, it must contain a possibly signed decimal number representable 
as a Python integer, possibly embedded in whitespace. The radix 
parameter gives the base for the conversion and may be any integer in 
the range [2, 36], or zero. If radix is zero, the proper radix is 
guessed based on the contents of string; the interpretation is the same 
as for integer literals. If radix is specified and x is not a string, 
TypeError is raised. If radix is not specified, and x is a string, the 
interpretation is as if a radix of 10 was specified. Otherwise, the 
argument may be a plain or long integer or a floating point number. 
Conversion of floating point numbers to integers truncates (towards 
zero). If the argument is outside the integer range a long object will 
be returned instead. If no arguments are given, returns 0.

--
components: Documentation
messages: 56110
nosy: tcdelaney
severity: normal
status: open
title: int() documentation does not specify default radix
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1197] logging: formatter does not accept %(funcName)s properly

2007-09-24 Thread Christian Meesters

Changes by Christian Meesters:


--
components: Library (Lib)
severity: minor
status: open
title: logging: formatter does not accept %(funcName)s properly
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

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



[issue1197] logging: formatter does not accept %(funcName)s properly

2007-09-24 Thread Christian Meesters

New submission from Christian Meesters:

Adding %(funcName)s to a formatter will only insert the calling logging
function (e.g. "info" for logging.info) into messages not the function
where the message comes from:


logging.Formatter('%(levelname)-8s %(funcName)s %(message)s'

def foo():
logging.info("test")

will insert

'INFOinfo test'

in the log instead of 

'INFOfoo test'

--
nosy: +CM

__
Tracker <[EMAIL PROTECTED]>

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



[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

There are a few other issues about raw_input and signals in the tracker,
possibly this is just another incarnation...

The docs tracker link is fixed, but needs a rebuild on the server.

--
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

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



[issue1177] urllib* 20x responses not OK?

2007-09-24 Thread Jim Jewett


Jim Jewett
 added the comment:

The change still missed 
the httpS copy.  I'm 
attaching a minimal change.

I think it might be better 
to just combine the 
methods -- as was already 
done in Py3K.  
Unfortunately, the py3K 
code doesn't run cleanly 
in 2.5, and I haven't yet 
had a chance to test a 
backported equivalent.  
(Hopefully tonight.)

__
Tracker <[EMAIL PROTECTED]>

__*** urllibhead.py 
--- urllib.py 
***
*** 435,441 
  # something went wrong with the HTTP status line
  raise IOError, ('http protocol error', 0,
  'got a bad status line', None)
! if errcode == 200:
  return addinfourl(fp, headers, "https:" + url)
  else:
  if data is None:
--- 435,443 
  # something went wrong with the HTTP status line
  raise IOError, ('http protocol error', 0,
  'got a bad status line', None)
! # According to RFC 2616, "2xx" code indicates that the client's
! # request was successfully received, understood, and accepted.
! if not (200 <= errcode < 300):
  return addinfourl(fp, headers, "https:" + url)
  else:
  if data is None:
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1182] Paticular decimal mod operation wrongly output NaN.

2007-09-24 Thread Mark Dickinson


Mark Dickinson
 added the comment:

There's a bug on line 1341 of decimal.py.  That line currently reads:

otherside = otherside._rescale(exp, context=context)

It should read:

otherside = otherside._rescale(exp, context=context, watchexp=0)

--
nosy: +marketdickinson

__
Tracker <[EMAIL PROTECTED]>

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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2007-09-24 Thread Mark Dickinson


Mark Dickinson
 added the comment:

I should have said that the bug I mentioned above is just one of a
number of bugs (mostly in division, addition and square root) that have
been corrected in the trunk.  Some of these fixes should probably be
backported.  But the decimal module has also had significant new
functionality added since Python 2.5, which is going to make sorting out
which pieces to backport tricky.

Actually, I guess it's possible to argue that the entire new decimal.py
module should be backported for inclusion in Python 2.5.2:  the new
functionality was added to comply with the IBM Decimal Arithmetic
specification, and the comments in the decimal module explicitly say
that non-compliance with an update specification should be regarded as a
bug.  So almost all the changes are bugfixes, in some sense...

Facundo, what do you think?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2007-09-24 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
components: +Library (Lib) -None
priority:  -> normal
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue1197] logging: formatter does not accept %(funcName)s properly

2007-09-24 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1196] int() documentation does not specify default radix

2007-09-24 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1193] os.system() encoding bug on Windows

2007-09-24 Thread Sean Reifschneider

Changes by Sean Reifschneider:


--
priority:  -> normal
severity: major -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-09-24 Thread Paul F. Dubois

Paul F. Dubois added the comment:

Testing auditor, this change should get this issue assigned to Collin.

--
nosy: +dubois

__
Tracker <[EMAIL PROTECTED]>

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



[issue1196] int() documentation does not specify default radix

2007-09-24 Thread Georg Brandl

Changes by Georg Brandl:


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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-09-24 Thread Paul F. Dubois

Paul F. Dubois added the comment:

yet another test

__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-09-24 Thread Paul F. Dubois

Changes by Paul F. Dubois:


__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-09-24 Thread Paul F. Dubois

Changes by Paul F. Dubois:


__
Tracker <[EMAIL PROTECTED]>

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



[issue1186] optparse documentation: -- being collapsed to - in HTML

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

Okay, applied that workaround in rev. 58243.

--
assignee: fdrake -> georg.brandl

__
Tracker <[EMAIL PROTECTED]>

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



[issue1196] int() documentation does not specify default radix

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

The default radix is, and was always AFAICS, 10. I've now documented
that in rev. 58244, 58245.

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



[issue1189] Documentation for tp_as_number tp_as_sequence tp_as_mapping

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

Committed in 3k branch as rev. 58246. Just open a new issue for the 2.6
docs when they are ready :)

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1177] urllib* 20x responses not OK?

2007-09-24 Thread Georg Brandl

Georg Brandl added the comment:

Applied your patch as r58247.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1002] Patch to rename HTMLParser module to lower_case

2007-09-24 Thread Paul F. Dubois

Paul F. Dubois added the comment:

Hoping I have learned to spell, another test.

--
assignee:  -> collinwinter

__
Tracker <[EMAIL PROTECTED]>

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



[issue1198] Test of 2to3 component auditor

2007-09-24 Thread Paul F. Dubois

New submission from Paul F. Dubois:

This is a test issue, please ignore.

--
assignee: collinwinter
components: 2to3 (2.x to 3.0 conversion tool)
messages: 56123
nosy: collinwinter, dubois
severity: minor
status: open
title: Test of 2to3 component auditor

__
Tracker <[EMAIL PROTECTED]>

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



[issue1198] Test of 2to3 component auditor

2007-09-24 Thread Paul F. Dubois

Changes by Paul F. Dubois:


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



[issue1199] Documentation for tp_as_number... version 2.6

2007-09-24 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc:

This patch is similar to http://bugs.python.org/issue1189, but in line
with python svn trunk (and 2.5 most probably as well): documentation of
all slots of tp_as_number, tp_as_mapping, tp_as_sequence.
The main difference with 3.0 is the coercion.

--
components: Documentation
files: numbermethods-2.6.diff
messages: 56124
nosy: amaury.forgeotdarc
severity: normal
status: open
title: Documentation for tp_as_number... version 2.6
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support

2007-09-24 Thread Senthil

Senthil added the comment:

Hi,
The patch attached required a complete rewrite. I am attaching the
modified patch, which will just substitute socket.gethostbyname with a
function gethost_addrinfo which internally uses getaddrinfo and takes
care of the IPv4 or IPv6 addresses translation.

jjlee, skip: let me know your comments on this.

One note we have to keep in mind is, testing on IPv6 address.
For eg. on my system /etc/hosts
10.98.1.6   goofy.goofy.com
#fe80::219:5bff:fefd:6270   localhost
127.0.0.1   localhost

test_urllib2 will PASS for the above.
But if I uncomment the IPv6 address, opening the local file fails. I am
not sure how local file access is done with IPv6 and should urllib2
(local file opening function) itself needs to be modified. Shall check
into that, with next version.

--
nosy: +orsenthil

_
Tracker <[EMAIL PROTECTED]>

_--- urllib2.py	2007-09-25 09:05:46.346939560 +0530
+++ urllib2-getaddrinfo.py	2007-09-25 09:04:59.019134480 +0530
@@ -1193,6 +1193,24 @@
 
 return [part.strip() for part in res]
 
+def gethost_addrinfo(hostname):
+if socket.has_ipv6:
+try:
+for res in socket.getaddrinfo(hostname, None, socket.AF_INET6,
+socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME):
+af, socktype, proto, canonname, sa = res
+except socket.gaierror:
+for res in socket.getaddrinfo(hostname, None, socket.AF_INET,
+socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME):
+af, socktype, proto, canonname, sa = res
+else:
+for res in socket.getaddrinfo(hostname, None, socket.AF_INET,
+socket.SOCK_DGRAM, socket.IPPROTO_IP, socket.AI_CANONNAME):
+af, socktype, proto, canonname, sa = res
+
+return sa[0]
+
+
 class FileHandler(BaseHandler):
 # Use local file or FTP depending on form of URL
 def file_open(self, req):
@@ -1208,10 +1226,10 @@
 def get_names(self):
 if FileHandler.names is None:
 try:
-FileHandler.names = (socket.gethostbyname('localhost'),
-socket.gethostbyname(socket.gethostname()))
+FileHandler.names = (gethost_addrinfo('localhost'),
+gethost_addrinfo(socket.gethostname()))
 except socket.gaierror:
-FileHandler.names = (socket.gethostbyname('localhost'),)
+FileHandler.names = (gethost_addrinfo('localhost'),)
 return FileHandler.names
 
 # not entirely sure what the rules are here
@@ -1232,7 +1250,7 @@
 if host:
 host, port = splitport(host)
 if not host or \
-(not port and socket.gethostbyname(host) in self.get_names()):
+(not port and gethost_addrinfo(host) in self.get_names()):
 return addinfourl(open(localfile, 'rb'),
   headers, 'file:'+file)
 except OSError, msg:
@@ -1264,7 +1282,7 @@
 passwd = unquote(passwd or '')
 
 try:
-host = socket.gethostbyname(host)
+host = gethost_addrinfo(host)
 except socket.error, msg:
 raise URLError(msg)
 path, attrs = splitattr(req.get_selector())
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support

2007-09-24 Thread Senthil

Changes by Senthil:


_
Tracker <[EMAIL PROTECTED]>

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



[issue1199] Documentation for tp_as_number... version 2.6

2007-09-24 Thread Martin v. Löwis

Changes by Martin v. Löwis:


--
keywords: +patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-09-24 Thread Martin v. Löwis

Changes by Martin v. Löwis:


--
keywords: +patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1200] Allow array.array to be parsed by the t# format unit.

2007-09-24 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin:

This changes PyArg_ParseTuple()'s "t#" to request a PyBUF_SIMPLE buffer
like all of the other buffer-using format units instead of
PyBUF_CHARACTER. Objects with multi-byte units wind up
byte-order-dependent. Alternately, it might make sense to have
array.array('b') and array.array('B') accept the PyBUF_CHARACTER flag.

I haven't actually tested this patch on a big-endian machine.

--
components: Interpreter Core
files: let_t_format_take_array.patch
messages: 56126
nosy: jyasskin
severity: normal
status: open
title: Allow array.array to be parsed by the t# format unit.
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__

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



[issue1199] Documentation for tp_as_number... version 2.6

2007-09-24 Thread Georg Brandl

Changes by Georg Brandl:


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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1184] test fixes for immutable bytes change

2007-09-24 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

To be precise, this change makes bytes immutable but does not give it a
__hash__ method or change the values its iterator returns.

__
Tracker <[EMAIL PROTECTED]>

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