[issue7978] SocketServer doesn't handle syscall interruption

2010-04-08 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> If we agree so far, I believe that an implementation of untilConcludes 
> *should* be added to stdlib ("signal.restartable_call", anyone?).

Definitely, it's better to have this handler written once and correct than 
having various implementations scattered around libraries.

> If people agree, I'd be happy to produce the patch (trunk+py3k, doc+test).

Go ahead :-)

> According to "man 7 signal" select must be explicitely restarted, regardless 
> of the SA_RESTART flag.

man sigaction states this:

SA_RESTART 

Provide behaviour compatible with BSD signal semantics by making _certain_ 
system calls restartable across signals. 

Indeed: you can't really rely on SA_RESTART, since certain syscalls are not 
restartable, and this flag isn't really portable.
select is even specific since the file descriptor sets can be modified, and the 
timeout too.

That's why it's definitely better to take the EINTR-wrapper approach.

--

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Ray.Allen

Ray.Allen  added the comment:

By looking into the source, I found PyObject_CallObject() is 
“reference-count-neutral” even the call is FAILED, because it will always call 
Py_DECREF(arg) in the end and in case of exception.

--
nosy: +ysj.ray

___
Python tracker 

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



[issue8297] AttributeError message text should include module name

2010-04-08 Thread Ray.Allen

Ray.Allen  added the comment:

The unittest of this patch.

--
Added file: http://bugs.python.org/file16815/issue_8297_test.py

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Indeed, every function of the API is consistent in this aspect, success or 
failure should not make a difference in reference counts.  Do you have an 
evidence of the contrary?

Note that it's possible that because of the failure, some argument is stored in 
an exception (maybe indirectly, through the traceback which contains active 
frames and their local variables), which increases its reference count. 
Clearing the exception should release the reference.

--
nosy: +amaury.forgeotdarc

___
Python tracker 

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



[issue2824] zipfile to handle duplicate files in archive

2010-04-08 Thread anatoly techtonik

anatoly techtonik  added the comment:

On the second thought having a switch for a low-level zip format hacking is a 
good addition. It may also be used for in-place removals from .zip file by 
erasing directory entry. Otherwise remove operation will require repacking 
archive into temporary file, which is too high level and vulnerable to disk 
space/permission matters.

So, I vote for:
(b) a switch in ZipFile's __init__() that will raise by default
and also because you'd need to modify write() and writestr().

