[issue7367] OSError [errno 13] permission denied

2009-11-20 Thread Ned Deily

Ned Deily  added the comment:

Can you be more specific about how to reproduce the problem you saw?  
Also, which version of Python were you using?  Please copy the information 
from the the first line of IDLE's Python Shell window, like so:

Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin

--
nosy: +ned.deily

___
Python tracker 

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



[issue7363] Inconsistent indentation in SocketServer docs

2009-11-20 Thread Yuv Gre

Changes by Yuv Gre :


--
title: Inconsisten Indentation In SocketServer Docs -> Inconsistent indentation 
in SocketServer docs

___
Python tracker 

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



[issue7367] OSError [errno 13] permission denied

2009-11-20 Thread Jay Lugo

Jay Lugo  added the comment:

Python 2.6.4
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin

>From the best I can tell the error came about
when I updated my firewall/shared folder settings.
(I lost a computer on my home network due to my partner leaving me :( )
so I did a complete revamp of my network to close up any holes
and Bam no IDLE.

The solution as I said came about from simply changing the user access
on the public folder in User/ME/

I initially came across the error when attempting to get a modules list
and was returned a list of errors. One of them was the [errno 13].

Hope that clears things.

--

___
Python tracker 

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



[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-11-20 Thread Tim Peters

Tim Peters  added the comment:

Ezio, it was Guido's design decision, it was intentional, and it's been
documented from the start(*).  So you can disagree with it, but you
won't get anywhere claiming it's "a bug":  intentional, documented
behaviors are never "bugs".  At best you can make a case for that
they're design errors.

But that won't fly either.  It's no more inconsistent than that, e.g.,
most floating-point numbers in practice aren't usually displayed with an
exponent, but if an exponent is needed, one is added to the output:

>>> .25
0.25
>>> .25 * 10**100
2.5e+99

Overly literal readings don't help your case either.  Yes, __str__ aims
at producing nice output, but it's pedantic to argue as if that is, or
should be, __str__'s /only/ goal.  Python's design just isn't that
simple-minded ;-)  If someone uses non-zero microseconds, presumably
they want to see them.

Utterly trivial mechanical parsing of str() output is a non-goal in Python.

Of course the failing test should be repaired, and that was a good
catch.  But the chance of changing the language to make the test work
as-is is approximately 0%.


(*) The datetime docs already say:

"""
__str__( ) 

For a datetime instance d, str(d) is equivalent to d.isoformat(' '). 
"""

--

___
Python tracker 

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



[issue7342] str(datetime_obj) doesn't include microseconds if their value is 0

2009-11-20 Thread Ezio Melotti

Ezio Melotti  added the comment:

Yes, I wrote the previous message from a cellphone and I wasn't able to
check the doc. It is indeed already documented in datetime.__str__ --
sorry for the noise.
I also noticed that the microseconds are not the only thing that can
change in datetime.isoformat(), there are also the separator and the UTC
offset, so if someone is parsing the output of str(d)/d.isoformat(), he
should already include other checks anyway.

I agree that only the test should be fixed (and possibly others tests
should be added to check that str() outputs the right thing when there
is a UTC offset and/or a different separator).

I'll work on a patch for that.

--
assignee: georg.brandl -> ezio.melotti
components:  -Documentation, Extension Modules

___
Python tracker 

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



[issue6077] Unicode issue with tempfile on Windows

2009-11-20 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +IO -Library (Lib)
priority:  -> normal
stage:  -> patch review
versions: +Python 3.1, Python 3.2 -Python 3.0

___
Python tracker 

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



[issue5080] PyArg_Parse* should raise TypeError for float parsed with integer format

2009-11-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I think this should be signalled on the mailing-list, by the way. I
expect everyone to agree of course :)

--

___
Python tracker 

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



[issue7368] Internal error in threading.py

2009-11-20 Thread JoostBehrends

New submission from JoostBehrends :

On Nov.20, 2009 i got the traceback below from Python 3.1.1 under
WindowsXP-SP3, as several times before. From code with 

def _core(func, my_args):
A = Thread(target = func, args = my_args); A.start(); A.join()
_core(ask_user, (question, default_answer))

Doesn't matter from what, the traceback is showing no calling line (thus
there is at least a slip in threading.py's exception handlers):

