[issue4221] inconsistent exception from int is confusing

2010-01-21 Thread STINNER Victor

STINNER Victor  added the comment:

See also issue #7710.

--
nosy: +haypo

___
Python tracker 

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



[issue7747] Function variable wrongly reported unassigned

2010-01-21 Thread Adrian May

Adrian May  added the comment:

OK, Thanks. Sorry for the hassle.

Adrian.

--
type: behavior -> compile error

___
Python tracker 

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



[issue5905] strptime fails in non-UTF locale

2010-01-21 Thread STINNER Victor

STINNER Victor  added the comment:

I'm unable to reproduce the error. I tried locales fr_FR.iso88591 and 
fr_fr.iso885...@euro (fr...@euro), but the example works correctly. Should the 
terminal use the specified locale? My terminal uses fr_FR.utF8 locale. Should 
set_locale() be called before loaded time and/or calendar module?

--
nosy: +haypo

___
Python tracker 

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



[issue7544] Fatal error on thread creation in low memory condition

2010-01-21 Thread STINNER Victor

STINNER Victor  added the comment:

Sum up of my patch:

 * it pass all test_thread*.py tests (tested with in pydebug mode)
 * it preallocates the thread state in the parent thread to be able to raise an 
error with PyErr_NoMemory() instead of Py_FatalError()
 * PyThreadState_Prealloc() doesn't call _PyGILState_NoteThreadState() because 
the thread ident is not correct in the parent thread
 * Call _PyGILState_NoteThreadState() in the new thread to finish the thread 
initialization
 * Py_InitializeEx() calls _PyGILState_Init() before initsite(), because 
initsite() may create a thread

--

___
Python tracker 

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



[issue7267] format method: c presentation type broken

2010-01-21 Thread STINNER Victor

STINNER Victor  added the comment:

See also issue #7649.

--
nosy: +haypo

___
Python tracker 

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



[issue7649] "u'%c' % char" broken for chars in range '\x80'-'\xFF'

2010-01-21 Thread STINNER Victor

STINNER Victor  added the comment:

@Ezio: Your patch leaks a reference: PyUnicode_FromString(...) is not destroyed 
(Py_DECREF) on success.

--

___
Python tracker 

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



[issue7747] Function variable wrongly reported unassigned

2010-01-21 Thread R. David Murray

Changes by R. David Murray :


--
priority:  -> normal
type: compile error -> behavior

___
Python tracker 

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



[issue7745] Remove "isatty" check when setting sys.std[in|out|err] encoding to that of locale

2010-01-21 Thread Dave Malcolm

Changes by Dave Malcolm :


--
status: open -> closed

___
Python tracker 

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



[issue7745] Remove "isatty" check when setting sys.std[in|out|err] encoding to that of locale

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
resolution:  -> rejected

___
Python tracker 

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



[issue7748] unicode supported in distutils register but not distutils upload

2010-01-21 Thread dholth

New submission from dholth :

# -*- encoding: utf-8 -*-
# Will not 'python setup.py upload':
setup(name='acute_e', version='0.1', description=u'é')

It looks like someone fixed this for register but forgot to copy it into upload:

+# Build up the MIME payload for the POST data
 boundary = '--GHSKFJDLGDS7543FJKLFHRE75642756743254'
 sep_boundary = '\n--' + boundary
 end_boundary = sep_boundary + '--'
 body = StringIO.StringIO()
 for key, value in data.items():
 # handle multiple entries for the same name
-if type(value) not in (type([]), type( () )):
+if type(value) != type([]):
 value = [value]
 for value in value:
-value = unicode(value).encode("utf-8")
+if type(value) is tuple:
+fn = ';filename="%s"' % value[0]
+value = value[1]
+else:
+fn = ""
+value = str(value)
 body.write(sep_boundary)
 body.write('\nContent-Disposition: form-data; name="%s"'%key)
+body.write(fn)
 body.write("\n\n")
 body.write(value)
 if value and value[-1] == '\r':

--
assignee: tarek
components: Distutils
messages: 98109
nosy: dholth, tarek
severity: normal
status: open
title: unicode supported in distutils register but not distutils upload
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



[issue7746] Nit: Extra comma in itertools doc

2010-01-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed in r77675 (trunk), r77676 (release26-maint), r77677 (py3k) and r77678 
(release31-maint).

--
assignee: georg.brandl -> ezio.melotti
nosy: +ezio.melotti
priority:  -> normal
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.6, Python 2.7, Python 3.2

