[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks, Victor.  You caught me by surprise a bit:  I had some more minor 
changes to that patch pending, so I've committed those separately.

Any news from the buildbots?

--

___
Python tracker 

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



[issue12035] problem with installing validator.nu on windows

2011-05-09 Thread sulakshana

New submission from sulakshana :

I tried following instructions given in http://about.validator.nu/#src to 
install validator.nu on windows. 1. changed hg clone 
https://bitbucket.org/validator/build build to hg.py clone 
https://bitbucket.org/validator/build build as HG was not getting recognised in 
windows. 2. when i tried to run python build/build.py all getting the following 
error..

pasting the entire thing... how to solve this???

C:\www\checker>python build/build.py all "hg.py" pull --update -R build 
https://bitbucket.org/validator/build/ Traceback (most recent call last): File 
"build/build.py", line 1041, in selfUpdate()

File "build/build.py", line 797, in selfUpdate hgCloneOrUpdate("build", hgRoot)

File "build/build.py", line 777, in hgCloneOrUpdate runCmd('"%s" pull --update 
-R %s %s%s/' % (hgCmd, mod, baseUrl, mod))

File "build/build.py", line 173, in runCmd subprocess.call(cmd)

File "C:\www\Python27\lib\subprocess.py", line 486, in call return 
Popen(*popenargs, **kwargs).wait()

File "C:\www\Python27\lib\subprocess.py", line 672, in init errread, errwrite)

File "C:\www\Python27\lib\subprocess.py", line 882, in _execute_child 
startupinfo)

WindowsError: [Error 193] %1 is not a valid Win32 application

--
components: Windows
messages: 135570
nosy: sulakshana
priority: normal
severity: normal
status: open
title: problem with installing validator.nu on windows
type: compile error
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



[issue12035] problem with installing validator.nu on windows

2011-05-09 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This is not a python issue. Please report your problem to the validator project.

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

> Thanks, Victor.  You caught me by surprise a bit

Oh, I thought that the patch was ready to be commited.

> I had some more minor changes to that patch pending,
> so I've committed those separately.

You should add "Issue #11888: " prefix to your commit messages so a bot 
automatically add comments for the new commits to this issue.

> "Fix cut-and-paste typo in comment: log10 -> log2."

Oh, I didn't notice it, but Terry Reedy

> "Fix nonunique test ids in math_testcases.txt."

Oh, I didn't notice it: why do we need explicit identifiers? Can't we use the 
line number or something like that? What happens if two tests have the same 
identifier? Is the first test skipped?

> Any news from the buildbots?

Yes, most of them are happy. Some of them are busy (don't have test log2() 
yet), others are unhappy but not because of log2(). Said differently: log2 
tests pass on most buildbots, but we have to wait 12 hours or maybe one day to 
wait for all buildbots.

If the test pass on all buildbots, I will commit issue11888-part2.patch to use 
the system log2 function.

--

___
Python tracker 

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



[issue11877] Change os.fsync() to support physical backing store syncs

2011-05-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Ronald Oussoren wrote (2011-05-08 10:33+0200):
> Steffen, I don't understand your comment about "auto". Declaring
> variables as "auto" is not necessary in C code and not used
> anywhere else in Python's source code.

Well, as long as i can keep my underwear all is fine.
(I also looked at Google translate because i first wanted to start
the reply with "croak .. pip .. twist .. wrench .. groan .. ugh".)

--

___
Python tracker 

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



[issue10811] sqlite segfault with generators

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c6523d6faef4 by Gerhard Haering in branch 'default':
#10811: Fix recursive usage of cursors. Instead of crashing, raise a 
ProgrammingError now.
http://hg.python.org/cpython/rev/c6523d6faef4

--
nosy: +python-dev

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

> we have to wait 12 hours or maybe one day to wait for all buildbots