Unhandled exception in thread started by >
Traceback (most recent call last):
  File "D:\Programme\Python31\lib\threading.py", line 482, in _bootstrap
self._bootstrap_inner()
  File "D:\Programme\Python31\lib\threading.py", line 558, in
_bootstrap_inner
self._stop()
  File "D:\Programme\Python31\lib\threading.py", line 569, in _stop
self._block.notify_all()
  File "D:\Programme\Python31\lib\threading.py", line 273, in notify_all
self.notify(len(self._waiters))
  File "D:\Programme\Python31\lib\threading.py", line 265, in notify
for waiter in waiters:
TypeError: function takes exactly 1 argument (0 given)

--
components: Library (Lib)
messages: 95539
nosy: 3Jane
severity: normal
status: open
title: Internal error in threading.py
type: compile error
versions: Python 3.1

___
Python tracker 

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



[issue7363] Inconsistent indentation in SocketServer docs

2009-11-20 Thread R. David Murray

R. David Murray  added the comment:

Thanks, fixed in r76430.  It'll get to the other doc versions eventually.

--
nosy: +r.david.murray
priority:  -> low
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior
versions: +Python 2.6, Python 3.1

___
Python tracker 

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



[issue5080] PyArg_Parse* should raise TypeError for float parsed with integer format

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

Yes, checking with python-dev sounds sensible.  I'll wait until there's
a working patch, though.

--

___
Python tracker 

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