class zipfile.ZipFile(file[, mode[, compression[, allowZip64, [low_level) 

"""Added in version 2.7: If `low_level` compatibility switch is set (False by 
default), then ZipFile allows low level operations, such as adding two files 
with the same name without raising an exception. This is for compatibility with 
previous versions.""" 

BTW, allowZip64 would be nice to be aliased/deprecated in favor of allow_zip64 
for consistency with other double word params in module.

--

___
Python tracker 

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



[issue3581] failures in test_uuid

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

Confirmed on Windows 7 under qemu with a fresh trunk checkout.

--
nosy: +skrah
priority: low -> high
versions: +Python 2.7

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Ray.Allen

Ray.Allen  added the comment:

Yes. I think if the argument object's reference count is increased because of 
the exception traceback or other cases, it has nothing to do with the 
PyObject_CallObject itself. Both of the Py_INCREF(arg) and Py_DECREF(arg) will 
always run once through the PyObject_CallObject() call. 
The “reference-count-neutral” means the code of PyObject_CallObject() itself 
can guarantee the "reference-count-neutral", but not include the callable 
called by PyObject_CallObject().

--

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-08 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

FYI, there seems to be a bug in the code cited above:

http://twistedmatrix.com/trac/browser/trunk/twisted/python/reflect.py#L382

For example, _importAndCheckStack('package.subpackage.module') raises
_NoModuleFound in the following scenario:

package/subpackage/__init__.py:
   import no_exist

when it should instead raise an ImportError from the buggy __init__.py.

I now think there should be at least a few unit tests to cover this case and a 
couple similar permutations.

--

___
Python tracker 

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



[issue8343] improve re parse error messages for named groups

2010-04-08 Thread anatoly techtonik

New submission from anatoly techtonik :

sre_parse has some messages among repeated code sequences, but can be tweaked 
for user convenience

--
components: Library (Lib)
files: lib.re.improve-error-message.diff
keywords: patch
messages: 102604
nosy: techtonik
severity: normal
status: open
title: improve re parse error messages for named groups
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file16816/lib.re.improve-error-message.diff

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Krauzi

Krauzi  added the comment:

a i think i expressed the problem false. The problem is that the arg (which is 
a tuple here) is correctly decremented and thus the reference counts are OK. 
BUT: The objects INSIDE the tuple are NOT correctly decremented. This is the 
code i've used:
C++ Program: http://www.copypastecode.com/26047/
Python Script imported by it: http://www.copypastecode.com/26051/
Now the results:
With raise in python script:
http://img251.imageshack.us/img251/997/witherror.jpg
and with uncommented "raise":
http://img256.imageshack.us/img256/2818/noerror.jpg

Hope its now clear.

Krauzi

--

___
Python tracker 

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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

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

Martin v. Löwis  added the comment:

I can reproduce the problem. The root cause is that the "event generate .nb 
" simply does not have any effect - neither through Python, nor 
through directly wish. Nor do any of the other keys that supposedly cycle 
through the notebook, when send through "event generate". Typing them directly 
works fine.

Guilherme, any idea?

--
assignee:  -> gpolo
nosy: +gpolo, loewis

___
Python tracker 

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



[issue8344] test_tag_configure fails on FreeBSD

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

New submission from Martin v. Löwis :

The FreeBSD buildbot reports

FAIL: test_tag_configure (test_ttk.test_widgets.TreeviewTest)
--
Traceback (most recent call last):
  File 
"/usr/home/db3l/buildarea/trunk.bolen-freebsd7/build/Lib/lib-tk/test/test_ttk/test_widgets.py",
 line 1116, in test_tag_configure
'blue')
AssertionError:  != 'blue'

--
keywords: buildbot
messages: 102607
nosy: loewis
severity: normal
status: open
title: test_tag_configure fails on FreeBSD
versions: Python 2.7

___
Python tracker 

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



[issue3581] failures in test_uuid

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

According to http://standards.ieee.org/regauth/groupmac/tutorial.html ,
the assertions in check_node are weeding out perfectly valid addresses:

>>> node = 0x525400123456
>>> universal_local_bit = (node >> 40L) & 2
>>> universal_local_bit
2L

This just means that the address is locally administered, but valid.
Similarly, shouldn't an individual_group_bit of 1 should just mean multicast 
mode?


See also: Issue 7650

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file16817/uuid_mac.patch

___
Python tracker 

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



[issue8344] test_tag_configure fails on FreeBSD

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

Martin v. Löwis  added the comment:

Apparently, Tk returns a color object instead of a string in this version. 
Fixed in r79903.

--

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Yes, I think what I wrote above applies here: the string is stored in the 
"args" variable. When the exception is raised, the traceback contains the 
*live* frame objects, with position in the bytecode and all local variables. 
This allows post-mortem debugging, for example.

Try calling PyErr_PrintEx(0) instead of PyErr_Print(), this should clear the 
exception state without storing it in sys.last_traceback, and the reference 
will decrease.

--

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-08 Thread Georg Brandl

Georg Brandl  added the comment:

I don't think this needs to be kept open.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue8345] missing method MatchObject.groups in re module doc

2010-04-08 Thread Derk Drukker

New submission from Derk Drukker :

The method MatchObject.groups disappeared from Doc/library/re.rst in py3k 
branch r79434 after a merge. (trunk, release26-maint, and release31-maint are 
fine.)

--
assignee: georg.brandl
components: Documentation
messages: 102612
nosy: drukker, georg.brandl
severity: normal
status: open
title: missing method MatchObject.groups in re module doc
versions: Python 3.2

___
Python tracker 

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



[issue7650] test_uuid is invalid

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

The multicast bit is the least significant bit of the first octet.

Could you check if the patch for http://bugs.python.org/issue3581
fixes your problem?

--
nosy: +skrah

___
Python tracker 

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



[issue1481] test_uuid is warning about unreliable functions

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

Still fails with trunk on OpenBSD. The error is more ctypes related
though: _uuid_generate_time isn't set.


==
ERROR: test_unixdll_getnode (__main__.TestUUID)
--
Traceback (most recent call last):
  File "Lib/test/test_uuid.py", line 332, in test_unixdll_getnode
self.check_node(uuid._unixdll_getnode(), 'unixdll')
  File "/home/stefan/svn/trunk/Lib/uuid.py", line 429, in _unixdll_getnode
_uuid_generate_time(_buffer)
TypeError: 'NoneType' object is not callable

--

--
nosy: +skrah

___
Python tracker 

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



[issue8346] Old Version Name in Interactive Mode

2010-04-08 Thread Firat Ozgul

New submission from Firat Ozgul :

In Python 2.7a4 tutorial, under section "2.1 Invoking the Interpreter" set path 
command is "set path=%path%;C:\python26". Also under section "2.1.2 Interactive 
Mode" python command is shown to give "Python 2.6 (#1, Feb 28 2007, 00:02:06)"

--
assignee: georg.brandl
components: Documentation
messages: 102615
nosy: georg.brandl, istihza
severity: normal
status: open
title: Old Version Name in Interactive Mode
versions: Python 2.7

___
Python tracker 

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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

2010-04-08 Thread Guilherme Polo

Guilherme Polo  added the comment:

> Martin v. Löwis added the comment:
>
> I can reproduce the problem. The root cause is that the "event generate .nb 
> " simply does not have any effect - neither through Python, nor 
> through directly wish. Nor do any of the other keys that supposedly cycle 
> through the notebook, when send through "event generate". Typing them 
> directly works fine.
>

Could it be caused because the notebook is not focused at the correct
time ? Here in OSX (finally I have one of these) I had to add
self.nb.focus() before that event_generate.

The attached patch is for trunk.

--
keywords: +patch
Added file: http://bugs.python.org/file16818/p1.diff

___
Python tracker 

___Index: Lib/lib-tk/test/test_ttk/test_widgets.py
===
--- Lib/lib-tk/test/test_ttk/test_widgets.py(revision 79905)
+++ Lib/lib-tk/test/test_ttk/test_widgets.py(working copy)
@@ -704,6 +704,7 @@
 self.nb.select(0)
 
 support.simulate_mouse_click(self.nb, 5, 5)
+self.nb.focus()
 self.nb.event_generate('')
 self.assertEqual(self.nb.select(), str(self.child2))
 self.nb.event_generate('')
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

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

Martin v. Löwis  added the comment:

> Could it be caused because the notebook is not focused at the correct
> time ? Here in OSX (finally I have one of these) I had to add
> self.nb.focus() before that event_generate.

No, that doesn't help. The event still gets lost. In particular, running

ttk::notebook .nb
.nb add [label .nb.l1 -text hello] -text a
.nb add [label .nb.l2 -text world] -text b
pack .nb
focus .nb
puts [.nb select]
event generate .nb 
puts [.nb select]

in wish prints ".nb.l1" twice; pressing the right key at the end of the
script does cycle properly, though.

--

___
Python tracker 

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



[issue8345] missing method MatchObject.groups in re module doc

2010-04-08 Thread Brian Curtin

Brian Curtin  added the comment:

Thanks for reporting this. Fixed in r79906.

--
assignee: georg.brandl -> brian.curtin
nosy: +brian.curtin -georg.brandl
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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

2010-04-08 Thread Guilherme Polo

Guilherme Polo  added the comment:

When I run that alone I get the same effect, maybe there is something
else contributing to the previous result I saw.

focus_force did solve when testing it alone, and I think it is ok to
use focus_force when testing at least.
Here is the sample I tried:

import ttk
import Tkinter as tk

nb = ttk.Notebook()
nb.add(tk.Label(text='hi'), text='a')
nb.add(tk.Label(text='there'), text='b')

nb.pack()
nb.wait_visibility()

nb.focus_force()
print nb.select()
nb.event_generate('')
print nb.select()

--

___
Python tracker 

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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

2010-04-08 Thread Guilherme Polo

Changes by Guilherme Polo :


Removed file: http://bugs.python.org/file16818/p1.diff

___
Python tracker 

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



[issue2876] Write UserDict fixer for 2to3

2010-04-08 Thread Jeroen Ruigrok van der Werven

Jeroen Ruigrok van der Werven  added the comment:

What's the consensus on this? I ask since I actually ran into code today that 
uses DictMixin and as such wasn't converted by the 2to3 tool.

--
nosy: +asmodai

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-08 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

Four failing unit tests (context code can use clean-up).

--
Added file: http://bugs.python.org/file16819/_patch-7559-4-unittests.diff

___
Python tracker 

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



[issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error

2010-04-08 Thread Tim Lesher

Tim Lesher  added the comment:

I just hit this one myself, and was about to write a bug and patch.

On reviewing the patch:

1. This really has the same issue as the original code: it detects one of a few 
known return values, and will infinitely loop on an unexpected return value.  
It would be better to explicitly check for 0 (continue), E_EOF (exit normally), 
and any other result (exit abnormally).

2. I don't think you want to unconditionally call PyErr_Print(), because you 
don't know for sure that an exception is set.

3. Returning 0 from PyRun_InteractiveLoopFlags() when an error occurs is a 
behavior change, which makes its documentation incorrect (meaning there should 
also be a doc patch). But to be honest, I don't think it's correct to return 0 
in this case. It seems better to return the actual error code (which also 
requires a doc patch)

If you don't have time to update the patch, let me know and I'll put one 
together.

--
nosy: +tlesher

___
Python tracker 

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



[issue2876] Write UserDict fixer for 2to3

2010-04-08 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

UserDict.DictMixin needs to convert to collections.MutableMapping

--

___
Python tracker 

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



[issue8330] Failures seen in test_gdb on buildbots

2010-04-08 Thread Dave Malcolm

Changes by Dave Malcolm :


--
nosy: +loewis

___
Python tracker 

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



[issue2876] Write UserDict fixer for 2to3

2010-04-08 Thread R. David Murray

R. David Murray  added the comment:

Converting DictMixin to collections.MutableMapping is not necessarily a 
complete solution.  MutableMapping does not provide all the methods that 
DictMixin does.  See for example the problems encountered in issue 7975.

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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-08 Thread Thomas Heller

Thomas Heller  added the comment:

Martin, you should probably post your patch to upstream libffi.

--

___
Python tracker 

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



[issue3581] failures in test_uuid

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

The new patch test_uuid.patch fixes issue 7650, issue 1481 and this one.

I've applied it to py3k-cdecimal in r79905 and test_uuid is passed
on all buildbots (I did not test on ARM and one FreeBSD bot is still hanging in 
test_subprocess).

Additionally, the patch works on Windows-qemu (this issue) and OpenBSD-qemu.


Changes:

1. check_node accepts addresses with universal_local_bit set to 1.
   These addresses are valid (like the qemu one).

2. check_node accepts addresses with the multicast bit set to 1.
   These addresses are used for valid random addresses per the RFC
   and uuid.getnode() itself actually may return such a random address.

3. On some platforms, _uuid_generate_time can't be set, so
   _unixdll_getnode fails with a TypeError. This exception
   is now caught.

4. With these changes, there appear to be no more failures, so
   all tests are enabled again.


Could this go into trunk, since the tests actually fail needlessly
on qemu setups?

--
Added file: http://bugs.python.org/file16820/test_uuid.patch

___
Python tracker 

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



[issue1481] test_uuid is warning about unreliable functions

2010-04-08 Thread Stefan Krah

Stefan Krah  added the comment:

With test_uuid.patch from issue 3581 (related) no warnings can be seen on the 
buildbots.

--

___
Python tracker 

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



[issue7650] test_uuid is invalid

2010-04-08 Thread Austin English

Austin English  added the comment:

>From Juan Lang, who originally pointed out the bug:

My only comment is that the message is now misleading:
-individual_group_bit = (node >> 40L) & 1
-universal_local_bit = (node >> 40L) & 2
message = "%012x doesn't look like a real MAC address" % node
-self.assertEqual(individual_group_bit, 0, message)
-self.assertEqual(universal_local_bit, 0, message)
self.assertNotEqual(node, 0, message)
self.assertNotEqual(node, 0xL, message)

The test no longer checks for the uuid being a MAC address or not.
Ideally it would be reworded to be less confusing, or perhaps the code
could check the various "flavors" of uuids, and check that a generated
uuid conforms to one of them.

--

___
Python tracker 

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



[issue8347] string capitalize erroneously lower-case any non-first letters

2010-04-08 Thread Martin

New submission from Martin :

When the following is run:
  s='the Los Angeles Symphony';
  s.capitalize();
it displays 'The los angeles symphony'
instead of 'The Los Angeles Symphony'

the str.capitalize() should only deal with the first letter, not lower-case the 
rest of the letters. The manual correctly describes this, but the actual 
behavior is not consistent with this description.

--
components: None
messages: 102629
nosy: famart
severity: normal
status: open
title: string capitalize erroneously lower-case any non-first letters
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

This patch includes a routine that adds the directory of the python executable 
to the path before attempting to run a symlinked executable (in test_platform).

--
Added file: http://bugs.python.org/file16821/windows symlink draft 28.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

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

Martin v. Löwis  added the comment:

The patch has now missed the window for 2.7, so backporting it won't be 
necessary.

--

___
Python tracker 

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



[issue3581] failures in test_uuid

2010-04-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I trust you on the investigation.

> Could this go into trunk, since the tests actually fail needlessly
> on qemu setups?

Yes, but after the beta:
http://mail.python.org/pipermail/python-dev/2010-April/099132.html

--
assignee:  -> skrah
resolution:  -> accepted
stage:  -> commit review

___
Python tracker 

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



[issue8348] test_urllib2net fails because of bad URL

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

New submission from Martin v. Löwis :

Recently, test_urllib2net started failing

==
ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest)
--
Traceback (most recent call last):
  File 
"/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py",
 line 227, in test_ftp_basic
u = _urlopen_with_retry(self.FTP_HOST)
  File 
"/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py",
 line 24, in wrapped
return _retry_thrice(func, exc, *args, **kwargs)
  File 
"/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py",
 line 20, in _retry_thrice
raise last_exc
URLError: 

Apparently, the directory /pub/mirror/gnu does not exist anymore.

--
messages: 102633
nosy: doko, loewis
severity: normal
status: open
title: test_urllib2net fails because of bad URL

___
Python tracker 

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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

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

Martin v. Löwis  added the comment:

Thanks for the advice. I managed to fix this (for me) in r79907; I had to force 
focus before every single event :-(

--
keywords: +buildbot
resolution:  -> fixed
stage:  -> 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



[issue8348] test_urllib2net fails because of bad URL

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

Martin v. Löwis  added the comment:

I changed the URL in r79908.

--
keywords: +buildbot
resolution:  -> fixed
stage:  -> 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



[issue3081] Py_(X)SETREF macros

2010-04-08 Thread Jean-Paul Calderone

Jean-Paul Calderone  added the comment:

The name suggests a different behavior to me - I assumed it would set the 
reference count to a specific value.  Maybe this is the kind of thing Raymond 
had in mind when he said "The mnemonic doesn't work for me".

--
nosy: +exarkun

___
Python tracker 

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



[issue8347] string capitalize erroneously lower-case any non-first letters

2010-04-08 Thread Philip Jenvey

Philip Jenvey  added the comment:

S.capitalize() -> string

Return a copy of the string S with only its first character
capitalized.

You've misunderstood the docs, only the first character is indeed capitalized. 
You want string.capwords instead

--
nosy: +pjenvey
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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-08 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

The new unit tests pass with this patch (minor clean-up still needed).

--
Added file: http://bugs.python.org/file16822/_patch-7559-5.diff

___
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-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I raised the "errno 0" issue on the openssl mailing-list, and I had a nice 
response by Darryl Miles here:
http://www.mail-archive.com/openssl-us...@openssl.org/msg60710.html

The bottom line is that any "socket error" return from unwrap(), that is any 
"SSL_ERROR_SYSCALL" return from SSL_shutdown(), means that the socket is closed 
(abruptly or not). In this case, we can't do anything except ignore the error 
in test_ftplib.

We should also remove the special casing hack in _ssl.c, even though a socket 
error with "errno 0" isn't particularly informative.

Here is a new patch.

--
Added file: http://bugs.python.org/file16823/newssl4.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

In the last patch, I addressed test_platform running a test under a symlinked 
Python. I then found the same error resulting from essentially the same code in 
test_sysconfig. So I refactored those methods into a generator method in 
test.support. This is patch 29.

--
Added file: http://bugs.python.org/file16824/windows symlink draft 28.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file16825/windows symlink draft 29.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16809/windows symlink draft 27.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16821/windows symlink draft 28.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16824/windows symlink draft 28.patch

___
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-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

My analysis of SSL_shutdown() was missing something: timeout sockets are really 
non-blocking sockets in disguise. I guess it's never too late to notice.

OpenSSL doesn't know about the timeout, so we have to do it ourselves. 
Ironically, the infrastructure is already in place in _ssl.c, and used for 
read() and write() methods.

So here is a new patch, taking this into account.

--
Added file: http://bugs.python.org/file16826/newssl5.patch

___
Python tracker 

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



[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2010-04-08 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

Alright, the current behaviour is quite strange:
we don't call msync() when closing the object, we just unmap() it:
mmap_close_method(mmap_object *self, PyObject *unused)
{
[...]
#ifdef UNIX
if (0 <= self->fd)
(void) close(self->fd);
self->fd = -1;
if (self->data != NULL) {
munmap(self->data, self->size);
self->data = NULL;
}
#endif
[...]
}

But we set self->data to NULL to avoid calling munmap() a second time when 
deallocating the object:
static void
mmap_object_dealloc(mmap_object *m_obj)
{
[ ... ]
#ifdef UNIX
if (m_obj->fd >= 0)
(void) close(m_obj->fd);
if (m_obj->data!=NULL) {
msync(m_obj->data, m_obj->size, MS_SYNC);
munmap(m_obj->data, m_obj->size);
}
#endif /* UNIX */
[ ...]
}

So, if the object has been closed properly before being deallocated, msync() is 
_not_ called.
But, if we don't close the object, then msync() is called.

The attached test script shows the _huge_ performance impact of msync:
when only close() is called (no msync()):
$ ./python /home/cf/test_mmap.py
0.35829615593

when both flush() and close() are called (msync() called):
$ ./python /home/cf/test_mmap.py
4.95999493599

when neither is called, relying on the deallocation (msync() called):
$ ./python /home/cf/test_mmap.py
4.8811671257

And a strace leaves no doubt (called 10 times in a loop) :
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0xb80b1000 <0.19>
write(1, "4.12167286873\n"..., 144.12167286873
)  = 14 <0.12>
close(3)= 0 <0.10>
munmap(0xb80b2000, 4096)= 0 <0.23>
rt_sigaction(SIGINT, {SIG_DFL}, {0x811d630, [], 0}, 8) = 0 <0.11>
close(5)= 0 <0.004889>
msync(0xb69f9000, 1000, MS_SYNC)= 0 <0.584054>
munmap(0xb69f9000, 1000)= 0 <0.000433>

See how expensive msync() is, and this is just for a 10MB file.

So the attached patch (mmap_msync.diff) removes the call to msync from 
mmap_object_dealloc(). Since UnmapViewOfFile() is only called inside flush() 
method, nothing to remove for MS Windows.

Here's the result of the same test script with the patch:
when only close() is called (no msync()):
$ ./python /home/cf/test_mmap.py
0.370584011078

when both flush() and close() are called (msync() called):
$ ./python /home/cf/test_mmap.py
4.97467517853

when neither is called, relying on the deallocation (msync() not called):
$ ./python /home/cf/test_mmap.py
0.390102148056

So we only get msync() latency when the user explicitely calls flush().

--
Added file: http://bugs.python.org/file16827/mmap_msync.diff

___
Python tracker 

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



[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2010-04-08 Thread Charles-Francois Natali

Changes by Charles-Francois Natali :


Added file: http://bugs.python.org/file16828/test_mmap.py

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-08 Thread R. David Murray

R. David Murray  added the comment:

Thank you very much for those tests.  I think you can simplify them a bit. For 
example, you can use assertRaises.  You also might be able to use the 
test_support.temp_cwd context manager in your context manager, even though you 
don't need the cwd part.

I've attached an alternate, simpler patch to fix this bug, based on a similar 
fix I did in pydoc.  The disadvantage of my patch is that it contains a 
hardcoding of the name of the function doing the import.  I think this is 
acceptable given the much greater simplicity of my patch.  I may be missing 
some subtlety, though, that the twisted folks know about.  Or perhaps people 
will just find the hardcoding itself objectionable.

--
Added file: http://bugs.python.org/file16829/alternate_import_fix.patch

___
Python tracker 

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



[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2010-04-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +akuchling, exarkun

___
Python tracker 

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



[issue3081] Py_(X)SETREF macros

2010-04-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Py_ASSIGN could be a better name, but given the enthusiasm generated by this 
proposal, I think we might just as well close the issue.

--

___
Python tracker 

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



[issue3081] Py_(X)SETREF macros

2010-04-08 Thread Mark Dickinson

Mark Dickinson  added the comment:

I agree with Raymond about the Py_INCREF.  I could see more uses for this macro 
without the Py_INCREF, especially for things like in-place arithmetic 
operations.  The following pattern appears a lot in code like 
Objects/longobject.c:

Old code:

/* add one to x */
temp = PyNumber_Add(x, one);
Py_DECREF(x);
x = temp;
if (x == NULL)
return NULL;


With a non-INCREF version of Py_SETREF:

/* add one to x */
Py_SETREF(x, PyNumber_Add(x, one));
if (x == NULL)
return NULL;

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue3081] Py_(X)SETREF macros

2010-04-08 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue8349] os.environ.get returns incorrect data

2010-04-08 Thread Dan Brandow

New submission from Dan Brandow :

I have a Windows 7 64 bit machine, which means it has a few different 
environment variables concerning the program files location:
PROGRAMFILES=C:\Program Files (x86)
ProgramFiles(x86)=C:\Program Files (x86)

Note that both env variables have "(x86)" at the end.

When I do an os.environ.get I get the following results:

Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on 
win32
>>> import os
>>> print os.environ.get('ProgramFiles(x86)')
C:\Program Files (x86)
>>> print os.environ.get('PROGRAMFILES')
C:\Program Files
>>> print os.environ.get('ProgramFiles')
C:\Program Files
>>>

Note the missing "(x86)" on the last two test cases.

I tried it on the 64-bit version of 2.5.4 as well:

Python 2.5.4 (r254:67916, Dec 23 2008, 15:19:34) [MSC v.1400 64 bit (AMD64)] on 
win32
>>> import os
>>> print os.environ.get('ProgramFiles(x86)')
C:\Program Files (x86)
>>> print os.environ.get('PROGRAMFILES')
C:\Program Files
>>> print os.environ.get('ProgramFiles')
C:\Program Files
>>>

Same result.  So I tried the 32-bit version of 2.5.4:

Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on 
win32
>>> import os
>>> print os.environ.get('ProgramFiles(x86)')
C:\Program Files (x86)
>>> print os.environ.get('PROGRAMFILES')
C:\Program Files (x86)
>>> print os.environ.get('ProgramFiles')
C:\Program Files (x86)
>>>

...which gave the correct strings...

--
components: Extension Modules
messages: 102646
nosy: dbrandow
severity: normal
status: open
title: os.environ.get returns incorrect data
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



[issue8349] os.environ.get returns incorrect data

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

Martin v. Löwis  added the comment:

This is the correct result. The value of the environment variables depends on 
whether a 32-bit or a 64-bit process is looking at them, see

http://msdn.microsoft.com/en-us/library/aa384274%28VS.85%29.aspx

--
nosy: +loewis
resolution:  -> invalid
stage:  -> 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



[issue8350] os.mkdir doc comment is incorrect

2010-04-08 Thread Todd Whiteman

New submission from Todd Whiteman :

The doc command for os.mkdir is incorrect (at least for posix). It specifies 
that there is an optional mode keyword, but it's not a keyword argument, see 
below:

>>> import os
>>> help(os.mkdir)
mkdir(...)
mkdir(path [, mode=0777])

Create a directory.

>>> os.mkdir("/tmp/1", mode=777) 
Traceback (most recent call last):
  File "", line 1, in 
TypeError: mkdir() takes no keyword arguments


Suggest the following doc comment change:

mkdir(...)
mkdir(path [, mode])

Create a directory. Mode defaults to 0777 if not specified.

--
assignee: georg.brandl
components: Documentation
messages: 102648
nosy: georg.brandl, twhitema
severity: normal
status: open
title: os.mkdir doc comment is incorrect
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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-08 Thread Nir Aides

Changes by Nir Aides :


Removed file: http://bugs.python.org/file16710/bfs.patch

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-04-08 Thread Nir Aides

Nir Aides  added the comment:

Uploaded an update.

--
Added file: http://bugs.python.org/file16830/bfs.patch

___
Python tracker 

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



[issue6650] sre_parse contains a confusing generic error message

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

Thanks for the patch, LGTM assuming we don't need a test for this.

Do you think the vague message could be less cryptic for users that didn't want 
lookbehind (or don't know what it is)?

--
nosy: +ajaksu2
priority:  -> low
stage:  -> patch review
versions:  -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue6700] inspect.getsource() returns incorrect source lines

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

Confirmed in trunk and py3k. Also affects inspect.getsourcelines.

--
nosy: +ajaksu2
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue6878] outdated docstring in tkinter.Canvas.coords

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

I think the obvious code fix of list(map()) is less likely to cause surprises 
than updating the docstring to the new map in 3.x.

--
keywords: +easy
nosy: +ajaksu2
priority:  -> low
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-04-08 Thread Floris Bruynooghe

New submission from Floris Bruynooghe :

This patch adds the ability to suppress large diffs in the failure message of 
TestCase.assertSequenceEqual().  The maximum size of the diff is customisable 
as an new keyword parameter with hopefully a sensible default.

--
components: Library (Lib)
files: case_seq.diff
keywords: patch
messages: 102653
nosy: flub
severity: normal
status: open
title: Suppress large diffs in unitttest.TestCase.assertSequenceEqual()
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file16831/case_seq.diff

___
Python tracker 

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



[issue3984] python interpreter import dependency with disutils/util

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
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-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual()

2010-04-08 Thread Michael Foord

Changes by Michael Foord :


--
assignee:  -> michael.foord
nosy: +michael.foord

___
Python tracker 

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



[issue5187] distutils upload should prompt for the user/password too

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue1004696] translate Windows cr-lf when installing scripts on Linux

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue7007] Tiny inconsistency in the orthography of "url encoded" in the doc of urllib.parse

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

Hits from py3k:

Doc/library/urllib.rst:239:   Convert a mapping object or a sequence of 
two-element tuples  to a "url-encoded"

Doc/library/urllib.rst:263:   Convert the path component *path* from an encoded 
URL to the local syntax for a

Doc/library/urlparse.rst:112:   values in URL encoded queries should be treated 
as blank strings.   A true value

Doc/library/urlparse.rst:135:   values in URL encoded queries should be treated 
as blank strings.   A true value

Doc/library/logging.rst:2347:  Sends the record to the Web server as an 
URL-encoded dictionary.

Lib/logging/handlers.py:1021:Send the record to the Web server as an 
URL-encoded dictionary

Lib/cgi.py:135:URL encoded forms should be treated as blank strings.

Lib/cgi.py:414:URL encoded forms should be treated as blank strings.

Lib/urlparse.py:297:qs: URL-encoded query string to be parsed

Lib/urlparse.py:300:URL encoded queries should be treated as blank 
strings.

Lib/urlparse.py:323:qs: URL-encoded query string to be parsed

Lib/urlparse.py:326:URL encoded queries should be treated as blank 
strings.  A

--
assignee:  -> georg.brandl
components: +Documentation
keywords: +easy
nosy: +ajaksu2, georg.brandl
priority:  -> low
stage:  -> needs patch
type:  -> feature request

___
Python tracker 

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



[issue1109659] distutils argument parsing is bogus

2010-04-08 Thread Éric Araujo

Éric Araujo  added the comment:

“Global option” could be understood as “option that can be given to any 
command”, i.e. “egg spam -d” == “egg -d spam”. Is it feasible to support such 
and equivalence, too difficult or not desirable?

Regards

--
nosy: +merwok

___
Python tracker 

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



[issue7677] distutils, better error message for setup.py upload -sign without identity.

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue6142] Distutils doesn't remove .pyc files

2010-04-08 Thread Éric Araujo

Éric Araujo  added the comment:

Hello

So, is this bug “add a distclean command” now?

Regards

--
nosy: +merwok

___
Python tracker 

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



[issue4908] adding a get_metadata in distutils

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue6860] Inconsistent naming of custom command in setup.py help output

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue793069] Add --remove-source option

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue6142] Distutils doesn't remove .pyc files

