[issue7250] wsgiref.handlers.CGIHandler caches os.environ, leaking info between requests

2009-11-01 Thread Brandon Bloom

New submission from Brandon Bloom :

This issue came up while doing Google App Engine development. Apparently 
the default wsgi handler logic is to cache os.environ into os_environ at 
import time. This is reasonable behavior for wsgi, but when using cgi, 
this is a serious security hole which leaks information between requests.

See this related bug at GAE:
http://code.google.com/p/googleappengine/issues/detail?
id=2040&q=cookies%20dev_appserver.py&colspec=ID%20Type%20Status%20Priority
%20Stars%20Owner%20Summary%20Log%20Component

--
components: Library (Lib)
messages: 94819
nosy: snprbob86
severity: normal
status: open
title: wsgiref.handlers.CGIHandler caches os.environ, leaking info between 
requests
type: security
versions: Python 2.5

___
Python tracker 

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



[issue1628484] Python 2.5 64 bit compile fails on Solaris 10/gcc 4.1.1

2009-11-01 Thread Ronald Oussoren

Changes by Ronald Oussoren :


--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue6873] posix_lchown: possible overflow of uid, gid

2009-11-01 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
priority:  -> normal

___
Python tracker 

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



[issue6873] posix_lchown: possible overflow of uid, gid

2009-11-01 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue1006238] cross compile patch

2009-11-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue7249] Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6

2009-11-01 Thread Ryan Leslie

New submission from Ryan Leslie :

py> StringIO.StringIO("foo").read(long(1))
'f'

py> io.BytesIO("foo").read(long(1))
Traceback (most recent call last):
  File "", line 1, in 
TypeError: integer argument expected, got 'long'

This is known to cause problems when reading zip data from a BytesIO
object with zipfile. See this recent thread on comp.lang.python:

http://groups.google.com/group/comp.lang.python/browse_thread/thread/337c1b8a48e8acae/

--
components: Library (Lib)
messages: 94818
nosy: ryles
severity: normal
status: open
title: Consider allowing io.BytesIO sizes to be passed as 'long' in 2.6
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



[issue1006238] cross compile patch

2009-11-01 Thread Mike Frysinger

Mike Frysinger  added the comment:

the chflags is specifically documented as needing a runtime test:
# On Tru64, chflags seems to be present, but calling it will
# exit Python

which is why i left the default of AC_TRY_RUN but cross-compile falls
back to a simple link test.  btw, a compile test is not valid when
trying to see if a function exists.  you'll get a successful compile
(and warning about implicit function), but no error because you didnt
finally link the object with the undefined reference.

somewhat similar are the compiler checks (profile/pthread/alias/etc...).
 some compilers do different things when linking and compiling (like gcc
and -pthread), so sticking to a LINK in the fallback of the RUN is
better, although not always perfect.  some flags are accepted/ignored by
compilers and issue only warnings about the unknown flags, not errors. 
but this issue probably isnt worth worrying about considering the code
in there today suffers from this edge case (and if no one is
complaining, then forget about it).

in terms of making sure all AC_TRY_RUN's have cross-compile fallbacks, i
only worried about the ones that actually get exercised.  the two i
posted fixes for are the only ones ive seen people (and myself) actively
hit.

the ipv6 should def have a LINK fallback, and it should try using
in6addr_any as that is often an exported symbol (which is missing when
ipv6 doesnt exist).

the double endian checks could easily be made into a compile test with a
creative grep.  pick a double value that expands into a funky ascii
string and then grep the object file for a match.  otherwise, a char
swapped ascii string indicates it's big endian.

the wchar/rshift signed tests can be made into a compile-only test by
creative use of arrays (like autoconf does now with compile sizeof() tests).
  main() { char foo[(((wchar_t) -1) < ((wchar_t) 0)) ? 1 : -1]; }
compilers will portably abort when array size is negative, and this
expression should be a constant.

i dont think any of the "broken" ones need to be sorted out as they
already have cross-compile fall backs and there isnt much to be done in
figuring out if the run time env is broken.

thanks Greg for the commits !

--

___
Python tracker 

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



[issue1006238] cross compile patch

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

these two have been merged and applied to trunk.

"""
i fixed the chflags specific check a long time ago (as i imagine others
have as well):
http://sources.gentoo.org/dev-lang/python/files/python-2.6-chflags-
cross.patch

same goes for the printf %zd test:
http://sources.gentoo.org/dev-lang/python/files/python-2.5-cross-
printf.patch
"""

