[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Zhigang Wang

New submission from Zhigang Wang :

The current subprocess.Popen() has a boolean close_fds parameter, which
cannot satisfy all the requirements. Eg. want to pass specific fd to
child process, but close others.

This patch adds a extra parameter pass_fds to subprocess.Popen's
__init__(). This parameter only effect when close_fds=True. When
close_fds=True, all fds in pass_fds will not closed before exec.

--
components: Library (Lib)
files: python-subprocess-add-pass-fds.patch
keywords: patch
messages: 90871
nosy: zhigang
severity: normal
status: open
title: [PATCH]add pass_fds paramter to subprocess.Popen()
versions: Python 3.2
Added file: 
http://bugs.python.org/file14555/python-subprocess-add-pass-fds.patch

___
Python tracker 

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



[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

A couple of unit tests would be great, as well as a paragraph for the
documentation.

--
nosy: +amaury.forgeotdarc
stage:  -> test needed

___
Python tracker 

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



[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-07-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Perhaps, although I don't know where /dev/tty would be involved in
os.popen().

For reference, under Linux I get:
>>> open("/dev/tty","a")
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 29] Illegal seek

--

___
Python tracker 

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



[issue6559] [PATCH]add pass_fds paramter to subprocess.Popen()

2009-07-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The reason os.closerange() is used is that it can be slow to call
os.close() on lots of fds (I suppose this depends on the OS). See
http://code.python.org/hg/trunk/rev/43caff85ec85

Therefore, the patch should be smart enough to continue using
os.closerange() on ranges of contiguous FDs to be closed.

--
nosy: +pitrou

___
Python tracker 

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



[issue1436346] yday in datetime module

2009-07-24 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +pitrou
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Kálmán Gergely

New submission from Kálmán Gergely :

This is the rewritten-from-scratch implementation of the
sendmsg()/recvmsg() methods.
Any comments / suggestions / flames are very welcome. Currently it
supports what I need
and I'm only releasing it because I don't have much time to develop it
further in the
forseeable future (1-2 months). It is rewritten from scratch, using the
python c-api
documents. I've tried my best, but I wouldn't bet that it works
error-free. I'd be glad
if someone could give me a review on what I've might done wrong.

The features that are missing:
- using scatter/gather
- using it with non-stream oriented sockets (doesn't support addresses
/msg_name/)

These should be very easy to implement. If no one takes up the task of
implementing the
missing features than I'll do it of course, you just have to wait a
little while. Of
course any errors present in the code right now will be fixed.

Thanks

Kalman Gergely

--
components: Library (Lib)
files: srmsg.patch
keywords: patch
messages: 90875
nosy: synapse
severity: normal
status: open
title: socket sendmsg(), recvmsg() methods
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file14556/srmsg.patch

___
Python tracker 

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



[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Kálmán Gergely

Kálmán Gergely  added the comment:

the tester application

--
Added file: http://bugs.python.org/file14557/sendrecvmsgtest.py

___
Python tracker 

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



[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Thomas Herve

Thomas Herve  added the comment:

This is a duplicate (although updated patch) from bug #1194378. It would
still need unit tests...

--
nosy: +therve

___
Python tracker 

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



[issue6331] Add unicode script info to the unicode database

2009-07-24 Thread Ezio Melotti

Changes by Ezio Melotti :


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

___
Python tracker 

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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson

New submission from Mark Dickinson :

In Python 3, or in Python 2 with the re.UNICODE flag, it appears that 
the regex r'\d' matches all unicode characters with category either 'Nd' 
(Number, Decimal Digit) or 'No' (Number, Other), but not characters in 
category 'Nl' (Number, Letter):

Python 3.2a0 (py3k:74188, Jul 23 2009, 16:01:29) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> import unicodedata
>>> x = '\u2781'
>>> unicodedata.category(x)
'No'
>>> unicodedata.name(x)
'DINGBAT CIRCLED SANS-SERIF DIGIT TWO'
>>> re.match(r'\d', '\u2781')
<_sre.SRE_Match object at 0x3d5d08>

I believe (but am not 100% sure) that r'\d' should only match characters 
in category 'Nd'.  To back up this belief:

(1) int and float currently accept characters in category 'Nd' but not 
'No'; it would seem useful for '\d' to match those characters that are 
accepted by int, so that e.g., something matched with '\d+' could be 
directly passed to int.  (This came up in a #python-dev discussion
about whether the Decimal type should accept other unicode digits;  
that's a separate issue, though.)

(2) In Perl 5.10 (and possibly some earlier versions too), '\d' matches 
only characters in category 'Nd'

(3) Unicode Technical Standard #18 ("Unicode Regular Expressions") at 
http://unicode.org/unicode/reports/tr18/ recommends that '\d' should 
correspond to \p{gc=Decimal_Number}

Marc-André, do you have any opinion on this?

It's probably slightly dangerous to change this in 2.6 or 3.1;  I'm 
proposing that '\d' should be modified to accept only characters of 
category 'Nd' in 2.7 and 3.2.

(Thanks Ezio Melotti for finding all the references above and doing Perl 
testing!)

--
components: Extension Modules
messages: 90878
nosy: ezio.melotti, lemburg, marketdickinson
severity: normal
stage: test needed
status: open
title: Regex '\d' should not match unicode category 'No'.
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-24 Thread David Roberts

New submission from David Roberts :

I'm getting the following error on Windows in an application I've
written (the error does not occur on Linux):

Exception in thread Thread-4:
Traceback (most recent call last):
 File "C:\Python26\lib\threading.py", line 525, in __bootstrap_inner
   self.run()
 File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tileprovider.py", line 97, in run
   self.__tilecache[tile_id] = Tile(tile)
 File "C:\Documents and Settings\David\My
Documents\pyzui\pyzui\tilecache.py", line 165, in __setitem__
   with self.__lock:
 File "C:\Python26\lib\threading.py", line 115, in acquire
   me = current_thread()
 File "C:\Python26\lib\threading.py", line 803, in currentThread
   return _active[_get_ident()]
OverflowError: can't convert negative value to unsigned long

Where __lock is an RLock object.

The odd thing is that it only affects a single class (which is derived
from the TileProvider class in tileprovider.py, which in turn is derived
from threading.Thread). This led me to believe there was an error in my
code, but I asked on the mailing list and was told that it is likely a
bug in the threading module.

The Python version is 2.6.2.

--
components: Library (Lib), Windows
messages: 90879
nosy: davidar
severity: normal
status: open
title: OverflowError in RLock.acquire()
type: crash
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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue6516] reset owner/group to root for distutils tarballs

2009-07-24 Thread Till Maas

Till Maas  added the comment:

I want to create uniform tarballs, independent of which username was
used to create the tarball.

--

___
Python tracker 

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



[issue6558] #ifdef linux is incorrect; should be #ifdef __linux__ (preferred standard)

2009-07-24 Thread Roumen Petrov

Roumen Petrov  added the comment:

Did my patch python-trunk-20081209-c89.patch from issue 4558 work for you ?

Is the issue fixed in original libffi ?

--
nosy: +rpetrov

___
Python tracker 

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



[issue6236] os.popen causes illegal seek on AIX in Python 3.1rc

2009-07-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

/dev/tty is probably similar to stdout, at least when python is started
without redirection.

What is the output of
>>> sys.stdout.seekable()
when run from an interactive interpreter?
Does it depend on the active console? (xterm, ssh...)

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue6562] OverflowError in RLock.acquire()

2009-07-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is strange, thread.get_ident() isn't supposed to raise this kind of
error.
Could you call it individually from the same thread to see what it returns?
Also, could you post the code for your derived class for us to see?

--
nosy: +pitrou

___
Python tracker 

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



[issue1764044] copy 2

2009-07-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The "f": drive probably was a FAT32 filesystem, which has a resolution
of two seconds...

--
nosy: +amaury.forgeotdarc
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

Patch against py3k.

--
keywords: +patch
Added file: http://bugs.python.org/file14558/issue6561.patch

___
Python tracker 

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



[issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging

2009-07-24 Thread jan matejek

jan matejek  added the comment:

i believe that the bug lies in bad implementation/backport of feature
from 3.0 patch for issue1251.

see this revision:
http://svn.python.org/view/python/branches/release30-maint/Lib/ssl.py?r1=59339&r2=59340
where the code was added for py3k branch.

the logic behind that code is that when the timeout is zero
(non-blocking socket), but the caller explicitly specifies that they
want to block (which only happens when an application handles
do_handshake by itself), timeout is set to None and reset to zero after
the call.
and this change was made to "better support non-blocking sockets", the
original patch (
http://svn.python.org/view/python/branches/py3k/Lib/ssl.py?view=diff&r1=58996&r2=58997
) did not have this code at all

on the other hand, what the 2.6 version does is not making any sense. i
don't even see how it got to be that way instead of using py3k's
do_handshake with optional "block" parameter - seeing as the change was
made six months later and changed the API anyway

the correct thing to do here is simply

if do_handshake_on_connect:
self.do_handshake()

without the timeout setting/resetting stuff

--

___
Python tracker 

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



[issue481171] Hang using files named prn.txt, etc

2009-07-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

It seems that Windows has been "patched"...
open("COM").read() does not hang: it reads from the console until you
hit Ctrl-Z.
Testing on Windows 2000, some device names always succeed, others fail
with IOError when you open them or write to them.

The behavior seems correct to me (except of course this very concept of
special device names), and matches the expectations of the OP.

--
nosy: +amaury.forgeotdarc
status: open -> closed

___
Python tracker 

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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson

Mark Dickinson  added the comment:

New patch;  same as before, but includes clarification to the 
documentation.

--
Added file: http://bugs.python.org/file14559/issue6561.patch

___
Python tracker 

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



[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file14558/issue6561.patch

___
Python tracker 

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



[issue6563] inserting None into sys.modules does not raise ImportError with importlib

2009-07-24 Thread Brett Cannon

New submission from Brett Cannon :

When you insert None into sys.modules, the built-in import raises an 
ImportError, but importlib does not.

See http://mail.python.org/pipermail/python-dev/2009-July/090780.html for 
the discussion that brought this up.

--
assignee: brett.cannon
components: Library (Lib)
messages: 90889
nosy: brett.cannon
priority: normal
severity: normal
stage: test needed
status: open
title: inserting None into sys.modules does not raise ImportError with importlib
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue6564] Error in Sec. 8.4 of Tutorial

2009-07-24 Thread Gaelen Marsden

New submission from Gaelen Marsden :

In Section 8.4 of the Tutorial, "Raising Exceptions", the text following
the first example states "Alternatively, the above could be written as
raise NameError('HiThere')." Perhaps I am being dense, but I can see no
difference between the two.

--
assignee: georg.brandl
components: Documentation
messages: 90890
nosy: georg.brandl, gmarsden
severity: normal
status: open
title: Error in Sec. 8.4 of Tutorial
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



[issue6565] improper use of __setitem__ in ElementTree for Python 3.1

2009-07-24 Thread Andre Roberge

New submission from Andre Roberge :

I have a function to replace the content of an ElementTree Element by
that of another one which works using Python 2 but not with Python 3.
I get an assertion error.  

It was suggested on the Python list that the problem is that in Python 3
slice assignments are done with __setitem__ rather than __setslice__ but
ElementTree has not been adapted to that -- hence the title given to
this bug.

The function that I use to demonstrate this (with a workaround solution)
is as follows:

def replace_element(elem, replacement):
'''replace the content of an ElementTree Element by that of
another
   one.
'''
elem.clear()
elem.text = replacement.text
elem.tail = replacement.tail
elem.tag = replacement.tag
elem.attrib = replacement.attrib
try:
elem[:] = replacement[:]  # works with Python 2.5 but not 3.1
except AssertionError:
del elem[:]
for child in replacement:
elem.append(child)

I have included a small test file which demonstrate the behaviour.

--
components: Library (Lib)
files: test.py
messages: 90891
nosy: aroberge
severity: normal
status: open
title: improper use of __setitem__ in ElementTree for Python 3.1
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file14560/test.py

___
Python tracker 

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



[issue6507] Enhance dis.dis to autocompile codestrings

2009-07-24 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Trying both 'eval' and 'exec' looks fine to me.
Marking 'easy' because I expect it should be ;-)

--
keywords: +easy

___
Python tracker 

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




[issue6518] Enable 'with' statement in ossaudiodev module

2009-07-24 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Seems like a sensible idea.
Note: 3.0 is no longer maintained.
Marking 'easy' because I expect that copying and adapting __exit__ from
regular open should be.

--
keywords: +easy
nosy: +tjreedy
versions:  -Python 3.0

___
Python tracker 

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



[issue6564] Error in Sec. 8.4 of Tutorial

2009-07-24 Thread Georg Brandl

Georg Brandl  added the comment:

Indeed :)

Fixed in r74194.

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



[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer

Nir Soffer  added the comment:

Tested on Ubuntu Linux 9.04.

The tests will probably fail on Windows, since connection refused is
detected trough handle_expt_event, and not in hadnle_read_event. I hope
someone on Windows will fix this :-)

--

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

In [2]: json.dumps({'a': 1, 'b': {'c': 3, None: 5}})
Out[2]: '{"a": 1, "b": {"c": 3, "null": 5}}'

In [3]: j = json.dumps({'a': 1, 'b': {'c': 3, None: 5}})

In [4]: json.loads(j)
Out[4]: {u'a': 1, u'b': {u'c': 3, u'null': 5}}

I was surprised to note that None was converted to "null" instead of 
null. This happens only in dicts and not, for example, lists:

In [5]: json.dumps([None, 1, "a"])
Out[5]: '[null, 1, "a"]'

--
components: Library (Lib)
messages: 90896
nosy: srid
severity: normal
status: open
title: json.dumps converts None to "null" (not null)
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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

The simplest repro:

In [6]: json.dumps({None: 3})
Out[6]: '{"null": 3}'

In [7]: json.loads(json.dumps({None: 3}))
Out[7]: {u'null': 3}

--

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> bob.ippolito
nosy: +bob.ippolito
status: open -> 

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Also repros on 3.0/3.1

--
versions: +Python 3.0, Python 3.1

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Notice what it does to other dict keys:

>>> simplejson.dumps({1: 1})
'{"1": 1}'

In other words, I don't think this is a bug.  It's how JSON works.  JSON
dict keys are strings *only*.

--
nosy: +exarkun

___
Python tracker 

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



[issue6566] json.dumps converts None to "null" (not null)

2009-07-24 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

> JSON dict keys are strings *only*.

I might be helpful to point this out (along with other caveats) in the 
standard library documentation for JSON.

An explicit mention of ``loads(dumps(x)) != x for certain structures`` 
would be nice.

I, sir, was genuinely surprised to discover this.

--

___
Python tracker 

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



[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer

Nir Soffer  added the comment:

The first fix reverted to 2.5 behavior, when self.connected is false when 
handle_connect is called. This behavior is little stupid - why call 
handle_connect if the socket is not really connected?

This fix ensure that handle_connect is called only if the socket is 
connected - just like it is done in handle_write_event. Now it does not 
matter when you set the connected flag, before or after handle_connect.

Tested in trunk on Mac OS X.

--
Added file: 
http://bugs.python.org/file14561/asycore-handle-connect-event-2.patch

___
Python tracker 

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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo

New submission from Lucas Prado Melo :

When we use TestCase.assertAlmostEqual to compare two float('inf')
objects, the result is that float('inf') is not almost equal to
float('inf').
I believe this is a bug. I tested against r74195 of Python 3.2 and
against Python 2.6.2.

--
messages: 90902
nosy: lucaspmelo
severity: normal
status: open
title: Isn't inf  almost equal to inf?
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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo

Changes by Lucas Prado Melo :


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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo

Changes by Lucas Prado Melo :


--
components: +Tests

___
Python tracker 

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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Lucas Prado Melo

Changes by Lucas Prado Melo :


--
type:  -> behavior

___
Python tracker 

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



[issue6550] asyncore incorrect failure when connection is refused and using async_chat channel

2009-07-24 Thread Nir Soffer

Nir Soffer  added the comment:

This version fix also handle_expt_event, so connection refused error 
should be handled in the same way also on Windows.

--
Added file: 
http://bugs.python.org/file14562/asycore-handle-connect-event-3.patch

___
Python tracker 

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



[issue6568] unittest test discovery improvements

2009-07-24 Thread Michael Foord

New submission from Michael Foord :

Issue to track improvements in the standalone discover.py that I need to
port to the test discovery in unittest.

* Failure to import a module does not halt discovery
* Will not attempt to import test files whose names are not valid Python
  identifiers, even if they match the pattern

--
assignee: michael.foord
messages: 90904
nosy: michael.foord
severity: normal
stage: needs patch
status: open
title: unittest test discovery improvements
type: feature request
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue6558] #ifdef linux is incorrect; should be #ifdef __linux__ (preferred standard)

2009-07-24 Thread Garrett Cooper

Garrett Cooper  added the comment:

__linux is legitimate too, so the patch looks ok, but...

1) It won't apply cleanly against 2.4.5, most likely.
2) Why __linux instead of __linux__ ?