[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-20 Thread prm225

New submission from prm225 :

The example starts off with 1 being printed, while the series is 
expected to begin with 0 and 1.
The example in 4.6 (defining functions) should have been:

def fib(n):
  a, b = 0, 1
  while a < n:
print a,
a, b = b, a+b
fib(2000)

0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597

--
assignee: georg.brandl
components: Documentation
messages: 95542
nosy: georg.brandl, prm225
severity: normal
status: open
title: Fibonacci example does not include 0; section 4.6
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



[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

That depends on whether you want to start the sequence with F_0  (=0) or
F_1 (=1), I guess.  Given Python's general preferences for zero-based
indexing, I agree that this very serious issue should be fixed.

See

http://www.research.att.com/~njas/sequences/A45

for an authoritative reference.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue7367] IDLE OSError [errno 13] permission denied accessing help files

2009-11-20 Thread R. David Murray

R. David Murray  added the comment:

A more specific issue title will also help others hitting the same
problem...hopefully I've guessed correctly as to what it should be.

--
nosy: +r.david.murray
priority:  -> normal
title: OSError [errno 13] permission denied -> IDLE OSError [errno 13] 
permission denied accessing help files
type: resource usage -> behavior

___
Python tracker 

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



[issue7367] IDLE OSError [errno 13] permission denied accessing help files

2009-11-20 Thread R. David Murray

Changes by R. David Murray :


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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

I had an opportunity to play with a FreeBSD 7.2 box recently.

The diagnosis is simple.  The solution may be less so...

Diagnosis:  FreeBSD still considers POSIX semaphores (sem_open,
sem_close, etc.) to be experimental, so they're not enabled by default
on a standard install.  So the very first call to sem_open, from
SEM_CREATE in semaphore.c (around line 439), produces the Signal 12.

Enabling POSIX semaphores (assuming that they've been built into the
kernel, which they seem to have been by default) is as simple as
executing 'kldload sem' (as root) at a shell prompt.  After I did this,
test_multiprocessing ran and all tests passed.

So the question is what multiprocessing (and test_multiprocessing)
should do when POSIX semaphores aren't available.  I guess the options
are: (1) fail loudly, with an error message telling the user to enable
the POSIX semaphores, or (2) try to use SysV semaphores (which are
supported out of the box) instead.

In the immediate future we should probably at least detect when POSIX
semaphores don't exist, and skip test_multiprocessing in that case.

--

___
Python tracker 

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



[issue7353] cporting docs recommend using Include/intobject.h, which was removed in 3.1?

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

[Benjamin]
>I wish intobject.h hadn't been removed so soon.

Yes;  I'm sorry about that.

> I'm not really sure how a file of #defines could suffer bitrot.

Good point.  Me neither.

--

___
Python tracker 

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



[issue7316] Add a timeout functionality to common locking operations

2009-11-20 Thread Jesse Noller

Changes by Jesse Noller :


--
nosy: +jnoller

___
Python tracker 

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



[issue1859] textwrap doesn't linebreak on "\n"

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

I'll take a look.

--
assignee:  -> mark.dickinson
priority:  -> normal
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 
2.5

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Jesse Noller

Jesse Noller  added the comment:

Thanks mark - if POSIX semaphores aren't available, we're largely dead-
on-arrival. I thought FBSD was at the point of enabling them by default 
- boo on me. See also: http://bugs.python.org/issue3770#msg73958 and 
http://bugs.python.org/issue3770#msg83495 - with martin's help last 
pycon I cut a lot of the "HAVE_BROKEN..." values to autoconf checks in 
configure.in.

I think the right way (however unpleasant) is to check to see if we have 
POSIX semaphores, period - if we don't, _multiprocessing should just not 
compile.

--

___
Python tracker 

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



[issue7350] csv doesn't handle escaped characters properly

2009-11-20 Thread Virgil Dupras

Virgil Dupras  added the comment:

You have to tell the reader how to handle escaping. In your case, you 
should send escapechar="\\" in reader()'s kwargs.

--
nosy: +vdupras

___
Python tracker 

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



[issue7357] tarfile doesn't detect disk full error on extraction

2009-11-20 Thread Eli Venter

Eli Venter  added the comment:

Yes, thanks errorlevel works as expected, and errors are correctly
generated. It's quite unintuitive to ignore fatal errors by default
however.

--

___
Python tracker 

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



[issue7368] Internal error in threading.py

2009-11-20 Thread JoostBehrends

JoostBehrends  added the comment:

Most probably better to ignore this. Sorry :(

The last line number 265 of the traceback is not the line causing the
error. This can be at quite another place, probably not in threading.py
- this is from code importing a new C-extension from me, who might
muddle the interpreter so terribly, that he is behaving like this
(unfortunately with code working very well on other opportunities).

I remember, that i had such a muddled interpreter with other problems
recently, and am working out now, what the real error might be (perhaps
missing Py_INCREFs). Still this is not the best behavior of the
interpreter, but one should not expect too much safety against
programming errors in C-extensions.

I wouldn't object a total deletion of this thread.

--

___
Python tracker 

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



[issue6077] Unicode issue with tempfile on Windows

2009-11-20 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch looks ok to me.

--
assignee:  -> amaury.forgeotdarc
nosy: +pitrou
resolution:  -> accepted
stage: patch review -> commit review

___
Python tracker 

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



[issue7368] Internal error in threading.py

2009-11-20 Thread R. David Murray

Changes by R. David Murray :


--
priority:  -> normal
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: compile error -> behavior

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a patch that makes FreeBSD behave exactly as though HAVE_SEM_OPEN
is not defined, when semaphores aren't available.  On my FreeBSD 7.2
test system, it results in the multiprocessing module being built
(without the contents of semaphore.c), but the test is skipped, along
with a message indicating that semaphores don't work on that system.

I added an autoconf test for the sem_open failure, and reused the
already existing pyconfig.h variable HAVE_BROKEN_POSIX_SEMAPHORES.

--
keywords: +patch
Added file: http://bugs.python.org/file15368/freebsd_multiprocessing.patch

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Changes by Mark Dickinson :


--
stage:  -> patch review

___
Python tracker 

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



[issue7370] patch: BaseHTTPServer reinventing rfc822

2009-11-20 Thread Josh Kupershmidt

New submission from Josh Kupershmidt :

While digging through Lib/BaseHTTPServer.py, I noticed that the
date_time_string() function duplicates rfc822.formatdate(). Attached is
a patch to eliminate this duplication of code.

--
components: Library (Lib)
files: BaseHTTPServer.patch
keywords: patch
messages: 95554
nosy: schmiddy
severity: normal
status: open
title: patch: BaseHTTPServer reinventing rfc822
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file15369/BaseHTTPServer.patch

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Jesse Noller

Jesse Noller  added the comment:

Looks good so far to me - I'll apply and run the tests locally (but I 
don't have a fbsd box, so I'm just checking for regressions). One question 
- what's with all the 

-rm -f -r conftest*
+rm -f conftest*

Lines in there?

--

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

About the rm -f -r conftest stuff:

My guess is that the last person to update configure used Apple's 
version of autoconf:  Apple seems to have silently 'fixed' autoconf 
version 2.61 to remove some (fairly benign) warnings that appear when 
running the configure script.  Which is fine, but it would be nice if 
the version string for their autoconf gave some indication that it had 
been fixed.

In any case, rm -f is what comes from standard autoconf 2.61, so I think 
that's what should be there.

--

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

One other thought:  if this is applied, would it make sense to ask the 
FreeBSD buildbot maintainer to then enable the POSIX semaphores for 
FreeBSD 7.2 (but probably not for 6.4)?  It looks like FreeBSD 8.0 is just 
around the corner, and the rumours are that it'll have these semaphores 
enabled by default;  it would be nice to know about any multiprocessing 
failures on FreeBSD, so that we can be reasonably sure it'll work on 8.0.

--

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Jesse Noller

Jesse Noller  added the comment:

On Fri, Nov 20, 2009 at 12:08 PM, Mark Dickinson  wrote:
> One other thought:  if this is applied, would it make sense to ask the
> FreeBSD buildbot maintainer to then enable the POSIX semaphores for
> FreeBSD 7.2 (but probably not for 6.4)?  It looks like FreeBSD 8.0 is just
> around the corner, and the rumours are that it'll have these semaphores
> enabled by default;  it would be nice to know about any multiprocessing
> failures on FreeBSD, so that we can be reasonably sure it'll work on 8.0.

Agreed

--

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Jesse Noller

Jesse Noller  added the comment:

Mark, the patch looks ok on os/x and fedora core 12. Nothing jumps out at 
me as incorrect. I'm for committing and watching the BSD buildbot.

--

___
Python tracker 

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



[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-20 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority:  -> critical

___
Python tracker 

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



[issue7361] Strange importlib error during test_multiprocessing failure

2009-11-20 Thread Brett Cannon

Brett Cannon  added the comment:

Huh. I wonder how importlib is ending up being the implementation of 
import then? Guess I also need to double-check everything is still 
cleaning itself up properly.

--

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread Mark Dickinson

Mark Dickinson  added the comment:

Thanks, Jesse.  Applied in r76432 (trunk).  Unfortunately the buildbots 
are all purple right now;  once they're building again, and the FreeBSD 
buildbots have gone green (/me crosses fingers) I'll merge to py3k.

--

___
Python tracker 

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



[issue1859] textwrap doesn't linebreak on "\n"

2009-11-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree that if newlines in the text are left in, they should reset the
characters in line count to 0 the same as inserted newlines.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates

2009-11-20 Thread Brian Curtin

Brian Curtin  added the comment:

After looking at this more, I poked around and found a whole lot of
things either missing or broken with _winreg.

Changes:
- documentation missing for *ReflectionKey, and updated a few
incorrectly documented exceptions in the docstrings
- QueryReflectionKey always returned False if the underlying API call
succeeded (used return code from call instead of bool param)
- addition of RegCreateKeyEx and RegDeleteKeyEx for 64-bit support
- changed the test suite to cover much more of the _winreg API. There
are now classes for local, remote, and 64-bit specific tests, with some
tests in the 64-bit class which are specific to whether Python was
compiled for 32 or 64-bit due to the differences in how _winreg acts.


So far everything passes on XP 32-bit, Server 2003 32-bit, and Server
2003 64-bit with a 32-bit Python. On Server 2003 64-bit with a 64-bit
Python, I get one failure on test_create_open_delete_for_32bit about
DeleteKeyEx -- not sure what the deal is, but I'm looking into it.

There is an added file, delete_regkey.vbs, because 32-bit applications
can create keys in the 64-bit space, but apparently they cannot be
deleted with DeleteKey -- they'd need DeleteKeyEx but that's 64-bit
only. It's used as a cleanup to make sure the key gets deleted in one case.

--
title: Patch - add RegCreateKeyEx to _winreg -> Add {Create|Delete}KeyEx to 
_winreg, doc and test updates
Added file: http://bugs.python.org/file15370/winreg_add_createkeyex_v2.patch

___
Python tracker 

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



[issue7329] global statements outside functions/methods should raise SyntaxError

2009-11-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I once proposed this change, but became less supportive as I can to
appreciate have fewer rather than more special-case rules. With
Gabriel's explanation, I now oppose the idea and think this should be
closed.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7371] Windows 64-bit build "skips" several projects in VS 2008

2009-11-20 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

1. Install Windows 64-bit (SP2)
2. Install Visual Studio 2008 Professional w/ 64-bit components
3. Download Python-2.6.4.tgz
4. Open PCbuild/pcbuild.sln
5. Select "Release" and "x64" in the configuration toolbar

One would notice that only the projects "make_buildinfo" and 
"make_versioninfo" are built (which too as Win32, not x64 - for unknown 
reason). All projects are *skipped*. I don't know why. 

64-bit build would work on a 32-bit Windows machine (cross-
compilation), but not a native 64-bit Windows machine?

Attached is the Visual Studio build log.

--
components: Build, Windows
files: py264-xp64bit-vs2008-buildlog.txt
messages: 95565
nosy: srid
severity: normal
status: open
title: Windows 64-bit build "skips" several projects in VS 2008
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file15371/py264-xp64bit-vs2008-buildlog.txt

___
Python tracker 

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



[issue7371] Windows 64-bit build "skips" several projects in VS 2008

2009-11-20 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

> All projects are *skipped*.

I meant: All other projects are *skipped*.

--

___
Python tracker 

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



[issue7335] int/long discrepancy when formatting zero with "%.0d"

2009-11-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I agree with the 'should' (behave same way), but changing nothing will
break no code. Given that the purpose of 2.7 is to aid 3.x migration, an
argument could be made for matching the 3.x behavior.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-11-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

You specified neither version nor system.
On 3.1, Windows
>>> from io import StringIO as s
>>> s('a\nb\nfoo').readline(-1)

'a\n'

which, I gather, is what you describe as expected, although using -1 to
mean None is rather weird. 

The 3.1 doc says only 
"readline(limit=-1) 
Read and return one line from the stream. If limit is specified, at most
limit bytes will be read."
which would imply that negative numbers are the same as 0.

So even in 3.1, either the behavior is wrong or the doc is incomplete.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7367] pkgutil.walk_packages fails on write-only directory in sys.path

