[issue11109] socketserver.ForkingMixIn leaves zombies

2011-02-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +gregory.p.smith
stage:  -> patch review
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.1

___
Python tracker 

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



[issue11119] Passing a socket to a process (multiprocessing module)

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Well, sockets cannot be pickled on any platform:

>>> sock = socket.create_connection(("www.python.org", 80))
__main__:1: ResourceWarning: unclosed 
>>> s = pickle.loads(pickle.dumps(sock))
>>> s.getpeername()
Traceback (most recent call last):
  File "", line 1, in 
socket.error: getsockaddrlen: bad family
>>> s.fileno()
-1

The reason your code works under Linux is that multiprocessing uses fork() and 
therefore all objects and file handles are transparently inherited by the 
child. Windows doesn't have fork(), it instead spawns a new process to which it 
must marshal objects using pickle. You'll have to create your socket in the 
child for it to work at all.

By the way, multi-threading is much more appropriate than multi-processing when 
writing servers under Windows. Also, see the socketserver module for helpers to 
write both multi-threaded and multi-processed servers: 
http://docs.python.org/library/socketserver.html

--
nosy: +pitrou
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue11127] sockets should not be pickleable

2011-02-05 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Like already done for file objects, sockets should refuse pickling by raising a 
TypeError.

--
components: Library (Lib)
messages: 127976
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: sockets should not be pickleable
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue11119] Passing a socket to a process (multiprocessing module)

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Opened issue11127 for raising a TypeError when trying to pickle any socket.

--
status: pending -> closed

___
Python tracker 

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



[issue11124] test_posix failure on the Leopard buildbot

2011-02-05 Thread Ned Deily

Changes by Ned Deily :


--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> posix.getgroups() failure on Mac OS X

___
Python tracker 

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



[issue1227748] subprocess: inheritance of std descriptors inconsistent

2011-02-05 Thread Ned Deily

Changes by Ned Deily :


--
assignee: astrand -> docs@python
nosy: +docs@python
stage: needs patch -> patch review

___
Python tracker 

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



[issue11076] Iterable argparse Namespace

2011-02-05 Thread Virgil Dupras

Virgil Dupras  added the comment:

I didn't know about vars() (well, I knew it existed, but never was quite sure 
what it did).

Given that I'm not a Python newbie, I'm guessing I'm not alone in this 
situation. Maybe that instead of making the Namespace iterable, we should just 
add an example usage of vars() in argparse's documentation?

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

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

Martin v. Löwis  added the comment:

My claim is that Tkinter is thread-safe as it stands. A lot of thought has been 
put into making Tkinter thread-safe, so if there is any claim to the contrary, 
we would need more details: what exact Python version is being used, what exact 
operating system is being used, what exact code is run, and what exact output 
is produced.

--
nosy: +loewis

___
Python tracker 

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



[issue11103] Python 3.2 installer doesn't register file extensions on Windows 7

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

Martin v. Löwis  added the comment:

Terry, if you are installing Python "for all users", but have the Open rebound 
just for yourself, it is unreasonable to expect that the Python installation 
procedure changes it. Per-user settings override machine settings; this is by 
Microsoft design.

Darren: did you install "for all users" or "just for me"?

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Scott M

Scott M  added the comment:

I'll look into making the crash easier to reproduce this coming week.

Is Tkinter's thread safety new? Because after I started getting crashes, I did 
my due diligence in Google and found a number of people writing about how it 
was necessary to use a Queue and Tkinter's after() timer, to draw from multiple 
threads. And in experiments in 2.7.1 on Windows, it turned out that it wasn't 
just the drawing calls from a thread other than the mainloop() thread, that 
invited a crash; even just trying to set an .after() timer from a different 
thread caused tracebacks, randomly.

At any rate this is less of an issue now, for me at least. I'm putting together 
a small graphic library for my coworkers. It will have a tiny fraction of 
Tkinter's capabilities, it will be Windows-only and won't even have native 
Windows look and feel; but it will be completely, rock-solid, idiot-proof 
thread safe - any operation (including widget deletes), any thread, any time, 
with no polling or timers needed. My coworkers are not technical and will get 
instantly lost if I have to describe queues and timers just to draw a line on a 
screen.

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

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

Martin v. Löwis  added the comment:

> Is Tkinter's thread safety new?

It's supported on Unix since 1.5.1, and on Windows since 2.3.

--

___
Python tracker 

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



