[issue4335] inspect.getsourcelines ignores last line in module

2008-12-08 Thread Zsolt Haraszti

Zsolt Haraszti <[EMAIL PROTECTED]> added the comment:

We are also using inspect.getsourceline() in a large system at my
company and we observed some unreliable behavior in the past which we
never had time to analyze till today. Interesting coincidence, but today
we finally took the effort and traced the issue, and we found that:

getsourceline() does not report the last line of a class definition body
_IF_:
  (1) that line is the last line of the file, _AND_
  (2) that line is not terminated with a newline (\n)

This also answers Alexandre's question: yes, the problem happens only if
the line is unterminated.

I understand that an unterminated line may be non-conforming per Python
specs, but my WingIDE happily saved the file, so I suspect other editors
may just do the same, and I do agree with Rafe that it would be nice if
inspect would be resilient against the missing \n. I assume there would
be no harm, and it could eliminate some angst (it is really not obvious
first why it fails).

I would really love to see this fixed in a patch release on the 2.5+
lines. Any chance?

--
nosy: +zsolt

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4596] 2to3 does not fail as early as possible.

2008-12-08 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

Granted, this isn't the hottest issue circulating.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4590] 2to3 strips trailing L for long iterals in two fixers

2008-12-08 Thread Armin Ronacher

Changes by Armin Ronacher <[EMAIL PROTECTED]>:


--
stage: patch review -> committed/rejected

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4590] 2to3 strips trailing L for long iterals in two fixers

2008-12-08 Thread Armin Ronacher

Armin Ronacher <[EMAIL PROTECTED]> added the comment:

Patch applied in [67679].

The tests were nearly the same, even with the same numbers :)

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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4590] 2to3 strips trailing L for long iterals in two fixers

2008-12-08 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I think this is the correct thing to do. Go ahead. (Did you see if any
of the long tests would be applicable in testing numliterals?)

--
assignee: benjamin.peterson -> aronacher

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Mark Dickinson

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

> It is in the builtins in Python 2.x, so keeping it there would make
> porting easier, but then it's probably better to put it somewhere else
> to make people aware of the fact that the underlying machinery has
> changed.

from __past__ import cmp

?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4335] inspect.getsourcelines ignores last line in module

2008-12-08 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

Rafe,

Can you confirm that behavior on missing end-of-line is indeed your 
issue?  Note that at first I could not even reproduce the problem based 
on your report.

I am attaching a proof-of-concept patch that would arguably improve the 
inspect module by making it more robust in your case.

Note that it is unlikely that a fix along the lines of my patch will be 
considered for bug-fix releases of 2.5.x and 2.6.x series.  If you want 
an immediate solution, you have a better chance convincing Komodo 
developers to fix their text editor (emacs' python mode auto-terminates 
the last line in .py files.)

--
keywords: +patch
Added file: http://bugs.python.org/file12299/inspect.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2008-12-08 Thread Paul Winkler

Paul Winkler <[EMAIL PROTECTED]> added the comment:

Whatever happened with this? I don't see it mentioned in the NEWS file
for the 2.6 line.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4596] 2to3 does not fail as early as possible.

2008-12-08 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I'm tempted to close this as a "won't fix". For 99.9% of cases, it would
only be annoying to check for the presence of a file before starting up.

--
nosy: +benjamin.peterson
priority:  -> low

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Ugly patch to fix this issue:
 - add more regression tests for charsets UTF-16*, UTF-32*
 - add mandatory argument "encoding" to io.IncrementalNewlineDecoder 
constructor => BREAK THE API
 - use the encoding the encode "\r"
 - most ulgy hack: strip the BOM for codecs "UTF-16" and "UTF-32" (when 
encoding "\r" to bytes) => I don't know how to encode "\r" without the 
BOM

Added file: http://bugs.python.org/file12298/incremental_newline_decoder-2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4602] 2to3 drops executable bit with --write

2008-12-08 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Thanks for the report! Fixed in r67674.

--
nosy: +benjamin.peterson
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4604] close() seems to have limited effect

2008-12-08 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


--
components: +Extension Modules, Library (Lib) -Interpreter Core
nosy: +christian.heimes
priority:  -> release blocker
stage:  -> test needed
versions: +Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Here is a patch for test_io.py: check the problem by adding new 
encodings to TextIOWrapperTest.testNewlines().

--
keywords: +patch
Added file: http://bugs.python.org/file12297/test_io.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4600] __class__ assignment: new-style? heap? == confusing

2008-12-08 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

Related issue that applies to recent 2.x.  Language/data model/Objects,
values, and types says 'An object’s type is also unchangeable.'.  This
should be changed or deleted.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4335] inspect.getsourcelines ignores last line in module

2008-12-08 Thread Rafe Sacks

Rafe Sacks <[EMAIL PROTECTED]> added the comment:

"I feel this is not a bug because a file that ends with an unterminated
line is not a well-formed python program."

I used Komodo to make the file. Nothing special. I just made a new
python document and used it. If there is a Komodo Bug that is fine, but
if this issue can happen (and it has), then the module should be made
more robust to protect against it happening, shouldn't it?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4605] 3.0 documentation mentions using maketrans from within the string module.

2008-12-08 Thread chris

New submission from chris <[EMAIL PROTECTED]>:

http://docs.python.org/3.0/library/stdtypes.html#str.translate
mentions the following:
"You can use the maketrans() helper function in the string module to 
create a translation table."

But maketrans is now a string method not just a function of the string 
module. It even mentions that right above it that it is now a method of 
string objects:
"A map for translate() is usually best created by str.maketrans()."

The page where this all appears in is:
http://docs.python.org/3.0/library/stdtypes.html

It may have just not been updated fully from an older release.
If I am mistaken and this is not a bug, I appologise.

