[issue12010] Compile fails when sizeof(wchar_t) == 1

2011-05-16 Thread David Coles

David Coles  added the comment:

Attached is a patch that updates configure.in to make sure that wchar.h is 
present and that wchar_t is at least 16 bits wide.

On android-8 this patch causes the configure step to fail since SIZEOF_WCHAR_T 
== 1. On android-9 and my Linux desktop the build continues as normal, passing 
the build tests. If wchar.h is removed from the system then the build also 
fails with an error as expected.

The patch does not contain the configure diff since it also contained some 
other changes and I wasn't sure of the correct autoreconf process for Python.

--
keywords: +patch
Added file: http://bugs.python.org/file22012/wchar_check.patch

___
Python tracker 

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



[issue12077] Harmonizing descriptor protocol documentation

2011-05-16 Thread Daniel Urban

Changes by Daniel Urban :


--
nosy: +durban

___
Python tracker 

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



[issue12050] unconsumed_tail of zlib.Decompress is not always cleared on decompress() call

2011-05-16 Thread Takeshi Yoshino

Takeshi Yoshino  added the comment:

Thank you for the fix!

--

___
Python tracker 

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



[issue11197] information leakage with SimpleHTTPServer

2011-05-16 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-16 Thread Brian Curtin

Changes by Brian Curtin :


--
Removed message: http://bugs.python.org/msg136132

___
Python tracker 

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



[issue12094] Cannot Launch IDLE

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

I can't test this on Windows, but you could try the following things:
  1) check that 'python.exe -V' returns 2.6.6;
  2) try using the IDLE shortcut in the start menu;
  3) try "from abc import ABCMeta" from the interactive interpreter;
  4) install Python 2.7 and see if it works there.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12092] Clarify sentence in tutorial

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed, thanks for the report!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12092] Clarify sentence in tutorial

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c449d3c3e0da by Ezio Melotti in branch '2.7':
#12092: backport rephrasing of a paragraph in the tutorial.
http://hg.python.org/cpython/rev/c449d3c3e0da

--
nosy: +python-dev

___
Python tracker 

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



[issue12093] Typo in struct unpacking example

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed, thanks for the patch!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12093] Typo in struct unpacking example

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 874309ce6e62 by Ezio Melotti in branch '2.7':
#12093: fix typo in struct doc. Patch by Sandro Tosi.
http://hg.python.org/cpython/rev/874309ce6e62

--
nosy: +python-dev

___
Python tracker 

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



[issue12088] tarfile.extractall fails to overwrite unresolved symlinks and hard links

2011-05-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Committed the fix. Thank you, Scott.

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

___
Python tracker 

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



[issue12088] tarfile.extractall fails to overwrite unresolved symlinks and hard links

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b29f0b6fcb76 by Senthil Kumaran in branch '2.7':
Fix closes issue #12088 - fixes the tarfile.extractall  issue when the
http://hg.python.org/cpython/rev/b29f0b6fcb76

--
nosy: +python-dev

___
Python tracker 

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



[issue11986] Min/max not symmetric in presence of NaN

2011-05-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue12077] Harmonizing descriptor protocol documentation

2011-05-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This is a venerable section of the tutorial that has been exposed to many, many 
readers and AFAICT it has never caused a problem.  So, I see no need to make a 
change to it.

Also as Georg points out, the docs (especially the tutorial) are not about 
discouragement, they are about empowerment.

--

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: lukasz.langa -> rhettinger

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2011-05-16 Thread René Schümann

Changes by René Schümann :


--
nosy: +WhiteTiger

___
Python tracker 

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



[issue4709] Mingw-w64 and python on windows x64

2011-05-16 Thread René Schümann

Changes by René Schümann :


--
nosy: +WhiteTiger

___
Python tracker 

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



[issue1006238] cross compile patch

2011-05-16 Thread René Schümann

Changes by René Schümann :


--
nosy: +WhiteTiger

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-16 Thread Brian Curtin

Brian Curtin  added the comment:

Looks like I was referring to a different patch from the email - sorry for any 
confusion.

--

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 47bc3509f76b by Victor Stinner in branch '2.7':
Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't exist anymore
http://hg.python.org/cpython/rev/47bc3509f76b

--

___
Python tracker 

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



[issue12094] Cannot Launch IDLE

2011-05-16 Thread Nathan

New submission from Nathan :

To Whom it may concern – I have suddenly lost my ability to launch IDLE.  I am 
using 2.6 with windows xp.  I was using ipython with PyReadline.  I have 
uninstalled and reinstalled just python 2.6.6 with no luck.

I get the following error:

Thanks in advance 

C:\Python26>python.exe Lib\idlelib\idle.py
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "Lib\idlelib\idle.py", line 6, in 
import PyShell
  File "C:\Python26\Lib\idlelib\PyShell.py", line 3, in 
import os
  File "C:\Python26\lib\os.py", line 398, in 
import UserDict
  File "C:\Python26\lib\UserDict.py", line 82, in 
import _abcoll
  File "C:\Python26\lib\_abcoll.py", line 11, in 
from abc import ABCMeta, abstractmethod
ImportError: cannot import name ABCMeta

--
components: IDLE
messages: 136130
nosy: nbuck
priority: normal
severity: normal
status: open
title: Cannot Launch IDLE
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



[issue12093] Typo in struct unpacking example

2011-05-16 Thread Sandro Tosi

New submission from Sandro Tosi :

following up http://mail.python.org/pipermail/docs/2011-April/004154.html and 
what was done in 1de718a31004, here's a tiny patch to correct that typo in 2.7 
too.