[issue11116] mailbox and email errors

2011-02-05 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Well, here is the long-asked-for 'fp_mailbox.py' test thing.
Note: it generates a 'test.mbox' in CWD!

print("USAGE: fp_mailbox.py 0|1|2",
  "   0 = use raw UTF-8 string",
  "   1 = use UTF-8 string",
  "   2 = use escaped byte string", sep="\n")

It does not use FeedParser directly, but email.message_from_*.  It's simple 
minded, but a dumb new python(1) user (like me) does not know otherwise, i 
guess.  Of course the input is malformed, but, you know, shit happens (you may 
trust me in respect to that).  I want to point out that .defects is the empty 
list, even though the input is *not* correctly converted (quopri/base64) and 
blows mailbox.add later on for test cases 0 and 1 (resulting in corrupted 
mailbox files).  2 does not cause a traceback and is mailbox.add()ed, but the 
resulting mail is not standart-conforming either.  For me and my (S-)Postman 
all of this means that i have to encapsulate all of this with a 
'MessageBuilder' layer on top of the python(1) builtin email package.



  I personally will encapsulate the email.* stuff with a MessageBuilder

--
Added file: http://bugs.python.org/file20683/fp_mailbox.py

___
Python tracker 

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



[issue11046] setup.py/configure [darwin]

2011-02-05 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

ronaldoussoren: thanks for the MACOSX_DEPLOYMENT_TARGET=10.5 hint!!  I did Py3K 
yesterday, and it was a matter of 'configure --prefix=x YZ && make && make 
install' as if it were a real UNIX!

I *really* think there should be a configure command line option for this thing 
- i would *not* have found that out on my own!

And of course the problem with libedit is it's ignorance for a long-time-grown 
multi-UNIX multi-term '.inputrc'.

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Scott M

Scott M  added the comment:

The new version runs 40 parabolas, then quits. I usually have to run this 
version 20 times or so to get the crash, so be patient. In general if it's 
going to crash it does so in the first 6 or so parabolas. Caveat: creates up to 
40 threads, so a bit of a CPU pig. You may want to change the 40 in 
(self.tracks > 40) to 8.

Here's one crash. I got this by double clicking the .py file from Windows 
explorer, but I can get them with F5 in IDLE too.
---
UpdateStringProc should not be invoked for type cmdName

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Exception in thread Thread-6:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 530, in __bootstrap_inner
self.run()
  File "H:\PMT2\MyProjects\TkinterCrash2.py", line 47, in run
self.deliverToQueue((self.target, z, y))
  File "H:\PMT2\MyProjects\TkinterCrash2.py", line 129, in arrival_122
new_yz[1])
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2201, in create_line
return self._create('line', args, kw)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2189, in _create
*(args + self._options(cnf, kw
TclError: bad screen distance "create"

--
versions: +Python 2.7 -Python 3.3
Added file: http://bugs.python.org/file20684/TkinterCrash2.py

___
Python tracker 

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



[issue11128] decimal.py: to_integral() corner cases

2011-02-05 Thread Stefan Krah

New submission from Stefan Krah :

Hi,

to_integral() should behave like quantize() for negative exponents:

"Otherwise (the operand has a negative exponent) the result is the
 same as using the quantize operation using the given operand as the
 left-hand-operand, 1E+0 as the right-hand-operand, and the precision
 of the operand as the precision setting. The rounding mode is taken
 from the context, as usual."


There are some corner cases where this matters:


>>> from decimal import *
>>> c = Context(prec=1, Emin=-1, Emax=1, traps=[])
>>> d = Context(prec=4, Emin=-1, Emax=1, traps=[])
>>> 
>>> c.to_integral(Decimal("999.9"))
Decimal('1000')
>>> d.quantize(Decimal("999.9"), Decimal("1e0"))
Decimal('NaN')


Indeed, decNumber returns NaN for to_integral(). This is an odd
situation, since for the result it is possible to exceed the
precision but not Emax:


>>> c = Context(prec=3, Emin=-3, Emax=3, traps=[])
>>> d = Context(prec=4, Emin=-3, Emax=3, traps=[])
>>> c.to_integral(Decimal("999.9"))
Decimal('1000')
>>> d.quantize(Decimal("999.9"), Decimal("1e0"))
Decimal('1000')


The specification is on the side of decNumber, but I wonder if this is
an oversight.

--
components: Library (Lib)
messages: 127986
nosy: mark.dickinson, skrah
priority: normal
severity: normal
status: open
title: decimal.py: to_integral() corner cases
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue11117] Implementing Async IO

2011-02-05 Thread David Beazley

David Beazley  added the comment:

Anyone contemplating the use of aio_ functions should first go read "The Story 
of Mel".

http://www.catb.org/jargon/html/story-of-mel.html

--
nosy: +dabeaz

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I can't reproduce either, but the latest traceback posted in msg127985 seems to 
hint at a parameter marshalling problem. "create" is one of the parameters to 
the called Tk function, but it seemed to be mistaken for another.

Since it's arguably threading-related, saying "I can't reproduce" doesn't seem 
like a sufficient reason to close the issue. There can be all kinds of 
influencing factors (OS, CPU, background tasks) and the marshalling code in 
Modules/_tkinter.c is far from trivial.

--
nosy: +amaury.forgeotdarc, pitrou
type: feature request -> crash

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

I think launching external tools like ifconfig and ipconfig can be avoided 
pretty easily. There are many recipes around the net how to use native API's.
About ctypes' horrible logic during find_library call - don't know yet.

--
nosy: +nvetoshkin

___
Python tracker 

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



[issue11117] Implementing Async IO

2011-02-05 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Thanks, David, for the link. The story is really touching :-).

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

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