Oh, it's faster than expected: test_math passed on FreeBSD 6.4 3.x buildbot. I 
was waiting for this one because it's an old OS and many tests fail on this 
buildbot (because it's old but also slow). So test_math passed on all 
buildbots. Let's try the system log2 :-)

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 565f43f6bed4 by Victor Stinner in branch 'default':
Issue #11888: Use system log2() when available
http://hg.python.org/cpython/rev/565f43f6bed4

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

Issue #11888: Use system log2() when available
http://hg.python.org/cpython/rev/565f43f6bed4

"I expect the system libc to use more accurate functions than Python."

You know what? Mac OS X log2 is less accurate than Python log2! A log2 test 
failed on "x86 Tiger 3.x":

http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2488
==
FAIL: testLog2 (test.test_math.MathTests)
--
Traceback (most recent call last):
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_math.py", 
line 658, in testLog2
self.assertEqual(actual, expected)
AssertionError: Lists differ: [-324.0, -323.0, -322.0, -321 != [-324.0, 
-323.0, -322.0, -321

First differing element 69:
-254.97
-255.0
--

Should I revert my patch or should we test the system log2 in configure to 
check if it is as accurate or more accurate than Mark's algorithm?

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

> You know what? Mac OS X log2 is less accurate than Python log2!

That doesn't surprise me much.  Though it's probably still true that log2 from 
OS X is more accurate than our log2 for some other values.  It's just that 
getting the answer wrong for a power of 2 is a 'high-visibility' error.

Testing log2 sounds long-winded and error-prone.  I'd suggest just marking that 
test as an expected failure on Tiger.  BTW, I don't see any such failure on 
Snow Leopard.

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

One other thought:  we should check that it's not pow that's at fault here, 
rather than log2.  The test uses math.log2(2.0**n).  It would probably be 
better off using math.log2(ldexp(1.0, n)), or similar:  the libm pow operation 
is also notorious for inaccuracies (due to poor implementations or otherwise) 
on various platforms.

--

___
Python tracker 

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



[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-09 Thread Stefan Krah

Stefan Krah  added the comment:

There are warnings on the FreeBSD and OSX buildbots, where pthread_t
is not a long.

http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/237/steps/compile/logs/warnings%20%283%29

http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/1336/steps/compile/logs/warnings%20%2828%29

--
nosy: +skrah

___
Python tracker 

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



[issue10811] sqlite segfault with generators

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2fdabf0dc8f7 by Victor Stinner in branch 'default':
Issue #10811: Use TestCase.assertRaises() in the new test
http://hg.python.org/cpython/rev/2fdabf0dc8f7

--

___
Python tracker 

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



[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2e0d3092249b by Victor Stinner in branch 'default':
Issue #8407: Use an explicit cast for FreeBSD
http://hg.python.org/cpython/rev/2e0d3092249b

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

> we should check that it's not pow that's at fault here

Some tests on Mac OS X Tiger:

>>> (2.0 ** -255).hex()
'0x1.0p-255'

=> pow is correct

>>> import ctypes; import ctypes.util, math
>>> libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library('c'))
>>> clog2=libc.log2
>>> clog2.restype=ctypes.c_double
>>> clog2.argtypes=(ctypes.c_double,)
>>> clog2(2.0**-255)
-254.97
>>> math.log(2.0**-255) / math.log(2.0)
-255.0

>>> math.log(2.0**-255)
-176.75253104278605
>>> math.log(2.0**-255).hex()
'-0x1.61814bbfb3fb5p+7'
>>> math.log(2.0)
0.6931471805599453
>>> math.log(2.0).hex()
'0x1.62e42fefa39efp-1'

>>> clog2(2.0**-255).hex()
'-0x1.fdfffp+7'
>>> (math.log(2.0**-255) / math.log(2.0)).hex()
'-0x1.fe000p+7'

clog2() is wrong for 2^-255.

--

___
Python tracker 

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



[issue11188] test_time error on AIX

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1f23d63b578c by Mark Dickinson in branch 'default':
Issue #11188: In log2 tests, create powers of 2 using ldexp(1, n) instead of 
the less reliable 2.0**n.
http://hg.python.org/cpython/rev/1f23d63b578c

--
nosy: +python-dev

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Okay, thanks.  We should still be using ldexp rather than 2.0**... in the 
tests, though;  I've fixed this, and also fixed the incorrect (too small) range 
for those tests, so that all representable powers of 2 are now covered.

--

___
Python tracker 

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



[issue11888] Add C99's log2() function to the math library

2011-05-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

Grr.  Got the issue number wrong in the commit message;  see msg135584.


New changeset 1f23d63b578c by Mark Dickinson in branch 'default':
Issue #11188: In log2 tests, create powers of 2 using ldexp(1, n) instead of 
the less reliable 2.0**n.
http://hg.python.org/cpython/rev/1f23d63b578c

--

___
Python tracker 

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



[issue11188] test_time error on AIX

2011-05-09 Thread Mark Dickinson

Changes by Mark Dickinson :


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

___
Python tracker 

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



[issue9584] Allow curly brace expansion

2011-05-09 Thread Tim Golden

Tim Golden  added the comment:

I've just rebuilt on Windows against tip. test_glob is failing:

test test_glob failed -- Traceback (most recent call last):
  File "c:\work-in-progress\python\cpython-9584\lib\test\test_glob.py", line 
135, in test_glob_curly_braces
os.path.join('a', 'bcd', 'efg')]))
  File "c:\work-in-progress\python\cpython-9584\lib\test\test_glob.py", line 
53, in assertSequencesEqual_noorder
self.assertEqual(set(l1), set(l2))
AssertionError: Items in the first set but not the second:
'@test_2788_tmp_dir\\a/bcd\\efg'
'@test_2788_tmp_dir\\a/bcd\\EF'
Items in the second set but not the first:
'@test_2788_tmp_dir\\a\\bcd\\EF'
'@test_2788_tmp_dir\\a\\bcd\\efg'

--

___
Python tracker 

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



[issue9584] Allow curly brace expansion

2011-05-09 Thread Ezio Melotti

Ezio Melotti  added the comment:

+if sub.find(',') != -1:
Please use the 'in' operator here.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

No.  You wrote this: “Here's a snippet of what I have in my startup file: [code 
with if 'libedit' in readline.__doc__ complication] While obviously this can be 
handled, it seems like an unnecessary burden on users.”  My message addresses 
this: using read_init_file removes the need for this complication (the four 
lines with the in test).  IOW, I was suggesting that we could add a mention of 
libedit in the readline docs and advise that people use read_init_file, then 
close this bug.

--

___
Python tracker 

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



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

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

