[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Committed revision 80236 in the trunk. The build-bots should not hang now. 
Shall merge to other branches too.

--
assignee:  -> orsenthil
resolution:  -> accepted

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> I'm not sure I understand the issue that this patch is supposed 
> to fix

It should fix all test_gdb errors :-)

> in any case, I can report that it doesn't fix *this* issue. 
> I'm still getting the very same failures after applying the patch.

The "'gdb.Frame' object has no attribute 'function'" error? Could you 
copy/paste the output of test_gdb?

--

Sorry for the issue hijaking, I will open a new issue ;-)

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

+1.  Thanks, all.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread David Bolen

David Bolen  added the comment:

The buildbot user's shell is also bash, so not entirely sure yet why it's 
behaving differently in my environment.  I had completely forgotten about bash 
having a default path.

I do agree that explicitly setting a minimal path is a good idea.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Martin v . Löwis

Changes by Martin v. Löwis :


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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

That fixes it indeed, see

http://www.python.org/dev/buildbot/builders/2.7.dmg/builds/11/steps/compile/logs/stdio

As for "which shell is being used": the slave reports that in his environment, 
there is

SHELL=/bin/bash

Not sure whether this actually means that new shells that get started are 
/bin/bash, though.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

r80232 explicitly sets $PATH to the system default one, which hopefully fixes 
the issue.

What would be interesting to know is which shell is the user shell on the 
buildbot. The original patch worked for me because my shell is bash and bash 
sets a default $PATH when it doesn't have one on startup, other shells might 
not be as friendly as that.

That default value contains unwanted locations though (in particular /usr/local 
and /usr/gnu), which is why r80232 is a good idea anyway.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread David Bolen

David Bolen  added the comment:

I believe it's XCode 2.4.1.

I know the script worked fine prior to the change that clears the environment, 
and commenting out just that piece of the latest trunk copy continues to work.

To be honest, I'm not sure how the build even finds gcc-4.0 (e.g., why it 
doesn't fail until ld) once PATH is cleared, nor do I fully understand the 
change.  How is the process supposed to work without a PATH?

--

___
Python tracker 

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



[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I haven't reviewed the patch in detail yet, but it seems to me that it fixes 
independent issues. -1000 on that. One problem, one bug report in the tracker, 
one commit.

If this issue is about the import machinery not working anymore if there is a 
non-ASCII character in the path, then why the heck does it touch 
posixmodule.c

As for modules that have non-ASCII characters in their module name: this is, 
again, an unrelated issue (ISTM), so if you want to deal with it, please create 
a new issue.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I personally can't verify what version of Xcode is installed. David?

In any case, David reported that he could build installers just fine on that 
very machine before r80179, but not after.

--
nosy: +db3l

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Folks, can we please focus at one issue at a time? I'm not sure I understand 
the issue that this patch is supposed to fix; in any case, I can report that it 
doesn't fix *this* issue. I'm still getting the very same failures after 
applying the patch.

Victor, please don't hijack existing bug reports for new issues. If you have a 
new issue, create a new bug report. They are really cheap to get :-)

--

___
Python tracker 

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



[issue8451] syslog.syslog('msg') logs message with ident "python".

2010-04-19 Thread Sean Reifschneider

Sean Reifschneider  added the comment:

Antoine: I believe I have everything you mentioned addressed with the new 
patch.  That was an awesome review, thank you so much.

The only things I didn't do were parts of the last two items you bring up:

If PyTuple_New(0) fails, bail out.
If syslog_openlog fails, bail out.

syslog(3) can continue even if the openlog() fails.  It won't have the expected 
"ident" string, but it *WILL* log.

I believe this is the desired behavior.

NOTE: I puled the code out that does all the sys.argv handling, which I think 
made that whole section of code much easier to read, particularly with the new 
changes.  The down side is that the code to be reviewed is quite different now.

I also found a leak in the call to syslog_openlog() where I wasn't DECREFing 
the return.

Can you please review these changes?

--
Added file: http://bugs.python.org/file17004/syslog-kwargs3.patch

___
Python tracker 

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



[issue8191] Make arg0 required argument in os.execl* functions

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Mon, Apr 19, 2010 at 11:03 PM, R. David Murray
 wrote:
>
> Alexander, do you think it would be worthwhile to write up a summary of all 
> the issues
> involved in these three releated bugs and post it to python-dev?

Sure.  I ranted about a related issue8154 on python-dev in a not so
relevant message:

http://mail.python.org/pipermail/python-dev/2010-March/098600.html

and can follow up with a more on-topic post unless you beat me to it.

>  Alternatively we could ask for a decision on what should be done in python 
> 2.7 from
> Benjamin.

I would much rather see os.exec* functions left unchanged in both 2.x
and 3.x series except possibly for Windows where  issue8154 is a bona
fide crash.  Lets see what python-dev has to say about this feature in
general first.

--

___
Python tracker 

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



[issue8191] Make arg0 required argument in os.execl* functions

2010-04-19 Thread R. David Murray

R. David Murray  added the comment:

Alexander, do you think it would be worthwhile to write up a summary of all the 
issues involved in these three releated bugs and post it to python-dev?  
Alternatively we could ask for a decision on what should be done in python 2.7 
from Benjamin.

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



[issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof

2010-04-19 Thread R. David Murray

R. David Murray  added the comment:

Just to be clear, the freebsd6 problem was unrelated (presumably).  Freebsd7 
seems to be suffering from the issue discussed here.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


Removed file: http://bugs.python.org/file16990/issue2706.diff

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

New patch, issue2706a.diff, implements timedelta % timedelta and addresses  
Mark's code review comments.


With respect to Mark's
"""
One other thought:  with this division operation added, it might be nice to add 
constants like td_hour, td_minute, etc. to the module.  Then the perennial 'how 
can I convert my timedelta x to minutes' questions could be answered with 'just 
do x/td_minute'.  I would personally find x/td_second to be a more obvious and 
natural way to find the total number of seconds in a timedelta than 
x.total_seconds.  I also quite like the idea of being able to create a 2.5-hour 
timedelta with something like

2*td_hour + 30*td_minute

On the other hand, maybe such constants would just be added clutter, since it's 
easy to create them when needed.
"""

I dislike this proposal for the same reason as Mark likes it: 2*td_hour + 
30*td_minute == timedelta(hours=2, minutes=30) is a violation of TOOWTDI.

--
Added file: http://bugs.python.org/file17003/issue2706a.diff

___
Python tracker 

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



[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

$ diffstat ~/surrogates-7.patch
 Doc/library/tarfile.rst |   15 +--
 Include/moduleobject.h  |1
 Lib/platform.py |   12 +-
 Lib/subprocess.py   |2
 Lib/tarfile.py  |   14 --
 Lib/test/regrtest.py|5 -
 Lib/test/test_import.py |5 +
 Lib/test/test_reprlib.py|4
 Lib/test/test_subprocess.py |4
 Lib/test/test_tarfile.py|4
 Lib/test/test_urllib.py |8 +
 Lib/test/test_urllib2.py|4
 Lib/test/test_xml_etree.py  |6 +
 Lib/traceback.py|   10 +-
 Lib/unittest/runner.py  |4
 Modules/_ctypes/callproc.c  |   12 +-
 Modules/_ssl.c  |   10 +-
 Modules/_tkinter.c  |6 -
 Modules/getpath.c   |  100 ++--
 Modules/main.c  |   46 +
 Modules/posixmodule.c   |   18 ++-
 Modules/pyexpat.c   |   11 +-
 Modules/zipimport.c |  210 
 Objects/codeobject.c|7 +
 Objects/exceptions.c|   49 ++
 Objects/fileobject.c|6 -
 Objects/moduleobject.c  |   22 +++-
 Objects/unicodeobject.c |   22 +++-
 Parser/tokenizer.c  |   18 ++-
 Python/_warnings.c  |   26 -
 Python/ast.c|   10 +-
 Python/bltinmodule.c|   33 --
 Python/ceval.c  |4
 Python/compile.c|   12 ++
 Python/errors.c |4
 Python/import.c |   88 --
 Python/pythonrun.c  |   39 
 Python/traceback.c  |   39 ++--
 38 files changed, 625 insertions(+), 265 deletions(-)

--

___
Python tracker 

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



[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-19 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file16919/surrogates-6.patch

___
Python tracker 

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



[issue8242] Support surrogates in import ; install Python in a non-ASCII directory

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Updated patch:
 - Some parts have been applied in other issues
 - Remove assert(PyBytes_Check(x)): support PyByteArray type
 - use PyErr_Format() instead of sprintf+PyErr_SetString in tokenizer.c
 - don't convert message to byte and then back to unicode in err_input(): keep 
the unicode object

--
Added file: http://bugs.python.org/file17002/surrogates-7.patch

___
Python tracker 

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



[issue7992] Backport capsule object

2010-04-19 Thread Larry Hastings

Larry Hastings  added the comment:

Marking closed, as promised; 2.7b1 has been out for nine days and there hasn't 
been a peep.  If new problems crop up from the capsule backport, please create 
a new issue and assign it to me.

For posterity: 2.7b1 shipped with a bsddb that still publishes a CObject.  This 
is the only CObject left in 2.7b1, and Python doesn't itself use that CObject 
for anything.  Therefore there are no CObject exploits left in pure Python 
2.7b1.  I don't know if bsddb will switch to a capsule in a later Python 2.7 
beta; that's up to Jesus and Benjamin and co.  But I suspect it won't.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue2986] difflib.SequenceMatcher not matching long sequences

2010-04-19 Thread Vlastimil Brom

Vlastimil Brom  added the comment:

I just stumbled on some seemingly different unexpected behaviour of
difflib.SequenceMatcher, but it turns out, it may have the same cause, i.e. the 
"popular" heuristics.
I hopefully managed to replicate it on an illustrative sample text - in as 
included in the attached file. (I also mentioned this issue in hte python-list 
http://mail.python.org/pipermail/python-list/2010-April/1241951.html but as 
there were no replies I eventually found, this might be more appropriate place.)
Both strings differ in a minimal way, each having one extra character
in a "strategic" position, which probably meets some pathological case
for difflib.
Instead of just reporting the insertion and deletion of these single
characters (which works well for most cases - with most other
positions of the differing characters), the output of the
SequenceMatcher decides to delete a large part of the string in
between the differences and to insert the almost same text after that.
The attached code simply prints the results of the comparison with the
respective tags, and substrings. No junk function is used.
I get the same results on Python 2.5.4, 2.6.5, 3.1.1 on windows XPp SP3.
I didn't find any plausible mentions of such cases in the documentation, but 
after some searching I found several reports in the bug tracker mentioning the 
erroneous output of SequenceMatcher on longer repetitive sequences.

besides this
http://bugs.python.org/issue2986
e.g.
http://bugs.python.org/issue1711800
http://bugs.python.org/issue4622
http://bugs.python.org/issue1528074

In my case, disabling the "popular" heuristics as mentioned by John Machin in
http://bugs.python.org/issue1528074#msg29269

seems to have solved the problem; with a modified version of difflib containing:

if 0:   # disable popular heuristics
if n >= 200 and len(indices) * 100 > n:
populardict[elt] = 1
del indices[:]

the comparison catches the differences in the test strings as expected - i.e. 
one character addition and deletion only. It is likely, that some other use 
cases for difflib may rely on the "popular"-heuristics but it also seems useful 
to have some control over this behaviour, which might not be appropriate in all 
cases.
(The issue seems to be the same in python 2.5, 2.6 and 3.1.)

regards,
   vbr

--
nosy: +vbr
Added file: http://bugs.python.org/file17001/difflib_test_inq.py

___
Python tracker 

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



[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> The last line references, buf. It wont be available if a
> socket.timeout had happened. So, it can simply be moved to 
> the line below buf = f.read(). Attaching the patch with 
> these changes.

Good catch :-)

> Question: Were you able to simulate a timeout at kernel.org 
> site to test this? If yes, how?

I used a firewall rule. On Linux, you can try: iptables -I OUTPUT DROP to drop 
all output packets (and then iptables -F to remove all rules). It's not 
reliable, but the test does sometimes fail :-)

--

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

test_gdb pass with add-conditions-for-gdb.Frame.select-to-trunk-003.patch.

In a new patch, or maybe a last version of the add- patch, could you move 
all "main" code at the end? I found these instructions:

# register Python pretty printer
register (gdb.current_objfile())

# register commands
PyList()
if hasattr(gdb.Frame, 'select'):
# Not all builds of gdb have gdb.Frame.select
PyUp()
PyDown()
PyBacktrace()
PyPrint()
PyLocals()


Could you also document how libpython.py is loaded automatically, and can I 
load it manually?

Anyway, thanks for libpython: it really rocks! I often use gdb with 
Misc/gdbinit, but pystack does not always work, and pyo crashs if Python is not 
yet initialized. It will be easier to improve the gdb scripting if it's written 
in Python!

--

___
Python tracker 

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



[issue6547] shutil.copytree fails on dangling symlinks

2010-04-19 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

> Ideally I feel it should create the same symlink pointing to a 
> possibly missing file, since that's what '/bin/cp' does, 
> and shutil.copytree is broadly understood as a drop in replacement..

That's what would happen if the symlink option is set to True.
When False, copytree() is supposed to copy the file pointed by the symlink, so 
copying the symlink as a fallback in case the file doesn't exists seems wrong 
to me in case symlink=False

--

___
Python tracker 

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



[issue6547] shutil.copytree fails on dangling symlinks

2010-04-19 Thread Timothee Besset

Timothee Besset  added the comment:

I am not sure what shutil does with symlinks already. At the very least it 
should not abort the operation.

Ideally I feel it should create the same symlink pointing to a possibly missing 
file, since that's what '/bin/cp' does, and shutil.copytree is broadly 
understood as a drop in replacement..

--

___
Python tracker 

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



[issue6547] shutil.copytree fails on dangling symlinks

2010-04-19 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

ok. what behavior would you expect in that case ? 

I propose that copytree() ignores symlinks that are not linked to an existing 
file in the copy process, and display a warning in this case.

We could add an option to transform this warning into an error that would stop 
the process.

--
priority:  -> normal
resolution:  -> accepted

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread Dave Malcolm

Dave Malcolm  added the comment:

Sorry about that.

Here's an updated version of the patch, combining my work with Victor's.

--
Added file: 
http://bugs.python.org/file17000/add-conditions-for-gdb.Frame.select-to-trunk-003.patch

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Tennessee Leeuwenburg

Tennessee Leeuwenburg  added the comment:

On Tue, Apr 20, 2010 at 6:46 AM, Mark Dickinson wrote:

>
> Mark Dickinson  added the comment:
>
> Tennessee, are you still tracking this issue?  If not, can I steal it from
> you.  :)
>