--
assignee: georg.brandl
components: Documentation
messages: 77379
nosy: georg.brandl, suicideducky
severity: normal
status: open
title: 3.0 documentation mentions using maketrans from within the string module.
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file12296/incremental_newline_decoder_bug.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12295/dec.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Smaller example to demonstrate the problem.

Added file: http://bugs.python.org/file12295/dec.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

The bug is in IncrementalNewlineDecoder, not in the codec nor 
TextIOWrapper.

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4604] close() seems to have limited effect

2008-12-08 Thread Skip Montanaro

New submission from Skip Montanaro <[EMAIL PROTECTED]>:

Seems like file.close() in 3.0 isn't much of a barrier to further reading:

% python3.0
Python 3.0rc3+ (py3k:67338M, Nov 22 2008, 06:47:23) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> fp = open("/etc/services")
>>> ct = fp.read(1048)
>>> print (ct[-80:], end='') ; fp.close() ; ct = fp.read(17) ; print (ct)
compressnet   2/udp # Management Utility
compressnet   2/tcp # Management Utility

The second read() should raise an exception.  Same code, 2.6:

% python2.6
Python 2.6+ (release26-maint:66821:66833, Oct 30 2008, 22:16:1) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> fp = open("/etc/services")
>>> ct = fp.read(1048)
>>> print (ct[-80:], end='') ; fp.close() ; ct = fp.read(17) ; print (ct)
compressnet   2/udp # Management Utility
Traceback (most recent call last):
  File "", line 1, in 
ValueError: I/O operation on closed file
compressnet   2/tcp # M>>> 

Culled this from a posting to comp.lang.python.

--
components: Interpreter Core
messages: 77376
nosy: skip.montanaro
severity: normal
status: open
title: close() seems to have limited effect
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Marc-Andre Lemburg

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

On 2008-12-09 00:58, Antoine Pitrou wrote:
> Antoine Pitrou <[EMAIL PROTECTED]> added the comment:
> 
> I wrote:
>> IMO PyUnicode_Compare() should be replaced by a hypothetical
>> PyObject_RichCompare(), which allows to take shortcuts when comparing
>> strings of different length and a Py_EQ or Py_NE comparison is requested.
> 
> ... and I didn't even remember that PyUnicode_RichCompare() already
> exists. So let my proposal be to enable those optimizations inside the
> existing PyUnicode_RichCompare(), and dump PyUnicode_Compare().

What for ? What does this have to do with removing __cmp__ ?
Why do you want to break the C API for no apparent reason ?

I've designed the Unicode C API to be a rich API and would like
it to stay that way.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

I wrote:
> IMO PyUnicode_Compare() should be replaced by a hypothetical
> PyObject_RichCompare(), which allows to take shortcuts when comparing
> strings of different length and a Py_EQ or Py_NE comparison is requested.

... and I didn't even remember that PyUnicode_RichCompare() already
exists. So let my proposal be to enable those optimizations inside the
existing PyUnicode_RichCompare(), and dump PyUnicode_Compare().

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_index_C

2008-12-08 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Well, then a proper API should be devised. Perhaps Travis can shed more
light on what he thinks would be useful.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-08 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
nosy: +teoliphant

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Marc-Andre Lemburg

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

On 2008-12-09 00:12, Christian Heimes wrote:
> Christian Heimes <[EMAIL PROTECTED]> added the comment:
> 
> Marc-Andre, how  do you like a function PyUnicode_Equal() instead of
> PyUnicode_Compare()?
> 
> The old PyUnicode_Compare() function returns -1 for smaller value and
> errors, 0 for equality and +1 for larger value. I find it confusing to
> have one function that follows the old PyObject_Compare() behavior.

For Unicode objects you don't have the issues with general rich
comparisons. Unicode objects only know <, = and >, so the C approach
of using -1, 0, +1 for these results will work just fine.

It doesn't in the general case, where comparisons can return arbitrary
objects.

> Instead I'm proposing PyUnicode_Equal() which returns -1 for errors, 0
> for unequal and +1 for equal. The function follows the semantic of
> http://docs.python.org/c-api/object.html#PyObject_RichCompareBool nicely.

Yes, but for sorting Unicode (in C) and other quick checks that rely on
lexical ordering you need checks for < and > as well.

It's better to have just one C API than 3 or 5 to cover all comparison
cases.

> About your proposal for cmp(), where should we put the method? I'm -0.5
> on builtins.

Good question.

It is in the builtins in Python 2.x, so keeping it there would make
porting easier, but then it's probably better to put it somewhere else
to make people aware of the fact that the underlying machinery has
changed.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

IMO PyUnicode_Compare() should be replaced by a hypothetical
PyObject_RichCompare(), which allows to take shortcuts when comparing
strings of different length and a Py_EQ or Py_NE comparison is requested.
(see #3106 too)

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


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

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Martin v. Löwis

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

> Hmmm... nope - my terminal encoding (according to Python) on WIndows
> Vista x64 (with 32bit Python and a vanilla cmd) is cp850.

Ah, ok. That doesn't have the euro sign, either. Try it in IDLE, though.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-08 Thread Roumen Petrov

Changes by Roumen Petrov <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12253/python-trunk-20081206-c89.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4558] with_stdc89

2008-12-08 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

Socket module need to be patched too otherwise test_socket fail on UNIX
domain socket tests.

After clean build and with new patch the regression tests results are:
337 tests OK.
3 tests failed:
test_curses test_urllib2_localnet test_urllibnet
21 tests skipped:
test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl
test_gl test_imgfile test_kqueue test_macos test_macostools
test_pep277 test_py3kwarn test_scriptpackages test_sqlite
test_startfile test_sunaudiodev test_unicode_file test_winreg
test_winsound test_zipfile64
Those skips are all expected on linux2.