2009-11-20 Thread Ned Deily

Ned Deily  added the comment:

>I initially came across the error when attempting to get a modules list
>and was returned a list of errors. One of them was the [errno 13].

OK, now that makes more sense!

The problem is that somehow you had a write-only directory ("~/Public/Drop 
Box") on your python module search path.  If you type the following commands 
in IDLE or in the interpreter:

import sys
sys.path

you will likely see the "Drop Box" directory in the list of paths (assuming 
things haven't changed).

When you run the "modules" help command, the python help module, pydoc, uses 
the pkgutil module to search the entire list of directories in sys.path and 
attempts to import each package it finds in each directory to print the 
module's help information (btw, there are no separate help files).

While the pkgutil.walk_packages function tries to handle most errors, it 
isn't prepared to handle the case of a write-only directory on sys.path and 
that's the root cause of the error of the error you saw.  The following test 
case demonstrates the problem:

import os, pkgutil, sys

dirname_wo = os.tempnam()
os.mkdir(dirname_wo, 0222)  # write permission only
try:
sys.path.insert(0, dirname_wo)
def onerror(pkgname):
print('onerror called for package %s' % pkgname)
for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
print modname
finally:
os.rmdir(dirname_wo)

The long-term solution is to have pkgutil.walk_packages protect itself 
against os.listdir errors.  A patch is needed for that.

In your case, though, you should check for and remove whatever is adding 
"Drop Box" to your Python sys.path.  Perhaps you have an out-of-date export 
of PYTHONPATH in a shell profile (.bash_profile, etc)?  Or something left 
over in a site-packages pth file (perhaps by trying to install a package 
from the "Drop Box" directory)?  By changing the permissions as you did, you 
worked around the problem but that's not the right solution and you could be 
compromising the security of your drop box file.

--
components: +Library (Lib) -IDLE
title: IDLE OSError [errno 13] permission denied accessing help files -> 
pkgutil.walk_packages fails on write-only directory in sys.path
versions: +Python 2.7, 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



[issue7348] StringIO.StringIO.readline(-1) returns the wrong result compared to other file-like objects

2009-11-20 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

Python 2.6, Linux.

--

___
Python tracker 

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



[issue7350] csv doesn't handle escaped characters properly

2009-11-20 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue7367] pkgutil.walk_packages fails on write-only directory in sys.path

2009-11-20 Thread Ned Deily

Ned Deily  added the comment:

More precisely: you should check for and remove whatever is adding 
"Drop Box" or a directory within it to your Python sys.path.

--

___
Python tracker 

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



[issue7369] Fibonacci example does not include 0; section 4.6

2009-11-20 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The delta (patch) is to change 'b' to 'a' in the while and print
statements and prepend '0 ' to the output line.

--
nosy: +tjreedy

___
Python tracker 

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



[issue7272] test_multiprocessing fails consistently with 'signal 12' on FreeBSD 6.2 buildbot.

2009-11-20 Thread David Bolen

David Bolen  added the comment:

Looks like some sort of master side global rebuild was initiated but
without the proper SVN information.  But I see a rebuild on 7.2 with
this patch revision that looks like it worked (still failed, but with a
different reason)

I'm not that familiar with the test harness, but would it be possible to
get test_multiprocessing to log an error when it has to be skipped (like
other tests that fail to find supporting modules and what not), so as to
highlight it in the log?  It might even warn about what to do to fix the
behavior for someone running the tests.

In any event though, I'm fine with enabling the support on the 7.2
buildbot (I'll stick it in loader.conf so I don't have to remember after
a reboot) if we're past any point of wanting to check how the test
behaves without them.  Or I guess the 6.4 buildbot can continue to serve
that purpose, right?

--

___
Python tracker 

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



[issue7372] Regression in pstats

2009-11-20 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

Attached zip archive can be run directly to reproduce the bug:

$ ./python.exe bug.zip 
Traceback (most recent call last):
  File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 162, in 
_run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 72, in 
_run_code
exec code in run_globals
  File "bug.zip/__main__.py", line 9, in 
  File "/Users/sasha/Work/python-svn/trunk/Lib/pstats.py", line 268, in 
strip_dirs
(cc, nc, tt, ct, newcallers))
  File "/Users/sasha/Work/python-svn/trunk/Lib/pstats.py", line 516, in 