It would be helpful if you could attach the test log.  Alternatively, if the 
configure and build log for your Python package is available somewhere on the 
web, the link would be useful.

--

___
Python tracker 

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



[issue11968] wsgiref's wsgi application sample code does not work

2011-05-09 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +skrah

___
Python tracker 

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



[issue12036] ConfigParser: items() adds the vars dictionary to the result

2011-05-09 Thread Isaac Jurado

New submission from Isaac Jurado :

>From the following python code:

import os
from ConfigParser import ConfigParser
from pprint import pprint
c = ConfigParser()
c.read(['test.ini'])
pprint(c.items('test', raw=False, vars=os.environ))

I see the values contained in os.environ as well as in section "test" (in the 
attached configuration example).

The problem seems to come from the following line:

http://hg.python.org/cpython/file/5395f96588d4/Lib/ConfigParser.py#l605

Which is fixed in py3k but for the 2.x branch has not been modified sin 2002:

http://hg.python.org/cpython/annotate/8bb6003f7f54/Lib/ConfigParser.py#514

--
components: Library (Lib)
files: test.ini
messages: 135591
nosy: Isaac.Jurado
priority: normal
severity: normal
status: open
title: ConfigParser: items() adds the vars dictionary to the result
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file21942/test.ini

___
Python tracker 

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



[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

In the absence of tests or doc update, can you tell in English what the new 
behavior is?  IIUC, when the home dir is not found, all the variables that 
depend on it would not exist, right?  Or would they be set to None?

--

___
Python tracker 

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



[issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

Okay.  Nonetheless, splitting on os.sep doesn’t cost us anything and is IMO a 
good practice to follow.

--

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file17065/backlog0.diff

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file17066/backlog0_incl_doc.diff

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file17067/socket_listen.patch

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file21851/server.py

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file21852/client.py

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Changes by Daniel Evers :


Removed file: http://bugs.python.org/file21879/backlog0_complete.patch

___
Python tracker 

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



[issue8498] Cannot use backlog = 0 for sockets

2011-05-09 Thread Daniel Evers

Daniel Evers  added the comment:

Thanks, I removed the old patches and changed the unit test according to your 
suggestion.
I kept the "usually 5" remark, because I'm not sure how reality really looks 
like. But feel free to suggest a patch ;)

--
Added file: http://bugs.python.org/file21943/socket_backlog0.patch

___
Python tracker 

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



[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1ac03e071d65 by Antoine Pitrou in branch 'default':
Issue #11743: Rewrite multiprocessing connection classes in pure Python.
http://hg.python.org/cpython/rev/1ac03e071d65

--
nosy: +python-dev

___
Python tracker 

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



[issue10496] "import site failed" when Python can't find home directory (sysconfig._getuserbase)

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

Main changes of the patch, if the current user has no home directory (no entry 
in /etc/passwd) and there is HOME environment variable:

 - sysconfig.get_config_vars() doesn't have a 'userbase' variable. 
sysconfig.get_config_var('userbase') returns None as any other nonexistent key.
 - sysconfig.get_paths() doesn't create a path if expand fails (without raising 
an error or emiting a warning). For example, 
sysconfig.get_paths(scheme='posix_user') returns an empty dict.

--

___
Python tracker 

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



[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Now checked in, hopefully there will be no buildbot failures.

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

___
Python tracker 

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



[issue12036] ConfigParser: items() adds the vars dictionary to the result

2011-05-09 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue3709] BaseHTTPRequestHandler innefficient when sending HTTP header

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 25298224cb25 by Senthil Kumaran in branch 'default':
Issue #3709: a flush_headers method to BaseHTTPRequestHandler which manages the
http://hg.python.org/cpython/rev/25298224cb25

--
nosy: +python-dev

___
Python tracker 

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



[issue3709] BaseHTTPRequestHandler innefficient when sending HTTP header

2011-05-09 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Added the flush_headers method and the test function. this issue can be closed 
now. Thanks, Andrew Schaaf.

--
status: open -> closed

___
Python tracker 

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



[issue8305] memoview[0] creates an invalid view if ndim != 1

2011-05-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +mark.dickinson
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



[issue5231] Change format of a memoryview

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

In the mean time I had to resort to dirty hacks in 1ac03e071d65 (such as using 
io.BytesIO.write(), which I know is implemented in C and doesn't care about 
item size).

At the minimum, a memoryview.getflatview() function would be nice (and probably 
easier to code than the generic version). Or a "flat" optional argument in the 
memoryview constructor.

--
stage: test needed -> patch review
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue5231] Change format of a memoryview

2011-05-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue5231] Change format of a memoryview

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

Read a int32 array as a raw byte string is useful, but the opposite is also 
useful.

--
nosy: +haypo

___
Python tracker 

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



[issue3709] BaseHTTPRequestHandler innefficient when sending HTTP header

2011-05-09 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2011-05-09 Thread Alan Kennedy

Changes by Alan Kennedy :


--
nosy: +amak

___
Python tracker 

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



[issue11743] Rewrite PipeConnection and Connection in pure Python

2011-05-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: pending -> closed

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Python should still work reliably even if the temp directory is on a 
case-insensitive filesystem. Since that isn't an easy thing to determine, -1 on 
restoring the uppercase characters to the filenames.

