[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

The status quo works. Proposals to change it on theoretical grounds have a 
significantly higher bar to meet than proposals to simply document it clearly.

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Thu, Apr 28, 2011 at 3:01 AM, Nick Coghlan  wrote:
..
> The status quo works.

No it does not. I am yet to see a Python program that uses
non-reflexivity of NaN in a meaningful way.  What I've seen was either
programmers ignore it and write slightly buggy programs ("slightly"
because it is actually hard to produce a NaN in Python code) or they
add extra code to filter out NaN values before numbers are compared.

> Proposals to change it on theoretical grounds have a significantly higher bar 
> to meet than proposals
> to simply document it clearly.

Documenting the status quo is necessary for any proposal to change.

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

By "works" I merely meant that you can currently achieve both of the following:

1. Write fully conformant implementations of IEEE754 floating point types, 
including the non-reflexive NaN comparisons (keeping in mind that, as a 
value-based specification, "same payload" is the closest IEEE754 can get to 
"same object")

2. Explicitly force reflexivity when you need it, either by filtering out 
nonconformant values, or by checking identity before checking equality.

The "pure" equality-tests-are-always-reflexive approach advocated by Meyer 
rules out option 1. Given that one of the use cases for Python is to prototype 
algorithms that are later translated to C or C++, formally disallowing that use 
case would be problematic.

--

___
Python tracker 

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



[issue10761] tarfile.extractall fails to overwrite symlinks

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0c8bc3a0130a by Senthil Kumaran in branch '2.7':
Fix closes  issue10761: tarfile.extractall failure  when symlinked files are 
present.
http://hg.python.org/cpython/rev/0c8bc3a0130a

--
nosy: +python-dev
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



[issue10761] tarfile.extractall fails to overwrite symlinks

2011-04-28 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I had tried/tested against 3.x branch and did not find the problem. Later 
realized that it was only again 2.7. Pushed in the changes and the tests. I 
shall the tests only in 3.x codeline.

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Glenn Linderman

Glenn Linderman  added the comment:

Nick says (and later explains better what he meant): 
The status quo works. Proposals to change it on theoretical grounds have a 
significantly higher bar to meet than proposals to simply document it clearly.

I say:
What the status quo doesn't provide is containers that "work".  In this case 
what I mean by "work" is that equality of containers is based on value, and 
value comparisons, and accept and embrace non-reflexive equality.  It might be 
possible to implement alternate containers with these characteristics, but that 
requires significantly more effort than simply filtering values.

Nonetheless, I totally agree with msg134654, and agree that properly 
documenting the present implementation would be a great service to users of the 
present implementation.

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Thu, Apr 28, 2011 at 3:26 AM, Nick Coghlan  wrote:
..
> 1. Write fully conformant implementations of IEEE754 floating point types, 
> including the non-reflexive NaN comparisons
> (keeping in mind that, as a value-based specification, "same payload" is the 
> closest IEEE754 can get to "same object")
>

If being "fully conformant" with various IEEE standards was a design
goal for Python, we would have leap seconds in the datetime module.
:-)

Python builtin float equality being reflexive does not in any way
inhibits anyone's ability to *write* a fully conforming
implementation.  In fact, if we ever get arithmetic operations
implemented for ctypes types, I would argue that c_double comparison
of c_double values would need to be changed to match C behavior.  (I
am +0 on changing that even without implementing arithmetics.)

I realize, however that by "status quo" you mean container operations
not calling __eq__ on identical objects.  I agree that this should not
change.  Making float comparison reflexive will actually make this
feature less controversial.

--

___
Python tracker 

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



[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-04-28 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Éric Araujo wrote:
> 
> Éric Araujo  added the comment:
> 
> I’m not sure how I feel about using surrogateescape.  The distutils source is 
> very similar across 2.7, 3.1, 3.2 and default, especially after the Great 
> Revert and freeze last year to restore buggy-but-known behavior while the 
> distutils2 project was created and allowed to fix things and break stuff.  
> Haypo added a fix using surrogateescape in 3.2, so it couldn’t be backported 
> to all stable branches.  You may say that at least it was fixed in one 
> version, which is something good.  I don’t know if I’d prefer to apply the 
> patch (if a test is provided) or to raise an exception instead of silently 
> changing behavior.

I think this patch should be applied to all 3.x versions, since
all of them are affected by the same problem: reading a file with
unknown encoding, adding a shebang and writing it back again.

Python shouldn't really care about the script file's encoding and
since the "surrogateescape" error handler is the only way to
more or less cleanly get around the problem, I'm +1 on adding the
patch to the 3.x series.

I don't think this is needed for 2.7, since Python 2.x's open()
doesn't care about the file encoding anyway.

--
nosy: +lemburg
title: distutils command build_scripts fails with UnicodeDecodeError -> 
distutils command build_scripts fails with  UnicodeDecodeError

___
Python tracker 

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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 57c076ab4bbd by Łukasz Langa in branch '3.2':
Closes #11858: configparser.ExtendedInterpolation and section case.
http://hg.python.org/cpython/rev/57c076ab4bbd

--
nosy: +python-dev
resolution:  -> fixed
stage: test needed -> 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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2afaef6cda8a by Łukasz Langa in branch 'default':
Merged solution for #11858 from 3.2.
http://hg.python.org/cpython/rev/2afaef6cda8a

--

___
Python tracker 

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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-28 Thread Łukasz Langa

Łukasz Langa  added the comment:

Pink, please give your name so I can include you in Misc/ACKS.

--

___
Python tracker 

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



[issue11944] Function call with * and generator hide exception raised by generator.

2011-04-28 Thread Jeong-Min Lee

Jeong-Min Lee  added the comment:

Some exceptions are reported correctly.


>>> def g():
... 1 / 0
... yield 1, 2
... yield 3, 4
... 
>>> zip(*g())
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2, in g
ZeroDivisionError: integer division or modulo by zero



>>> def g():
... [][0]
... yield 1, 2
... yield 3, 4
... 
>>> zip(*g())
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 2, in g
IndexError: list index out of range

--

___
Python tracker 

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1bbda00bbe78 by Łukasz Langa in branch '3.2':
Style updates for the #11670 solution after post-commit review by Ezio Melotti:
http://hg.python.org/cpython/rev/1bbda00bbe78

New changeset 339cd1d9b21a by Łukasz Langa in branch 'default':
Merged styling updates for #11670 from 3.2.
http://hg.python.org/cpython/rev/339cd1d9b21a

--

___
Python tracker 

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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-28 Thread Pink

Pink  added the comment:

Oh, all right :)
My name is Yuxiao Zeng.