2010-04-08 Thread James

James  added the comment:

i'm fine with that and willing to contribute patches, however i would feel 
better if whoever upstream was, was more supportive of the idea.
someone let me know.

a thought:
- it's true (as mentioned) that distclean isn't necessarily directly related to 
distributing python scripts, however (in my mind anyways) i see distutils as a 
replacement for common things we do in makefiles. so as a result if we did this 
we could get rid of makefiles and provide useful "action" targets such as 
distclean, test, etc... 100% pure python if needed...

--

___
Python tracker 

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



[issue6555] distutils config file should have the same name on both platforms and all scopes

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue3992] removed custom log from distutils

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue5747] knowing the parent command

2010-04-08 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file16833/admin results - no patch.zip

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file16834/admin results - patch 29.zip

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

With patch 29, I believe all patch-related test failures are corrected.

The remaining failures in some modules (namely test_tarfile, test_glob, 
test_mailbox, test_warnings) can be demonstrated to occur in unpatched builds. 
Since some failures are transient, I created repeat_test, which I used to 
demonstrate that test_glob, test_tarfile, and test_mailbox will fail on a clean 
build.

Additionally, I'm including test output for 32- and 64-bit builds on the 
unpatched build, the patched build running under administrator, and the patched 
build running under guest.

The test output was generated in an automated fashion to guarantee a clean 
build. The build process can be found by easy_installing jaraco.develop==1.1.1 
and running test-python-symlink-patch.py (VS9, GNU patch, and svn required).