add_func_stats
add_callers(t_callers, callers))
  File "/Users/sasha/Work/python-svn/trunk/Lib/pstats.py", line 526, in 
add_callers
zip(caller, new_callers[func])])
TypeError: zip argument #1 must support iteration


This is a regression introduced by r60149 which fixed processing of 
cProfile data, but broke processing of profile.

It is fairly easy to fix this problem in pstats, but a better solution 
may be to make profile output compatible with cProfile.

See also issue1269 and issue1315 .

--
components: Library (Lib)
files: bug.zip
messages: 95574
nosy: belopolsky, georg.brandl, matthew.fremont, stromnov, therve
severity: normal
status: open
title: Regression in pstats
type: crash
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file15372/bug.zip

___
Python tracker 

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



[issue7372] Regression in pstats

2009-11-20 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I am attaching a simple fix.  The test for data format could be taken out 
of the loop, but it is probably not worth complicating the logic.  In any 
case the real issue is whether profile and cProfile should produce 
compatible output or not.

--
keywords: +patch
Added file: http://bugs.python.org/file15373/issue7372.diff

___
Python tracker 

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



[issue5683] Speed up cPickle's pickling generally

2009-11-20 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

Last august, I worked on integrating Collin's optimization work into
py3k in a local Mercurial branch. So, I can champion these changes into
py3k, if Collin is unavailable.

And if Collin allows me, I would like to merge the other pickle
optimizations currently in Unladen Swallow.

--

___
Python tracker 

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



[issue7128] cPickle looking for non-existent package copyreg

2009-11-20 Thread Alexandre Vassalotti

Alexandre Vassalotti  added the comment:

But, that change was undone already, no? In fact, it is you, Georg, that
reverted my mess in r63493. ;-)

--
nosy: +alexandre.vassalotti

___
Python tracker 

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