As for it not being fixed previously, it's a rare bug that only affects 
case-insensitive filesystems. Just because other groups have decided not to 
care about it (typically due to a heavy bias towards case-sensitive POSIX 
filesystems), that is no reason for us to ignore it once we're aware of it.

If we really wanted to increase the entropy, better to increase the number of 
random characters included in the name to 7 or 8 (with each additional 
character increasing the pool size by a factor of 37). After all, why 
perpetuate an arbitrary restriction that is due primarily to the difficulty of 
constructing nice string manipulation interfaces in C?

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

If you would like more entry, use a longer filename:

>>> (26+10+1) ** 6 > (26+26+10+1) ** 6
False
>>> (26+10+1) ** 7 > (26+26+10+1) ** 6
True

--
nosy: +haypo

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

The number of characters in the filename is hardcoded in the guts of tempfile 
(in _RandomNameSequence.__next__ to be exact). Increasing that to 7 (or even 8) 
would be a straightforward change at the library level, but it can't be done 
from user code.

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

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

Charles-François Natali  added the comment:

Could someone explain me what's the risk on a case-insensitive filesystem?
Since files are created with O_CREAT|O_EXCL, I don't see where the problem is.

--
nosy: +neologix

___
Python tracker 

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



[issue12037] test_email failures under Windows with the eol extension activated

2011-05-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The title says it all. Ideally (!), changing .hgignore should be enough to fix 
this issue.
(NB: I have only tested the default branch)

==
FAIL: test_byte_message_rfc822_only (test_email.TestMessageAPI)
--
Traceback (most recent call last):
  File "C:\t\cp\lib\test\test_email\test_email.py", line 189, in test_byte_messa