Interesting for failed tests is that every succeed if run independently.

Added file: http://bugs.python.org/file12294/python-trunk-20081209-c89.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_index_C

2008-12-08 Thread Martin v. Löwis

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

> I think they currently are private functions which happen to be used
> accross two different C source files. 

But see msg71879

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-08 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Here is patch, using the "small storage at the end of Py_buffer" idea.
It adds a lot of unit tests as well.

--
keywords: +needs review, patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file12293/issue4580.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Michael Foord

Michael Foord <[EMAIL PROTECTED]> added the comment:

OK - and as a further follow up, the traceback I posted for Mac OS X was
from a terminal called iTerm. I tried the same thing on the standard
'Terminal' app and it prints the Euro symbol fine. Looks like iTerm is
an ascii terminal.

Sorry for the noise, I think this can be closed.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Michael Foord

Michael Foord <[EMAIL PROTECTED]> added the comment:

Hmmm... nope - my terminal encoding (according to Python) on WIndows
Vista x64 (with 32bit Python and a vanilla cmd) is cp850.

C:\compile>C:\Python30\python.exe
Python 3.0 (r30:67507, Dec  3 2008, 20:14:27) [MSC v.1500 32 bit
(Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> '\u20ac'
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Python30\lib\io.py", line 1491, in write
b = encoder.encode(s)
  File "C:\Python30\lib\encodings\cp850.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u20ac' in
position
1: character maps to 

Oh well. (The traceback I posted was from Max OS X 10.5 - I didn't dig
closely enough to see that a different encoding was being used on
Windows, my bad - and thanks for the tip about ascii() ).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4601] directory permission error with make install in 3.0

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

Gotcha! os.path.walk() was replaced by os.walk() but walk() argument is 
no more a callback because walk() is a generator! Here is a fix.

--
keywords: +patch
title: permissions errors with altinstall in 3.0 -> directory permission error 
with make install in 3.0
versions:  -Python 2.6, Python 2.7
Added file: http://bugs.python.org/file12292/setup_chmod.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_index_C

2008-12-08 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

I think they currently are private functions which happen to be used
accross two different C source files. So they should be renamed
_Py_something (or the situation should be fixed so that they can be made
static).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Martin v. Löwis

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

This specific character shouldn't be undisplayable on Windows, not even
on your version of Windows. Instead, Python should find out how to
convert it to your terminal's encoding, rather than using ASCII.

It's a bug that the OSX port using ASCII; it probably should use UTF-8
by default for the terminal encoding.

In any case, it is *not* a bug that Python doesn't escape the character.
If you want it escaped, use the ascii() builtin function.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1533164] Installed but not listed *.pyo break bdist_rpm

2008-12-08 Thread Forest Wilkinson

Changes by Forest Wilkinson <[EMAIL PROTECTED]>:


--
nosy: +forest

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Marc-Andre, how  do you like a function PyUnicode_Equal() instead of
PyUnicode_Compare()?

The old PyUnicode_Compare() function returns -1 for smaller value and
errors, 0 for equality and +1 for larger value. I find it confusing to
have one function that follows the old PyObject_Compare() behavior.

Instead I'm proposing PyUnicode_Equal() which returns -1 for errors, 0
for unequal and +1 for equal. The function follows the semantic of
http://docs.python.org/c-api/object.html#PyObject_RichCompareBool nicely.

About your proposal for cmp(), where should we put the method? I'm -0.5
on builtins.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4603] 3.0 document tab interpretation change

2008-12-08 Thread Terry J. Reedy

New submission from Terry J. Reedy <[EMAIL PROTECTED]>:

In 2.6, Ref Manual / Lexical Analysis / Indentation says

"First, tabs are replaced (from left to right) by one to eight spaces
such that the total number of characters up to and including the
replacement is a multiple of eight (this is intended to be the same rule
as used by Unix). The total number of spaces preceding the first
non-blank character then determines the line’s indentation. "

and Using Python / Command line / Misc options says

"-t
Issue a warning when a source file mixes tabs and spaces for
indentation in a way that makes it depend on the worth of a tab
expressed in spaces. Issue an error when the option is given twice (-tt)."

Inyeol Lee, on c.l.p., in response to a report of a TabError, says "-tt
option in python 2.x is now default in python 3.0.
Apparently it got slipped from any documentation, including what's
new."

In 3.0 docs, the -t option *was* removed from Using Python, but the
Indentation sentences quoted above remain unchanged, though obsolete.  I
would guess that they should be replaced by something like

"When a source file mixes tabs and spaces for indentation in a way that
makes it depend on the worth of a tab expressed in spaces, a TabError is
raised." 

Perhaps What's New should get a sentence too.  "The former -tt startup
option to raise TabError on ambiguous mixtures of tabs and spaces for
indentation has been removed as an option and is now the standard behavior."

--
assignee: georg.brandl
components: Documentation
messages: 77360
nosy: georg.brandl, tjreedy
severity: normal
status: open
title: 3.0 document tab interpretation change
versions: Python 3.0, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4598] IDLE not opening

2008-12-08 Thread Martin v. Löwis

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

Do you have TCL_LIBRARY or TK_LIBRARY environment variables set?

This is a very obscure behavior - the installer is known to work on many
machines, including IDLE. So something must be particular with your
Windows installation.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-08 Thread Martin v. Löwis

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

This is fine to port to 2.5; please go ahead. Don't forget to add
Misc/NEWS entries, though - also add them for the branches you have
changed already.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4594] Can't compile with -O3, on ARM, with gcc 3.4.4

2008-12-08 Thread Martin v. Löwis

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