___
Python tracker 

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



[issue7749] pydoc error

2010-01-21 Thread Gib Bogle

New submission from Gib Bogle :

>python -m pydoc sys

gives

No module named tempfile

--
messages: 98111
nosy: gib
severity: normal
status: open
title: pydoc error
type: behavior
versions: Python 2.5

___
Python tracker 

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



[issue7749] pydoc error

2010-01-21 Thread Éric Araujo

Éric Araujo  added the comment:

Hello

I can’t reproduce your bug.

Please specify exact Python version, how you installed it, whether you did 
something unusual with the lib directory, and any other useful information.

Kind regards

--
nosy: +Merwok

___
Python tracker 

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



[issue7749] pydoc error

2010-01-21 Thread Gib Bogle

Gib Bogle  added the comment:

Hi Eric,

I'm using Python 2.5.4 on Windows XP.  I installed pythonxy, which installed 
2.5.4.  I also have PyQt4.4 installed.  I haven't touched anything in the lib 
directory, as far as I know.

A poster on comp.lang.python finds the command works on one machine, but not on 
another.  Look for the post entitled "pyexe and pydocs.Downloads?"

Cheers
Gib

Dr. Gib Bogle
Senior Research Fellow
Auckland Bioengineering Institute
University of Auckland
New Zealand

http://www.bioeng.auckland.ac.nz

g.bo...@auckland.ac.nz
(64-9) 373-7599 Ext. 87030

Éric Araujo wrote:
> Éric Araujo  added the comment:
> 
> Hello
> 
> I can’t reproduce your bug.
> 
> Please specify exact Python version, how you installed it, whether you did 
> something unusual with the lib directory, and any other useful information.
> 
> Kind regards
> 
> --
> nosy: +Merwok
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Brian Curtin

Brian Curtin  added the comment:

I'm not seeing this on 2.5, 2.6, or trunk.

--
components: +Extension Modules
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed
title: pydoc error -> pydoc error - "No module named tempfile"

___
Python tracker 

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