--
assignee: docs@python
components: Documentation
files: struct_unpack_record.patch
keywords: patch
messages: 136129
nosy: docs@python, sandro.tosi
priority: normal
severity: normal
stage: patch review
status: open
title: Typo in struct unpacking example
versions: Python 2.7
Added file: http://bugs.python.org/file22011/struct_unpack_record.patch

___
Python tracker 

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



[issue7443] test.support.unlink issue on Windows platform

2011-05-16 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue12092] Clarify sentence in tutorial

2011-05-16 Thread Sandro Tosi

New submission from Sandro Tosi :

following up http://mail.python.org/pipermail/docs/2011-April/004161.html, it 
would be nice to have changeset 1811eb03ba00 applied in 2.7 (it's already there 
in 3.1, 3.2 and default). Added Georg to the nosy list since it's the author of 
the given cs.

--
assignee: docs@python
components: Documentation
keywords: patch
messages: 136128
nosy: docs@python, georg.brandl, sandro.tosi
priority: normal
severity: normal
stage: commit review
status: open
title: Clarify sentence in tutorial
versions: Python 2.7

___
Python tracker 

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



[issue1615158] POSIX capabilities support

2011-05-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> "posixcap" sounds ok to me.

Bike-sheddingly, it bothers me that these functions are actually
*not* defined by POSIX, but have been withdrawn before becoming
standard. So I'd rather call it linuxcap. Using _linuxcap, and
exposing them from os sounds fine to me.

--

___
Python tracker 

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



[issue10239] multiprocessing signal defect

2011-05-16 Thread Charles-François Natali

Charles-François Natali  added the comment:

Closing as duplicate of issue #9205.

--
nosy: +neologix
resolution:  -> duplicate
status: open -> closed
superseder:  -> Parent process hanging in multiprocessing if children terminate 
unexpectedly

___
Python tracker 

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



[issue12045] external shell command executed twice in ctypes.util._get_soname

2011-05-16 Thread Sijin Joseph

Sijin Joseph  added the comment:

Attaching patch.

Removed the second call to os.popen and used the dump variable that was read 
earlier as the argument to re.search.

--
keywords: +patch
nosy: +sijinjoseph
Added file: http://bugs.python.org/file22010/12045.patch

___
Python tracker 

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



[issue12034] check_GetFinalPathNameByHandle() suboptimal

2011-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Yes, it should be trivial to fix.
I've stumbled on this simply because I needed to write similar code for another 
patch, so studied how it was done in posixmodule.c.

--

___
Python tracker 

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



[issue12034] check_GetFinalPathNameByHandle() suboptimal

2011-05-16 Thread Sijin Joseph

Sijin Joseph  added the comment:

Is this related to some other issue? The fix seems trivial, however I am 
curious as to how you stumbled upon this?

Is there more to this issue than just performance?

--

___
Python tracker 

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



[issue12091] multiprocessing: simplify ApplyResult and MapResult with threading.Event

2011-05-16 Thread Charles-François Natali

New submission from Charles-François Natali :

Multiprocessing's MapResult and ApplyResult use a notification mechanism to 
signal callers when the underlying value is available.
Instead of re-inventing the wheel, we could use threading.Event instead: this 
leads to cleaner and simpler code (with no noticable performance impact).
Patch attached.

--
components: Library (Lib)
files: multiprocessing_event.diff
keywords: patch
messages: 136122
nosy: asksol, jnoller, neologix
priority: low
severity: normal
stage: patch review
status: open
title: multiprocessing: simplify ApplyResult and MapResult with threading.Event
type: behavior
Added file: http://bugs.python.org/file22009/multiprocessing_event.diff

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-16 Thread Santoso Wijaya

Changes by Santoso Wijaya :


--
nosy: +santa4nt

___
Python tracker 

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



[issue11882] test_imaplib failed on x86 ubuntu

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph :


--
nosy:  -sijinjoseph

___
Python tracker 

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



[issue12045] external shell command executed twice in ctypes.util._get_soname

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph :


--
nosy:  -sijinjoseph

___
Python tracker 

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



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph :


--
nosy:  -sijinjoseph

___
Python tracker 

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



[issue11986] Min/max not symmetric in presence of NaN

2011-05-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

rhettinger> Your other tracker item correctly focused on the behavior of
rhettinger> float('NaN') itself,

You closed issue11949 as well, so it won't help.  I disagree that this issue 
would be resolved by resolving issue11949.  Defining max(nan, x) and nan < x 
are two different issues.  Quoting Kahan,

"""
Some familiar functions have yet to be defined for NaN . For instance max{x, y} 
should deliver the same result as max{y, x} but almost no implementations do 
that when x is NaN . There are good reasons to define max{NaN, 5} := max{5, 
NaN} := 5 though many would disagree.
"""
-- Lecture Notes on the Status of IEEE Standard 754 for Binary
Floating-Point Arithmetic by Prof. W. Kahan
http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps

In the same lecture, Prof. Kahan states that nan < x must signal.

My ideal solution would be to make nan < x signal, keep naive implementation of 
builtin max() and provide symmetric float.max such that nan.max(x) = x.max(nan) 
= x (nan result would be a valid but less useful alternative.)

This will make float behavior closer to that of Decimal.

--

___
Python tracker 

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



[issue6721] Locks in python standard library should be sanitized on fork

2011-05-16 Thread Nir Aides

Nir Aides  added the comment:

Steffen, can you explain in layman's terms?

On Sun, May 15, 2011 at 8:03 PM, Steffen Daode Nurpmeso 
 wrote:
>
> @ Charles-François Natali wrote (2011-05-15 01:14+0200):
>> So if we really wanted to be safe, the only solution would be to
>> forbid fork() in a multi-threaded program.
>> Since it's not really a reasonable option
>
> But now - why this?  The only really acceptable thing if you have
> control about what you are doing is the following:
>
> class SMP::Process
>/*!
>* \brief Daemonize process.
>*[.]
>* \note
>* The implementation of this function is not trivial.
>* To avoid portability no-goes and other such problems,
>* you may \e not call this function after you have initialized
>* Thread::enableSMP(),
>* nor may there (have) be(en) Child objects,
>* nor may you have used an EventLoop!
>* I.e., the process has to be a single threaded, "synchronous" one.
>* [.]
>*/
>pub static si32 daemonize(ui32 _daemon_flags=df_default);
>
> namespace SMP::POSIX
>/*!
>* \brief \fn fork(2).
>*[.]
>* Be aware that this passes by all \SMP and Child related code,
>* i.e., this simply \e is the system-call.
>* Signal::resetAllSignalStates() and Child::killAll() are thus if
>* particular interest; thread handling is still entirely up to you.
>*/
>pub static sir fork(void);
>
> Which kind of programs cannot be written with this restriction?

--

___
Python tracker 

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



[issue11990] redirected output - stdout writes newline as \n in windows

2011-05-16 Thread Brian Curtin

Brian Curtin  added the comment:

That's already fixed, it'll be in 3.2.1

--
nosy: +brian.curtin

___
Python tracker 

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



[issue11990] redirected output - stdout writes newline as \n in windows

2011-05-16 Thread James Hutchison

James Hutchison  added the comment:

I would like to add in windows, "input" now adds a \r at the end which wasn't 
in 3.1. It doesn't do it in idle. This is using just the regular console window 
that opens up when you double click. I'm guessing this is related to the issue 
I saw earlier:

code:
from time import sleep

item = input("Input something\n");
print("%s %i" % (item, len(item)));
sleep(15);

in Idle:
Input something
something
something 9

in console window:
Input something
something
 10ething

ouch

--

___
Python tracker 

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