Hi Mark,

Please feel free to steal it from me! Wonderful to see some movement on this
issue...

> > I found out that timedelta % int is not supported in the
> > released versions while timedelta // int is.
>
> Mmm.  Interesting.  :)
>
> I think it would be fine to add timedelta % timedelta in this patch, and
> then open another feature request for timedelta % int and friends as you
> suggest.  I don't think divmod(timedelta, timedelta) should go in if
> timedelta % timedelta doesn't also go in.
>

I'm an incrementalist -- I'm happy with one step at a time, so for what it's
worth I'd be happy to see divmod go in alone with % to be added later.
However, seeing as I'm really contributing, I'd say feel free to disregard
my vote of +1... :)

Regards,
-Tennessee

--
Added file: http://bugs.python.org/file16999/unnamed

___
Python tracker 

___On Tue, Apr 20, 2010 at 6:46 AM, Mark 
Dickinson rep...@bugs.python.org> 
wrote:

Mark Dickinson dicki...@gmail.com> added the 
comment:

Tennessee, are you still tracking this issue?  If not, can I steal it 
from you.  :)Hi 
Mark, Please feel free to steal it from me! 
Wonderful to see some movement on this issue...
 
> I found out that timedelta % int is not supported in 
the
> released versions while timedelta // int is.

Mmm.  Interesting.  :)

I think it would be fine to add timedelta % timedelta in this patch, and then 
open another feature request for timedelta % int and friends as you suggest. 
 I don't think divmod(timedelta, timedelta) should go in if timedelta % 
timedelta doesn't also go in.
I'm an incrementalist -- I'm happy 
with one step at a time, so for what it's worth I'd be happy to see 
divmod go in alone with % to be added later. However, seeing as I'm really 
contributing, I'd say feel free to disregard my vote of +1... :)
Regards,-Tennessee
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread Dave Malcolm

Dave Malcolm  added the comment:

> Attached patch is based on add-conditions-for-gdb.Frame.select-to-
> trunk.patch and fix described problems. Using test_gdb-2.patch, test_gdb 
> pass without any error on my Debian Sid (gdb 7.1).

The patch conditionalizes each test within StackNavigationTests, but then drops 
it from the list of classes at the end.  Looks like it needs to be reinstated.

--

___
Python tracker 

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



[issue5168] shutil.copystat does not copy the "hidden" flag on windows

2010-04-19 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee:  -> tarek
nosy: +tarek
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue1540112] Allow choice of copy function in shutil.copytree

2010-04-19 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r80230, thanks !

--
assignee:  -> tarek
nosy: +tarek
status: open -> closed

___
Python tracker 

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



[issue4814] ftplib does not honour "timeout" parameter for active data connections

2010-04-19 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Fixed as r80226 (2.7) and r80228 (3.2).

--
components: +Library (Lib)
priority:  -> normal
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

> (A) that we shouldn't use gdb.Frame.function.name(), ...
> that this was fixed in trunk in r80156.

This command is not correct: it still calls .function() method:
 def is_evalframeex(self):
'''Is this a PyEval_EvalFrameEx frame?'''
if self._gdbframe.function():
if self._gdbframe.name() == 'PyEval_EvalFrameEx':

Call to self._gdbframe.function() can be removed.

> The "py-up" and "py-down" commands and their selftest
> (StackNavigationTests) are made conditional upon this.

It's not enough, test_print_after_up() and test_locals_after_up() require also 
py-up command.

Attached patch is based on add-conditions-for-gdb.Frame.select-to-trunk.patch 
and fix described problems. Using test_gdb-2.patch, test_gdb pass without any 
error on my Debian Sid (gdb 7.1).

--
Added file: http://bugs.python.org/file16998/test_gdb-2.patch

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

(er, "ranlib")

--

___
Python tracker 

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



[issue6547] shutil.copytree fails on dangling symlinks

2010-04-19 Thread Timothee Besset

Timothee Besset  added the comment:

It's a symlink that points to a file that doesn't exist. There are many ways 
this can happen, in this particular case my text editor (emacs) seems to keep 
some metadata about which user, machine and process is editing a file. I tried 
to reproduce in 2.6 (Debian sid amd64) and I can confirm it still happens:

t...@ttimozilla:~$ mkdir test
t...@ttimozilla:~$ cd test
t...@ttimozilla:~/test$ ln -s foo bar
t...@ttimozilla:~/test$ ls -1l bar
lrwxrwxrwx 1 timo timo 3 Apr 19 17:12 bar -> foo
t...@ttimozilla:~/test$ ls -1l foo
ls: cannot access foo: No such file or directory
t...@ttimozilla:~/test$ python2.6
Python 2.6.5 (r265:79063, Mar 20 2010, 03:56:44) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.copytree( '../test', '../test2' )
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/shutil.py", line 177, in copytree
raise Error, errors
shutil.Error: [('../test/bar', '../test2/bar', "[Errno 2] No such file or 
directory: '../test/bar'")]
>>>

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

I still don't understand why that isn't showing up in my environment (I've been 
running with that change for over a year) and I can't see why ld would fail but 
ar and ran don't.  Can you verify the version of Xcode that has been installed? 
 Perhaps there is an older tool chain on the buildbot.  It is certainly easy to 
change the PATH test in r80179 to supply some default path (/usr/bin:/bin 
perhaps) but I'd like to know why it is needed here.

--

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread Dave Malcolm

Dave Malcolm  added the comment:

Assigning to loewis for review

--
assignee: dmalcolm -> loewis
stage:  -> patch review

___
Python tracker 

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



[issue8437] test_gdb: gdb.Frame has no attribute function

2010-04-19 Thread Dave Malcolm

Dave Malcolm  added the comment:

If I'm reading this bug correctly, there are two issues here:
  
(A) that we shouldn't use gdb.Frame.function.name(), and should instead use 
gdb.Frame.name().  I believe this is a duplicate of issue 8279, and that this 
was fixed in trunk in r80156.It hasn't yet been fixed in the py3k branch; 
the patch from r80156 does appear to apply cleanly there.

(B) That different builds of gdb may or may not have gdb.Frame.select.

I'm attaching a patch to trunk which tries to autodetect whether the 
gdb.Frame.select method is present.  The "py-up" and "py-down" commands and 
their selftest (StackNavigationTests) are made conditional upon this.


> gdb in Fedora 12 is based on 7.0.1 plus a lot of patches. But I don't see a 
> patch added the
> select() method to the Python API:
> http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/
FWIW, the relevant patch is this one:
http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/gdb-archer.patch?revision=1.40&view=markup
(search for "frapy_select" within that patch); as I understand it this 
generating from the git repository used by the team that created the Python 
support within gdb, and as such it's a snapshot of work, much of which is now 
in upstream gdb's CVS repository.

--
keywords: +patch
Added file: 
http://bugs.python.org/file16997/add-conditions-for-gdb.Frame.select-to-trunk.patch

___
Python tracker 

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



[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński

Filip Gruszczyński  added the comment:

Ok, here comes patch for argparse too.

--
Added file: http://bugs.python.org/file16996/4256_2.patch

___
Python tracker 

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



[issue4843] make distutils use shutil

2010-04-19 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
components: +Distutils2 -Distutils

___
Python tracker 

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



[issue6547] shutil.copytree fails on dangling symlinks

2010-04-19 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Sorry, what's a "dangling symlink" ?

can you provide steps to reproduce this ?

I am moving the Python version to 2.6. If we are unable to reproduce it for 
Python > 2.5 we'll close it since we don't fix bugs for 2.5 anymore

--
assignee:  -> tarek
nosy: +tarek
versions: +Python 2.6 -Python 2.5

___
Python tracker 

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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r80221, r80224, 

Thanks!

--
status: open -> closed

___
Python tracker 

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



[issue8464] tarfile creates tarballs with execute permissions set

2010-04-19 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

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



[issue8465] Backreferences vs. escapes: a silent failure solved

2010-04-19 Thread Aaron Sherman

New submission from Aaron Sherman :

I tested this under 2.6 and 3.1. Under both, the common mistake that I'm sure 
many others have made, and which cost me quite some time today was:

 re.sub(r'(foo)bar', '\1baz', 'foobar')

It's obvious, I'm sure, to many reading this that the second "r" was left out 
before the replacement spec. It's probably obvious that this is going to happen 
quite a lot, and there are many edge cases which are equally baffling to the 
uninitiated (e.g. \8, \418 and \)

In order to avoid this, I'd like to request that such usage be deprecated, 
leaving only numeric escapes of the form matched by r'\\[0-7][0-7][0-7]?(?!\d)' 
as valid, non-deprecated uses (e.g. \01 or \111 are fine). Let's look at what 
that would do:

Right now, the standard library uses escape sequences with \n where n is a 
single digit in a handful of places like sndhdr.py and difflib.py. These are 
certainly not widespread enough to consider this a common usage, but certainly 
those few would have to change to add a leading zero before the digit.

OK, so the specific requested feature is that \xxx produces a warning where xxx 
is:

* any single digit or
* any invalid sequence of two or three digits (e.g containing 8 or 9) or
* any sequence of 4 or more digits

... guiding the user to the more explicit \01, \x01 or, if they intended a 
literal backslash, the r notation.

If you wish to go a step further, I'd suggest adding a no-op escape \e such 
that:

 \41\e1

would print "!1". Otherwise, there's no clean way to halt the interpretation of 
a digit-based escape sequence.

--
components: Regular Expressions, Unicode
messages: 103640
nosy: Aaron.Sherman
severity: normal
status: open
title: Backreferences vs. escapes: a silent failure solved
type: feature request
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



[issue5250] Document __instancecheck__ and __subclasscheck__

2010-04-19 Thread Chris Rebert

Chris Rebert  added the comment:

One last triviality: Could the mention of __subclasscheck__() in 
http://docs.python.org/dev/library/abc.html#abc.ABCMeta.__subclasshook__ get 
linked to the newly-added docs?

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I should be able to add timedelta % timedelta and fix the nits that Mark 
mentioned tonight.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Hmm.  Having timedelta // int work is *really* peculiar, since it can only be 
made sense of with reference to some implicit particular chosen unit of time;  
in this case, that unit of time is apparently microseconds, as far as I can 
tell.

Surely there aren't any applications for timedelta // int?!  The operation just 
doesn't make dimensional sense, since it involves taking floor of a timedelta.

I vote -3.2 minutes on extending this craziness by adding timedelta % int or 
divmod(timedelta, int).

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file16995/unnamed

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Tennessee, are you still tracking this issue?  If not, can I steal it from you. 
 :)

> I found out that timedelta % int is not supported in the
> released versions while timedelta // int is.

Mmm.  Interesting.  :)

I think it would be fine to add timedelta % timedelta in this patch, and then 
open another feature request for timedelta % int and friends as you suggest.  I 
don't think divmod(timedelta, timedelta) should go in if timedelta % timedelta 
doesn't also go in.

> I feel that increasing the number of added
> features will reduce the likelihood of patch being accepted.

Perhaps;  I haven't seen much opposition to these ideas anyway---I think the 
only reason they haven't been implemented yet is lack of round-tuits.

I'd be +1 on accepting the current patch if timedelta % timedelta were added to 
it.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

By the way, the patch looks good to me, as far as it goes, and I'm +1 on adding 
all this.  I only have the tiniest of nits:

 - the patch deletes a line at the top of Lib/test/test_datetime.py, for no 
apparent reason

 - in delta_add, I think the added 'if' block should be an 'else if' (yes, I 
know this is excessively picky ;)

 - the brace style for if blocks is inconsistent:  please put the opening brace 
on the same line as the if.

One other thought:  with this division operation added, it might be nice to add 
constants like td_hour, td_minute, etc. to the module.  Then the perennial 'how 
can I convert my timedelta x to minutes' questions could be answered with 'just 
do x/td_minute'.  I would personally find x/td_second to be a more obvious and 
natural way to find the total number of seconds in a timedelta than 
x.total_seconds.  I also quite like the idea of being able to create a 2.5-hour 
timedelta with something like

2*td_hour + 30*td_minute

On the other hand, maybe such constants would just be added clutter, since it's 
easy to create them when needed.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Mon, Apr 19, 2010 at 4:09 PM, Mark Dickinson wrote:

I noticed that as I was porting Victor's patch.   I did not add  timedelta %
timedelta because I found out that timedelta % int is not supported in the
released versions while timedelta // int is.

I was contemplating opening a separate RFE for divmod(timedelta, int)
and timedelta % int because I feel that increasing the number of added
features will reduce the likelihood of patch being accepted.  Personally, I
only had need for  timedelta // timedelta in my code and not any other
proposed features.

--
Added file: http://bugs.python.org/file16995/unnamed

___
Python tracker 

___On Mon, Apr 19, 2010 at 4:09 PM, Mark 
Dickinson rep...@bugs.python.org> 
wrote:

Why is divmod(timedelta, timedelta) supported but not timedelta % timedelta? 
 I think if one is implemented, the other should be 
too.I noticed that as I was porting 
Victor's patch.   I did not add  timedelta % timedelta because I found 
out that timedelta % int is not supported in the released versions 
while timedelta // int is.
I was contemplating opening a separate RFE for 
divmod(timedelta, int) and timedelta % int because I feel that increasing the 
number of added features will reduce the likelihood of patch being accepted. 
 Personally, I only had need for  timedelta // timedelta in my code and not 
any other proposed features.

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



[issue8464] tarfile creates tarballs with execute permissions set

2010-04-19 Thread Lino Mastrodomenico

Lino Mastrodomenico  added the comment:

I think 0666 is correct because os.open() does a bitwise AND between this value 
and the bitwise inversion of the umask, something like oct(0666 & ~umask).

Since the umask is usually 022 octal (18 decimal), the actual permission on 
disk should be 0644 as expected.

--

___
Python tracker 

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



[issue8453] build_installer.py breaks bzip compilation

2010-04-19 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

David Bolen reported that this occurs with r80179, which now clears the PATH 
environment variable, removing ld from the path.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Mark Dickinson

Mark Dickinson  added the comment:

Why is divmod(timedelta, timedelta) supported but not timedelta % timedelta?  I 
think if one is implemented, the other should be too.

--

___
Python tracker 

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



[issue6692] asyncore kqueue support

2010-04-19 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Forgot to add the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file16994/asyncore.patch

___
Python tracker 

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



[issue8381] IDLE 2.6 freezes on OS X 10.6

2010-04-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Ned : After I opened a new window, that is how it opened : 
http://imagebin.us/images/gbg8zdr25hviw26hnqfv.png
And IDLE hanged a little later. Had to do a force quit. So yes, the problem is 
in Apple build Idle2.6

--

___
Python tracker 

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



[issue6692] asyncore kqueue support

2010-04-19 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +exarkun

___
Python tracker 

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



[issue6692] asyncore kqueue support

2010-04-19 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

The patch in attachment implements support for epoll() and kqueue() by adding a 
new "poller" argument to asyncore.loop().

However, I had a chat with Jean Paul Calderone today which pointed out how 
useless this is. =)
The problem is basically how asyncore.loop() is implemented.
Being impossible to let loop() function know when a file descriptor gets added 
or removed from the socket map we are forced to iterate over all existing fds 
on every loop which nullifies the benefits offered by epoll() and kqueue() 
syscalls.