[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2010-01-21 Thread Manuel Muradás

Manuel Muradás  added the comment:

Here is a patch for supporting MD5-sess, following RFC2617 specification.

Some comments/warnings:
 * I've only tested the patch against IIS 6.0. I don't know about other servers 
supporting MD5-sess.
 * IIS 6.0 expects the User Agent to send the URI (in the Authorization header) 
without the query string.
 * This patch doesn't add support for Digest sessions. For each request we 
make, we get a new [401|407] message with a new nonce (depending if we're 
talking about a proxy with digest authentication or a web server). Then we 
generate another authenticated request using that nonce. For Digest sessions to 
be fully supported, we should be adding an [WWW|Proxy]-Authenticate header in 
each following request we made to the server using the last nonce. This 
includes both MD5-sess and MD5 digest implementations.
 * A1 is being recalculated for every request. Given the above, this is not a 
real problem.

I'll open a new ticket regarding Digest sessions.

--
keywords: +patch
nosy: +dieresys
Added file: http://bugs.python.org/file15964/urllib2-support_md5-sess.diff

___
Python tracker 

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



[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Jason R. Coombs

New submission from Jason R. Coombs :

Under Python 2.6.4 64-bit on Windows 7 64-bit, I found that when launching a 
script under the debugger, if backslashes were in the script pathname, they 
were not interpreted correctly by the interpreter.

For example, create a simple test script, "t-helloworld.py" with the canonical 
"hello-world" content. The script name must start with a backslash escape 
character such as 't' or 'n'. Then, from the command prompt:

> python -m pdb .\t-helloworld.py
IOError: (2, 'No such file or directory', '.\t-helloworld.py')
> (1)()
(Pdb)

However, using forward slashes works just fine.

> python -m pdb ./t-helloworld.py
> c:\debug\t-helloworld.py(1)()
-> print "hello world"
(Pdb)

Note that launching the script from the python directly does not exhibit the 
error - it seems to be only when pdb is used.

Expected behavior: pdb should interpret the command-line parameters the same 
way Python does.

--
components: Windows
messages: 98116
nosy: jaraco
severity: normal
status: open
title: IOError when launching script under pdb with backslash in script path
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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread R. David Murray

R. David Murray  added the comment:

Under 2.5 this could be due to various weird issues with your python path and 
the modules on it.  Try running python from a clean directory and specifying 
the -E flag and see if the behavior changes, and/or try importing tempfile at 
the python prompt and see if you get a more useful message.

Under 2.7 I think pydoc handles this better.  Note that even if you find a bug 
in 2.5 it no longer receives bug fixes, so you'd also have to be able to 
reproduce it in 2.6.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gib Bogle

Gib Bogle  added the comment:

R. David Murray wrote:
> R. David Murray  added the comment:
> 
> Under 2.5 this could be due to various weird issues with your python path and 
> the modules on it.  Try running python from a clean directory and specifying 
> the -E flag and see if the behavior changes, and/or try importing tempfile at 
> the python prompt and see if you get a more useful message.
> 
> Under 2.7 I think pydoc handles this better.  Note that even if you find a 
> bug in 2.5 it no longer receives bug fixes, so you'd also have to be able to 
> reproduce it in 2.6.
> 
> --
> nosy: +r.david.murray
> 
> ___
> Python tracker 
> 
> ___

I previously had 2.6 installed, removed it for compatibility with something. 
Maybe I did something wrong.  It isn't a big issue for me, I just reported it 
because someone suggested I should.  I plan to upgrade to 2.6 soon anyway.

--

___
Python tracker 

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



[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-01-21 Thread Christoph Gohlke

New submission from Christoph Gohlke :

On Windows 7, Python 2.6 raises an IOError when opening a valid file URL with 
urllib.urlopen(). A patch to the nturl2path.url2pathname function is attached. 
It replaces '%7C' by '|' in the url at the top of the url2pathname function.

Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on 
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, urllib
>>> fname = sys.executable
>>> fname
'x:\\python26\\python.exe'
>>> fname = "file:///" + fname.replace('\\', '/').replace(':', '|')
>>> fname
'file:///x|/python26/python.exe'
>>> urllib.urlopen(fname)
Traceback (most recent call last):
  File "", line 1, in 
  File "x:\python26\lib\urllib.py", line 87, in urlopen
return opener.open(url)
  File "x:\python26\lib\urllib.py", line 206, in open
return getattr(self, name)(url)
  File "x:\python26\lib\urllib.py", line 468, in open_file
return self.open_local_file(url)
  File "x:\python26\lib\urllib.py", line 482, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 22] The filename, directory name, or volume label syntax is 
incorrect: '\\x|\\python26\\python.exe'

--
components: Library (Lib), Windows
files: url2pathname.patch
keywords: patch
messages: 98119
nosy: cgohlke
severity: normal
status: open
title: urllib.urlopen("///C|/foo/bar/spam.foo")  IOError: [Errno 22]
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file15965/url2pathname.patch

___
Python tracker 

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



[issue7752] Add support for Digest authentication session (reuse nonces)

2010-01-21 Thread Manuel Muradás

New submission from Manuel Muradás :

Description:
As described in issue [2202], for each request we make, we get a new 
[401|407] message with a new nonce (depending if we're talking about a proxy 
with digest authentication or a web server). Then we generate another 
authenticated request using that nonce. For Digest authentication session to be 
fully supported, we should be adding a [WWW|Proxy]-Authenticate header in each 
following request we made to the server using the last nonce sent by the 
server. This will reduce the amount of requests performed, improving the 
performance.


How common browsers behaves:
Browsers implements authentication session by reusing the last nonce 
received from the web server for a given domain and Realm. When a request is 
made to a new URL from the same domain, the browsers doesn't know if that URL 
belongs to the same Realm. If the new URL is a sub-url of any other known URL 
on that Realm, the browsers add the Authorization header to new request. If 
they can't infer the Realm with this method, the Request is sent without the 
header. If the new URL do belongs to the Realm, the Browsers uses the nonce 
included in the response from the sever (with a 401 status code) to make new 
requests to URLs belonging to that Realm.
Regarding proxies with Digest authentication, browsers reuse the last nonce 
for every request made through the proxy.

For example:
URL1 redirects to URL2 and URL2 redirects to URL3:

Notes:
-> = request
<- = response
N  = nonce
C  = client nonce
NC = nonce count

---
[1]
URL1: http://domain/1/1.htm
URL2: http://domain/2/1.htm
URL3: http://domain/1/2.htm

-> GET URL1
<- 401 N1
-> GET URL1 N1 C1 NC1
<- 301 URL2
-> GET URL2
<- 401 N2
-> GET URL2 N2 C2 NC1
<- 301 URL3
-> GET URL3 N2 C2 NC2
<- 200

---
[2]
URL1: http://domain/1.htm
URL2: http://domain/1/1.htm
URL3: http://domain/2/1.htm

-> GET URL1
<- 401 N1
-> GET URL1 N1 C1 NC1
<- 301 URL2
-> GET URL2 N1 C1 NC2
<- 301 URL3
-> GET URL3 N1 C1 NC3
<- 200


About the patch:
I've added a 'http_request' to 'AbstractDigestAuthHandler' to add the 
'*-Authenticate' header before performing the requests.

There is a known problem with this patch: we generate a new 
AuthenticationSession against digest proxies when we are redirected to another 
page (with a 30X code), instead of re-using the previous session (first we send 
the redirected request without the authentication handler, we receive a new 407 
code, and then we send the redirected request again with the new authentication 
handler). This is caused because of the execution order of handlers:
- RedirectHandler generates a new request and calls to self.parent.open
- ProxyDigestAuthHandler tries to find an AuthenticationSession for that 
request but fails ('Request.get_host' returns the web server host)
- ProxyHandler modifies the request (now 'Request.get_host' returns the proxy 
host)

Comments are more than welcome!!

--
components: Library (Lib)
files: urllib2-support_digest_sessions.diff
keywords: patch
messages: 98120
nosy: dieresys
severity: normal
status: open
title: Add support for Digest authentication session (reuse nonces)
type: feature request
versions: Python 2.7
Added file: 
http://bugs.python.org/file15966/urllib2-support_digest_sessions.diff

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Brian Curtin

Brian Curtin  added the comment:

You can see the same thing by doing execfile(".\test.py"), which is what pdb 
makes under the hood, then bdb exec's it.

--
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> test needed
type: crash -> behavior

___
Python tracker 

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



[issue7752] Add support for Digest authentication session (reuse nonces)

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> normal
stage:  -> test needed
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



[issue7753] newgil backport

2010-01-21 Thread Ross Cohen

New submission from Ross Cohen :

This is a backport of the newgil work to the 2.7 branch (otherwise known as 
trunk.) Patch is against r77678.

Created by diffing r76193 (last in the newgil branch)
against r76189 and applying the result. Generally applied cleanly and it looked 
as though only 1 reject needed to be massaged in. Passes all tests except for 
test_command, but the unpatched source also fails that test on my machine.

Perf numbers for linux on Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz
Using benchmark from here:
http://www.mail-archive.com/python-...@python.org/msg43407.html
-j0
2.7   : 14.93s, 15.71s, 15.03s
newgil: 15.32s, 15.45s, 15.78s

-j4
2.7   : 22.44s, 22.30s, 22.19s
newgil: 18.75s, 18.80s, 18.79s

--
components: Interpreter Core
files: newgil-2.7.diff
keywords: patch
messages: 98122
nosy: rcohen
severity: normal
status: open
title: newgil backport
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file15967/newgil-2.7.diff

___
Python tracker 

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



[issue7750] IOError in execfile with backslash in path

2010-01-21 Thread Jason R. Coombs

Changes by Jason R. Coombs :


--
title: IOError when launching script under pdb with backslash in script path -> 
IOError in execfile with backslash in path

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I'm changing the title back to the original title. I don't believe the problem 
is reproducible using execfile. That is, if a properly-escaped path is passed 
to execfile, it works fine.

So I believe the problem lies between when pdb takes control and where execfile 
is called - the command-line is not properly parsed.

--
title: IOError in execfile with backslash in path -> IOError when launching 
script under pdb with backslash in script path

___
Python tracker 

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



[issue7753] newgil backport

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
keywords: +needs review
priority:  -> high
stage:  -> patch review

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I suspect this patch may fix the problem. I haven't yet had time to test it.

Index: Lib/pdb.py
===
--- Lib/pdb.py  (revision 77683)
+++ Lib/pdb.py  (working copy)
@@ -1200,7 +1200,7 @@
 self._wait_for_mainpyfile = 1
 self.mainpyfile = self.canonic(filename)
 self._user_requested_quit = 0
-statement = 'execfile( "%s")' % filename
+statement = 'execfile(%r)' % filename
 self.run(statement)

 # Simplified interface

--

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Brian Curtin

Brian Curtin  added the comment:

Works for me, repr will escape the slash.

--

___
Python tracker 

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



[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-21 Thread Mike Clark

New submission from Mike Clark :

Good behavior:
>>> 0.0**0.0
1.0
>>>

Bad behavior:
>>> Decimal('0.0')**Decimal('0.0')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/decimal.py", line 2101, in __pow__
return context._raise_error(InvalidOperation, '0 ** 0')
  File "/usr/lib/python2.6/decimal.py", line 3699, in _raise_error
raise error(explanation)
decimal.InvalidOperation: 0 ** 0
>>>

I'm in Python 2.6, I don't know if other versions are affected.

--
messages: 98126
nosy: Mike.Clark
severity: normal
status: open
title: decimal.Decimal 0.0**0.0 error
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



[issue7658] OS X pythonw.c compile error with 10.4 or earlier deployment target: no spawn.h

2010-01-21 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

> RONALD: I've committed a fix for this in r77585, please test.

Verified on Tiger with 10.4u SDK.

--

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

The attached test-case identifies the failure mode (and verifies that the 
proposed fix corrects the issue).

--
Added file: http://bugs.python.org/file15968/test_pdb.py

___
Python tracker 

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



[issue7753] newgil backport

2010-01-21 Thread Jesse Noller

Changes by Jesse Noller :


--
nosy: +jnoller

___
Python tracker 

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



[issue6963] Add worker process lifetime to multiprocessing.Pool - patch included

2010-01-21 Thread Jesse Noller

Jesse Noller  added the comment:

I'm working on this now; I'm going to need to port the patch to trunk before 
moving forward with it. Shouldn't take me long.

--

___
Python tracker 

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



[issue7754] decimal.Decimal 0.0**0.0 error

2010-01-21 Thread R. David Murray

Changes by R. David Murray :


--
components: +Library (Lib)
nosy: +mark.dickinson
priority:  -> normal
type:  -> behavior
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures

2010-01-21 Thread Mike Crute

Mike Crute  added the comment:

Bump. Updated the patch against trunk.

--
nosy: +mcrute
Added file: http://bugs.python.org/file15969/broken_pipe.patch

___
Python tracker 

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



[issue7750] IOError when launching script under pdb with backslash in script path

2010-01-21 Thread Brian Curtin

Brian Curtin  added the comment:

Can you add your test to Lib/test/test_pdb.py?

If the test fails the "hello world" script won't be removed, it won't make it 
to os.remove(). You'll need to make sure the file gets deleted in any case. 
Could use a temporary file.

Can you condense the cmd stuff into less lines? Super minor thing, but it's all 
short lines anyways.

Rather than testing using failIf, assertFalse is a better alternative. In 2.7 
there is assertIn which would be ideal for this test, but this will go into 2.6 
as well.

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



[issue7753] newgil backport

2010-01-21 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin

___
Python tracker 

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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

On Windows, trying with different Python versions:

D:\temp>python24 -m pydoc sys
[works as expected]

D:\temp>python25 -m pydoc sys
No module named tempfile

D:\temp>python26 -m pydoc sys
No module named tempfile

D:\temp>python27 -m pydoc sys
[works as expected]


If tempfile.py is in the current directory, it works:

D:\temp>cd \apps\python26\lib

D:\apps\Python26\Lib>dir /b tempfile.py
tempfile.py

D:\apps\Python26\Lib>python26 -m pydoc sys
Help on built-in module sys:
...


Directly executing pydoc.py works fine too:

D:\temp>d:\apps\Python26\lib\pydoc.py sys
Help on built-in module sys:
...


so this may be a runpy issue, not directly related to pydoc.

--
nosy: +gagenellina

___
Python tracker 

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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gib Bogle

Gib Bogle  added the comment:

Importing tempfile from within python does not produce an error.

--

___
Python tracker 

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



[issue7753] newgil backport

2010-01-21 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Looks like the 2.7 patch has a spurious change to /Lib/unittest/runner.py.

--
nosy: +nascheme

___
Python tracker 

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



[issue7749] pydoc error - "No module named tempfile"

2010-01-21 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

This happens to be a duplicate of issue #7328 -- pydoc used to remove the 
Python standard library from sys.path (!) when run with -m

Fixed in r76312 (2.7). I think the fix should be backported to 2.6

@gib: you may patch your Python 2.5 installation yourself, it's very simple, 
you'll have to add a single line and reindent a block, that's all. See r76312

--

___
Python tracker 

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



[issue7076] Documentation add note about SystemRandom

2010-01-21 Thread Shawn Ligocki

Shawn Ligocki  added the comment:

ping

Please look at the last patch. It's very simple and would be helpful. This is 
not very complicated and shouldn't take months to consider.

--

___
Python tracker 

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