ge_rfc822_only
self.assertEqual(out.getvalue(), msgdata)
AssertionError: Lists differ: ["b'Return-Path: \n'
b'Return-Path: \r\n'

- ["b'Return-Path: \\n'",
+ ["b'Return-Path: \\r\\n'",
?+++

-  "b'Delivery-Date: Mon, 08 Feb 2010 14:05:16 +0100\\n'",
+  "b'Delivery-Date: Mon, 08 Feb 2010 14:05:16 +0100\\r\\n'",
? +++

-  "b'Received: from example.org (example.org [64.5.53.58])\\n'",
+  "b'Received: from example.org (example.org [64.5.53.58])\\r\\n'",
?+++

-  "b'by example.net (node=mxbap2) with ESMTP (Nemesis)\\n'",
+  "b'by example.net (node=mxbap2) with ESMTP (Nemesis)\\r\\n'",
?+++

-  "b'id UNIQUE for some...@example.com; Mon, 08 Feb 2010 14:05:16 +0100\\n'
",
+  "b'id UNIQUE for some...@example.com; Mon, 08 Feb 2010 14:05:16 +0100\\r\
\n'",
? ++
+

-  "b'Date: Mon, 01 Feb 2010 12:21:16 +0100\\n'",
+  "b'Date: Mon, 01 Feb 2010 12:21:16 +0100\\r\\n'",
?+++

-  'b\'From: "Sender" \\n\'',
+  'b\'From: "Sender" \\r\\n\'',
?   +++

-  "b'To: \\n'",
+  "b'To: \\r\\n'",
?+++

-  "b'Subject: GroupwiseForwardingTest\\n'",
+  "b'Subject: GroupwiseForwardingTest\\r\\n'",
?   +++

-  "b'Mime-Version: 1.0\\n'",
+  "b'Mime-Version: 1.0\\r\\n'",
?  +++

-  "b'Content-Type: message/rfc822\\n'",
+  "b'Content-Type: message/rfc822\\r\\n'",
?   +++

-  "b'\\n'",
+  "b'\\r\\n'",
? +++

   "b'Return-path: \\r\\n'",
   "b'Message-ID: <4b66b890.4070...@teconcept.de>\\r\\n'",
   "b'Date: Mon, 01 Feb 2010 12:18:40 +0100\\r\\n'",
   'b\'From: "Dr. Sender" \\r\\n\'',
   "b'MIME-Version: 1.0\\r\\n'",
   'b\'To: "Recipient" \\r\\n\'',
   "b'Subject: GroupwiseForwardingTest\\r\\n'",
   "b'Content-Type: text/plain; charset=ISO-8859-15\\r\\n'",
   "b'Content-Transfer-Encoding: 7bit\\r\\n'",
   "b'\\r\\n'",
   "b'Testing email forwarding with Groupwise 1.2.2010\\r\\n'"]

==
FAIL: test_flatten_linesep_overrides_policy (test_email.TestParsers)
--
Traceback (most recent call last):
  File "C:\t\cp\lib\test\test_email\test_email.py", line 3074, in test_flatten_l
inesep_overrides_policy
self.assertEqual(s.getvalue(), text)
AssertionError: 'Return-Path: \nReceived: by mail.dom.ain (Post
fix, from userid [truncated]... != 'Return-Path: \r\nReceived:
by mail.dom.ain (Postfix, from user [truncated]...
- Return-Path: 
+ Return-Path: 
?   +
- Received: by mail.dom.ain (Postfix, from userid 889)
+ Received: by mail.dom.ain (Postfix, from userid 889)
? +
-   id B9D0AD35DB; Tue,  4 Jun 2002 21:46:59 -0400 (EDT)
+   id B9D0AD35DB; Tue,  4 Jun 2002 21:46:59 -0400 (EDT)
?   +
- Message-ID: <15613.28051.707126.569...@dom.ain>
+ Message-ID: <15613.28051.707126.569...@dom.ain>
?+
- Date: Tue, 4 Jun 2002 21:46:59 -0400
+ Date: Tue, 4 Jun 2002 21:46:59 -0400
? +
- MIME-Version: 1.0
+ MIME-Version: 1.0
?  +
- Content-Type: text/plain; charset=us-ascii
+ Content-Type: text/plain; charset=us-ascii
?   +
- Content-Transfer-Encoding: 7bit
+ Content-Transfer-Encoding: 7bit
?+
- Subject: bug demonstration
+ Subject: bug demonstration
?   +
-   123456789112345678921234567893123456789412345678951234567896123456789712
34567898112345678911234567892123456789112345678911234567892123456789
+   123456789112345678921234567893123456789412345678951234567896123456789712
34567898112345678911234567892123456789112345678911234567892123456789
?
+
-   more text
+   more text
?+
- From: aper...@dom.ain (Anne P. Erson)
+ From: aper...@dom.ain (Anne P. Erson)
?  +
- To: bper...@dom.ain

[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Basically, adding the uppercase letters back in would provide no gain in 
entropy on a case-insensitive filesystem (as the upper and lower case letters 
will collide). Increasing the length of the random sequence would provide a 
consistent gain regardless of filesystem properties.

--

___
Python tracker 

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



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

2011-05-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

>>> tc.assertEqual("x\n" * 40 + "\n", "x\n" * 40 + "\r\n")
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 662, in 
assertEqual
assertion_func(first, second, msg=msg)
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 1041, in 
assertMultiLineEqual
self.fail(self._formatMessage(msg, standardMsg))
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 531, in fail
raise self.failureException(msg)
AssertionError: 
'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx
 [truncated]... != 
'x\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx\nx
 [truncated]...
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
  x
- 
+ 


It isn't obvious when looking at this printout that the last newline differed.

--
components: Library (Lib)
messages: 135608
nosy: ezio.melotti, michael.foord, pitrou
priority: low
severity: normal
status: open
title: assertEqual doesn't display newline differences quite well
type: behavior
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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

+1 for increasing the number of random characters to 8
-1 for restoring uppercase letters

--

___
Python tracker 

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



[issue12036] ConfigParser: items() adds the vars dictionary to the result

2011-05-09 Thread Łukasz Langa

Łukasz Langa  added the comment:

This annoyance can't be fixed in 2.x anymore since this is a change of 
behaviour requiring a full release. While it is very unlikely someone depended 
on this "feature", changing it breaks compatibility.

Reclassified as `Documentation` to explicitly describe that change in 3.2.

--
assignee:  -> lukasz.langa
components: +Documentation -Library (Lib)
priority: normal -> low
stage:  -> needs patch
versions: +Python 3.2, Python 3.3 -Python 2.6, Python 2.7

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Minor clarification: after my first comment, I realised that the original 
change in the character set didn't actually fix anything, it just propagated 
the effectively smaller sample space on case-insensitive filesystems to all 
filesystems. Increasing the number of random characters to 8 will more than 
compensate for that reduction while retaining the cross-platform consistency in 
behaviour.

--

___
Python tracker 

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



[issue12036] ConfigParser: Document items() added the vars dictionary to the result

2011-05-09 Thread Łukasz Langa

Changes by Łukasz Langa :


--
title: ConfigParser: items() adds the vars dictionary to the result -> 
ConfigParser: Document items() added the vars dictionary to the result

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

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

Charles-François Natali  added the comment:

@Nick
I fully agree with you, but my point was that it doesn't make it less safe on 
case-insensitive filesystems.
Apart from that, it's of course better to increase the length of the random 
sequence.

--

___
Python tracker 

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



[issue12036] ConfigParser: Document items() added the vars dictionary to the result

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 62e2b74c3bfc by Łukasz Langa in branch '3.2':
Closes #12036: ConfigParser: Document items() added the vars dictionary to the 
result
http://hg.python.org/cpython/rev/62e2b74c3bfc

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

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Ned Deily

Ned Deily  added the comment:

Sorry, I don't see how that could help.  The point I was making is that the 
directives accepted by GNU readline and BSD editline are completely different 
and one way or another the user is forced to deal with that.  If you used 
read_init_file, you would still need two different files anyway, no?

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

Oh, you mean the security risk if the temporary names can be guessed? My 
recollection is that it is more of a problem for temporary directories than it 
is for temporary files, since the module can't control how files inside a temp 
directory get created. It's been a long time since I read anything detailed on 
the threat models and attack scenarios mkstemp() and friends were designed to 
handle though, so Google may be a better source of answers on that front.

--

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

Ah, I thought that read_init_file used a different filename with libedit.

Would there be a downside in implementing your suggestion labeled trivial, i.e. 
always use readline?

--

___
Python tracker 

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



[issue5114] 2.7: test_threading hangs on Solaris

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

Charles-François Natali  added the comment:

Hmm.
I think this was probably fixed by Gregory in issue #6643 (it's not in Python 
2.7.1).
Could you try with Python 3.2, or a current snapshot?

--
nosy: +neologix

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Ned Deily

Ned Deily  added the comment:

Even if used a different file name, you still have to set up two different sets 
of directives.

The main drawback to the trivial suggestion is that it continues to pull in GNU 
readline, which is now GPLv3-licensed, into the python.org OS X installers. In 
general, we try to avoid shipping GPL-licensed software since it can complicate 
the allowable usages of the installed Python.

(Since I opened this one, I'm reassigning it to myself.)

--
assignee: ronaldoussoren -> ned.deily

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Éric Araujo

Éric Araujo  added the comment:

> Even if used a different file name, you still have to set up two
> different sets of directives.

I was assuming this would not be a problem: the .inputrc (or hypothetical 
.editrc file) is written once for all applications, it’s not a Python-specific 
task.  What I didn’t see is that users do not necessarily know about which file 
is used, so it’s at least a doc problem.

For the perceived problem with licensing, I’m adding Martin to nosy, not 
because he’s a PSF director but because he’s had to make similar choices for 
the Windows installers.

Martin, here’s the context: the Mac installer sometimes builds readline with 
the real readline or libedit.  There’s a doc problem which can be solved either 
by always using the same lib.  The easiest to implement now would be choosing 
readline, but Ned says: “The main drawback to the trivial suggestion is that it 
continues to pull in GNU readline, which is now GPLv3-licensed, into the 
python.org OS X installers. In general, we try to avoid shipping GPL-licensed 
software since it can complicate the allowable usages of the installed Python.” 
 Could you provide advice?

--
nosy: +loewis

___
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-05-09 Thread Sandro Tosi

Sandro Tosi  added the comment:

What about the attached (v3) patch? the "This allows...experts hands." part can 
be remove completely if can be mis-interpreted.

--
Added file: http://bugs.python.org/file21944/issue11948-v3.patch

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

2011-05-09 Thread Ned Deily

Ned Deily  added the comment:

́Éric, Martin was involved in the earlier discussions when the support for 
editline was originally added to the readline module.  We've been over this 
ground before.  See Issue6872 and Issue6877.

There are a number of options here.  I plan to investigate the supplying 
editline with the older installer variant.  That fits in with some other 
installer improvements that I'm working on.  I would prefer to defer further 
discussion on this issue until I've had a chance to further pursue that option.

--

___
Python tracker 

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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah

New submission from Stefan Krah :

The FreeBSD-AMD64 bot shows an error in test_logging:

http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/243/steps/test/logs/stdio

Exception in thread Thread-281:
Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/threading.py", 
line 737, in _bootstrap_inner
self.run()
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/threading.py", 
line 690, in run
self._target(*self._args, **self._kwargs)
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_logging.py", 
line 726, in serve_forever
asyncore.loop(poll_interval, map=self.sockmap)
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/asyncore.py", 
line 214, in loop
poll_fun(timeout, map)
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/asyncore.py", 
line 144, in poll
r, w, e = select.select(r, w, e, timeout)
select.error: (9, 'Bad file descriptor')

Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/logging/handlers.py", 
line 1053, in emit
h.getresponse()#can't do anything with the result
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
1046, in getresponse
response.begin()
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
346, in begin
version, status, reason = self._read_status()
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
316, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
Logged from file test_logging.py, line 1493
/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/logging/__init__.py:837:
 ResourceWarning: unclosed 
  self.emit(record)
Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/logging/handlers.py", 
line 1053, in emit
h.getresponse()#can't do anything with the result
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
1046, in getresponse
response.begin()
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
346, in begin
version, status, reason = self._read_status()
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/http/client.py", line 
316, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
Logged from file test_logging.py, line 1493

--
components: Tests
messages: 135622
nosy: skrah, vinay.sajip
priority: normal
severity: normal
status: open
title: test_logging: bad file descriptor on FreeBSD bot
type: behavior
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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Stefan Krah

Changes by Stefan Krah :


--
keywords: +buildbot

___
Python tracker 

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



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

2011-05-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This patch exposes a new read-only property of multiprocessing.Process objects, 
named "sentinel".
As the doc indicates, this is a file descriptor undex Unix, and a handle under 
Windows. Both are suitable for flexible polling/waiting with the appropriate OS 
primitives. They become ready when the process has ended.
Under Unix, this also replaces the repeated polling in _Popen.wait() (called 
from Process.join()) with a regular select() call, making it friendlier with 
CPU low-power states.

This is necessary for issue9205.

--
components: Library (Lib)
files: process_sentinel.patch
keywords: patch
messages: 135623
nosy: asksol, brian.curtin, gregory.p.smith, jnoller, neologix, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Expose a Process.sentinel property (and fix polling loop in 
Process.join())
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21945/process_sentinel.patch

___
Python tracker 

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



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

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Part of the patch submitted standalone in issue12040.

--
dependencies: +Expose a Process.sentinel property (and fix polling loop in 
Process.join())

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread R. David Murray

New submission from R. David Murray :

It doesn't matter which order test_os and test_ctypes run in, but if they 
precede test_wait3 test_wait3 will fail.  When the test is immediately re-run 
it passes.

The reason ought to be interesting once we figure it out :)

Tested on linux.  Doesn't appear to affect other branches.

[1/3] test_os
[2/3] test_ctypes
[3/3] test_wait3
test test_wait3 failed -- Traceback (most recent call last):
  File "/home/rdmurray/python/p33/Lib/test/fork_wait.py", line 72, in test_wait
self.wait_impl(cpid)
  File "/home/rdmurray/python/p33/Lib/test/test_wait3.py", line 30, in wait_impl
self.assertEqual(spid, cpid)
AssertionError: 14480 != 14487

--
keywords: buildbot
messages: 135625
nosy: r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: test_os test_ctypes test_wait3 causes test_wait3 error
type: behavior
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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12042] What's New multiprocessing example error

2011-05-09 Thread Davi Post

New submission from Davi Post :

In this section:
http://docs.python.org/whatsnew/2.6.html#pep-371-the-multiprocessing-package

This sentence follows the first example:
"A Queue is used to communicate the input parameter N and the result."

In the example, the queue is used only for the result, not the input parameter 
N.

[P.S. I'd be happy to submit corrections, but don't want to have to install and 
learn Mercurial. Is there a simpler way?]

--
assignee: docs@python
components: Documentation
messages: 135626
nosy: davipo, docs@python
priority: normal
severity: normal
status: open
title: What's New multiprocessing example error
versions: Python 2.6

___
Python tracker 

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



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

2011-05-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Please don't make these kind of changes.  Guido has been clear that the docs 
need to affirmatively state what the language does.  

Except for certain security risks or segfault risks, the docs should avoid 
wording along the lines of "feature x is dangerous" or "experts only".  These 
kind of value judgements belong in blogs and wikis, not in the core 
documentation which should simply focus on what the language does and examples 
of how to use it effectively.

--

___
Python tracker 

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



[issue12043] Update shutil documentation

2011-05-09 Thread Sandro Tosi

New submission from Sandro Tosi :

This issue is to keep track of the 'shutil' documentation update, since it 
seems to miss several information (in particular in comparison with the 
docstrings).

I'll post patches as soon as I get them.

--
assignee: docs@python
components: Documentation
messages: 135628
nosy: docs@python, sandro.tosi
priority: low
severity: normal
stage: needs patch
status: open
title: Update shutil documentation
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



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

2011-05-09 Thread Sandro Tosi

Sandro Tosi  added the comment:

Sorry Raymond for the bad editing, I was confused by thinking 'tutorial' is 
particularly meant for new-coming people. Anyhow, sorry again: I attach a patch 
removing the badworded part.

Please let me know if anything else is missing or needs fixing.

Thanks for your check & time.

--
Added file: http://bugs.python.org/file21946/issue11948-v4.patch

___
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-05-09 Thread R. David Murray

R. David Murray  added the comment:

Raymond: I haven't read the examples in detail so I don't have an opinion on 
the appropriateness of the text, but I'm curious: while what you say certainly 
applies to the Language Reference, does it also apply to the Tutorial?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

What seems to happen is that test_ctypes runs a lot of ldconfig processes, and 
the 10 retries in fork_wait are not enough to consume them all.

--
nosy: +pitrou

___
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-05-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The tutorial is meant for newcomers.  The experience needs to be positive and 
not leave the reader with worries that something bad will happen if they make a 
misstep.

People commonly use the tutorial to evaluate the language as a whole.  The 
tutorial needs to show people what the language is capable of doing.  It should 
not create the impression that all its features are dangerous and should only 
be used by experts.

--

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9e473917cbfb by Antoine Pitrou in branch 'default':
Issue #12041: Make test_wait3 more robust.
http://hg.python.org/cpython/rev/9e473917cbfb

--
nosy: +python-dev

___
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-05-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

One other stylistic note.  The tone of the tutorial (and all the docs) needs to 
be respectful of the readers intelligence.  We don't presume that the readers 
are stupid.  We lay out the relevant information, show motivating use cases, 
provide glossary links, and do our best to connect-the-dots, but don't talk 
down them or waste their time.

The recent doc patch for using the in-operator instead of str.find borders on 
the edge of not giving readers credit for being able to make trivial inferences 
about the API.

--

___
Python tracker 

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



[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

2011-05-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

I find it a bit strange that Popen.__exit__ closes all standard file 
descriptors leading to the child process, but doesn't wait for process end 
afterwards.
(context management support was added in issue10554)

--
messages: 135635
nosy: brian.curtin, gregory.p.smith, neologix, pitrou
priority: normal
severity: normal
status: open
title: subprocess.Popen.__exit__ doesn't wait for process end
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This should be fixed, can you confirm?

PS: I've opened issue12044 as one of the root causes.

--
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> pending

___
Python tracker 

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



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

2011-05-09 Thread Alex Lai

Alex Lai  added the comment:

I've installed it successfully on another server. That is enough. I haven't got 
time to upgrade my workstation from s10 pre-release to latest s10 release yet.


Thanks for the information,

Alex

--

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Ezio Melotti

Ezio Melotti  added the comment:

Works for me after the commit.

--
resolution: fixed -> 
stage: committed/rejected -> needs patch
status: pending -> open

___
Python tracker 

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



[issue12041] test_os test_ctypes test_wait3 causes test_wait3 error

2011-05-09 Thread Ezio Melotti

Changes by Ezio Melotti :


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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've made recent changes in test_logging to improve coverage, but these errors 
were not being raised on my local development machine (Ubuntu Jaunty). They 
have recently started occurring on my machine, too, so at the moment I'm 
suspecting some other change which is causing an interaction with test_logging.

--

___
Python tracker 

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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip

Vinay Sajip  added the comment:

I've attached a smaller script which shows up the error. It's not tiny, but 
tests the SMTP and HTTP handler tests which show the failures mentioned in 
Stefan's post.

--
Added file: http://bugs.python.org/file21947/server_test.py

___
Python tracker 

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



[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

2011-05-09 Thread Brian Curtin

Brian Curtin  added the comment:

Seems like it would be enough to add a wait() at the end?

diff -r 9e473917cbfb Lib/subprocess.py
--- a/Lib/subprocess.py Mon May 09 21:17:02 2011 +0200
+++ b/Lib/subprocess.py Mon May 09 15:30:02 2011 -0500
@@ -796,6 +796,7 @@
 self.stderr.close()
 if self.stdin:
 self.stdin.close()
+self.wait()

 def __del__(self, _maxsize=sys.maxsize, _active=_active):
 if not self._child_created:

--

___
Python tracker 

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



[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Seems like it would be enough to add a wait() at the end?

Probably, perhaps with a try/finally?

I'm not entirely sure this is a good idea, by the way. May there be some
drawbacks?

--

___
Python tracker 

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



[issue10666] OS X installer variants have confusing readline differences

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

Martin v. Löwis  added the comment:

It's true that we should try to avoid distributing GPL'ed code with binary 
installers. At a minimum, we would have to provide the source of readline for 
download also, and we would have to warn anybody redistributing our binaries 
that they must include the source of readline and Python on the distribution 
media. So it's better to link against libedit, I'd say.

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread STINNER Victor

STINNER Victor  added the comment:

If you care about security, you should not use the Python random module because 
it is not cryptographic. Oh oh, ssl doesn't expose RAND_bytes().

--

___
Python tracker 

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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip

Vinay Sajip  added the comment:

The rest isn't actually failing - it's just that a spurious BadStatusLine 
exception appears to be being raised.

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> If you care about security, you should not use the Python random
> module because it is not cryptographic. Oh oh, ssl doesn't expose
> RAND_bytes().

Feel free to open a separate issue and even provide a patch!

--

___
Python tracker 

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



[issue12039] test_logging: bad file descriptor on FreeBSD bot

2011-05-09 Thread Vinay Sajip

Vinay Sajip  added the comment:

The change which causes the apparently spurious messages is one made by 
Senthil: 25298224cb25 - with the earlier revision 1ac03e071d65 the messages 
don't occur, as you can see here:

vinay@eta-jaunty:~/projects/python/default$ hg update -r 69980
merging Lib/test/test_logging.py
5 files updated, 1 files merged, 0 files removed, 0 files unresolved
vinay@eta-jaunty:~/projects/python/default$ python3.3 Lib/test/regrtest.py 
test_logging
[1/1] test_logging
1 test OK.
[131048 refs]
vinay@eta-jaunty:~/projects/python/default$ hg update -r 69981
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
vinay@eta-jaunty:~/projects/python/default$ python3.3 Lib/test/regrtest.py 
test_logging
[1/1] test_logging
Traceback (most recent call last):
  File "/home/vinay/projects/python/default/Lib/logging/handlers.py", line 
1053, in emit
h.getresponse()#can't do anything with the result
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 1046, in 
getresponse
response.begin()
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 346, in 
begin
version, status, reason = self._read_status()
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 316, in 
_read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
Logged from file test_logging.py, line 1484
/home/vinay/projects/python/default/Lib/logging/__init__.py:837: 
ResourceWarning: unclosed 
  self.emit(record)
Traceback (most recent call last):
  File "/home/vinay/projects/python/default/Lib/logging/handlers.py", line 
1053, in emit
h.getresponse()#can't do anything with the result
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 1046, in 
getresponse
response.begin()
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 346, in 
begin
version, status, reason = self._read_status()
  File "/home/vinay/projects/python/default/Lib/http/client.py", line 316, in 
_read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
Logged from file test_logging.py, line 1484
/home/vinay/projects/python/default/Lib/logging/__init__.py:837: 
ResourceWarning: unclosed 
  self.emit(record)
1 test OK.
[131005 refs]

--
nosy: +orsenthil

___
Python tracker 

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



[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

2011-05-09 Thread Brian Curtin

Brian Curtin  added the comment:

Actually, I don't think the wait() is a good idea. If you want to block and 
infinitely wait on the process to close, you should do so explicitly.

It's probably better that we try to use terminate() or kill() and raise if that 
fails.

--

___
Python tracker 

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



[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

2011-05-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Actually, I don't think the wait() is a good idea. If you want to
> block and infinitely wait on the process to close, you should do so
> explicitly.

Ok.

> It's probably better that we try to use terminate() or kill() and raise if 
> that fails.

Uh, I think it's worse. Using a context manager shouldn't do something
potentially destructive like killing a process.

--

___
Python tracker 

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



  1   2   >