--

___
Python tracker 

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



[issue6896] Intermittent failures in test_mailbox

2009-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ezio indicated that the patch suppressed all failures for him, so I
committed it on trunk.

--

___
Python tracker 

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



[issue4698] Solaris buildbot failure on trunk in test_hostshot

2009-11-01 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

I checked in the fix on the 2.6 branch.

--

___
Python tracker 

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



[issue1006238] cross compile patch

2009-11-01 Thread Garrett Cooper

Garrett Cooper  added the comment:

Ok. Taking a look at trunk...

The following could be converted to AC_TRY_COMPILE statements for the
3rd AC_TRY_RUN tuple:

1. $ac_enable_profiling : 697
2. $ac_cv_no_strict_aliasing_ok : 921
3. $ac_cv_opt_olimit_ok : 1070
4. $ac_cv_olimit_ok : 1092
5. $ac_cv_pthread_is_default : 1126
6. $ac_cv_kpthread : 1163
7. $ac_cv_pthread : 1225
8. $ac_osx_32bit : 1569
9. $ac_cv_pthread_system_supported : 2229
10. $ac_cv_have_size_t_format : 3959

The following can just be converted to AC_TRY_COMPILE:
1. $ipv6 : 2278
2. $ac_cv_have_chflags : 2663
3. $ac_cv_have_lchflags : 2693

The following will need to be sorted out, as to what needs to be done
here, as they are legitimate runtime only tests:
1. $ac_cv_little_endian_double : 3249
2. $ac_cv_big_endian_double : 3271
3. $ac_cv_mixed_endian_double : 3299
4. $ac_cv_x87_double_rounding : 3354
5. $ac_cv_broken_sem_getvalue : 3395
6. $ac_cv_tanh_preserves_zero_sign : 3430
7. $ac_cv_wchar_t_signed : 3510
8. $ac_cv_rshift_extends_sign : 3597
9. $ac_cv_broken_nice : 3714
10. $ac_cv_broken_poll : 3735
11. $ac_cv_working_tzset : 3772

Taking a look at py3k, most of the offsets are the same -- some have
changed, but the only the test which doesn't exist in trunk is the
following:

1. $ac_cv_broken_mbstowcs : 3872

Again, this is a valid runtime test, so it needs to be sorted out what
should be done here with cross-compilation.

--

___
Python tracker 

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



[issue7248] test_importlib uses a fixed name in /tmp

2009-11-01 Thread Brett Cannon

Brett Cannon  added the comment:

Yeah, I should have used tempfile.mkdtemp().

--

___
Python tracker 

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



[issue7245] better Ctrl-C support in pdb (program can be resumed)

2009-11-01 Thread Ilya Sandler

Ilya Sandler  added the comment:

No,I don't think patch in the issue #1294 addresses the problem which
I'm trying to solve.

I tried applying patch#1294, and Ctrl-C will still throws your debugger
into postmortem mode and I don't think you can change that by overriding
do_KeyboardInterrupt(): when do_KbdInterrupt() is called you cannot
resume execution (or at least I don't know any way of doing it).

My patch handles the SIGINT directly which allows it to set tracing and
resume the program immediately (and keyboardinterrupt is never raised)

I'll also add comments to patch#1294

--

___
Python tracker 

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



[issue7248] test_importlib uses a fixed name in /tmp

2009-11-01 Thread Antoine Pitrou

New submission from Antoine Pitrou :

test_importlib uses fixed names in /tmp (e.g. /tmp/pkg), which will make
the tests fail is such files/dirs already exist and aren't writable by
the current user (which can happen if several users run the python test
suite...).

--
assignee: brett.cannon
components: Library (Lib), Tests
messages: 94810
nosy: brett.cannon, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_importlib uses a fixed name in /tmp
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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2009-11-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: 2.6.4 fnctl test failure -> test_fcntl_64_bit from test_fcntl.py fails 
in Python 2.6.4

___
Python tracker 

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




[issue7247] 2.6.4 fnctl test failure

2009-11-01 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue4698] Solaris buildbot failure on trunk in test_hostshot

2009-11-01 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

This was apparently fixed some months ago with r69410.
Neil, would you mind backporting it to 2.6?

--
assignee:  -> nascheme
nosy: +nascheme

___
Python tracker 

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



[issue1115] Minor Change For Better cross compile

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Thanks for the patch!

applied in trunk r76028/r76029.  py3k r76030/r76032