As of right now I can't think of a solution to this problem which doesn't imply 
a change to the current asyncore API.

--

___
Python tracker 

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



[issue8381] IDLE 2.6 freezes on OS X 10.6

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

Shashwat: what happens when you launch /usr/bin/idle2.6 and then open a new 
window in it (CMD N)?  My experience is like Aaron's (and many other reports): 
the Apple-supplied idle2.6 in OS X 10.6 usually hangs after opening a second 
window, requiring a Force Quit.  The problem appears to be pretty specific to 
the combination of idle2.6 and the 10.6 Apple-supplied Tk 8.5.  It's not a 
problem with the python.org 2.6 which links to Tk 8.4.

--

___
Python tracker 

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



[issue2302] Uses of SocketServer.BaseServer.shutdown have a race

2010-04-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

By the way, getting rid of poll_interval for a file descriptor is easy under 
Unix, but wouldn't work under Windows (where select() only takes sockets, not 
arbitrary file descriptors).

--

___
Python tracker 

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



[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-04-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +l0nwlf

___
Python tracker 

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



[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Hello Victor,

The patch looks for fine for a timeout enforcement.

A couple of changes required.

-if isinstance(err[0], timeout):
+if isinstance(err[0], socket.timeout):

And, in this portion:

+try:
+with test_support.transient_internet():
+buf = f.read()
+except socket.timeout:
+print >>sys.stderr, "" % url
 f.close()
 debug("read %d bytes" % len(buf))

The last line references, buf. It wont be available if a socket.timeout had 
happened. So, it can simply be moved to the line below buf = f.read(). 
Attaching the patch with these changes.

Question: Were you able to simulate a timeout at kernel.org site to test this? 
If yes, how? I am unable to simulate (by changing the kernel.org:81, 
kernel42.org etc), it immediately throws a connection refused. ( In general, I 
could simulate the timeout by urlopen('www.google.com:81', timeout=30) and test 
the exception) 

As build-bot seems to be hung, a timeout enforcement as the patch accomplishes 
is fine.

--
Added file: http://bugs.python.org/file16993/test_urllib2net_timeout.patch-2

___
Python tracker 

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



[issue8454] unittest Module Problem with different Kinds of Invocation

2010-04-19 Thread Michael Foord

Michael Foord  added the comment:

I'm sure that there are many places using the API as it is, inserting a dummy 
entry into the argv they pass. Although the fix you propose would solve the 
problem for users who are currently using the API wrongly it would break code 
for people who are using it correctly. It is certainly an unfortunate API wart 
- but I don't think it is worth breaking people's code to fix it...

--

___
Python tracker 

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



[issue4768] email.generator.Generator object bytes/str crash - b64encode() bug?

2010-04-19 Thread Shashwat Anand

Changes by Shashwat Anand :


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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee: georg.brandl -> tarek

___
Python tracker 

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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +tarek

___
Python tracker 

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



[issue8464] tarfile creates tarballs with execute permissions set

2010-04-19 Thread Shashwat Anand

Changes by Shashwat Anand :


--
nosy: +tarek

___
Python tracker 

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



[issue8464] tarfile creates tarballs with execute permissions set

2010-04-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Is "self.fd = os.open(name, mode, 0666)" Ok ? Should not it be "self.fd = 
os.open(name, mode, 0644)", because that is what the default permissions are.

--
nosy: +l0nwlf

___
Python tracker 

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



[issue8438] Codecs: "surrogateescape" error handler in Python 2.7

2010-04-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch committed to trunk in r80215. I'm going to watch the buildbots, I suspect 
OS X might dislike surrogates in the filename.

--

___
Python tracker 

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



[issue8381] IDLE 2.6 freezes on OS X 10.6

2010-04-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Idle provided by built-in python in Mac OS X Snow leopard i.e. python 2.6.1  is 
running without any issues. It is /usr/bin/idle2.6. And if by very new mac you 
mean latest intel based macs released last summer, then yes I have the same 
machine.

--
nosy: +l0nwlf

___
Python tracker 

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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Attaching the fix

--
keywords: +patch
Added file: http://bugs.python.org/file16992/shutil.patch

___
Python tracker 

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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Shashwat Anand

Shashwat Anand  added the comment:

Seems like these formats are supported, so yes "bztar" can be used as a format 
parameter.

_ARCHIVE_FORMATS = {
 'gztar': (_make_tarball, [('compress', 'gzip')], "gzip'ed tar-file"),
 'bztar': (_make_tarball, [('compress', 'bzip2')], "bzip2'ed tar-file"),
  
 'ztar':  (_make_tarball, [('compress', 'compress')],
 "compressed tar file"),
 'tar':   (_make_tarball, [('compress', None)], "uncompressed tar file"),
 'zip':   (_make_zipfile, [],"ZIP file")
 }

--
nosy: +l0nwlf

___
Python tracker 

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



[issue8381] IDLE 2.6 freezes on OS X 10.6

2010-04-19 Thread Aaron

Aaron  added the comment:

I just used the biult in mac softwere

--

___
Python tracker 

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



[issue8464] tarfile creates tarballs with execute permissions set

2010-04-19 Thread Lino Mastrodomenico

New submission from Lino Mastrodomenico :

tarfile.open(filename, "w|") creates a tar file with execute permissions set, 
if filename doesn't exist (i.e. it uses mode 0777 minus the umask). It should 
instead use mode 0666 minus the umask, which is what happens when using mode 
"w:..." instead of "w|...".

AFAICT this bug has always been present since the introduction of tarfile in 
Python 2.3, but it may soon become more noticeable since the new function 
shutil.make_archive() in Python 2.7 and 3.2 uses tarfile with mode "w|".

I have attached a patch for the trunk.

--
components: Library (Lib)
files: tarfile.diff
keywords: patch
messages: 103617
nosy: mastrodomenico
severity: normal
status: open
title: tarfile creates tarballs with execute permissions set
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file16991/tarfile.diff

___
Python tracker 

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



[issue8273] move generally useful test_support functions into the unittest package

2010-04-19 Thread Georg Brandl

Changes by Georg Brandl :


--
nosy:  -georg.brandl

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy:  -belopolsky

___
Python tracker 

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



[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Filip Gruszczyński

Filip Gruszczyński  added the comment:

I guess I am using my English too little, that's why I am using polish 
expressions too often. What I meant was of course, that I will do argparse 
patch too.

I haven't provided docs for --help-options yet, becuase it is not clear to me, 
it is an accepted feature. When it is, I will update the patch.

--

___
Python tracker 

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



[issue2706] datetime: define division timedelta/timedelta

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I am attaching a forward port of Victor's timedelta_true_divide_divmod.patch to 
py3k.

--
nosy: +Alexander.Belopolsky
Added file: http://bugs.python.org/file16990/issue2706.diff

___
Python tracker 

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



[issue8463] shutil.make_archive() supports bz2, but it's not documented

2010-04-19 Thread Lino Mastrodomenico

New submission from Lino Mastrodomenico :

The new function shutil.make_archive() supports bzip2 compression using "bztar" 
as format parameter, but neither the documentation nor the docstring mention it 
(all the other compression formats are correctly listed).

--
assignee: georg.brandl
components: Documentation
messages: 103614
nosy: georg.brandl, mastrodomenico
severity: normal
status: open
title: shutil.make_archive() supports bz2, but it's not documented
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue4256] optparse: provide a simple way to get a programmatically useful list of options

2010-04-19 Thread Steven Bethard

Steven Bethard  added the comment:

Sorry, what does "I'll sit down to" mean? Does that mean you're offering to try 
to do the argparse patch too? Or that you'd rather someone else do it? (Either 
one's fine - I just couldn't tell which you meant.)

--

___
Python tracker 

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



[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +orsenthil

___
Python tracker 

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



[issue8273] move generally useful test_support functions into the unittest package

2010-04-19 Thread Tim Golden

Changes by Tim Golden :


--
nosy:  -tim.golden

___
Python tracker 

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



[issue8273] move generally useful test_support functions into the unittest package

2010-04-19 Thread Ezio Melotti

Ezio Melotti  added the comment:

Also note that the test_support module is for some reason documented here: 
http://docs.python.org/library/test.html#module-test.test_support
This means that there are probably developers out there that are already using 
these functions even if some of them are not intended/designed to be used 
outside the Python test suite.
This situation is sub-optimal for two reasons:
1) test_support can't evolve quickly because the documented functions have to 
be backward-compatible;
2) other developers are using these python-test-suite-specific functions in 
their tests;
It would be better to keep test_support for our test suite only and 
provide/move useful function in unittest.