[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

A tracker bug has mangled the following paragraph following the IEEE 754 
standard quote in my previous post:

"""
Table 5.2 referenced above lists 10 operations, four of which (>, <,
>=, and <=) are given spellings that are identical to the spellings of
Python comparison operators.
"""

--

___
Python tracker 

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



[issue12090] 3.2: build --without-threads fails

2011-05-16 Thread Stefan Krah

Stefan Krah  added the comment:

A backport of 79fcd71d0356 fixes the problem.

--

___
Python tracker 

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



[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Sat, May 14, 2011 at 3:08 PM, Raymond Hettinger
 wrote:
..
>> Note that the current behaviour does *not* violate IEEE 754, ...
>
> I agree with Mark.

Do we really need a popular vote to determine what a published
standard does or does not require?

Section 7.2 of IEEE Std 754-2008 states:

"""
7.2 Invalid operation

The invalid operation exception is signaled if and only if there is no
usefully definable result. In these cases
the operands are invalid for the operation to be performed.
…

For operations producing no result in floating-point format, the
operations that signal the invalid operation exception are:
...
j)  comparison by way of unordered-signaling predicates listed in Table
5.2, when the operands are unordered
"""

Python comparison operators.

We can argue, of course about the proper mapping of IEEE 754 'INVALID'
exception to the available Python construct.  Arguably, a compliant
language can ignore INVALID exceptions, issue a warning while
returning result, or raise an exception and produce no result.  In a
post on Python ideas Mark argued that the ideal disposition of INVALID
is a ValueError:

"""
IMO, the ideal (ignoring backwards compatibility) would be to have
OverflowError / ZeroDivisionError / ValueError produced wherever
IEEE754 says that overflow / divide-by-zero / invalid-operation should
be signaled.
"""
http://mail.python.org/pipermail/python-ideas/2011-April/010106.html

If IEEE 754 compliance is a stated goal in Python design, it would
make very little sense to treat some cases of INVALID differently from
others.  If, however, IEEE 754 compliance is not a goal, we should
consider what is the most useful behavior.   On the mailing list, I
posted a challenge - review your code that will work differently if
nan ordering was disallowed and report whether that code does the
right thing for all kinds of float (including nan, inf and signed 0).
So far, I have not seen any responses to this.

My own experiment with the Python library itself, have revealed a bug
in the test suit.   This matches my prior experience: naive numeric
code usually produces nonsense results when nans are compared and
careful numeric code makes an effort to avoid comparing nans.

>  Am closing this feature request which is both ill-conceived and likely to 
> cause more harm than good (possibly breaking code that currently does not 
> fail).
>

My primary goal in posting this patch was to support the discussion on
python-ideas.  The patch was not intended to be applied as is.  At the
minimum, I would need to make nan < nan issue a deprecation warning
before turning it into an error.  If this is not an appropriate use of
the tracker - please propose an alternative.  Posting a patch on the
mailing list or outside of python.org seems to be a worse alternative.

>> the discussion about cleaning up test_math
>> (which I agree would be a good thing to do)
>> should probably go into another issue.
>
> I agree.

Why?  The issue in test_math is small enough that it can be fixed
without any discussion on the tracker.  If someone would want to
improve unittest based on this experience, this can indeed be handled
in a separate issue.  As long as the changes are limited to Lib/test,
I don't see what a separate issue will bring other than extra work.

--

___
Python tracker 

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



[issue12090] 3.2: build --without-threads fails

2011-05-16 Thread Stefan Krah

New submission from Stefan Krah :

The new Fedora buildbot (--without-threads) fails to compile:

http://www.python.org/dev/buildbot/all/builders/AMD64%20Fedora%20without%20threads%203.2/builds/1


I didn't check the release branch yet.

--
components: Build
keywords: buildbot
messages: 136114
nosy: georg.brandl, skrah
priority: normal
severity: normal
status: open
title: 3.2: build --without-threads fails
type: compile error
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



[issue12089] regrtest.py doesn't check for unexpected output anymore?

2011-05-16 Thread R. David Murray

R. David Murray  added the comment:

Antoine removed that check as part of the -j support, if I recall correctly.  
The check for unexpected output was part of the support for the transition 
between the old pre-unittest test suite and the unittest based test suite, and 
does seem like it is obsolete.  Presumably we will visually spot unexpected 
output during pre-checkin testing.

--
nosy: +pitrou, r.david.murray

___
Python tracker 

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



[issue6727] ImportError when package is symlinked on Windows

2011-05-16 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I decided to investigate further. I created another script to test the call to 
_wstat to try to recreate the -1 return code, but I was unable to do so. I'm 
attaching the script, which creates the same 'sample' package, but instead of 
calling import, calls _wstat directly on the 'sample', but it returns 0, even 
in the environments where the test script fails.

This leads me to believe the issue isn't with _wstat, but with the way _wstat 
is called in _Py_stat.

--
Added file: http://bugs.python.org/file22008/wstat-res.py

___
Python tracker 

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



[issue11949] Make float('nan') unorderable

2011-05-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Sat, May 14, 2011 at 2:50 PM, Mark Dickinson  wrote:
..
> On the issue itself, I'm -1 on making comparisons with float('nan') raise: I 
> don't see that there's a real problem here that needs solving.
>

I probably should have changed the title of this issue after making an
alternative proposal to make INVALID operations produce a warning:

http://mail.python.org/pipermail/python-ideas/2011-April/010101.html

For the case of nan ordering, this idea seemed to receive support on
the mailing list:

http://mail.python.org/pipermail/python-ideas/2011-April/010102.html
http://mail.python.org/pipermail/python-ideas/2011-April/010103.html
http://mail.python.org/pipermail/python-ideas/2011-April/010104.html

> Note that the current behaviour does *not* violate IEEE 754, since there's 
> nothing anywhere
> in IEEE 754 that says that Python's < operation should raise for comparisons 
> involving NaNs:
>  all that's said is that a conforming language should provide a number of 
> comparison operations
> (without specifying how those operation should be spelt in the language in 
> question), including
> both a < operation that's quiet (returning a false value for comparison with 
> NaNs) and a <
> operation that signals on comparison with NaN.  There's nothing to indicate 
> definitively which of
>  these two operations '<' should bind to in a language.
>

Yes, IEEE 754, provides little guidance to language designers, but why
would anyone want to treat
ordering of floats differently from ordering of decimals?

Traceback (most recent call last):
  ..
decimal.InvalidOperation: comparison involving NaN

> It *is* true that C chooses to bind '<' to the signalling version, but that 
> doesn't automatically mean that we should do the same in Python.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Daniel Urban

Changes by Daniel Urban :


--
nosy: +durban

___
Python tracker 

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



[issue12087] install_egg_info fails with UnicodeEncodeError depending on locale

2011-05-16 Thread Éric Araujo

Éric Araujo  added the comment:

The pkg_resources module in setuptools or distribute reads those files.

In 3.3, packaging.database reads them too (it’s an implementation of PEP 376 
with b/w compat with egg-info).  It may work just fine in 3.x (it uses text 
I/O), but when we backport packaging to distutils2 for 2.4+, we’ll probably run 
into the problem again.

--
components: +Distutils2
nosy: +alexis, pje

___
Python tracker 

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



[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-16 Thread Brian Curtin

Brian Curtin  added the comment:

Hirokazu contacted me directly with these patches a few days ago but I haven't 
been able to email him because his host's DNS is apparently down.

The tests in this patch do not end up testing anything, so we'll need to start 
with a proper test. In the brief look I had the other day, adding an except 
clause to the outer try/finally block catches something about a file not being 
available IIRC. I'll take a look this afternoon/evening.

--
nosy: +brian.curtin

___
Python tracker 

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



[issue12089] regrtest.py doesn't check for unexpected output anymore?

2011-05-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue12087] install_egg_info fails with UnicodeEncodeError depending on locale

2011-05-16 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue4966] Improving Lib Doc Sequence Types Section

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

I think it should be OK.  The stdtypes page could then mention type-specific 
behavior in the types' sections (e.g. <, <=, =>, > for sets) and link to the 
language reference for the general behavior.

--

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

> New changeset 9a4d4506680a by Victor Stinner in branch '3.1':
> Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't exist anymore

Oh, these commits are related to #12057, not this one.

--

___
Python tracker 

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



[issue12057] HZ codec has no test

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, I specified the wrong issue number of my last 3 commits: test_linecache 
failure is related to this issue.

New changeset 9a4d4506680a by Victor Stinner in branch '3.1':
Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't exist anymore
http://hg.python.org/cpython/rev/9a4d4506680a

New changeset 43cbfacae463 by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't
http://hg.python.org/cpython/rev/43cbfacae463

New changeset 06473da99270 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't
http://hg.python.org/cpython/rev/06473da99270