There are more of these, other bugs are open that should result in us 
cleaning them up.  see issue1006238 for example.

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Forward-ported in r76025 r76026 and r76027.

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



[issue1006238] cross compile patch

2009-11-01 Thread Mike Frysinger

Mike Frysinger  added the comment:

Gregory: there's no need to be a dick.  i'm pointing out the obvious --
bugs have been open literally for *years* with zero assistance/feedback
from anyone who can actually get things merged.  people have posted
patches, but no one has said "xxx needs to be done in order to get
merged".  you havent posted anything here either (assuming you're
someone who can actually get things merged and not just comment in a
tracker).  if you can at least do something with trackers, you should
start by marking 1597850 as a dupe of this one.  or you can simply prove
my point by continuing to contribute nothing.

the basic required changes are simple -- fix the few autoconf tests. 
getting automatic cross-detection (building a host python/pygen
automatically) isnt nearly as important as long as people have a way to
tell the build system to use a different python/pgen for build purposes.
 last i looked, these simple changes were pretty trivial to move across
major versions of python.

i fixed the chflags specific check a long time ago (as i imagine others
have as well):
http://sources.gentoo.org/dev-lang/python/files/python-2.6-chflags-cross.patch

same goes for the printf %zd test:
http://sources.gentoo.org/dev-lang/python/files/python-2.5-cross-printf.patch

however, unless these trivial baby steps can be made, worrying about the
next step (properly cross-compiling modules and such) is a complete
waste of time as these require diving into the python-specific build
system which does see a lot of churn over versions.

--
nosy: +vapier

___
Python tracker 

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



[issue6665] fnmatch fails on filenames containing \n character

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

release26-maint r76023 to appear in Python 2.6.5.
release31-maint r76024 to appear in Python 3.1.2.

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



[issue1008086] socket.inet_aton returns 8 bytes on LP64 platforms

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Fixed in release26-maint r76022.  This will appear in Python 2.6.5.

I'm leaving release30-maint alone as it is already in 3.1.

sorry for not making it into 2.6.3/2.6.4 despite the code being ready.  I 
should've set this as a release blocker.

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



[issue1006238] cross compile patch

2009-11-01 Thread Garrett Cooper

Garrett Cooper  added the comment:

On Sun, Nov 1, 2009 at 5:50 AM, Mike Frysinger  wrote:
>
> Mike Frysinger  added the comment:
>
> AC_TRY_RUN is already documented:
> http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html#index-AC_005fTRY_005fRUN-1992
>
> there are a bunch of distros out there (like OE and Gentoo) that have
> been maintaining cross-compile patches for python.  i'm pretty sure the
> stuff in Gentoo works for 2.6.x, but i havent tried 3.1.x yet.
>
> ive given up on pushing to upstream as this bug (among others)) shows
> that such attempts go nowhere

Actually what Mike showed was helpful for me. I didn't realize that
the 3rd argument to AC_TRY_RUN was for Canadian cross, aka
cross-compiling.

My personal opinion on why past attempts have failed (and it's just my
opinion) is probably because:

1. The change set wasn't incremental, thus the diff was large, and the
checkin was rejected.
2. The patch was based on previous versions of python, which doesn't
help the current trunk, release-maint* branches, etc.

I'm more than happy to steal existing code (if possible :)..), but it
should be well designed so longterm maintenance can be eased, and the
cross-compile issue can be resolved in a correct manner.

It took me 2 months to rewrite the Makefile infrastructure for LTP --
this should be a lot simpler and less painful to resolve (in terms of
autotools input files, Makefile, etc). setup.py and distutils is
something that I need to defer to someone more seasoned in the python
internals (at least for mentoring) s.t. it can be resolved on all
branches.

First comes first, I'll propose some changes for cross-compilation
dealing with some of the AC_TRY_RUN tests -- there are some tests that
can be turned into preprocessor defines and/or AC_TRY_COMPILES [the
sizeof(pthread_t), etc], then I'll look at the other tests and propose
appropriate action for them.

If needed individuals in the python org. aren't aware of this work, it
probably should be brought to their attention sometime in the next
couple of weeks, because I need to make sure core team members are
aware of these changes so that they can get reviewed and checked into
the project in a timely manner (my group needs to upgrade from 2.4.2
to python 2.6.x in the next couple months; this is a stopgap item for
us because we use a cross-compilation environment).

All the best,
-Garrett

--

___
Python tracker 

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



[issue7247] 2.6.4 fnctl test failure