--

___
Python tracker 

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



[issue8393] subprocess: support undecodable current working directory on POSIX OS

2010-04-19 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

"mbcs" is not a fixed encoding and may change between Windows sessions, see the 
Rationale in PEP277 http://www.python.org/dev/peps/pep-0277/

The mixed case is interesting. We could use CreateProcessW when at least one 
string is Unicode, and CreateProcessA when all strings are bytes.
OTOH this is unlikely, because for example the environment will be passed as 
unicode; so I'm OK to use CreateProcessW in all cases, and use mbcs to convert 
bytes.

--

___
Python tracker 

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



[issue8462] raise test_support.TestSkipped() is used outside main() / test_main()

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

TestSkipped docstring should also explain that it should not be used in a test 
function, but only to skip the whole file.

--

___
Python tracker 

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



[issue8462] raise test_support.TestSkipped() is used outside main() / test_main()

2010-04-19 Thread STINNER Victor

New submission from STINNER Victor :

unittest in Python 2.6 has to SkipTest exception, but test_support has a 
TestSkipped which can be used to skip the whole file.

TestSkipped should not be used in a test function. Following tests have to be 
fixed: test_decimal, test_ioctl, test_largefile, test_nis, test_ossaudiodev, 
test_pty. Replace raise by return. To dislpay, print >>sys.stderr can be used.