2011/4/28 Łukasz Langa :
>
> Łukasz Langa  added the comment:
>
> Pink, please give your name so I can include you in Misc/ACKS.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue11332] Increase logging/__init__.py coverage to 97%

2011-04-28 Thread Vinay Sajip

Vinay Sajip  added the comment:

Though I did not use this patch verbatim, thank you, Oliver, for the impetus to 
improve coverage. Now, coverage of the logging package is:

logging/__init__.py 99% (97%)
logging/config.py 89% (85%)
logging/handlers.py 65% (60%)

where the brackets include branch coverage measurements. Not too shabby, so 
I'll close this issue now: I think future coverage increases will need to focus 
on the handlers.

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



[issue11862] urlparse.ParseResult to have meaningful __str__

2011-04-28 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Éric, ParseResult is a class which provides tuple for urlparse/unparse. People 
should hardly (/never) use ParseResult directly. The original poster's concern 
was to get something like geturl() from this class which  was not suitable and 
it should be obtained by other meaningful methods.

--

___
Python tracker 

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



[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-28 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Sijin, please go ahead and submit a patch. No one is working on this at the 
moment.

--
nosy: +markm

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-28 Thread Éric Araujo

Éric Araujo  added the comment:

Out of curiosity: Any reason you used a containment test with a list instead of 
a set (IMO more idiomatic, and in 3.2+ also optimized)?  I guess it’s to match 
the rest of the file, but using sets would not change any behavior.

--

___
Python tracker 

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



[issue11457] Expose nanosecond precision from system calls

2011-04-28 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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

Good question. I considered using sets but then decided to use lists because 
they don't get rid of duplicates and would make the test fail in the (indeed 
unlikely) case that a keyword gets added twice (that's actually not possible in 
Test.keywords because it's a dict, but keyword.kwlist is a list and the 
implementation of either one could change at some point).
In any case it probably doesn't make much difference -- I just preferred to err 
on the safe side.

--

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-28 Thread Éric Araujo

Éric Araujo  added the comment:

I was too vague.  I referred only to “if something in ['True', 'False', 
'None']” in pydoc.py

--

___
Python tracker 

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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-04-28 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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-04-28 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy: +orsenthil

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

New submission from Jason Vas Dias :

After building from source in Python-2.7.1.tar.bz2 ,
I get this 'make test' failure :

test_commands
test test_commands failed -- Traceback (most recent call last): 
  File "/usr/src/Python-2.7/Lib/test/test_commands.py", line 61, in 
test_getstatus
self.assertTrue(re.match(pat, commands.getstatus("/."),re.VERBOSE)) 
AssertionError: None is not True

I don't get this error when building from Python-2.7.tar.bz2

--
components: Tests
messages: 134674
nosy: Jason.Vas.Dias
priority: normal
severity: normal
status: open
title: 2.7.1 'test_commands' build test fails
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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-04-28 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

The idea seems interesting. I will check the RFC ASAP. The patch should include 
documentation updates, though. You can update the issue number in the NEWS 
file, also.

Do you plan to complete the sections marked as "TODO"? 

PS: The mercurial repository URL you are linking has an unnedeed username, and 
firefox complains about it.

--

___
Python tracker 

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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-04-28 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Also, I will not invest too much time on this until OpenSSL 1.0.1 is released, 
with support for this.

--

___
Python tracker 

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



[issue11858] configparser.ExtendedInterpolation and section case

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 17b4378689e6 by Łukasz Langa in branch '3.2':
Added Yuxiao Zeng for finding and resolving #11858. Thanks!
http://hg.python.org/cpython/rev/17b4378689e6

--

___
Python tracker 

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



[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-04-28 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Alternatively it's possible to use binary mode. I'm attaching the patch, which 
shows this possibility.

--
title: distutils command build_scripts fails with   UnicodeDecodeError -> 
distutils command build_scripts fails with UnicodeDecodeError
Added file: http://bugs.python.org/file21821/build_scripts-binary_mode.patch

___
Python tracker 

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



[issue11941] Support st_atim, st_mtim and st_ctim attributes in os.stat_result

2011-04-28 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Actually issue #11941 should be a dependency of issue #11457. Issue #11941 is 
only about os.stat(), while issue #11457 proposes changes also in other places 
(e.g. tarfile module).

--

___
Python tracker 

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



[issue11397] os.path.realpath() may produce incorrect results

2011-04-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Removed file: http://bugs.python.org/file21820/issue11397_py32_2.patch

___
Python tracker 

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



[issue11397] os.path.realpath() may produce incorrect results

2011-04-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Added file: http://bugs.python.org/file21822/issue11397_py32_2.patch

___
Python tracker 

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



[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-04-28 Thread Éric Araujo

Éric Araujo  added the comment:

Was the patch tested in 2.7 only?  I think the first_line_re needs to be 
changed to bytes too.  (3.x would have disallowed mixing bytes and str for a 
regex.)

--

___
Python tracker 

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



[issue10419] distutils command build_scripts fails with UnicodeDecodeError

2011-04-28 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Which patch do you mean?
(My patch already changes first_line_re to bytes. My patch was tested only with 
3.2. Lib/distutils/command/build_scripts.py is currently identical in 3.1, 3.2 
and 3.3.)

--

___
Python tracker 

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



[issue11324] ConfigParser(interpolation=None) doesn't work

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 32031e33d793 by Łukasz Langa in branch '3.2':
Closes #11324: ConfigParser(interpolation=None) doesn't work.
http://hg.python.org/cpython/rev/32031e33d793

New changeset de7dc59260b1 by Łukasz Langa in branch 'default':
Merged solution for #11324 from 3.2.
http://hg.python.org/cpython/rev/de7dc59260b1

--
nosy: +python-dev
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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Oops, bash  completion was a bit over-eager, and I inadvertently
built /usr/src/Python-2.7 instead  of /usr/src/Python-2.7.1 .

Nevertheless, when I finally do build Python-2.7.1, I get the same 
error :

test_commands   

test test_commands failed -- Traceback (most recent call last): 

  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 61, in 
test_getstatus  
  
self.assertTrue(re.match(pat, commands.getstatus("/."), re.VERBOSE))

AssertionError: None is not True



I guess if python-2.7 cannot run command I'd know about it, and
it has the same bug.

I guess you ship a broken 'test_commands' test script for Python-2.7
AND Python-2.7.1 .

This does not increase my already meager confidence in Python's 
robustness and reliability.

--

___
Python tracker 

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



[issue11397] os.path.realpath() may produce incorrect results

2011-04-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Added file: http://bugs.python.org/file21823/issue11397_py27_2.patch

___
Python tracker 

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



[issue11397] os.path.realpath() may produce incorrect results

2011-04-28 Thread Santoso Wijaya

Changes by Santoso Wijaya :


Added file: http://bugs.python.org/file21824/issue11397_py31_2.patch

___
Python tracker 

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



[issue11943] Add TLS-SRP (RFC 5054) support to ssl, _ssl, http, and urllib

2011-04-28 Thread Quinn Slack

Quinn Slack  added the comment:

Thanks for checking this out. Yes, this should wait for OpenSSL 1.0.1.

I will fix the TODO. It is there because the current TLS-SRP patch to OpenSSL 
uses old (pre-RFC 5054) TLS alert values for when the SRP username isn't in the 
Client Hello. I'm preparing another patch to OpenSSL to fix these, and then 
I'll update this patch.

I'll also include docs.

--

___
Python tracker 

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



[issue11786] ConfigParser.[Raw]ConfigParser optionxform()

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c7ce67c9237a by Łukasz Langa in branch '2.6':
Closes #11786: ConfigParser.[Raw]ConfigParser optionxform().
http://hg.python.org/cpython/rev/c7ce67c9237a

New changeset a6b772599594 by Łukasz Langa in branch '2.7':
Merged solution for #11786 from 2.6
http://hg.python.org/cpython/rev/a6b772599594

--
nosy: +python-dev
resolution: accepted -> 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



[issue11786] ConfigParser.[Raw]ConfigParser optionxform()

2011-04-28 Thread Łukasz Langa

Changes by Łukasz Langa :


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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

We don't ship unless all tests pass on all of our test platforms (and we have 
quite a few).  If you look at that test it says the regex "should match 'ls -ld 
/.' on any posix system, however perversely configured".  Perhaps your system 
has managed a new brand of perversity :)