2009-11-01 Thread Tony Vroon

New submission from Tony Vroon :

chain...@prometheus ~ $ python2.6 
/usr/lib64/python2.6/test/test_fcntl.py
struct.pack: 
'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
test_fcntl_64_bit (__main__.TestFcntl) ... ERROR
test_fcntl_file_descriptor (__main__.TestFcntl) ... ok
test_fcntl_fileno (__main__.TestFcntl) ... Status from fcntl with 
O_NONBLOCK: 
0
String from fcntl with F_SETLKW: 
'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
ok

==
ERROR: test_fcntl_64_bit (__main__.TestFcntl)
--
Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 96, in 
test_fcntl_64_bit
fcntl.fcntl(fd, cmd, flags)
IOError: [Errno 22] Invalid argument

--
Ran 3 tests in 0.000s

FAILED (errors=1)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 105, in 
test_main()
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 102, in test_main
run_unittest(TestFcntl)
  File "/usr/lib64/python2.6/test/test_support.py", line 724, in 
run_unittest
_run_suite(suite)
  File "/usr/lib64/python2.6/test/test_support.py", line 707, in 
_run_suite
raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 96, in 
test_fcntl_64_bit
fcntl.fcntl(fd, cmd, flags)
IOError: [Errno 22] Invalid argument

--
components: Tests
messages: 94801
nosy: Chainsaw
severity: normal
status: open
title: 2.6.4 fnctl test failure
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



[issue7208] Getpass echo's password to screen on 2.6, but not on 2.5 or 3.1

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

merged into release26-maint in r76015.  this patch also fixed issue7246.

py3k r76017
release31-maint r76019

--
resolution:  -> fixed
status: open -> closed
versions:  -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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Added r76018 to use Hirokazu's test for the RuntimeError case and to
redirect stdout to a file for the StopIteration case.  Also, fixed-up
weird indentation in the C code.

--

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--

___
Python tracker 

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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

change that.  it looks like r76000 in trunk already fixes this.  i was 
using an old build when i tried earlier.

merged into release26-maint in r76015.

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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

and the r76000 patch does not fix it.  investigating.

--

___
Python tracker 

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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

ah i misread your example.  the following works to reproduce it:


Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, getpass
>>> time.sleep(5)
getpass.getpass()  


>>> getpass.getpass()
Password: Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/getpass.py", line 81, in unix_getpass
stream.write('\n')
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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

am unable to duplicate this behavior on Linux or OS X using python 2.6.

What platform did you see the problem on?

that said, can you apply the following patch to your getpass.py and see if 
it helps at all?

http://svn.python.org/view/python/trunk/Lib/getpass.py?
r1=74860&r2=76000&pathrev=76000

--

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Will take a look at your patch.
Am also still doing work to complete r76004
for the case where the refcnt > 1.

--

___
Python tracker 

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