Martin v. Löwis  added the comment:

Tk produces "bad screen distance" in Tk_GetScreenMM (convert string to screen 
millimeters) and TkGetDoublePixels (convert string to number of pixels) when 
strtod fails on the string being passed. It also produces the error in 
SetPixelAny (convert object to pixel) if the string doesn't start with a 
double, and SetMMFromAny (convert object to millimeters) if the string either 
is no double, or not followed by "[cimp]". Finally, TkPixelParseProc returns 
the error if TkGetDoublePixels returns a negative number.

In relationship to the canvas line command, TkPixelParseProc is used for 
converting the -width, -activewidth, and -disabledwidth arguments. None of 
these are used in the test case, though, so it's not clear which pixel parsing 
fails specifically.

--

___
Python tracker 

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



[issue11129] logging: allow multiple entries in qualname config

2011-02-05 Thread anatoly techtonik

New submission from anatoly techtonik :

When configuration is specified in external file, qualname attribute should 
allow several values. Maybe comma separated.

--
messages: 127992
nosy: techtonik
priority: normal
severity: normal
status: open
title: logging: allow multiple entries in qualname config
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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Scott M

Scott M  added the comment:

If it helps, over the many iterations of this test code, there have been two 
kinds of issues:

1. pythonw.exe crashes with the Windows variant of a SEGV. No traceback, just a 
crash. These are rare.

2. Evidence of confusion over which string the code should be looking at, and 
it's always down in the create function of Tkinter. Variations of this 
confusion have been Int() complaining that it can't translate "None", strings 
like ".667748474.7464" not being recognized as parameter names...  all of it 
sounds like Tkinter has somehow managed to be looking at the wrong string. Even 
when the only Tkinter call I do outside the mainloop thread is .after(), the 
crashes would happen when I went to draw a line.

My (trivial) experience in extending Python makes me wonder if some reference 
count, somewhere, didn’t get mismanaged. The only times I ever got a hard crash 
out pythonw.exe in my own projects is when I mishandled a count.

As a side note, if Tkinter is intended to be thread safe, the documentation 
should say so. Clearly, and in the first paragraph. Once I started having 
problems, I started Googling, and everything I read lead me to conclude that 
neither Tkinter nor wx were even intended to be thread safe, so I've started to 
write my own GUI code. This is a project I might have skipped if it has been 
clear that Tkinter is at least intended to be thread safe.

--

___
Python tracker 

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



[issue11117] Implementing Async IO

2011-02-05 Thread David Beazley

David Beazley  added the comment:

Glad you liked it!   I think there is a bit of a cautionary tale in there 
though. With aio_, there is the promise of better performance, but you're also 
going to need a *LOT* of advance planning and thought to avoid creating a 
tangled coding nightmare with it.

Just as an aside, one of the uses of aio_ related functions is to implement 
parts of user-level thread libraries in C (e.g., pthreads, etc.). A library 
might use the asynchronous I/O callbacks as part of implementing non-kernel 
(green) threads.  The code for doing this tends to be very low level and hairy 
with lots of signal handling--for example, if you want to context-switch 
between two user-level threads in C, you usually do it inside a signal handler 
(i.e., you thread-switch inside the signal handler called in response to aio_ 
completions). 