--

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9a4d4506680a by Victor Stinner in branch '3.1':
Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't exist anymore
http://hg.python.org/cpython/rev/9a4d4506680a

New changeset 43cbfacae463 by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't
http://hg.python.org/cpython/rev/43cbfacae463

New changeset 06473da99270 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11614: Fix test_linecache, cjkencodings_test.py doesn't
http://hg.python.org/cpython/rev/06473da99270

--

___
Python tracker 

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



[issue12057] HZ codec has no test

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1bd697cdd210 by Victor Stinner in branch '2.7':
Issue #12057: Convert CJK encoding testcase BLOB into multiple text files
http://hg.python.org/cpython/rev/1bd697cdd210

--

___
Python tracker 

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



[issue12089] regrtest.py doesn't check for unexpected output anymore?

2011-05-16 Thread STINNER Victor

New submission from STINNER Victor :

In Python 3.1, a test fails if it writes to stdout/stderr. It is no more the 
case in Python 3.2 and 3.3. Why? If we decided to not check for unexpected 
output in Python 3.2+, the following code should be removed:

if verbose:
capture_stdout = None
else:
capture_stdout = io.StringIO()

--
components: Tests
messages: 136103
nosy: haypo
priority: normal
severity: normal
status: open
title: regrtest.py doesn't check for unexpected output anymore?
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue4966] Improving Lib Doc Sequence Types Section

2011-05-16 Thread Ana Sofia Paixão

Ana Sofia Paixão  added the comment:

I was taking a look into the possibility of splitting this page into several 
pages, and wondered: could the contents of the Comparisons and the Boolean 
operations sections just be merged into Python Reference / Expressions, and 
then deleted from this page altogether? They are not even data types but 
operators, after all.

--
nosy: +anasofiapaixao

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9e1d7cd15d2e by Victor Stinner in branch '3.1':
Issue #11614: Fix importlib tests for the new __hello__ module
http://hg.python.org/cpython/rev/9e1d7cd15d2e

New changeset 6119f6cc9b2d by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #11614: Fix importlib tests for the new __hello__ module
http://hg.python.org/cpython/rev/6119f6cc9b2d

New changeset b61a1cd4943b by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11614: Fix importlib tests for the new __hello__ module
http://hg.python.org/cpython/rev/b61a1cd4943b

--

___
Python tracker 

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



[issue6727] ImportError when package is symlinked on Windows

2011-05-16 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I've made some progress on this issue. Thanks to Waldemar's findings, I'm able 
to selectively reproduce the issue by installing/uninstalling the Visual C++ 
redistributable that includes KB2467174 on a Windows 7 RTM installation.

So I added a patch to cpython to help troubleshoot:

PS C:\Users\jaraco\projects\public\cpython\pcbuild> hg id
434dfe42fde1+
PS C:\Users\jaraco\projects\public\cpython\pcbuild> hg diff
diff -r 434dfe42fde1 Python/import.c
--- a/Python/import.c   Sun May 15 13:16:22 2011 +0200
+++ b/Python/import.c   Mon May 16 10:52:45 2011 -0400
@@ -1807,6 +1807,15 @@
 /* Check for package import (buf holds a directory name,
and there's an __init__ module in that directory */
 #ifdef HAVE_STAT