--
Added file: http://bugs.python.org/file16832/repeat_test.py

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Added file: http://bugs.python.org/file16835/guest results - patch 29.zip

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16202/guest results.zip

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16203/admin results.zip

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I think the wrapper approach is a good one. Now remains to decide whether 
it should stay private to socketserver or be exposed as a generic method (for 
example in the "os" module as proposed).

By the way, adding a patch would be nice, too. I'm not sure it what form it 
should be done; perhaps register a signal handler and trigger the signal from a 
sub-thread while the main thread is iterating in a select loop?

--

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-08 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I think the wrapper approach is a good one. Now remains to decide whether 
it should stay private to socketserver or be exposed as a generic method (for 
example in the "os" module as proposed).

By the way, adding a test would be nice, too. I'm not sure it what form it 
should be done; perhaps register a signal handler and trigger the signal from a 
sub-thread while the main thread is iterating in a select loop?

--

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-08 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--

___
Python tracker 

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



[issue7163] IDLE suppresses sys.stdout.write() return value

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

sys.stdout is a idlelib.rpc.RPCProxy in IDLE. It calls 
Idlelib.PyShell.PseudoFile.write ->
.PyShell.write -> 
.OutputWindow.OutputWindow.write ->
.Percolator.Percolator.insert ->
...