[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

2009-11-01 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith
components: +Library (Lib)
nosy: +gregory.p.smith
priority:  -> normal
title: getpass crashes when several returns are in stdin before getpass was 
called -> getpass raises IOError when several returns are in stdin before 
getpass was called
type: crash -> behavior

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Already checked-in a fix for Py2.6 in r76004.
Will forward port shortly.

--

___
Python tracker 

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



[issue1006238] cross compile patch

2009-11-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Removing a toxic person from the cc list.  Mike, please go harm some other 
all volunteer project.

--
nosy:  -vapier

___
Python tracker 

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



[issue7246] getpass crashes when several returns are in stdin before getpass was called

2009-11-01 Thread Avihu Turzion

New submission from Avihu Turzion :

When I have the following code:

blah.py
===

import getpass
nothing = getpass.getpass("blah:")

And I run it like so:

>>> sleep 5
./blah.py 


(I write the ./blah.py and returns while the sleep occurs)

I get the following stack-trace:

Traceback (most recent call last):
  File "./xuy.py", line 5, in 
nothing = getpass.getpass("XUY:")
  File "/usr/local/lib/python2.6/getpass.py", line 81, in unix_getpass
stream.write('\n')
IOError: [Errno 29] Illegal seek
close failed in file object destructor:
IOError: [Errno 29] Illegal seek

This error occurs only when getpass is called with 2 or more returns in 
the buffer. One return will not reveal the problem.

Running this code with strace shows clearly that the seek problem is 
because that for return in the buffer it tries to seek back. 2 returns 
will cause it to seek -2. 7 returns will cause it to seek -7.

This problem was introduced in python 2.6, and is maintained throughout 
the minor releases of python 2.6 - 2.6.4. It doesn't appear in python 
2.5 and before, and it doesn't appear in python 3.

Doing sys.stdin.flush() doesn't resolve this issue.

--
components: IO
messages: 94791
nosy: avihu
severity: normal
status: open
title: getpass crashes when several returns are in stdin before getpass was 
called
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



[issue6748] test_debuglevel from test_telnetlib.py fails

2009-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Please note that the Windows buildbot shows another error:

==
ERROR: test_debuglevel (test.test_telnetlib.OptionTests)
--
Traceback (most recent call last):
  File
"E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_telnetlib.py",
line 409, in test_debuglevel
self._test_debuglevel([a, EOF_sigil], b)
  File
"E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\test\test_telnetlib.py",
line 389, in _test_debuglevel
txt = telnet.read_all()
  File
"E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\telnetlib.py", line
325, in read_all
self.fill_rawq()
  File
"E:\cygwin\home\db3l\buildarea\3.1.bolen-windows\build\lib\telnetlib.py", line
516, in fill_rawq
buf = self.sock.recv(50)
socket.error: [Errno 10053] An established connection was aborted by the
software in your host machine


According to a quick search on the Web, 10053 under Windows would be for
ECONNABORTED. Bazaar apparently faced the same issue:

https://lists.ubuntu.com/archives/bazaar/2006q4/020035.html

--

___
Python tracker 

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



[issue6896] Intermittent failures in test_mailbox

2009-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

PS: this is the kind of traces I had when running TestMaildir on David's
buildbot:

at 1257086460.18, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.21, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.24, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.27, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.3, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.33, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086459.0
at 1257086460.36, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086460.0
at 1257086460.38, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086460.0
at 1257086460.4, linking/renaming ... mtime of
'/home/pitrou/trunk/@test_23145_tmp/new' is now 1257086460.0


As you see, the mtime is set to 1257086459 even when time.time() returns
1257086460.00 and higher, and it's only set to 1257086460 when
time.time() reaches 1257086460.36.

--

___
Python tracker 

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



[issue6896] Intermittent failures in test_mailbox

2009-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, here is a patch which seems to fix the problem reliably on RDM's
buildbot. Ezio, can you give it a try?

--
Added file: http://bugs.python.org/file15246/maildir.patch

___
Python tracker 

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



[issue6896] Intermittent failures in test_mailbox

2009-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The explanation seems to be that some systems (including RDM's buildbot)
have slightly bizarre mtime behaviour:

$ date && python -c 'import os; os.link("setup.py", "t/c")' && stat t &&
date
Sun Nov  1 09:49:04 EST 2009
  File: `t'
  Size: 144 Blocks: 0  IO Block: 4096   directory
Device: 811h/2065d  Inode: 223152  Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1001/  pitrou)   Gid: ( 1005/  pitrou)
Access: 2009-11-01 09:10:11.0 -0500
Modify: 2009-11-01 09:49:03.0 -0500
Change: 2009-11-01 09:49:03.0 -0500
Sun Nov  1 09:49:04 EST 2009


As you see, the mtime of the directory is set a full one second before
the date at which its contents are modified.
I guess the only safe solution is to explicitly flush the internal cache
when we do any modifications.

--

___
Python tracker 

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



[issue7217] IDLE Subprocess Startup Error

2009-11-01 Thread ali

ali  added the comment:

?

--

___
Python tracker 

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



[issue1006238] cross compile patch

2009-11-01 Thread Mike Frysinger

Mike Frysinger  added the comment:

AC_TRY_RUN is already documented:
http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html#index-AC_005fTRY_005fRUN-1992

there are a bunch of distros out there (like OE and Gentoo) that have
been maintaining cross-compile patches for python.  i'm pretty sure the
stuff in Gentoo works for 2.6.x, but i havent tried 3.1.x yet.

ive given up on pushing to upstream as this bug (among others)) shows
that such attempts go nowhere

--

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

> correct elements are returned even when RuntimeError is
raised.

Or maybe it is not guaranteed. :-)

--

___
Python tracker 

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



[issue7244] itertools.zip_longest behaves strangely with an iterable class

2009-11-01 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I created the patch to improve test which was checked in r76004. This
patch checks if correct elements are returned even when RuntimeError is
raised. Could you take a look?

--
Added file: http://bugs.python.org/file15245/improve_test_itertools.patch

___
Python tracker 

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