> Now, this isn't really Python's fault; gcc really shouldn't be crashing.
>  However, it'd be nice if configure had a way to specify the
> optimization level--I had to go in and edit the generated Makefile by
> hand. 

Well, Python does have a way - the way you have been using.

However, as yet another way, you can set the OPT environment variable,
to define the optimization flags to be used (and other non-essential
compiler flags).

> Better yet would be if configure could recognize the platform and
> set the -O level accordingly.

I'm opposed. Selecting such a thing by platform and compiler version
is too transient to be maintainable. It would be different if the
platform would have been around for 10 years, and had seen no compiler
change for 8 years, but in this case, this likely is fixed before the
next Python release is even made. Please report this to the system
vendor.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4601] permissions errors with altinstall in 3.0

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

With Python trunk, the directory has the right permission (drwxr-xr-x) 
whereas build/lib.linux(...) has permission 
drwx--.

But the problem is still open for listed files 
(.pyc, .pyo, .picle, .egg-info).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4591] uid/gid problem in os.chown

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

2^31-2 doesn't fit in long on 32 bits CPU. On my Linux box, uid_t is an 
unsigned integer (32 bits unsigned integer). Why not using "unsigned 
int"? chown prototype:

   int chown(const char *path, uid_t owner, gid_t group);

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4601] permissions errors with altinstall in 3.0

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

install() method of the install_lib command 
(Lib/distutils/command/install_lib.py) calls self.copy_tree() which 
calls copy_tree() from Lib/distutils/dir_util.py. By default, this 
function preserve the modes (perserve_mode=1 by default). Or the build 
created a directory with permissions "drwx--".