gcoo...@orangebox ~ $ echo "" | gcc --std=c89 -E -dM -c - | grep linux
#define __linux 1
#define __linux__ 1
#define __gnu_linux__ 1

__linux__ is the preferred nomenclature in the kernel.org sources, IIRC...

--

___
Python tracker 

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



[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Michael Foord

Michael Foord  added the comment:

Uhm... they may or may not be almost equal, but probably not.
Comparisons on them are defined to be undefined so you're using the
wrong thing to test them. Use assertTrue and math.isinf instead.

--
nosy: +michael.foord
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue6569] unittest document bug (random.shuffle sequence)

2009-07-24 Thread Kouki Hashimoto

New submission from Kouki Hashimoto :

Hello.
I found a bug in unittest sample code.
http://docs.python.org/dev/py3k/library/unittest.html#unittest-minimal-example
(naming this code as test_sample.py)

I got this error.
$ python3.2 test_sample.py
..E
==
ERROR: test_shuffle (__main__.TestSequenceFunctions)
--
Traceback (most recent call last):
  File "test_sample.py", line 11, in test_shuffle
random.shuffle(self.seq)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/random.py",
line 270, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment

--
Ran 3 tests in 0.004s

I think this code should be fixed with attached patch.
Regards.

--
assignee: georg.brandl
components: Documentation
files: unittest.rst.patch
keywords: patch
messages: 90907
nosy: georg.brandl, hsmtkk
severity: normal
status: open
title: unittest document bug (random.shuffle sequence)
versions: Python 3.2
Added file: http://bugs.python.org/file14563/unittest.rst.patch

___
Python tracker 

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



[issue6569] unittest document bug (random.shuffle sequence)

2009-07-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r74196.

--
nosy: +benjamin.peterson
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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-24 Thread Senthil

Senthil  added the comment:

Fixed for 3.2 in py3k branch revision 74198. Asked python-dev for
objections on back porting changes 2.6.

Shall back port changes to py2.6 and py3.1

--

___
Python tracker 

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



[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-07-24 Thread Senthil

Changes by Senthil :


--
resolution:  -> fixed

___
Python tracker 

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