Whether it's feasible to expose aio_* all the way up to Python or not is an 
open question. I suspect it will be fraught with lots of tricky issues. In the 
end, it might just be easier to use threads.  Nevertheless, you'll learn a lot 
about Python internals by working on this :-).

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The "UpdateStringProc should not be invoked for type cmdName" message (as 
quoted above in the traceback) apparently can mean that there's a mismanagement 
of Tcl reference counts.

>From 
>http://sourceforge.net/tracker/?func=detail&atid=110894&aid=1326087&group_id=10894:

“This crash (actually, a panic) hints at defective Tcl_Obj
handling - possibly in the core, more likely in an extension
if you're using one. It indicates that Tcl_GetString() or
Tcl_GetStringFromObj() has been called on a cmdNameType
Tcl_Obj that has no string representation, a state that
should never occur.”

Intuitively, cmdNameType seems to refer to createcommand() / deletecommand(). 
Also, the following code in Tkinter.py looks a bit suspicious:

def after(self, ms, func=None, *args):
"""Call function once after given time.

MS specifies the time in milliseconds. FUNC gives the
function which shall be called. Additional parameters
are given as parameters to the function call.  Return
identifier to cancel scheduling with after_cancel."""
if not func:
# I'd rather use time.sleep(ms*0.001)
self.tk.call('after', ms)
else:
def callit():
try:
func(*args)
finally:
try:
self.deletecommand(name)
except TclError:
pass
name = self._register(callit)
return self.tk.call('after', ms, name)

That is, we call deletecommand() while the command is still being executed.
Perhaps that, together with concurrent memory allocation from another thread 
(Tcl_Alloc() doesn't use Python's "Tcl lock"), might explain why the cmdName or 
other things sometimes become corrupted ("Tcl_DeleteCommand deletes a command 
from a command interpreter. Once the call completes, attempts to invoke cmdName 
in interp will result in errors").

--

___
Python tracker 

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



[issue11077] Tkinter is not thread safe

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> As a side note, if Tkinter is intended to be thread safe, the 
> documentation should say so. Clearly, and in the first paragraph.

I'm no Tkinter specialist but, judging by its source code, Tkinter (the Python 
module) *is* intended to be thread-safe using locking and/or marshalling.

As for wxPython, you are right that it is not thread safe.

--

___
Python tracker 

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



[issue5285] hmac throws TypeErrors

2011-02-05 Thread anatoly techtonik

anatoly techtonik  added the comment:

This damn bug ruined my day. MoinMoin couldn't reset password on many outdated 
wikies < 1.8.2 (including Python's one probably), because of it.

http://moinmo.in/MoinMoinBugs/1.8_ResetPasswordError

--
nosy: +techtonik

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Kenny Meyer

Kenny Meyer  added the comment:

With the attached patch the "heavy work" will be done on request, when calling 
uuid1() or uuid4() not on import.

I am working off from the py3k svn branch. Is it necessary to submit a separate 
patch for py2 branch?

--
keywords: +patch
nosy: +knny-myer
Added file: http://bugs.python.org/file20685/issue11063.patch

___
Python tracker 

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



[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal

New submission from ProgVal :

Hello,

I have issues with a script I'm programming (TypeError at every client 
connection), so I edited BaseServer's __init__():
def __init__(self, server_address, RequestHandlerClass):
"""Constructor.  May be extended, do not override."""
if isinstance(server_address, socket._socketobject):
raise Exception()
self.server_address = server_address
self.RequestHandlerClass = RequestHandlerClass
self.__is_shut_down = threading.Event()
self.__shutdown_request = False
And it raises sometimes this traceback:
Exception happened during processing of request from ('127.0.0.1', 32810)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 285, in 
_handle_request_noblock
self.process_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 311, in process_request
self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 324, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 400, in __init__
BaseServer.__init__(self, server_address, RequestHandlerClass)
  File "/usr/lib/python2.6/SocketServer.py", line 198, in __init__
raise Exception()

Best regards,
ProgVal

--
components: Library (Lib)
messages: 127999
nosy: ProgVal
priority: normal
severity: normal
status: open
title: SocketServer: server_address is... a socket
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



[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal

ProgVal  added the comment:

The problem happens on Python 2.7 too.

Additionaly, here is the traceback, if I don't edit the library:
Exception happened during processing of request from ('127.0.0.1', 50378)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in 
_handle_request_noblock
self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
self.server_bind()
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
TypeError: getsockaddrarg: AF_INET address must be tuple, not _socketobject

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Kenny, I don't see a problem with uuid is *imported*, it just creates a couple 
of STANDARD UUID class objects for use later. And this seems to just set the 
number and validates it. I don't see any subprocess calls performed. Perhaps 
you were referring to scenarios of using uuid1/uuid5 methods in mac and 
suggesting improvements to it by your patch?

--
nosy: +orsenthil

___
Python tracker 

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



[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal

ProgVal  added the comment:

This seems odd to me: this line:
self.RequestHandlerClass(request, client_address, self)
calls TCPServer's constructor:
def __init__(self, server_address, RequestHandlerClass, 
bind_and_activate=True):

--

___
Python tracker 

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



[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread ProgVal

ProgVal  added the comment:

Oh, excuse me, it's because of my code!

class MyRequestHandler(SocketServer.TCPServer):

--
resolution:  -> invalid

___
Python tracker 

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



[issue11130] SocketServer: server_address is... a socket

2011-02-05 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Unable to determine the bug here. If you have questions with using python, 
please ask python-l...@python.org

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



[issue11122] bdist_rpm fails

2011-02-05 Thread James

James  added the comment:

I'll write a docs and script patch for this next week...

I'm happy to do the work,

Thanks for the comments.

James

--

___
Python tracker 

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




[issue9364] some problems with the documentation of pydoc

2011-02-05 Thread yeswanth

yeswanth  added the comment:

Suggestions are good . One thing I came across when going through the doc is 
that when you run help(help) after importing help from pydoc , i noticed that 
the first line of the help utility is 

"""
Welcome to Python 3.2!  This is the online help utility.
"""
which could be changed to 

"Welcome to Python help utility" as the help utility is already inbuilt .

--
nosy: +swamiyeswanth

___
Python tracker 

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



[issue11131] decimal.py: plus/minus with ROUND_FLOOR

2011-02-05 Thread Stefan Krah

New submission from Stefan Krah :

Another exciting corner case in plus/minus:

"The operations are evaluated using the same rules as add and subtract;
 the operations plus(a) and minus(a) (where a and b refer to any numbers)
 are calculated as the operations add(’0’, a) and subtract(’0’, b)
 respectively, where the ’0’ has the same exponent as the operand."


But add and subtract have a special rule for the sign with ROUND_FLOOR:

"Otherwise, the sign of a zero result is 0 unless either both operands 
 were negative or the signs of the operands were different and the 
 rounding is round-floor."


So, +Decimal("-0") and -Decimal("0") should be a negative zero. I checked
this against decNumber. Currently:


>>> c = getcontext()
>>> c.rounding = ROUND_FLOOR
>>> +Decimal("-0")
Decimal('0')
>>> -Decimal("0")
Decimal('0')

--
components: Library (Lib)
messages: 128007
nosy: mark.dickinson, skrah
priority: normal
severity: normal
status: open
title: decimal.py: plus/minus with ROUND_FLOOR
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread R. David Murray

R. David Murray  added the comment:

If you do 'python -c "import uuid" under strace, _posixsubprocess is definitely 
loaded, and a pipe2 call is made.

Take a look at the code starting at (py3k trunk) line 418 (try:).  That's where 
the weird stuff happens, which is what the patch is addressing.

Ken: thanks for working on this.

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



[issue9364] some problems with the documentation of pydoc

2011-02-05 Thread yeswanth

yeswanth  added the comment:

Patch for the change i have suggested in pydoc .
@Eric I will try to implement the patch suggestions you have made. I still have 
to figure out how to make crosslinks

--
keywords: +patch
Added file: http://bugs.python.org/file20686/pydoc.diff

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for posting a patch! I have two comments:
- Have you run test_uuid? When I run it, it seems to go into an infinite loop 
somewhere and I need to kill the process.
- uuid should work even when ctypes is not available, so you can't just put an 
import statement at the top-level without a fallback

--
nosy: +pitrou
stage: needs patch -> patch review

___
Python tracker 

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



[issue11127] sockets should not be pickleable

2011-02-05 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies

2011-02-05 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue11116] mailbox and email errors

2011-02-05 Thread R. David Murray

R. David Murray  added the comment:

Thanks, much easier to communicate when runnable code is involved :) Now I can 
see what you mean about it writing the From.  I will figure out why and fix it 
so that the From line is not written.

The traceback from email.generator is unfortunate.  I should have 
message_from-string reject non-ASCII input with a clear error message like 
mailbox.add does now, but I didn't think of it.  I will see if the release 
manager will let me make that change.

For case (2) it is working as designed: faithfully writing the non-conformant 
message to the mbox.  If you wish to do other sorts of handling of 
non-conformant email you need to write code to do that.  You can use the email 
package to make it technically conformant (and ASCII only) by doing something 
like message_from_string(str(message_from_bytes(non_conformant_message)))  I'm 
not sure why you'd want to do that, though :)

--
nosy: +georg.brandl

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

>uuid should work even when ctypes is not available
A bit of offtopic: why can't we assume that ctypes is available?

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> A bit of offtopic: why can't we assume that ctypes is available?

Because ctypes (or, actually, the libffi it relies on) needs specific low-level 
code for each platform it runs on, and not all platforms have such code.

Another reason is that ctypes is dangerous and some administrators might prefer 
to disable it (especially on shared hosting ala Google App Engine).

--

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-05 Thread Gerard van Helden

Gerard van Helden  added the comment:

The reporter imho is 100% right. Simply because of the fact that in the current 
situation, there is no way to supply an argument starting with a dash (not even 
for instance a filename). That is, of course, total nonsense to be dictated by 
the parser library.

--
nosy: +drm

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Kenny Meyer

Kenny Meyer  added the comment:

Thanks for pointing that out! I guess that is the reason you did the import
in a try block.

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

___
Python tracker 

___Thanks for pointing that out! I guess 
that is the reason you did the import in a try block.
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

Maybe I understood and ctypes ImportError simply must be handled and fallbacked 
to something else. But there are only 3 ways of getting MAC address:
1. using popen
2. using ctypes and native calls
3. using C API and performing native calls in extension

And ctypes seems to be the best choice: it's portable across Python VMs (better 
that 3) and faster (better than 1).

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Maybe I understood and ctypes ImportError simply must be handled and
> fallbacked to something else.

Indeed.

> But there are only 3 ways of getting MAC address:
> 1. using popen
> 2. using ctypes and native calls
> 3. using C API and performing native calls in extension
> 
> And ctypes seems to be the best choice: it's portable across Python
> VMs (better that 3) and faster (better than 1).

Perhaps, but doing without ctypes should still be possible, otherwise
it's a regression.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Keith Dart

Keith Dart  added the comment:

It's also possible using existing wrapped os system calls. One exaple is here: 
http://code.google.com/p/pycopia/source/browse/trunk/aid/pycopia/ifconfig.py

Although that one doesn't current support MAC addresses, but it could. The 
socket module also now support the netlink socket on Linux, so it shouldbe 
possible to use that for getting MAC address on Linux.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

>It's also possible using existing wrapped os system calls.
That's right, on linux we can use ioctls but windows would require win api 
calls like this one: 
http://stackoverflow.com/questions/166506/finding-local-ip-addresses-in-python/166992#166992

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Kenny Meyer

Changes by Kenny Meyer :


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

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Keith Dart

Keith Dart  added the comment:

I'm thinking Python could use a general purpose ifconfig/mac-layer module that 
uuid.py could then just use.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I'm thinking Python could use a general purpose ifconfig/mac-layer
> module that uuid.py could then just use.

Perhaps, but that's really out of scope for this issue. Feel free to
open another issue.

--

___
Python tracker 

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



[issue11121] libpython3.so support with --enable-shared

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

Martin v. Löwis  added the comment:

Thanks for the review. Committed as r88350.

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



[issue11067] Py_LIMITED_API breaks most PySomething_Check() functions

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

Martin v. Löwis  added the comment:

Thanks for the review. Committed as r88351.

--
status: open -> closed

___
Python tracker 

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



[issue10882] Add os.sendfile()

2011-02-05 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Patch in attachment provides a complete test suite.
It also fixes a problem which occurred on BSD platforms when using non-blocking 
sockets: EAGAIN/EBUSY are now raised if the transmitted data == 0 bytes 
reflecting socket's send() behavior:

+if (ret < 0) {
+if ((errno == EAGAIN) || (errno == EBUSY)) {
+if (sbytes != 0) {
+// some data has been sent
+goto done;
+}
+else {
+// no data has been sent; upper application is supposed
+// to retry on EAGAIN or EBUSY
+return posix_error();
+}
+}
+return posix_error();
+}
+goto done;

The test suite shows that "trailer" argument does not work.
I couldn't manage to figure out what's wrong though.

--
Added file: http://bugs.python.org/file20688/sendfile_v6.patch

___
Python tracker 

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2011-02-05 Thread Eric Smith

Eric Smith  added the comment:

While I also dislike the existing behavior, note that you can get what you want 
by using an equal sign.

>>> import argparse
>>> parser = argparse.ArgumentParser(prog='a2x')
>>> parser.add_argument('--asciidoc-opts',
... action='store', dest='asciidoc_opts', default=''
... metavar='ASCIIDOC_OPTS', help='asciidoc options')
>>> parser.parse_args(['--asciidoc-opts', '-1'])
Namespace(asciidoc_opts='-1')
>>> parser.parse_args(['--asciidoc-opts=-one'])
Namespace(asciidoc_opts='-one')

I always use the equal sign, so I've never noticed this behavior before.

I wish that help would display the equal sign, but that's another issue.

--
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies

2011-02-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Rather than depending on the internal details of ForkingMixIn in your 
BaseServer.serve_forever modification I'd prefer to see that simply call 
self._cleanup()

Define a do-nothing _periodic_cleanup method in BaseServer.  ForkingMixIn 
should implement its own _periodic_cleanup method that does the active_children 
test and calls collect_children as appropriate.

--

___
Python tracker 

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



[issue7108] test_commands.py failing on OS X 10.5.7 due to '@' in ls output

2011-02-05 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: ronaldoussoren -> 

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-02-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I'll use the packaging approach.  The os.path technique predated packages and 
is no longer the preferred way of doing things.

--

___
Python tracker 

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



[issue7678] subprocess.Popen pipeline example code in the documentation is lacking

2011-02-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

documentation updated in r88352.  thanks!

--
assignee: docs@python -> gregory.p.smith
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



[issue1615376] subprocess doesn\'t handle SIGPIPE

2011-02-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

The need to call p1.stdout.close() has now been documented as part of 
issue7678.  Python 3.2's subprocess also has restore_signals=True as its 
default behavior so SIGPIPE is restored by default.

I do not think it is appropriate to to add the synchronization Peter suggested 
to the subprocess module to optimize that close call.  The potential delay due 
to python having to call p1.stdout.close() is non-fatal and should be assumed 
to exist anyways as you can't guarantee when an async event like a signal (in 
this case SIGPIPE) will actually reach the other process.