+if (Py_VerboseFlag > 1 && _Py_stat(filename, &statbuf) == 0) {
+PySys_FormatStderr("stat_mode %U: %d\n",
+   filename, statbuf.st_mode);
+}
+else if(Py_VerboseFlag > 1)
+{
+PySys_FormatStderr("_Py_stat(%U) returned %d\n",
+filename, _Py_stat(filename, &statbuf));
+}
 if (_Py_stat(filename, &statbuf) == 0 && /* it exists */
 S_ISDIR(statbuf.st_mode))   /* it's a directory */
 {


I then ran the test script without vcredist:

C:\Users\Jason R. 
Coombs\Desktop>u:\users\jaraco\projects\public\cpython\pcbuild\amd64\python -vv 
.\test_import_symlink_package.py   2>&1  | findstr sample
stat_mode .\sample: 16895
import sample # directory '.\\sample'
_Py_stat(.\sample\__init__) returned -1
# trying '.\\sample\\__init__.pyd'
# trying '.\\sample\\__init__.py'
import sample # from '.\\sample\\__init__.py'
# wrote '.\\sample\\__pycache__\\__init__.cpython-32.pyc'
# cleanup[1] sample

And again with the vcredist installed:

C:\Users\Jason R. 
Coombs\Desktop>u:\users\jaraco\projects\public\cpython\pcbuild\amd64\python -vv 
.\test_import_symlink_package.py   2>&1  | findstr sample
_Py_stat(.\sample) returned -1
# trying '.\\sample.pyd'
# trying '.\\sample.py'
# trying '.\\sample.pyw'
# trying '.\\sample.pyc'
No module named 'sample'

Basically, it appears that with the later vcredist installed, _Py_stat is 
returning -1 for symlink directories.

--
versions: +Python 3.3

___
Python tracker 

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



[issue12057] HZ codec has no test

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 16503022c4b8 by Victor Stinner in branch '3.1':
Issue #12057: Convert CJK encoding testcase BLOB into multiple text files
http://hg.python.org/cpython/rev/16503022c4b8

New changeset 370db8da308f by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #12057: Convert CJK encoding testcase BLOB into multiple text
http://hg.python.org/cpython/rev/370db8da308f

New changeset e7daf2acc3a7 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #12057: Convert CJK encoding testcase BLOB into multiple text
http://hg.python.org/cpython/rev/e7daf2acc3a7

--
nosy: +python-dev

___
Python tracker 

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



[issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found

2011-05-16 Thread Alex Lai

Alex Lai  added the comment:

I install the Python package compiled by sunfreeware.

Alex Lai

Senior System Support Specialist
TAG-IPM Application Support, Scotia Capital,
720 King St. West, 6th Floor,
Toronto, Ontario M5V 2T3
Tel: (416) 607-4789
-Original Message-
From: dario frascatani [mailto:rep...@bugs.python.org] 
Sent: May 16, 2011 3:53 AM
To: Alex Lai (Scotia Capital)
Subject: [issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: 
symbol inet_aton: referenced symbol not found

dario frascatani  added the comment:

I have some problem to compile python source code to my server, I can't install 
make.
My problem is only when import the smtplib.

--

___
Python tracker 

___

---
The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. Any 
review, re-transmission, dissemination or other use of, or taking of any action 
in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. If you received this email in error, please 
contact the sender immediately by return electronic transmission and then 
immediately delete this transmission, including all attachments, without 
copying, distributing or disclosing same. No member of the Scotiabank Group is 
liable for any errors or omissions in the content or transmission of this email 
or accepts any responsibility or liability for loss or damage arising from the 
receipt or use of this transmission. Scotiabank Group may monitor, retain 
and/or review email. Trading instructions received by e-mail or voicemail will 
not be accepted or acted upon. Unless indicated in writing, opinions contained 
in this email are those of the author and are not endorsed by any member of the 
Scotiabank Group. 

For information on some members of the Scotiabank Group: 
http://www.scotiacapital.com/EmailDisclaimer/English_entities.htm
For authorized users of the Scotia Capital trademark: 
http://www.scotiacapital.com/EmailDisclaimer/English_trademark.htm

Pour obtenir la traduction en français: 
http://www.scotiacapital.com/EmailDisclaimer/French.htm
Traducción en español: http://www.scotiacapital.com/EmailDisclaimer/Spanish.htm

--
title: file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: 
referenced symbol not found -> file 
/usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: 
referenced symbol not found

___
Python tracker 

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



[issue1615158] POSIX capabilities support

2011-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

"posixcap" sounds ok to me.

--

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Andreas for your fix! Python 3 is now better than Python 2: it prints 
"Hello World!" instead of "Hello World...".

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

___
Python tracker 

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



[issue11614] import __hello__ is broken in Python 3

2011-05-16 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 44fd95cead7b by Victor Stinner in branch '3.1':
Issue #11614: import __hello__ prints "Hello World!". Patch written by Andreas
http://hg.python.org/cpython/rev/44fd95cead7b

New changeset 2c5736e8a221 by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #11614: import __hello__ prints "Hello World!". Patch written
http://hg.python.org/cpython/rev/2c5736e8a221

New changeset 79c49d2fc768 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11614: import __hello__ prints "Hello World!". Patch written
http://hg.python.org/cpython/rev/79c49d2fc768

--
nosy: +python-dev

___
Python tracker 

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



[issue1615158] POSIX capabilities support

2011-05-16 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Another possibility is to make it a private module _posixcapabilities, which 
would be used in os module:

try:
from _posixcapabilities import *
except ImportError:
pass

--

___
Python tracker 

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



[issue12088] tarfile.extractall fails to overwrite unresolved symlinks and hard links

2011-05-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I looked at your message and the patch, seems okay for the case of testing if 
the symlink is broken and performing the next steps. I shall commit it soon.

--
assignee:  -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

> In which case can it be None?

Oh, I misunderstood threading.py. current_thread().ident cannot be None.

During the bootstrap of a thread, Thread._ident is None, but 
current_thread().ident is not None because current_thread() creates a dummy 
thread object having the right identifer. This dummy object is destroyed at 
soon as the Thread object is started (see Thread._bootstrap_inner).

current_thread().ident is a little bit "suboptimal" because it gets the 
identifier of the thread, it reads the corresponding thread object, and then it 
gets the identifier of the thread object.

def current_thread():
...
return _active[_get_ident()]
...

--

___
Python tracker 

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



[issue12088] tarfile.extractall fails to overwrite unresolved symlinks and hard links

2011-05-16 Thread Scott Leerssen

New submission from Scott Leerssen :

I'm opening this as a continuation of issue10761 since it was closed as fixed, 
and there's a bit more work to do there.

The fix for issue10761 was incomplete.  It did not handle the case where the 
symlink being overwritten did not resolve to another file (i.e. a "broken" 
link).  It also did not address the same issues with hard links.

The comments starting at http://bugs.python.org/issue10761#msg135924 detail the 
updates needed to complete this fix.

--
components: Library (Lib)
messages: 136091
nosy: Scott.Leerssen
priority: normal
severity: normal
status: open
title: tarfile.extractall fails to overwrite unresolved symlinks and hard links
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2011-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Thus,
> Connection.recv_bytes() will be called:
> 
> def _recv_bytes(self, maxsize=None):
> buf = self._recv(4)
> size, = struct.unpack("=i", buf.getvalue())
> if maxsize is not None and size > maxsize:
> return None
> return self._recv(size)
> 
> The first _recv() will succeed, since the length is in the Pipe.
> The second one, however, will remain stuck on the read from the
> pipe/unix socket, because there's no more data.
> This can be reproduced easily by adding a short sleep right after the
> sending of the length of the buffer inside send_bytes(), and then
> sending a SIGKILL to a worker process.

That's true. We would need to insert a select() before each raw read().

--

___
Python tracker 

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



[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I think that threading._get_ident() is more reliable than
> threading.current_thread().ident because Thread.ident can be None in
> some cases.

In which case can it be None?

--

___
Python tracker 

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



[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

The threading API changed in Python 3 with the PEP 3108, especially and issue 
#2875. Extract of the PEP:

"thread [done]

 * People should use 'threading' instead.
   * Rename 'thread' to _thread.
   * Deprecate dummy_thread and rename _dummy_thread.
   * Move thread.get_ident over to threading.
 * Guido has previously supported the deprecation [13]."

The issue was closed by the commit [7fe3a8648ce2], "Issue #2875: Rename thread 
to _thread and dummy_thread to _dummy_thread."

--
nosy: +brett.cannon, georg.brandl

___
Python tracker 

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



[issue12040] Expose a Process.sentinel property (and fix polling loop in Process.join())

2011-05-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Just a detail, but with the last version, select is retried with the
> full timeout (note that the signal you're the most likely to receive
> is SIGCHLD and since it's ignored by default it won't cause EINTR, so
> this shouldn't happen too often).

Indeed, it is. In practice we don't see anyone complaining about EINTR
issues, so I guess it's quite rare anyway.

> By the way, it's not the first time EINTR-issues pop up: would it be
> possible/worth it/interesting to expose this kind of wrapper somewhere
> (even as a private API), or a context manager ?

Yes, but where?

--

___
Python tracker 

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



[issue12028] threading._get_ident(): remove it in the doc and make it public

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

@pitrou: What do you think Antoine?

--
nosy: +pitrou

___
Python tracker 

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



[issue12081] Remove distributed copy of libffi

2011-05-16 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12075] python3.2 memory leak when setting integer key in dictionary

2011-05-16 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue12087] install_egg_info fails with UnicodeEncodeError depending on locale

2011-05-16 Thread STINNER Victor

STINNER Victor  added the comment:

install_egg_info.run() uses f = open(target, 'w') to create the .egg-info file 
and so the file uses the locale encoding. I don't know which module/program 
reads the file, so I don't know if the "locale encoding" is a good choice.

--
nosy: +haypo

___
Python tracker 

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



[issue12087] install_egg_info fails with UnicodeEncodeError depending on locale

2011-05-16 Thread Hagen Fürstenau

New submission from Hagen Fürstenau :

With issue 10419 fixed, I've run into the next distutils unicode bug: The 
command "install_egg_info" doesn't specify an encoding when opening the 
".egg-info" file for writing. Depending on the locale, this may result in 
something like the following:

$ python setup.py install
[...]
Traceback (most recent call last):
  File "setup.py", line 67, in 
main()
  File "setup.py", line 62, in main
cmdclass={"test":TestCommand},
  File "/home/hagen/src/python/Lib/distutils/core.py", line 149, in setup
dist.run_commands()
  File "/home/hagen/src/python/Lib/distutils/dist.py", line 919, in run_commands
self.run_command(cmd)
  File "/home/hagen/src/python/Lib/distutils/dist.py", line 938, in run_command
cmd_obj.run()
  File "/home/hagen/src/python/Lib/distutils/command/install.py", line 583, in 
run
self.run_command(cmd_name)
  File "/home/hagen/src/python/Lib/distutils/cmd.py", line 315, in run_command
self.distribution.run_command(command)
  File "/home/hagen/src/python/Lib/distutils/dist.py", line 938, in run_command
cmd_obj.run()
  File "/home/hagen/src/python/Lib/distutils/command/install_egg_info.py", line 
44, in run
self.distribution.metadata.write_pkg_file(f)
  File "/home/hagen/src/python/Lib/distutils/dist.py", line 1033, in 
write_pkg_file
file.write('Author: %s\n' % self.get_contact() )
UnicodeEncodeError: 'ascii' codec can't encode character '\xfc' in position 15: 
ordinal not in range(128)


I guess some encoding (UTF-8?) should be specified in the "run" method of 
"install_egg_info".

--
assignee: tarek
components: Distutils
messages: 136084
nosy: eric.araujo, hagen, tarek
priority: normal
severity: normal
status: open
title: install_egg_info fails with UnicodeEncodeError depending on locale
type: crash
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Nick Coghlan

Nick Coghlan  added the comment:

The challenge with C functions is that this becomes *additional* metadata that 
somehow needs to be provided to the method and function creation process. None 
of our APIs are set up to accept that information (and obviously no code is set 
up to provide it, either).

What might be nice is a way to graft the signature information from a Python 
implementation onto a C implementation (which would be quite straightforward 
given PEP 362 and a writable __signature__ slot in the C objects).

The other virtue of this approach is that the Python metadata will be testable, 
so it doesn't run the same risk of getting out of date that manually maintained 
metadata at the C level does. It would work naturally for C acceleration 
modules, and wouldn't be any more effort to add for pure C code than direct 
annotations at the C level would be.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue9938] Documentation for argparse interactive use

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

FWIW unittest had a similar issue and it's been solved adding an 'exit' 
argument to unittest.main() [0].

I think using an attribute here might be fine.
The patch contains some trailing whitespace that should be removed, also it 
might be enough to name the attribute "exit_on_error".
It should also include tests to check that the attribute is set with the 
correct default value and that it doesn't raise SystemExit when the attribute 
is False.

[0]: http://docs.python.org/library/unittest.html#unittest.main

--
nosy: +ezio.melotti
versions: +Python 3.3

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Michael Foord

Michael Foord  added the comment:

Sorry, *could* fix / obsolete this issue. i.e. builtin functions / methods 
could support pep 362 - the reference implementation is in pure python and 
doesn't work for C functions.

--

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Michael Foord

Michael Foord  added the comment:

If PEP 362 is implemented it would either fix or obsolete this issue:

http://www.python.org/dev/peps/pep-0362/

--

___
Python tracker 

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



[issue12038] assertEqual doesn't display newline differences quite well

2011-05-16 Thread Michael Foord

Michael Foord  added the comment:

Yep, ensuring the truncated repr includes at least the *first* difference 
sounds like the right approach.

--
assignee:  -> michael.foord

___
Python tracker 

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



[issue1748064] inspect.getargspec fails on built-in or slot wrapper methods

2011-05-16 Thread Michael Foord

Changes by Michael Foord :


--
nosy: +michael.foord

___
Python tracker 

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



[issue12077] Harmonizing descriptor protocol documentation

2011-05-16 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue6715] xz compressor support

2011-05-16 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Also, if I'm reading the documentation correctly, there isn't any
support for incremental in-memory coding, so it wouldn't be possible
to implement classes analogous to BZ2Compressor/BZ2Decompressor.

--
assignee:  -> nadeem.vawda

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Łukasz Langa

Łukasz Langa  added the comment:

I'd like to see that section gone altogether. The tutorial is designed to be 
the first point of contact with the language. In that context name mangling is 
an obscure detail with an unlikely use case.

If anything, the tutorial should simply state that private variables are by 
convention prepended with a single underscore. Maybe there's place for a 
separate short article which would nicely explain the philosophy behind the 
lack of an enforcing `private` modifier. The "we're all consenting adults here" 
stuff.

Agreed with Ezio that "private" is in itself a poor name for what underscore 
(regardless whether a single one or two) really means.

--

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Ezio Melotti

Ezio Melotti  added the comment:

I think the main problem here is that they are called "private" and people 
coming from other languages assume that the double underscore is the Python way 
to mark variables as private, whereas the appearance of being private is just a 
side effect of the name mangling.

This part should IMHO focus on the name mangling, explaining what it is and 
what it's useful for, and mention clearly that this doesn't really make the 
variable "private", because it can still be accessed through the mangled name.

The section could also mention that the word "private" here doesn't mean the 
same thing as in other language.

I don't know if the "trust the programmer" philosophy found in Python is 
explained somewhere in the doc, but if not it could be added to the tutorial or 
the FAQ.

--
nosy: +ezio.melotti, rhettinger

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Radomir Dopieralski

Radomir Dopieralski  added the comment:

"In the unlikely case that you specifically need to avoid name clashes with 
subclasses, there is limited support..." ;)

--

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Tim Golden

Tim Golden  added the comment:

But at the least, the start of the para might be slightly reworded to something 
like: "If you specifically need to avoid name clashes with subclasses, there is 
limited support..." which avoids the phrase "Since there is a valid use-case 
for class-private members".

--
nosy: +tim.golden

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Georg Brandl

Georg Brandl  added the comment:

No warnings, please.  See 
http://docs.python.org/documenting/style.html#affirmative-tone and related 
sections.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee: docs@python -> lukasz.langa
nosy: +lukasz.langa
stage:  -> needs patch
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12086] Tutorial doesn't discourage name mangling

2011-05-16 Thread Radomir Dopieralski

New submission from Radomir Dopieralski :

In the tutorial, at 
http://docs.python.org/tutorial/classes.html#private-variables you can read:


9.6. Private Variables
“Private” instance variables that cannot be accessed except from inside an 
object don’t exist in Python. However, there is a convention that is followed 
by most Python code: a name prefixed with an underscore (e.g. _spam) should be 
treated as a non-public part of the API (whether it is a function, a method or 
a data member). It should be considered an implementation detail and subject to 
change without notice.

Since there is a valid use-case for class-private members (namely to avoid name 
clashes of names with names defined by subclasses), there is limited support 
for such a mechanism, called name mangling. Any identifier of the form __spam 
(at least two leading underscores, at most one trailing underscore) is 
textually replaced with _classname__spam, where classname is the current class 
name with leading underscore(s) stripped. This mangling is done without regard 
to the syntactic position of the identifier, as long as it occurs within the 
definition of a class.

Note that the mangling rules are designed mostly to avoid accidents; it still 
is possible to access or modify a variable that is considered private. This can 
even be useful in special circumstances, such as in the debugger.

[...]


I think that this section doesn't stress enough how special the "__foo" syntax 
is and how rarely it should be used. If I was a programmer coming from Java to 
Python, I would start using "__foo" everywhere after reading this. I actually 
receive code written like that from programmers new to Python, and they point 
to that section of documentation when I ask why they did it.

At minimum, I'd add a paragraph that warns about how name mangling makes the 
code hard to reuse, difficult to test and unpleasant to debug.

--
assignee: docs@python
components: Documentation
messages: 136072
nosy: docs@python, sheep
priority: normal
severity: normal
status: open
title: Tutorial doesn't discourage name mangling
type: feature request
versions: Python 2.7

___
Python tracker 

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



[issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found

2011-05-16 Thread dario frascatani

dario frascatani  added the comment:

I have some problem to compile python source code to my server, I can't install 
make.
My problem is only when import the smtplib.

--

___
Python tracker 

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



[issue6715] xz compressor support

2011-05-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> maybe it'd be better to add support for libarchive

That wouldn't be better. We want the C dependency as small
and low-level as possible, so that the dependency is small
and the functionality flexible to implement stuff in Python
on top of it.

--

___
Python tracker 

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