Seriously, though, it looks like the test is broken in the face of some edge 
case present on your system and not on any of our test machines.  Can you 
provide the output of 'ls -ld /.' from your system please?  And also your OS 
and filesystem types and versions.

--
nosy: +r.david.murray
type:  -> behavior

___
Python tracker 

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



[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2011-04-28 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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

$ uname -a
Linux jvdspc 2.6.38.2-jvd #1 SMP Sun Apr 3 00:55:29 BST 2011 x86_64 GNU/Linux
$ ls -ld /
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /
$ ls --version
ls (GNU coreutils) 8.10
...
$ eval {gcc,g++,cpp,ld,as,ar,ranlib,objdump,objcopy,make,bash,ldconfig}' 
--version;' | egrep '[(]G|bash'
gcc (GCC) 4.6.0
g++ (GCC) 4.6.0
cpp (GCC) 4.6.0
GNU ld (GNU Binutils) 2.21.51.20110407
GNU assembler (GNU Binutils) 2.21.51.20110407
GNU ar (GNU Binutils) 2.21.51.20110407
GNU ranlib (GNU Binutils) 2.21.51.20110407
GNU objdump (GNU Binutils) 2.21.51.20110407
GNU objcopy (GNU Binutils) 2.21.51.20110407
GNU bash, version 4.2.8(2)-release (x86_64-pc-linux-gnu)
ldconfig (GNU libc) 2.13

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

$ ldd /usr/bin/python
linux-vdso.so.1 =>  (0x7fff1edff000)
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 
(0x7f16aa8c)
libpthread.so.0 => /usr/lib64/libpthread.so.0 (0x7f16aa6a3000)
libdl.so.2 => /usr/lib64/libdl.so.2 (0x7f16aa49f000)
libutil.so.1 => /lib64/libutil.so.1 (0x7f16aa29c000)
libm.so.6 => /lib64/libm.so.6 (0x7f16aa01a000)
libc.so.6 => /lib64/libc.so.6 (0x7f16a9c92000)
/lib64/ld-linux-x86-64.so.2 (0x7f16aac9)

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

$ ls -ld /.
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.

(oops, forgot the '.' suffix before)

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

The re matches for me if I call it manually with your ls -ld output.

What output do you get if you do a 'print commands.getstatus("/.")' using your 
build of the python interpreter?

By the way, this is a deprecated function under test here, so I'm setting this 
bug to low priority.  But I'm certainly curious as to what the problem is.

--
priority: normal -> low

___
Python tracker 

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



[issue11941] Support st_atim, st_mtim and st_ctim attributes in os.stat_result

2011-04-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Ok, that's true, reopening.

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

___
Python tracker 

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



[issue7517] freeze.py not ported to python3

2011-04-28 Thread Marc Sibson

Marc Sibson  added the comment:

I think the original issue has been fixed by 
http://hg.python.org/cpython/rev/fd20eba1f201. 

freeze.py is now broken due to pep3149 and ABIFLAGS, 
freeze-pep3149-compat.patch adds awareness of ABIFLAGS to 
Tools/freeze/freeze.py.

For me "python3.3 freeze.py hello.py && make && ./hello" now works.

--
keywords: +patch
nosy: +marcs
Added file: http://bugs.python.org/file21825/freeze-pep3149-compat.patch

___
Python tracker 

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



[issue11457] Expose nanosecond precision from system calls

2011-04-28 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
dependencies: +Support st_atim, st_mtim and st_ctim attributes in os.stat_result

___
Python tracker 

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



[issue7517] freeze.py not ported to python3

2011-04-28 Thread Andreas Stührk

Andreas Stührk  added the comment:

Note that I also opened issue #11824 for the abiflags problem.

--
nosy: +Trundle

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Seeing the source , I see some complicated RE - should this test
maybe be better off in the RE testing module ?

I'd have used a simple RE like '^.*(\/.*)$' .

Might my newly built & installed pcre-8.02 be a suspect here ?

Here is an strace of the installed python  2.7 (not 2.7.1!)
failing with test_commands.py :

$ strace -s8192 -f -e trace=execve python 
/usr/src/Python-2.7.1/Lib/test/test_commands.py
execve("/usr/bin/python", ["python", 
"/usr/src/Python-2.7.1/Lib/test/test_commands.py"], [/* 23 vars */]) = 0
test_getoutput (__main__.CommandTests) ... syscall_293(0x7fffa0d6a400, 0x8, 
0x7f4029a834dd, 0x7fffa0d6a200, 0x7f4029abf700, 0x100, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0   

 
Process 30803 attached  

  
[pid 30803] execve("/bin/sh", ["sh", "-c", "{ echo xyzzy; } 2>&1"], [/* 23 vars 
*/]) = 0
  
Process 30803 detached  

  
--- SIGCHLD (Child exited) @ 0 (0) ---  

  
syscall_293(0x7fffa0d6a550, 0x8, 0x7f4029a834dd, 0, 0x7f4029abf700, 0x100, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 
0  
Process 30804 attached  

  
[pid 30804] execve("/bin/sh", ["sh", "-c", "{ echo xyzzy; } 2>&1"], [/* 23 vars 
*/]) = 0
  
Process 30804 detached  

  
--- SIGCHLD (Child exited) @ 0 (0) ---  

  
syscall_293(0x7fffa0d6a550, 0x8, 0x7f4029a834dd, 0, 0x7f4029abf700, 0x100, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 
0  
Process 30805 attached  

  
[pid 30805] execve("/bin/sh", ["sh", "-c", "{ cat /tmp/tmpZ2sqbO/foo; } 2>&1"], 
[/* 23 vars */]) = 0
  
Process 30806 attached  

  
[pid 30806] execve("/bin/cat", ["cat", "/tmp/tmpZ2sqbO/foo"], [/* 21 vars */]) 
= 0 
   
Process 30805 suspended 

  
Process 30805 resumed   

  
Process 30806 detached
[pid 30805] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 30805 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
ok
test_getstatus (__main__.CommandTests) ... syscall_293(0x7fffa0d6a2b0, 0x8, 
0x7f4029a834dd, 0, 0x7f4029abf700, 0x100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) = 0
Process 30807 attached
[pid 30807] execve("/bin/sh", ["sh", "-c", "{ ls -ld \'/.\'; } 2>&1"], [/* 23 
vars */]) = 0
Process 30808 attached
Process 30807 suspended
[pid 30808] execve("/bin/ls", ["ls", "-ld", "/."], [/* 21 vars */]) = 0
Process 30807 resumed
Process 30808 detached
[pid 30807] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 30807 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
FAIL

==
FAIL: test_getstatus (__main__.CommandTests)
--
Traceback (most recent call last):
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 61, in 
test_getstatus
self.assertTrue(re.match(pat, commands.getstatus("/."), re.VERBOSE))
AssertionError: None is not True

--
Ran 2 tests in 0.202s

FAILED (failures=1)
Traceback (most recent call last):
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 70, in 
test_main()
  File 

[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Hmm.. investigating that "syscall_293..." stuff - I did 
  $ cd /usr/src/linux; make headers_install
and then built glibc-2.13 with the new header OK, but
strace is rather old . I'll rebuild strace ...

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

$ python
Python 2.7 (r27:82500, Jul  4 2010, 23:30:10)
[GCC 4.4.2 20090927 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import re
>>> import sys
>>> import commands
>>> print commands.getstatus("/.")
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.
>>>

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

new strace 4.6 of newly built python 2.7.1 failing test_commands.py

$ LD_LIBRARY_PATH=`pwd` LD_PRELINK=`pwd`/libpython2.7.so.1.0 strace -s8192 -f 
-e trace=execve ./python /usr/src/Python-2.7.1/Lib/test/test_commands.py
execve("./python", ["./python", 
"/usr/src/Python-2.7.1/Lib/test/test_commands.py"], [/* 25 vars */]) = 0
  
test_getoutput (__main__.CommandTests) ... Process 1327 attached
  
[pid  1327] execve("/bin/sh", ["sh", "-c", "{ echo xyzzy; } 2>&1"], [/* 25 vars 
*/]) = 0  
Process 1327 detached   
  
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1327, si_status=0, 
si_utime=0, si_stime=1} (Child exited) ---  
 
Process 1328 attached   
  
[pid  1328] execve("/bin/sh", ["sh", "-c", "{ echo xyzzy; } 2>&1"], [/* 25 vars 
*/]) = 0  
Process 1328 detached   
  
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1328, si_status=0, 
si_utime=0, si_stime=1} (Child exited) ---  
 
Process 1329 attached   
  
[pid  1329] execve("/bin/sh", ["sh", "-c", "{ cat /tmp/tmp2EkRJK/foo; } 2>&1"], 
[/* 25 vars */]) = 0  
Process 1330 attached   
  
Process 1329 suspended  
  
[pid  1330] execve("/bin/cat", ["cat", "/tmp/tmp2EkRJK/foo"], [/* 23 vars */]) 
= 0
Process 1329 resumed
Process 1330 detached
[pid  1329] --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1330, 
si_status=1, si_utime=0, si_stime=0} (Child exited) ---
Process 1329 detached
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1329, si_status=1, 
si_utime=0, si_stime=1} (Child exited) ---
ok
test_getstatus (__main__.CommandTests) ... Process 1338 attached
[pid  1338] execve("/bin/sh", ["sh", "-c", "{ ls -ld '/.'; } 2>&1"], [/* 25 
vars */]) = 0
Process 1339 attached
Process 1338 suspended
[pid  1339] execve("/bin/ls", ["ls", "-ld", "/."], [/* 23 vars */]) = 0
Process 1338 resumed
Process 1339 detached
[pid  1338] --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1339, 
si_status=0, si_utime=0, si_stime=0} (Child exited) ---
Process 1338 detached
--- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1338, si_status=0, 
si_utime=0, si_stime=1} (Child exited) ---
FAIL

==
FAIL: test_getstatus (__main__.CommandTests)
--
Traceback (most recent call last):
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 61, in 
test_getstatus
self.assertTrue(re.match(pat, commands.getstatus("/."), re.VERBOSE))
AssertionError: None is not True

--
Ran 2 tests in 0.289s

FAILED (failures=1)
Traceback (most recent call last):
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 70, in 
test_main()
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 65, in test_main
run_unittest(CommandTests)
  File "/usr/src/Python-2.7.1/Lib/test/test_support.py", line 1087, in 
run_unittest
_run_suite(suite)
  File "/usr/src/Python-2.7.1/Lib/test/test_support.py", line 1070, in 
_run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "/usr/src/Python-2.7.1/Lib/test/test_commands.py", line 61, in 
test_getstatus
self.assertTrue(re.match(pat, commands.getstatus("/."), re.VERBOSE))
AssertionError: None is not True

So, now with strace-4.6, that syscall_293* is shown to be an old strace anomaly.

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Newly built python 2.7.1 commands.getstatus succeeds :

$ LD_LIBRARY_PATH=`pwd` LD_PRELINK=`pwd`/libpython2.7.so.1.0 ./python
Python 2.7.1 (r271:86832, Apr 28 2011, 15:53:47)
[GCC 4.6.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import re
>>> import sys
>>> import commands
>>> print commands.getstatus("/.")
drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.
>>>

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

Hmm.  This is very odd.  The output from getstatus is the same as your ls 
output, and that output passes the re.  Python has its own regular expression 
implementation, so your pcre version shouldn't have anything to do with it.

That complicated re, by the way, is trying to confirm that what comes back from 
getstatus is something that looks like the output of ls, so no, it can't really 
be simplified and still be testing getstatus.

It looks like something weird is going on inside the test machinery.  Are you 
willing to do a little Python hacking?  If I were seeing this error on my box 
I'd split up that assert statement.  Get the value of the getstatus call, print 
it out.  Then pass the output to the re, and print the result (which should be 
None, given that the test is failing).  If the getstatus output looks right at 
that point, then something very odd indeed is going on.

--

___
Python tracker 

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



[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Robert Meerman

New submission from Robert Meerman :

Regular expressions which are written match literal underscores ("_", ASCII 
ordinal 95) and specify `re.IGNORECASE` during compilation do not consistently 
match underscores: it seems some occurrences are matched, but others are not.

The following session log shows the problem:

Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> subject = "[Conclave-Mendoi]_ef_-_a_tale_of_memories_00-12_H264"
>>> print subject.encode("base64")  # Incase my environment encoding is to 
blame
W0NvbmNsYXZlLU1lbmRvaV1fZWZfLV9hX3RhbGVfb2ZfbWVtb3JpZXNfMDAtMTJfSDI2NA==

>>> re.sub("_", "X", subject)  # No flags, does what I expect
'[Conclave-Mendoi]XefX-XaXtaleXofXmemoriesX00-12XH264'
>>> 
>>> re.sub("_", "X", subject, re.IGNORECASE)  # Misses some matches
'[Conclave-Mendoi]XefX-_a_tale_of_memories_00-12_H264'
>>> 
>>> re.sub("_", "X", subject, re.IGNORECASE | re.LOCALE)  # Misses fewer 
matches
'[Conclave-Mendoi]XefX-XaXtaleXofXmemories_00-12_H264'
>>> 
>>> re.sub("_", "X", subject, re.IGNORECASE | re.LOCALE | re.UNICODE)  # 
Works OK
'[Conclave-Mendoi]XefX-XaXtaleXofXmemoriesX00-12XH264'
>>> 
>>> re.sub("_", "X", subject, re.IGNORECASE | re.UNICODE) # Works OK
'[Conclave-Mendoi]XefX-XaXtaleXofXmemoriesX00-12XH264'
>>> 
>>> type(subject)  # Don't think this is a unicode string

>>> 

Since my `subject` variable is of type `str` and only contains ASCII characters
I do not believe that the `re.UNICODE` flag should be required.

--
components: Regular Expressions
messages: 134700
nosy: RobM, effbot, ezio.melotti, pitrou
priority: normal
severity: normal
status: open
title: re.IGNORECASE does not match literal "_" (underscore)
type: behavior
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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

You are running selinux, right?  Have you checked for things in the log that 
might indicate selinux is blocking the ls call for some reason?

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Aha ! Fixed ! : patch :

[ root@jvdspc:/mnt/sda3/Python-2.7 18:02:22 1685:1178 ]
$ LD_LIBRARY_PATH=`pwd` LD_PRELINK=`pwd`/libpython2.7.so.1.0 ./python 
/tmp/test_commands.py
test_getoutput (__main__.CommandTests) ... ok
test_getstatus (__main__.CommandTests) ... ok

--
Ran 2 tests in 0.068s

OK
[ root@jvdspc:/mnt/sda3/Python-2.7 18:03:34 1686:1179 ]
$ diff -U0 /usr/src/Python-2.7/Lib/test/test_commands.py /tmp/test_commands.py
--- /usr/src/Python-2.7/Lib/test/test_commands.py   2010-03-31 
23:01:03.0 +0100
+++ /tmp/test_commands.py   2011-04-28 18:03:27.821395320 +0100
@@ -27,2 +27,2 @@
-self.assertEquals(commands.getoutput('echo xyzzy'), 'xyzzy')
-self.assertEquals(commands.getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
+self.assertEqual(commands.getoutput('echo xyzzy'), 'xyzzy')
+self.assertEqual(commands.getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
@@ -39 +39 @@
-self.assertNotEquals(status, 0)
+self.assertNotEqual(status, 0)
@@ -52,5 +52 @@
-pat = r'''d.   # It is a directory.
-  \+?  # It may have ACLs.
-  \s+\d+   # It has some number of links.
-  [^/]*# Skip user, group, size, and date.
-  /\.  # and end with the name of the file.
+pat = r'''^.*(\/\.)[\ ]*[\n\r]*$

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

oops, over-eager bash  again - 
I've certainly had one too many bash s today :-)
Here's the patch against 2.7.1's test_commands.py, not 2.7's :


[ root@jvdspc:/mnt/sda3/Python-2.7 18:04:15 1687:1180 ]
$ diff -U0 /usr/src/Python-2.7.1/Lib/test/test_commands.py /tmp/test_commands.py
--- /usr/src/Python-2.7.1/Lib/test/test_commands.py 2010-11-21 
13:34:58.0 +
+++ /tmp/test_commands.py   2011-04-28 18:03:27.821395320 +0100
@@ -52,5 +52 @@
-pat = r'''d.   # It is a directory.
-  \+?  # It may have ACLs.
-  \s+\d+   # It has some number of links.
-  [^/]*# Skip user, group, size, and date.
-  /\.  # and end with the name of the file.
+pat = r'''^.*(\/\.)[\ ]*[\n\r]*$
[ root@jvdspc:/mnt/sda3/Python-2.7 18:05:52 1688:1181 ]

--

___
Python tracker 

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



[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-04-28 Thread Sandro Tosi

New submission from Sandro Tosi :

Following up http://mail.python.org/pipermail/docs/2011-April/004029.html 
here's a small patch (applicable on all the active branches) to "actually" :) 
connects the two paragraphs about modules search path.

--
assignee: docs@python
components: Documentation
files: tutorial_modules_actually.patch
keywords: patch
messages: 134704
nosy: docs@python, sandro.tosi
priority: normal
severity: normal
stage: patch review
status: open
title: Tutorial/Modules - small fix to better clarify the modules search path
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21826/tutorial_modules_actually.patch

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Not sure if relevant, but ls is appending a ' ' (0x20 == space) after
the filename :

$ ls -ld -d /. | od -x
000 7264 7877 2d72 7278 782d 202e 3532 7220
020 6f6f 2074 6f72 746f 3420 3930 2036 7041
040 2072 3032 3120 3a35 3832 2f20 0a2e
056

See the ending "200a2e" - maybe there should not be an 0x20 there .
Should I raise a GNU coreutils 8.10 bug about this ?

--

___
Python tracker 

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



[issue11811] ssl.get_server_certificate() does not work for IPv6 addresses

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0518f32cb747 by Antoine Pitrou in branch 'default':
Issue #11811: Factor out detection of IPv6 support on the current host
http://hg.python.org/cpython/rev/0518f32cb747

New changeset d3166c359714 by Antoine Pitrou in branch 'default':
Issue #11811: ssl.get_server_certificate() is now IPv6-compatible.  Patch
http://hg.python.org/cpython/rev/d3166c359714

--
nosy: +python-dev

___
Python tracker 

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



[issue11811] ssl.get_server_certificate() does not work for IPv6 addresses

2011-04-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed, thank you!

--
resolution:  -> fixed
stage: needs patch -> 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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Changes by Jason Vas Dias :


--
keywords: +patch
Added file: http://bugs.python.org/file21827/bug_11946.patch

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Wow, GNU have respun two major releases of coreutils since I built
coreutils-2.10 two weeks ago !

Now moving to latest version of coreutils : 8.12 and retesting .

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

$ ls -dl /. | od -x
000 7264 7877 2d72 7278 782d 202e 3532 7220
020 6f6f 2074 6f72 746f 3420 3930 2036 7041
040 2072 3032 3120 3a35 3832 2f20 0a2e
056
[ root@jvdspc:/tmp 19:15:01 1730:1223 ]
$ ls --version
ls (GNU coreutils) 8.12


Either GNU coreutils 8.12 's ls is wrong to append a ' ', or 
test_commands.py is wrong not to be expecting it.

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

I would say that coreutils is wrong to be appending a space.  If a program were 
to parse the output of ls, it would reasonably expect the filename to be 
rendered exactly as it appears in the directory.  That is, a program should 
treat a trailing space as *part* of the filename, which it clearly isn't in 
this case.

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread R. David Murray

R. David Murray  added the comment:

By the way, I wouldn't expect most programs to ever notice that trailing space 
parsing -l output, but if it also attaches the trailing space in regular ls 
output, *that* I would expect more programs would trip over.

--

___
Python tracker 

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



[issue11944] Function call with * and generator hide exception raised by generator.

2011-04-28 Thread Daniel Urban

Daniel Urban  added the comment:

This may be the same/similar as issue4806 (which has a patch).

--
nosy: +durban

___
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-04-28 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

Rationale:

"""
IEEE 754 assigns values to all relational expressions involving NaN.
In the syntax of C, the predicate x != y is True but all others, x <
y , x <= y , x == y , x >= y and x > y, are False whenever x or y or
both are NaN, and then all but x != y and x == y are INVALID
operations too and must so signal.
"""
-- 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

The problem with faithfully implementing IEEE 754 in Python is that
exceptions in IEEE standard don't have the same meaning as in Python.
 IEEE 754 requires that a value is computed even when the operation
signals an exception.  The program can then decide whether to
terminate computation or propagate the value. In Python, we have to
choose between raising an exception and returning the value.  We
cannot have both.  It appears that in most cases IEEE 754 "INVALID"
exception is treated as a terminating exception by Python and
operations that signal INVALID in IEEE 754 raise an exception in
Python.  Therefore making <, >, etc. raise on NaN while keeping the
status quo for != and == would bring Python floats closer to
compliance with IEEE 754.

See http://mail.python.org/pipermail/python-ideas/2011-April/010057.html for 
discussion.

An instructive part of the patch is

--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -174,10 +174,22 @@
flags
   )
 
+def is_negative_zero(x):
+return x == 0 and math.copysign(1, x) < 0
+
+def almost_equal(value, expected):
+if math.isfinite(expected) and math.isfinite(value):
+return abs(value-expected) <= eps
+if math.isnan(expected):
+return math.isnan(value)
+if is_negative_zero(expected):
+return is_negative_zero(value)
+return value == expected
+
 class MathTests(unittest.TestCase):
 
 def ftest(self, name, value, expected):
-if abs(value-expected) > eps:
+if not almost_equal(value, expected):


Although it may look like proposed change makes it harder to compare floats for 
approximate equality, the change actually helped to highlight a programming 
mistake: old ftest() accepts 0.0 where -0.0 is expected.

This is a typical situation when someone attempts to write clever code relying 
on unusual properties of NaNs. In most cases clever code does not account for 
all possibilities and it is always hard reason about such code.

--
components: Interpreter Core
files: unorderable-nans.diff
keywords: patch
messages: 134713
nosy: belopolsky
priority: normal
severity: normal
status: open
title: Make float('nan') unorderable
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21828/unorderable-nans.diff

___
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-04-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Added file: http://bugs.python.org/file21829/unorderable-nans.diff

___
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-04-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file21828/unorderable-nans.diff

___
Python tracker 

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



[issue11950] logger use dict for loggers instead of WeakValueDictionary

2011-04-28 Thread Марк Коренберг

New submission from Марк Коренберг :

logger use dict for loggers instead of WeakValueDictionary

Now, when object returned by getLogger() gets unreferenced - it will not be 
garbage collected, as reference is stored in logging module. This will results 
in leaked file object, that cannot be closed in easy way. Some modules (notable 
yum) opens dozen of loggers that prevents me to unmount directory where logs 
placed. Now, I use workaround:

---
try:
# work with yum
finally:
yum_base_cli.close()
yum_base_cli.closeRpmDB()
yum_base_cli.doUnlock()
del yum_base_cli
# gc.collect() may be called here, but it does not actually change 
anything
for logger_name,logger in cli.logging.Logger.manager.loggerDict.iteritems():
if not logger_name.startswith('yum'):
continue
for h in logger.handlers:
h.flush()
h.close()
---
The problem in that logging module stores many references in lists and dicts. 
So just replacing {} with WeakValueDictionary() 
does not eliminate problem fully.

I have checked, problem exists in all python versions

--
components: Library (Lib)
messages: 134714
nosy: mmarkk
priority: normal
severity: normal
status: open
title: logger use dict for loggers instead of WeakValueDictionary
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

To repeat concisely what I said on pydev list, I think Reference 5.9. 
Comparisons, which says

"Tuples and lists are compared lexicographically using comparison of 
corresponding elements. This means that to compare equal, each element must 
compare equal and the two sequences must be of the same type and have the same 
length.".

needs 'be indentical or ' added before 'compare equal and ...'

"Mappings (dictionaries) compare equal if and only if they have the same (key, 
value) pairs."

may be ok, depending on how one interprets 'same (key, value) pairs'.

Alexander has opened a separate issue to change behavior in 3.3.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue4296] Python assumes identity implies equivalence; contradicts NaN

2011-04-28 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> fixed

___
Python tracker 

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



[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Matthew Barnett

Matthew Barnett  added the comment:

help(re.sub) says:

sub(pattern, repl, string, count=0)

and re.IGNORECASE has a value of 2.

Therefore this:

re.sub("_", "X", subject, re.IGNORECASE)

is telling it to replace at most 2 occurrences of "_".

--
nosy: +mrabarnett

___
Python tracker 

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



[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

Closing as invalid.
I wonder if it would be better to have count as a keyword-only argument though, 
since this problem seems to come up pretty often and it's not easy to debug.

--
resolution:  -> invalid
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



[issue11951] Mac OSX IDLE 3.2 does not allow entering text into toolbar windows (such as the help search box) unless all shells are closed or minimized

2011-04-28 Thread Brian Buckley

Changes by Brian Buckley :


--
components: IDLE
nosy: Brian.Buckley
priority: normal
severity: normal
status: open
title: Mac OSX IDLE 3.2 does not allow entering text into toolbar windows (such 
as the help search box) unless all shells are closed or minimized
type: feature request
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



[issue11951] Mac OSX IDLE 3.2 does not allow entering text into toolbar windows (such as the help search box) unless all shells are closed or minimized

2011-04-28 Thread Brian Buckley

New submission from Brian Buckley :

text enters directly to the window closest to the front rather than to the 
selected text box.

--
Added file: http://bugs.python.org/file21830/Screen shot 2011-04-28 at 5.07.07 
PM.png

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

Oops, Paul is right here - I asked bug-coreut...@gnu.org, and Paul
responds:

Re: bug#8578: 8.12 and 8.10 'ls -dl' appends ' ' (0x20: space) to file  output 
lines
From:  Paul Eggert   (UCLA Computer Science Department)
  To: jason.vas.d...@gmail.com
  CC: 8...@debbugs.gnu.org
Date: 2011-04-28 20:34
   
On 04/28/11 11:34, Jason Vas Dias wrote:

> $ ls -dl /. | od -cx
> ...
> 040   r   2   0   1   5   :   2   8   /   .  \n
>2072303231203a3538322f200a2e
> 056
> 
> Please could the ls developer let me know if it 100% POSIXLY correct
> that ls appends 0x20 to the filename '/.'  here ?

I don't see any space appended there.  The last four bytes of
output are 0x20, 0x2f, 0x2e, 0x0a (space, /, ., newline).
Perhaps you're misunderstanding the little-endian nature of
od -x output?


Yes, of course, when 'od' says ' 2f200a2e' it means it received:
  0x20 0x2f 0x2e 0x0a
sorry - I'm just trying to understand why your original RE fails -
it isn't because of the spaces !

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

I imagine lots of other python REs fail if this one is failing ? :

$ cat test.py

import os
import sys
import re

pat = r'''d.   # It is a directory.
  \+?  # It may have ACLs.
  \s+\d+   # It has some number of links.
  [^/]*# Skip user, group, size, and date.
  /\.  # and end with the name of the file.
   '''
str = 'drwxr-xr-x. 25 root root 4096 Apr 20 15:28 /.'
if re.match(pat, str, re.VERBOSE) :
   print "MATCHED\n"
else :
   print "DID NOT MATCH"

$ LD_LIBRARY_PATH=`pwd` LD_PRELINK=`pwd`/libpython2.7.so.1.0 ./python ./test.py
DID NOT MATCH

--

___
Python tracker 

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



[issue11948] Tutorial/Modules - small fix to better clarify the modules search path

2011-04-28 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

It would be better to drop the introductory phrase entirely.

--
nosy: +rhettinger
priority: normal -> low

___
Python tracker 

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



[issue11926] help("keywords") returns incomplete list of keywords

2011-04-28 Thread Ezio Melotti

Ezio Melotti  added the comment:

That's just because I'm used to Python 2 where the {} syntax for sets was not 
available.  I'll try to keep that in mind for the next time.

--

___
Python tracker 

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



[issue11947] re.IGNORECASE does not match literal "_" (underscore)

2011-04-28 Thread Matthew Barnett

Matthew Barnett  added the comment:

I don't know how much code that might break. It might not be that much; I can't 
remember when I last used re.sub without the default count.

--

___
Python tracker 

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



[issue11952] typo in multiprocessing documentation: __main__ method should be replaced by __main__ module

2011-04-28 Thread akira

New submission from akira <4kir4...@gmail.com>:

s/method/module/:

Functionality within this package requires that the ``__main__`` method be
importable by the children.

--
assignee: docs@python
components: Documentation
messages: 134724
nosy: akira, docs@python
priority: normal
severity: normal
status: open
title: typo in multiprocessing documentation: __main__ method should be 
replaced by __main__ module
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue11953] Missing WSA* error codes

2011-04-28 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Apparently not all Windows socket error codes (see 
http://msdn.microsoft.com/en-us/library/ms740668%28v=vs.85%29.aspx) are mapped 
in the errno module.

For example, a buildbot recently got a 11004 error (see 
http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/3001/steps/test/logs/stdio),
 which is:

“WSANO_DATA
11004

Valid name, no data record of requested type.

The requested name is valid and was found in the database, but it does not 
have the correct associated data being resolved for. The usual example for this 
is a host name-to-address translation attempt (using gethostbyname or 
WSAAsyncGetHostByName) which uses the DNS (Domain Name Server). An MX record is 
returned but no A record—indicating the host itself exists, but is not directly 
reachable.”


Not sure how this should be handled.

--
messages: 134725
nosy: amaury.forgeotdarc, loewis, pitrou
priority: low
severity: normal
status: open
title: Missing WSA* error codes
type: feature request
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



[issue11953] Missing WSA* error codes

2011-04-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +brian.curtin, tim.golden

___
Python tracker 

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



[issue11832] Add option to pause regrtest to attach a debugger

2011-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3d9800fcce7f by Brian Curtin in branch 'default':
Implement #11832. Add an option to start regrtest and wait for input
http://hg.python.org/cpython/rev/3d9800fcce7f

--
nosy: +python-dev

___
Python tracker 

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



[issue11832] Add option to pause regrtest to attach a debugger

2011-04-28 Thread Brian Curtin

Changes by Brian Curtin :


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



[issue11953] Missing WSA* error codes

2011-04-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Actually, it was raised by getaddrinfo(), so should perhaps belong in the 
socket module instead.

--

___
Python tracker 

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



[issue11946] 2.7.1 'test_commands' build test fails

2011-04-28 Thread Jason Vas Dias

Jason Vas Dias  added the comment:

When I see messages like this in the "make test" log it makes me
want to remove python and all python using software from my system :

test_dl
test test_dl crashed -- : module dl requires 
sizeof(int) == sizeof(long) == sizeof(char*)

NO, GEE, THAT'S RIGHT ! 

  ( sizeof( int ) == 4 ) == ( ( sizeof(long) == 8) == 
  (sizeof(void*) == 8 )
)

which actually makes sense in "C" on my system, and produces
a true value, ( 1 ) == ( ( 1 ) == ( 1 ) )
when gcc is run with the $CFLAGS given to the python build,
unlike the message's pseudo-code.

So I think some internal python components think they are getting
compiled in 32-bit mode, on a native 64-bit compiler - how ? 
Is anything in the python build appending any '-m32' flag ? 
Because my environment certainly does not contain '-m32' :

$ export -p | egrep 'CC|CXX|FLAG'
declare -x CC="/usr/bin/gcc"
declare -x CFLAGS="-march=x86-64 -mtune=k8 -O2 -g -fPIC -DPIC -pipe"
declare -x CXX="/usr/bin/g++"
declare -x CXXFLAGS="-march=x86-64 -mtune=k8 -O2 -g -fPIC -DPIC -pipe"


`uname -m` says 'x86_64' - a 64-bit arch . And the dl* objects 
are actually 64-bit:
$ find . -name 'dl*' -exec file '{}' ';'
./Modules/dlmodule.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not 
stripped
./build/temp.linux-x86_64-2.7/usr/src/Python-2.7.1/Modules/_ctypes/libffi/src/dlmalloc.o:
 ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

So why this message :

test_dl
test test_dl crashed -- : module dl requires 
sizeof(int) == sizeof(long) == sizeof(char*)

hmm, time to get out gdb I guess .

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

After further discussion on python-dev, it is clear that this identity checking 
behaviour handles more than just NaNs - it also allows containers to cope more 
gracefully with objects like NumPy arrays that make use of rich comparisons to 
return something other than simple True/False values for equality checks.

Also, since I neglected to mention it in the initial post, merely *adding* the 
glossary entry is just the first step. It then needs to be referenced from the 
appropriate points in the language and library reference.

--

___
Python tracker 

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



[issue11945] Adopt and document consistent semantics for handling NaN values in containers

2011-04-28 Thread Nick Coghlan

Nick Coghlan  added the comment:

Scratch the first half of that last comment - Guido pointed out that false 
positives rear their ugly head almost immediately if you try to store rich 
comparison objects in other containers.

--

___
Python tracker 

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



[issue11951] Mac OSX IDLE 3.2 does not allow entering text into toolbar windows (such as the help search box) unless all shells are closed or minimized

2011-04-28 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report: yet another Aqua Tk oddity.  This one is a problem in Tk 
itself. It can be seen using a recent Wish 8.4 with a simple Tcl script to 
create a help menu.  The relevant Tk bug is here:

http://sourceforge.net/tracker/index.php?func=detail&aid=1884667&group_id=12997&atid=112997

For the record, I can reproduce the problem when using a Tkinter linked with 
current ActiveState Tcl/Tk 8.4.19 on either OS X 10.5 or 10.6 or with the Apple 
Tcl/Tk 8.4 on OS X 10.6.  All of those are Tk 8.4.19.  The problem does not 
appear when using the Apple-supplied Tcl/Tk 8.4 (8.4.7) on OS X 10.5.  It also 
does not appear when using Tkinter linked with Aqua Tk 8.5 (as is the case with 
the 3.2 64-bit/32-bit python.org installer).  Unfortunately, there is nothing 
Tkinter or IDLE can do to work around this.

--
assignee:  -> ned.deily
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: feature request -> behavior
versions: +Python 2.7, Python 3.1, Python 3.3

___
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-04-28 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Actually, my first attempt to fix the test was faulty.  The correct logic seems 
to be

+def is_negative_zero(x):
+return x == 0 and math.copysign(1, x) < 0
+
+def almost_equal(value, expected):
+if math.isfinite(expected) and math.isfinite(value):
+if is_negative_zero(expected):
+return is_negative_zero(value)
+if is_negative_zero(value):
+return is_negative_zero(expected)
+return abs(value-expected) <= eps
+if math.isnan(expected):
+return math.isnan(value)
+return value == expected
+
 class MathTests(unittest.TestCase):
+
+def test_xxx(self):
+self.assertTrue(is_negative_zero(-0.0))
+self.assertFalse(almost_equal(0.0, -0.0))
 
 def ftest(self, name, value, expected):
-if abs(value-expected) > eps:
+if not almost_equal(value, expected):

Now, the attached patch has two failures:

AssertionError: fmod(-10,1) returned -0.0, expected 0

and 

AssertionError: sqrt0002:sqrt(-0.0) returned -0.0, expected 0.0

The first seems to be a typo in the test, but I would not expect sqrt(-0.0) to 
return -0.0.  Does anyone know what the relevant standard says?

--
Added file: http://bugs.python.org/file21831/unorderable-nans.diff

___
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-04-28 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file21829/unorderable-nans.diff

___
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-04-28 Thread Alex Gaynor

Alex Gaynor  added the comment:

The C standard (and/or the POSIX one, I forget) says sqrt(-0.0) returns -0.0.

--
nosy: +alex

___
Python tracker 

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



  1   2   >