--
components: Tests
messages: 103609
nosy: haypo
severity: normal
status: open
title: raise test_support.TestSkipped() is used outside main() / test_main()
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



[issue8460] Set a timeout in test_urllib2net

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Attached patch sets the timeout to 60 seconds. It writes "" % url 
to stderr on timeout. I don't know better place to write the error. (The test 
doesn't fail, it just continues to the next URL)

--
keywords: +patch
Added file: http://bugs.python.org/file16989/test_urllib2net_timeout.patch

___
Python tracker 

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



[issue8154] os.execlp('true') crashes the interpreter on 2.x

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I noticed that the change is still present in 2.7a.  For what it's worth, I 
agree with David:

"""
Since it does trigger a crash on the windows equivalent API, the check should 
be conditional on platform.  And it should generate a py3k warning on other 
platforms.
"""

I am changing classification to "feature request" and adding "Windows" to the 
list of components because if I understand David correctly, the title of the 
issue is valid only on Windows platform.  (On other platforms os.execlp(path) 
may cause a crash of the program found at path, but not a crash of python 
interpreter itself.)  I also remove 2.6 from the list of versions since after 
r79190 no further action is contemplated for 2.6 branch.

--
components: +Windows
type: crash -> feature request
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



[issue8154] os.execlp('true') crashes the interpreter on 2.x

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

If this new feature stays in 3.x, shouldn't 2.7 have a -3 warning?

Also, I would consider adding os.execlp(path) -> os.execlp(path, 
os.path.basename(path)) transformation to 2to3.

--

___
Python tracker 

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



[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

That wouldn't explain trunk failures.  The _scproxy code has been in 26 and 
trunk for a long time.

--

___
Python tracker 

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



[issue8459] buildbot: test_select failure (test_returned_list_identity) on Python 2.6, Windows

2010-04-19 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-04-19 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> With regards to SSL_peek() blocking, you'd need to explain yourself
> better on that one.  The patch has been tested with the test cases
> from Python SVN enough to be happy they run ok.

IIRC it worked with OpenSSL 1.0.0 but failed with 0.9.8k.
I could test it again if you think that is unlikely.

Can SSL_pending() be used in place of SSL_peek() in this case?
(note: there doesn't seem to be any documentation for SSL_peek() on the
openssl.org website)

> I'll leave you guys too it about how you want to handle things with
> python (i.e. to make the design choice trade offs).  I think all the
> points have been covered.

Thanks a lot for your help. I believe it has been fruitful.

--

___
Python tracker 

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



[issue8191] Make arg0 required argument in os.execl* functions

2010-04-19 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Google code search for

os.execlp\([^*,]+\) lang:python

returns 15 hits, two of which are the same as Matthias found.  I am not sure 
what these results mean for the issue (and Matthias does not reach a conclusion 
either.)

Note that the status quo in 3.x is that os.execlp(single_arg) is invalid, so 
all these examples will stop working in 3.x and will not be fixed by 2to3.  My 
patch will only make failure happen sooner and reason for it more obvious.

I am not very happy about issue1039 (r57731) to begin with.  (See my comments 
at issue8154.)  It was rather hastily applied 3.x feature without a 
corresponding -3 warning and not even a mention in the NEWS file.  However if 
r57731 stays as a strict POSIX compliance feature, I think it will be cleaner 
to enforce >1 argument to os.execl* functions in their signatures rather than 
in a run-time check.

--

___
Python tracker 

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



[issue8459] buildbot: test_select failure (test_returned_list_identity) on Python 2.6, Windows

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

The fail looks to be related to #8329 (r79867:trunk, r79868:py3k, r79869:2.6, 
r79870:3.1).

--
title: buildbot: test_select failure on Python 2.6, Windows -> buildbot: 
test_select failure (test_returned_list_identity) on Python 2.6, Windows

___
Python tracker 

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



[issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof

2010-04-19 Thread Stefan Krah

Stefan Krah  added the comment:

Right, the skip should be left in place.

--
Added file: http://bugs.python.org/file16988/issue8424-2.patch

___
Python tracker 

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



[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-04-19 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-04-19 Thread STINNER Victor

STINNER Victor  added the comment:

Maybe r80198 of #7154?

--

___
Python tracker 

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



[issue8455] buildbot: test_urllib2_localnet failures (Connection refused) on Tiger buildbot

2010-04-19 Thread Ned Deily

Ned Deily  added the comment:

This appears to be a recently introduced failure; the same failure is seen on 
current trunk build on 10.5 and 10.6 as well.

--
nosy: +ned.deily

___
Python tracker 

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



  1   2   >