--
assignee:  -> gregory.p.smith
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



[issue11079] Make OS X entry in Applications like that in Windows

2011-02-05 Thread Ned Deily

Ned Deily  added the comment:

Ping!  Raymond, this needs review and release manager approval to make it into 
3.2 final.

--

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2011-02-05 Thread Stefan Krah

Stefan Krah  added the comment:

Éric, the Debian patch looks good to me and it solves my build problem.

The only question I have is why EXTRA_CFLAGS still go behind CFLAGS
and cannot be overridden via the environment.

But as it is, the patch is an improvement. I'm attaching the version
for 2.7.

--
stage:  -> patch review
Added file: http://bugs.python.org/file20689/sysconfig-flags.patch

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2011-02-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Why is OPT duplicated in get_config_vars(...)?
Why do OPT and BASECFLAGS environ vars override their Makefile values instead 
of accumulating with them?
Why is EXTRA_CFLAGS not configurable through environ?

--

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies

2011-02-05 Thread Justin

Justin  added the comment:

Good point. I was just writing up something quick that works. Here's another 
patch, is this acceptable?

--
Added file: http://bugs.python.org/file20690/loop_actions.patch

___
Python tracker 

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



[issue969718] BASECFLAGS are not passed to module build line

2011-02-05 Thread Stefan Krah