I wrote that only lib-dynload directory has a problem. But other files 
are install with permissions -rw---:
 - .../lib/python?.?/*.{pyc,pyo}
 - .../lib/python?.?/lib2to3/PatternGrammar*.pickle
 - .../lib/python?.?/lib2to3/Grammar*.pickle
 - .../lib/python?.?/lib-dynload/Python*.egg-info

--
components: +Distutils -Library (Lib)
versions: +Python 2.6, Python 2.7, Python 3.1

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_index_C

2008-12-08 Thread Martin v. Löwis

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

I think _add_one_to_index_C and _add_one_to_index_F should be renamed.
If they are meant to be called by non-core extension modules, their
names should start with Py_, else with _Py_.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3101] global function _add_one_to_index_C

2008-12-08 Thread Martin v. Löwis

Changes by Martin v. Löwis <[EMAIL PROTECTED]>:


--
title: global function _add_one_to_C -> global function _add_one_to_index_C

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4601] permissions errors with altinstall in 3.0

2008-12-08 Thread STINNER Victor

STINNER Victor <[EMAIL PROTECTED]> added the comment:

I'm able to reproduce the bug with umask set to 0027:
drwxr-x--- 2 root root 3072 déc  8 22:59 
(...)/lib/python3.1/lib-dynload

With umask 0077, it's:
drwx-- 2 root root 3072 déc  8 22:59 
(...)/lib/python3.1/lib-dynload

The problem is specific to this directory.

--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4602] 2to3 drops executable bit with --write

2008-12-08 Thread Adeodato Simó

Changes by Adeodato Simó <[EMAIL PROTECTED]>:


--
type:  -> behavior

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4601] permissions errors with altinstall in 3.0

2008-12-08 Thread Leger

Leger <[EMAIL PROTECTED]> added the comment:

My root umask = 0027 (hardened system), so the altinstall/install script
don't manage umask parameter.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4555] Smelly exports

2008-12-08 Thread Martin v. Löwis

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

I guess you *could* change the name of extensions that become builtin
modules. However, I think it is not worth the trouble, especially since
PEP 3121 solves the problem for good, for Python 3.

I propose to simply filter out init[_a-z]+ from the set of "bad" symbols.

That leaves us with asdl_*_seq_new, and _add_one_to_index_; the latter
is already reported as issue3101.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4602] 2to3 drops executable bit with --write

2008-12-08 Thread Adeodato Simó

New submission from Adeodato Simó <[EMAIL PROTECTED]>:

Hello,

after using 2to3 --write over some scripts, I found it very cumbersome
having to run `chmod +x` on each of them afterwards.

The attached patch is a possible way to fix this issue. It'd be great 
if somebody could apply it, or write a more appropriate fix.

--
components: 2to3 (2.x to 3.0 conversion tool)
files: 2to3_preserve_mode.diff
keywords: patch
messages: 77349
nosy: dato
severity: normal
status: open
title: 2to3 drops executable bit with --write
versions: Python 3.0
Added file: http://bugs.python.org/file12291/2to3_preserve_mode.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4587] Need to rework the dbm lib/include selection process

2008-12-08 Thread Skip Montanaro

Changes by Skip Montanaro <[EMAIL PROTECTED]>:


Removed file: http://bugs.python.org/file12275/setup.diff

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Guido van Rossum

Changes by Guido van Rossum <[EMAIL PROTECTED]>:


--
nosy:  -gvanrossum

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4587] Need to rework the dbm lib/include selection process

2008-12-08 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Roumen> I confirm my expectation:
Roumen> in case 'elif cand == "gdbm":' the if statement for "gdbm.h" has to 
be
Roumen> removed. This header don't provide dbm/ndbm compatible
Roumen> structure/function names.
Roumen> If setup is without 'if find_file("gdbm.h"...' statement dbm module 
is
Roumen> build successfully and test_dbm pass.

Right.  Dumb move on my part.  New patch attached.

Skip

Added file: http://bugs.python.org/file12290/setup.diff

___
Python tracker <[EMAIL PROTECTED]>

___Index: setup.py
===
--- setup.py(revision 67628)
+++ setup.py(working copy)
@@ -1010,39 +1010,63 @@
 
 # The standard Unix dbm module:
 if platform not in ['cygwin']:
-if find_file("ndbm.h", inc_dirs, []) is not None:
-# Some systems have -lndbm, others don't
-if self.compiler.find_library_file(lib_dirs, 'ndbm'):
-ndbm_libs = ['ndbm']
-else:
-ndbm_libs = []
-exts.append( Extension('dbm', ['dbmmodule.c'],
-   define_macros=[('HAVE_NDBM_H',None)],
-   libraries = ndbm_libs ) )
-elif self.compiler.find_library_file(lib_dirs, 'gdbm'):
-gdbm_libs = ['gdbm']
-if self.compiler.find_library_file(lib_dirs, 'gdbm_compat'):
-gdbm_libs.append('gdbm_compat')
-if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
-exts.append( Extension(
-'dbm', ['dbmmodule.c'],
-define_macros=[('HAVE_GDBM_NDBM_H',None)],
-libraries = gdbm_libs ) )
-elif find_file("gdbm-ndbm.h", inc_dirs, []) is not None:
-exts.append( Extension(
-'dbm', ['dbmmodule.c'],
-define_macros=[('HAVE_GDBM_DASH_NDBM_H',None)],
-libraries = gdbm_libs ) )
-else:
-missing.append('dbm')
-elif db_incs is not None:
-exts.append( Extension('dbm', ['dbmmodule.c'],
-   library_dirs=dblib_dir,
-   runtime_library_dirs=dblib_dir,
-   include_dirs=db_incs,
-   define_macros=[('HAVE_BERKDB_H',None),
-  ('DB_DBM_HSEARCH',None)],
-   libraries=dblibs))
+dbm_order = os.environ.get("PYDBMLIBORDER",
+   "ndbm:gdbm:bdb").split(":")
+dbmext = None
+for cand in dbm_order:
+if cand == "ndbm":
+if find_file("ndbm.h", inc_dirs, []) is not None:
+# Some systems have -lndbm, others don't
+if self.compiler.find_library_file(lib_dirs, 'ndbm'):
+ndbm_libs = ['ndbm']
+else:
+ndbm_libs = []
+print "building dbm using ndbm"
+dbmext = Extension('dbm', ['dbmmodule.c'],
+   define_macros=[
+   ('HAVE_NDBM_H',None),
+   ],
+   libraries=ndbm_libs)
+break
+
+elif cand == "gdbm":
+if self.compiler.find_library_file(lib_dirs, 'gdbm'):
+gdbm_libs = ['gdbm']
+if self.compiler.find_library_file(lib_dirs, 
'gdbm_compat'):
+gdbm_libs.append('gdbm_compat')
+if find_file("gdbm/ndbm.h", inc_dirs, []) is not None:
+print "building dbm using gdbm"
+dbmext = Extension(
+'dbm', ['dbmmodule.c'],
+define_macros=[
+('HAVE_GDBM_NDBM_H', None),
+],
+libraries = gdbm_libs)
+break
+if find_file("gdbm-ndbm.h", inc_dirs, []) is not None:
+print "building dbm using gdbm"
+dbmext = Extension(
+'dbm', ['dbmmodule.c'],
+define_macros=[
+('HAVE_GDBM_DASH_NDBM_H', None),
+ 

[issue4335] inspect.getsourcelines ignores last line in module

2008-12-08 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

According to my understanding of

http://docs.python.org/reference/lexical_analysis.html#id1

a newline character is required at the end of the python file.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4335] inspect.getsourcelines ignores last line in module

2008-12-08 Thread Alexander Belopolsky

Alexander Belopolsky <[EMAIL PROTECTED]> added the comment:

In order to reproduce the reported problem I had to conjure the attached 
repro.py which is missing '\n' on the last line.

I need to double check the language definition, but I feel this is not a 
bug because a file that ends with an unterminated line is not a well-
formed python program.

Added file: http://bugs.python.org/file12289/repro.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Marc-Andre Lemburg

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

Instead of removing cmp(a, b) and replacing all uses with (a>b)-(b

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



[issue4601] permissions errors with altinstall in 3.0

2008-12-08 Thread Leger

New submission from Leger <[EMAIL PROTECTED]>:

Under Debian/Lenny, with Python3.0.final install from the tarball, any
user can't import lib-dynload, launch IDLE ... but local root can do them.

When I login in root and run "chmod -R o+rx /usr/lib/python3.0/*", users
can use normaly python3.0.

Install detail : "configure --with-pydebug --with-doc-strings
--enable-shared --enable-profiling --enable-ipv6 --with-threads
--with-tsc --prefix=/usr ; make ; make test" and after "make altinstall
> altinstall.log 2>&1". I join altinstall.log.

--
components: Library (Lib)
files: altinstall.log
messages: 77344
nosy: legerf
severity: normal
status: open
title: permissions errors with altinstall in 3.0
type: resource usage
versions: Python 3.0
Added file: http://bugs.python.org/file12288/altinstall.log

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4600] __class__ assignment: new-style? heap? == confusing

2008-12-08 Thread Terry J. Reedy

New submission from Terry J. Reedy <[EMAIL PROTECTED]>:

ob.__class__ = ob2
gives some confusing TypeError messages.

>>> c.__class__ = 1
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __class__ must be set to new-style class, not 'int' object

Problem: 'new-style' is obsolete in 3.0. It is also too inclusive...

>>> c.__class__ = object
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __class__ assignment: only for heap types

object *is* 'new-style'.  I presume 'heap type' means 'class defined by
class statement'.  If so, let us say so, since beginning programmers may
not know what a 'heap type' is.  If the above is incorrect, then this
experienced programmer also does not know what it means in Python
context ;-).

Proposal: when someone tries to set __class__ to an inappropriate
object, give similar error message for instances and heap classes.

TypeError: __class__ must be set to a class defined by a class
statement, not 'xxx' [object].

where 'object', without the brackets, is added for non-classes, as it is
today.

>>> c.__class__ = object
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __class__ assignment: only for heap types

C, the class of c, *is* a heap type.  The different problem, the target
being an instance of heap class, should get a different message.  'Heap'
is still possibly confusing. Proposal:

TypeError: __class__ assignment: only for instances of classes defined
by class statements.

--
components: Interpreter Core
messages: 77343
nosy: tjreedy
severity: normal
status: open
title: __class__ assignment: new-style? heap? == confusing
type: behavior
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4587] Need to rework the dbm lib/include selection process

2008-12-08 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

I confirm my expectation:
in case 'elif cand == "gdbm":' the if statement for "gdbm.h" has to be
removed. This header don't provide dbm/ndbm compatible
structure/function names.
If setup is without 'if find_file("gdbm.h"...' statement dbm module is
build successfully and test_dbm pass.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4599] Strings undisplayable with repr

2008-12-08 Thread Michael Foord

New submission from Michael Foord <[EMAIL PROTECTED]>:

In Python 3 strings with non-ascii characters are undisplayable (even
with repr) in the default interactive interpreter on Windows and Mac.
Shouldn't the repr use escapes as with previous versions of Python?

Python 2.6
Python 2.6 (trunk:66714:66715M, Oct  1 2008, 18:36:04) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> d = u'\u20ac'
>>> d
u'\u20ac'

Python 3
Python 3.0 (r30:67503, Dec  6 2008, 21:14:27) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> d = '\u20ac'
>>> d
Traceback (most recent call last):
  File "", line 1, in 
  File
"/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/io.py",
line 1491, in write
b = encoder.encode(s)
  File
"/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/encodings/ascii.py",
line 22, in encode
return codecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode character '\u20ac' in
position 1: ordinal not in range(128)
>>> repr(d)
Traceback (most recent call last):
  File "", line 1, in 
  File
"/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/io.py",
line 1491, in write
b = encoder.encode(s)
  File
"/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/encodings/ascii.py",
line 22, in encode
return codecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode character '\u20ac' in
position 2: ordinal not in range(128)
>>>

--
components: Interpreter Core, Macintosh, Windows
messages: 77341
nosy: mfoord
severity: normal
status: open
title: Strings undisplayable with repr
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-12-08 Thread Mark Mentovai

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

This is not limited to Windows.  I experience this bug on Mac OS X and
Linux as well.

http://mail.python.org/pipermail/python-list/2008-August/505753.html

Attachment 3210.py is a reduced testcase.  It attempts to execute nocmd,
which should not exist.  The expected behavior is for OSError to be
thrown each time, with ENOENT or EACCES set in the errno field,
depending on the environment.  Due to this bug, Python will hit the file
descriptor limit at some point instead.

For quick reproduction, set a low but reasonable limit on the number of
maximum open files:

[EMAIL PROTECTED] bash$ ulimit -n 256
[EMAIL PROTECTED] bash$ python 3210.py
250
Traceback (most recent call last):
  File "3210.py", line 11, in 
raise e
OSError: [Errno 24] Too many open files

--
nosy: +markmentovai
Added file: http://bugs.python.org/file12287/3210.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4049] IDLE does not open too

2008-12-08 Thread Elizabeth Chang

Elizabeth Chang <[EMAIL PROTECTED]> added the comment:

Issue 4598 created.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4598] IDLE not opening

2008-12-08 Thread Elizabeth Chang

New submission from Elizabeth Chang <[EMAIL PROTECTED]>:

Fresh install, IDLE does not open. Cannot find tk tcl. Reference 
Issue4049. Problem reported in Python 2.5 and 3.0 on Windows.

--
messages: 77338
nosy: ec2929
severity: normal
status: open
title: IDLE not opening
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4049] IDLE does not open too

2008-12-08 Thread Elizabeth Chang

Elizabeth Chang <[EMAIL PROTECTED]> added the comment:

I fixed this by copying the tcl8.4 and tk8.4 directories into 
Python25/Lib from Python25/tcl. This fixes it but it should work 
without having to do this. I start new ticket and reference this one.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley

David M. Beazley <[EMAIL PROTECTED]> added the comment:

Actually, you shouldn't discount the potential usefulness of running 
apply() in all of the worker nodes.  A lot of people coming from 
parallel programming know about things like global broadcasts, 
reductions, and so forth.  For example, if I wanted to perform a global 
operation (maybe some kind of configuration) on all workers, I could see 
doing some kind of global apply() operation to do it.  

That said, I'm not actually asking for any new functionality.   I'd just 
make it more clear that apply() is not performing a function call on all 
pool workers.

Also, given that apply() blocks, I'm not exactly sure how useful it is 
in the context of actually performing work in parallel.   You might want 
to emphasize that apply_async() is better suited for that (the only 
other way I could think of to take advantage of apply() in parallel 
would be to call it from separate threads in the process that created 
the pool).

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4589] 'with' loses ->bool exceptions

2008-12-08 Thread Kevin Watters

Changes by Kevin Watters <[EMAIL PROTECTED]>:


--
nosy: +kevinwatters

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-08 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

Submitted as r67666. I'll ping Martin.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-08 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

The patch looks good.

These problems also apply to 2.5 I assume?  You might want to ping MvL
to let him know since he's about to cut that release.

--
keywords:  -needs review
nosy: +nnorwitz

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4552] Doc/tools/sphinxext not included in the 2.6.1 tarball

2008-12-08 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Well, those which "make checkout" checks out :)

I set this up so that nobody needs to care about any additional packages
or dependencies, as long as svn is installed and working.

--
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4597] EvalFrameEx fails to set 'why' for some exceptions

2008-12-08 Thread Jeffrey Yasskin

New submission from Jeffrey Yasskin <[EMAIL PROTECTED]>:

Several opcodes that can raise an exception fail to set x, err, or why
afterward. This patch fixes all the examples I could find. I could only
figure out how to write a test for PRINT_NEWLINE; the others are hard to
trigger.

--
assignee: jyasskin
components: Interpreter Core
files: fix_exceptions.patch
keywords: needs review, patch
messages: 77332
nosy: jyasskin
priority: normal
severity: normal
stage: patch review
status: open
title: EvalFrameEx fails to set 'why' for some exceptions
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12286/fix_exceptions.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4589] 'with' loses ->bool exceptions

2008-12-08 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

Looks good. Thanks!

I assume this should be merged into the 2.6.x and 3.0.x branches?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2899] Fixers find, rfind, etc in 'string' module

2008-12-08 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

I think the point is to get a message from 2to3 about possible use of
feature that is gone.  Of course python3 raises an exception when trying
to execute the code, but it does leave the user wondering "why did 2to3
report that there are no changes necessary?".

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-08 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
superseder:  -> AssertionError in Doc/includes/mp_benchmarks.py

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2899] Fixers find, rfind, etc in 'string' module

2008-12-08 Thread Armin Ronacher

Armin Ronacher <[EMAIL PROTECTED]> added the comment:

2to3 could handle it, but it would be a lot of work for something
unnecessary.  You can use "s.replace(a, b)" instead of string.replace(s,
a, b) since at least 2.0.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4589] 'with' loses ->bool exceptions

2008-12-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Running the test with -R:: indeed shows the reference leak.
2nd patch with suggested corrections.

--
assignee: jyasskin -> amaury.forgeotdarc
Added file: http://bugs.python.org/file12285/with_badbool_2.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4596] 2to3 does not fail as early as possible.

2008-12-08 Thread David W. Lambert

New submission from David W. Lambert <[EMAIL PROTECTED]>:

$ #rm -f file_that_is_not_here.py
$ 2to3 file_that_is_not_here.py


The program spends considerable time preparing itself only to discover
that it cannot open the file.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 77327
nosy: LambertDW
severity: normal
status: open
title: 2to3 does not fail as early as possible.
type: performance

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4592] Example patch is missing something

2008-12-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

In python2.6, Py_InitModule4() calls PyImport_AddModule().
Why doesn't python3.0's PyModule_Create() do the same?

Index: Objects/moduleobject.c
===
--- Objects/moduleobject.c  (revision 67577)
+++ Objects/moduleobject.c  (working copy)
@@ -103,8 +103,9 @@
_Py_PackageContext = NULL;
}
}
-   if ((m = (PyModuleObject*)PyModule_New(name)) == NULL)
+   if ((m = (PyModuleObject*)PyImport_AddModule(name)) == NULL)
return NULL;
+   Py_INCREF(m);

if (module->m_size > 0) {
m->md_state = PyMem_MALLOC(module->m_size);

--
nosy: +amaury.forgeotdarc, loewis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2173] Python fails silently on bad locale

2008-12-08 Thread Mark Dickinson

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

Could someone please try the attached patch and see if it solves the 
problem.

I'm not sure whether Facundo's problem is the same issue or not.

--
keywords: +patch
versions: +Python 3.1
Added file: http://bugs.python.org/file12284/issue2173.patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2173] Python fails silently on bad locale

2008-12-08 Thread Mark Dickinson

Changes by Mark Dickinson <[EMAIL PROTECTED]>:


--
nosy: +nelis

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4589] 'with' loses ->bool exceptions

2008-12-08 Thread Jeffrey Yasskin

Jeffrey Yasskin <[EMAIL PROTECTED]> added the comment:

I think your patch leaks a reference to 'x'. Move the Py_DECREF(x) to
before "if (err < 0)"?

And then really nitpicky: your test has 3 blank lines after it, and
should have 2.

Otherwise looks great. Thanks for picking this up!

--
keywords:  -needs review
resolution:  -> accepted
stage: patch review -> commit review

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4595] new types example is out of date

2008-12-08 Thread blake madden

New submission from blake madden <[EMAIL PROTECTED]>:

http://docs.python.org/3.0/extending/newtypes.html

This example is using Py_InitModule3, is this function removed in Python 3?

--
assignee: georg.brandl
components: Documentation
messages: 77323
nosy: blakemadden, georg.brandl
severity: normal
status: open
title: new types example is out of date
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4592] Example patch is missing something

2008-12-08 Thread blake madden

Changes by blake madden <[EMAIL PROTECTED]>:


--
title: PyModule_Create doesn't work (or example is missing something) -> 
Example patch is missing something

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4592] PyModule_Create doesn't work (or example is missing something)

2008-12-08 Thread blake madden

blake madden <[EMAIL PROTECTED]> added the comment:

It seems that a call to "PyDict_SetItemString" is what is missing from
r67655:

PyObject* m = PyModule_Create(&EmbModule);
PyDict_SetItemString(PyImport_GetModuleDict(), EmbModule.m_name, m);

I am just guessing here though, don't know if this is correct way to do
things.

--
assignee:  -> georg.brandl
components: +Documentation -Extension Modules
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2173] Python fails silently on bad locale

2008-12-08 Thread Mark Dickinson

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

I think I've traced the 'no output' problem back to the device_encoding 
function in Modules/posixmodule.c.  The problem occurs when this function 
is called to try to get the encoding for stdout.

On my machine, if I do:

LC_CTYPE="UTF-8" ./python.exe

then the nl_langinfo call in device_encoding returns an empty string.  If 
I do

LC_CTYPE="bogus" ./python.exe

then it returns "US-ASCII"

and if I do

LC_CTYPE="en_US.UTF-8" ./python.exe

then it returns "UTF-8".

In the first case (where the encoding is set to ""), any subsequent 
attempts to send anything to stdout result in a LookupError with the 
message "unknown encoding".  But of course, since this exception message 
is itself sent to stdout (or possibly stderr?) the same problem occurs 
again and we just don't see any output.

I don't yet know why this causes the module build to fail, or why exit() 
doesn't work.

I think we should try to get this fixed before 3.0.1.  Any help would be 
welcomed.

--
priority: normal -> critical

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2899] Fixers find, rfind, etc in 'string' module

2008-12-08 Thread David W. Lambert

David W. Lambert <[EMAIL PROTECTED]> added the comment:

I expect the answer will be that 2to3 cannot know what sort of object
"string" names.  Bell's theorem, or some such, as I understand it, tells
us that you must execute the algorithm to find out what it does, there
isn't a short cut.

It does seem like 2to3 could assume that you write code with honorable
intention, grace, and style and thereby offer a suggestive note.  The
string module is not an isolated case for such notices.  I made a
similar request to yours for "file" which is gone in version 3.

Unfortunately, code as follows is probably frequent, so we aren't likely
to get support for this feature.  Maybe here is an opportunity for
venture capital!

def f(list):
'''
argument should be a list.
"list" in this scope no longer names __builtins__.list
'''

--
nosy: +LambertDW

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-08 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Dupe, issue4449

___
Python tracker <[EMAIL PROTECTED]>

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



[issue2173] Python fails silently on bad locale

2008-12-08 Thread Mark Dickinson

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

See issue 4585, which appears to be the same problem.

--
nosy: +marketdickinson

___
Python tracker <[EMAIL PROTECTED]>

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



[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-12-08 Thread Jesse Noller

Changes by Jesse Noller <[EMAIL PROTECTED]>:


--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4585] Build failure on OS X 10.5.5: make: *** [sharedmods] Error 1

2008-12-08 Thread Mark Dickinson

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

Thanks for the information, nelis!

This appears to be a duplicate of issue 2173.  Further analysis should go 
there.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread Jesse Noller

Jesse Noller <[EMAIL PROTECTED]> added the comment:

Ah, I see what you're talking about David. Good catch. It wouldn't make 
sense to run the apply() in all of the workers, as apply() is a single 
function(...) call. map() however is done in parallel amongst all workers.

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4594] Can't compile with -O3, on ARM, with gcc 3.4.4

2008-12-08 Thread John Stracke

New submission from John Stracke <[EMAIL PROTECTED]>:

I downloaded the source to Python 3.0 onto my Nokia N810, an ARM-based
Linux machine.  The native gcc is 3.4.4 (upgrading might be possible,
but would certainly be a pain).  I was able to build only by switching
from -O3 to -O2; -O3 caused a compiler crash.

Now, this isn't really Python's fault; gcc really shouldn't be crashing.
 However, it'd be nice if configure had a way to specify the
optimization level--I had to go in and edit the generated Makefile by
hand.  Better yet would be if configure could recognize the platform and
set the -O level accordingly.

--
components: Build
messages: 77315
nosy: metageek
severity: normal
status: open
title: Can't compile with -O3, on ARM, with gcc 3.4.4
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4587] Need to rework the dbm lib/include selection process

2008-12-08 Thread Roumen Petrov

Roumen Petrov <[EMAIL PROTECTED]> added the comment:

About my environment :
- one is linux :
  a) gdbm library, with header gdbm.h,  without *ndbm.h
  b) "Berkeley DB" many versions but the last is 4.4 I think
- other is cross and native(msys) mingw32 environment 
  only "Berkeley DB" 4.7

I will check later the patch but at first look is expected to fail. Lets
see 
http://svn.python.org/view/python/trunk/Modules/dbmmodule.c?rev=67614&view=auto

 . This module don't include gdbm.h header. I expect linux build to fail
with error "No ndbm.h available!"

I could test patch later when I get access to build environment.

Did you like I to test what is result (linux build) when header gdbm.h
is included in module ?

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Marc-Andre Lemburg

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

Please put the PyUnicode_Compare() API back in there.

Removing __cmp__ really doesn't have anything to do with removing often
used helper functions for comparing certain object types and only
cripples the C API in a needless way.

Thanks.

--
nosy: +lemburg

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


--
assignee: georg.brandl -> jnoller
keywords: +easy
nosy: +jnoller
priority:  -> normal
stage:  -> needs patch

___
Python tracker <[EMAIL PROTECTED]>

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



[issue4593] Documentation for multiprocessing - Pool.apply()

2008-12-08 Thread David M. Beazley

New submission from David M. Beazley <[EMAIL PROTECTED]>:

The documentation for the apply() and apply_async() methods of a Pool 
object might emphasize that these operations execute func(*args,**kwargs) 
in only one of the pool workers and that func() is not being executed in 
parallel on all workers.On first reading, I actually thought it might 
be the latter (and had to do some experimentation to figure out what was 
actually happening).

--
assignee: georg.brandl
components: Documentation
messages: 77312
nosy: beazley, georg.brandl
severity: normal
status: open
title: Documentation for multiprocessing - Pool.apply()
versions: Python 2.6, Python 2.7, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

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



[issue1717] Get rid of more refercenes to __cmp__

2008-12-08 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I've created a new branch to work on the issue:
svn+ssh://[EMAIL PROTECTED]/python/branches/py3k-issue1717. It's
easier to work on a branch than exchanging monster patches.

___
Python tracker <[EMAIL PROTECTED]>

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



  1   2   >