I suppose we could mimic the return value patching PseudoFile.write (for 
educational purposes?).

--
nosy: +ajaksu2
priority:  -> normal
type:  -> behavior

___
Python tracker 

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



[issue8352] imp.find_module of a .py ending dir causes glibc double free crash

2010-04-08 Thread Matthias Klose

New submission from Matthias Klose :

[forwarded from http://bugs.debian.org/577005]

seen with 2.5.5, 2.6.5 and 2.7alpha4:

The imp.find_module function causes a glibc double free or corruption if
it would be invoked with a directory with a ".py" ending. It can be
reproduced with:

mkdir bla.py; python -c 'import imp; imp.find_module("bla", ["."])'

This causes bpython to crash after the first input char if such a
directory exist.


stacktrace with 2.6.5:
(gdb) bt
#0  0x00355906 in *__GI_raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00358e05 in *__GI_abort () at abort.c:88
#2  0x0038c78d in __libc_message (do_abort=2, fmt=0x453088 "*** glibc detected 
*** %s: %s: 0x%s ***\n")
at ../sysdeps/unix/sysv/linux/libc_fatal.c:173
#3  0x00396905 in malloc_printerr (action=2, str=0x453230 "double free or 
corruption (!prev)", ptr=
0x83004e0) at malloc.c:6239
#4  0x003981a3 in _int_free (av=0x46f3c0, p=0x83004d8) at malloc.c:4772
#5  0x0039b22d in *__GI___libc_free (mem=0x83004e0) at malloc.c:3738
#6  0x00386b55 in _IO_new_fclose (fp=0x83004e0) at iofclose.c:88
#7  0x08116efc in call_find_module (name=0xb7f52a54 "bla", path=['.']) at 
../Python/import.c:2844
#8  0x08117011 in imp_find_module (self=, args=('bla', 
['.']))
at ../Python/import.c:2865
#9  0x081b1755 in PyCFunction_Call (func=, arg=
('bla', ['.']), kw=) at ../Objects/methodobject.c:81
#10 0x080fbf03 in call_function (pp_stack=0xb3cc, oparg=2) at 
../Python/ceval.c:3750
#11 0x080f75ac in PyEval_EvalFrameEx (f=File , line 1, in  (), 
throwflag=0)
at ../Python/ceval.c:2412
#12 0x080f9c48 in PyEval_EvalCodeEx (co=0xb7fe6da8, globals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
locals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, 
defcount=0, closure=) at ../Python/ceval.c:3000
#13 0x080efd6b in PyEval_EvalCode (co=0xb7fe6da8, globals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
locals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }) at 
../Python/ceval.c:541
#14 0x0812376c in run_mod (mod=0x83565c0, filename=0x81ef6b1 "", 
globals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
locals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
flags=0xb6c0, arena=0x82f5700)
at ../Python/pythonrun.c:1339
#15 0x08123640 in PyRun_StringFlags (str=0x82e5008 "import imp; 
imp.find_module(\"bla\", [\".\"])\n", 
start=257, globals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
locals=
{'__builtins__': , '__name__': '__main__', 
'__package__': None, '__doc__': None, 'imp': }, 
flags=0xb6c0) at ../Python/pythonrun.c:1302
#16 0x081223e9 in PyRun_SimpleStringFlags (command=
0x82e5008 "import imp; imp.find_module(\"bla\", [\".\"])\n", 
flags=0xb6c0)
at ../Python/pythonrun.c:961
#17 0x0805e3f6 in Py_Main (argc=3, argv=0xb7b4) at ../Modules/main.c:521
#18 0x0805d51f in main (argc=3, argv=0xb7b4) at ../Modules/python.c:23

--
components: Interpreter Core
messages: 102662
nosy: doko
severity: normal
status: open
title: imp.find_module of a .py ending dir causes glibc double free crash
versions: Python 2.5, Python 2.6, Python 2.7

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-08 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

It seems issue7443 discusses the cause of the transient failures.

--

___
Python tracker 

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



[issue7443] test.support.unlink issue on Windows platform

2010-04-08 Thread Jason R. Coombs

Changes by Jason R. Coombs :


--
nosy: +jaraco

___
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

2010-04-08 Thread Daniel Diniz

Daniel Diniz  added the comment:

Thanks for the patch. Per issue 2849, use of rfc822 should be gone from the 
stdlib. Please re-open if you disagree.

--
nosy: +ajaksu2
priority:  -> normal
resolution:  -> invalid
stage:  -> 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



[issue7370] patch: BaseHTTPServer reinventing rfc822

2010-04-08 Thread Éric Araujo

Éric Araujo  added the comment:

Following the last link on #2859, I’ve found that “rfc822.formatdate(time)” can 
be changed to “email.utils.formatdate(time, usegmt=True)”.

I’ll make a real diff in a few days if noone beats me to it.

Regards

--
nosy: +merwok

___
Python tracker 

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



  1   2   >