Stefan Krah  added the comment:

Antoine Pitrou  wrote:
> Why is OPT duplicated in get_config_vars(...)?

I missed that, thanks.

> Why do OPT and BASECFLAGS environ vars override their Makefile values
> instead of accumulating with them?

I think it would go too far to append in three places. If the environment
CFLAGS go to the end, everything can be overridden with a single variable.

> Why is EXTRA_CFLAGS not configurable through environ?

I don't know. Ideally the Debian people would comment if they had any
reasons for that. For me it would be sufficient if CFLAGS were configurable
without deleting OPT, BASECFLAGS or EXTRA_CFLAGS.

--

___
Python tracker 

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



[issue10826] pass_fds sometimes fails

2011-02-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

Your patch makes sense to me.  I'll commit it after the 3.2 release for 3.2.1.  
The elease manager can feel free to commit it earlier if it is bothering an 
important buildbot.

--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I believe that is good.  I'll commit it after the 3.2 release has been cut 
(we're in release candidate release blocker only lockdown right now).

Looking at ForkingMixIn.collect_children() there appears to be another buglet: 
it loops over self.active_children and calls self.active_children.remove(pid).  
This modification of the list while looping over it will cause it to skip the 
next item in the list.  For every child waited on successfully, it skips 
checking one of the others.

--
title: socketserver.ForkingMixIn leaves zombies -> socketserver.ForkingMixIn 
leaves zombies, also fails to reap all zombies in one pass

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Justin  added the comment:

I noticed that ForkingMixIn also was overriding handle_timeout() trying to 
cleanup zombies after 300 seconds of inactivity, which is useless on a busy 
server. I'm replacing the patch with one that also removes handle_timeout().

--
Added file: http://bugs.python.org/file20691/loop_actions.patch

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Changes by Justin :


Removed file: http://bugs.python.org/file20690/loop_actions.patch

___
Python tracker 

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



[issue5863] bz2.BZ2File should accept other file-like objects.

2011-02-05 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Here's an update to the documentation for the bz2 module.

--
Added file: http://bugs.python.org/file20692/bz2-doc.diff

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Changes by Justin :


Removed file: http://bugs.python.org/file20691/loop_actions.patch

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Changes by Justin :


Added file: http://bugs.python.org/file20693/loop_actions.patch

___
Python tracker 

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Justin  added the comment:

I hope I did that last patch right. I did a 'diff -u' instead of a 'diff -c'. 
If you need something different, let me know.

--

___
Python tracker 

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



[issue10882] Add os.sendfile()

2011-02-05 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

For trailers to work, I think the line:
  self.assertEqual(data, "abcde12345")
should be:
  self.assertEqual(data, b"abcde12345")

Also not that tests like this:
  if not sys.platform.startswith('linux'):

perhaps should also include solaris since it doesn't support headers/trailers 
either.

--

___
Python tracker 

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



[issue8691] Doc: left alignment is not the default for numbers

2011-02-05 Thread Westley Martínez

Westley Martínez  added the comment:

It seems > is only the default for numbers. < is the default for strings, 
lists, sets, dicts, etc. I have made a patch, though Eric knows the exact 
semantics.

I wonder what the rationale for having numbers use < is.

--
keywords: +patch
nosy: +anikom15
Added file: http://bugs.python.org/file20694/py3k-8691.diff

___
Python tracker 

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



[issue11079] Make OS X entry in Applications like that in Windows

2011-02-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

The patches looks like what I expected.  Thank you.

I don't know the installer process well enough to say that it is correct at a 
detailed level, but if you are getting it to run and the links work, then it's 
probably fine.

--

___
Python tracker 

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



[issue10891] Tweak sorting howto to eliminate redundancy

2011-02-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Made some tweaks r88358.  Sorry, I'm leaving the list.sort references as-is.  I 
consider them to be important in a document that needs to clearly differentiate 
list.sort from __builtin__.sorted().

--
assignee: eric.araujo -> rhettinger
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



[issue10042] total_ordering stack overflow

2011-02-05 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
priority: normal -> low

___
Python tracker 

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



[issue11003] os.system should be deprecated in favour of subprocess module

2011-02-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Sorry, I'm rejecting this.  No reasons were presented that would warrant such 
as disruptive change.

For good or ill, a number of languages implement the same call in much the same 
way.  It does its job of exposing an operating system service that many people 
have found to be useful.

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



[issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass

2011-02-05 Thread Justin

Justin  added the comment:

Sorry I keep plaguing this with comments and files, but I got to thinking, 
anyone should be able to override _loop_actions() and implement what they need 
in the loop. While it's probably a bad idea in most cases, there may be 
legitimate needs and it's always good to allow the flexibility. So, I'm adding 
one more patch that changes the name to loop_actions() and adds it to the list 
of methods that can be overridden in the BaseServer docstring. If you like it, 
keep it, if not, just use the last one.

--
Added file: http://bugs.python.org/file20695/loop_actions.patch

___
Python tracker 

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