Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Minor bug in multiprocessing?

0 views
Skip to first unread message

Frank Millman

unread,
Dec 19, 2009, 3:38:18 AM12/19/09
to pytho...@python.org
Hi all

This is a minor issue, but I thought I would mention it.

I am on Python 2.6.2. I have 'from __future__ import unicode_literals' at
the top of my programs.

I am experimenting with multiprocessing, and in particular subclassing the
Process class.

If I create a subclass and pass "name='test'" as one of the arguments, I get
the following -

Traceback (most recent call last):
File "F:\junk\multiprocess\mp5.py", line 37, in <module>
p = Frank(name='test')
File "F:\junk\multiprocess\mp5.py", line 18, in __init__
self.name = name
File "C:\Python26\lib\multiprocessing\process.py", line 141, in name
assert isinstance(name, str), 'name must be a string'
AssertionError: name must be a string

If I change the argument to "name=str('test')" there is no error.

For Python 2.x I think the assertion should be "isinstance(name,
basestring)" to prevent this from happening.

Is this worth reporting, if it has not been reported already?

Thanks

Frank Millman

Aahz

unread,
Jan 5, 2010, 9:38:11 PM1/5/10
to
[p&e]

In article <mailman.2127.1261211...@python.org>,


Frank Millman <fr...@chagford.com> wrote:
>
>Is this worth reporting, if it has not been reported already?

Defiitely report it.
--
Aahz (aa...@pythoncraft.com) <*> http://www.pythoncraft.com/

Weinberg's Second Law: If builders built buildings the way programmers wrote
programs, then the first woodpecker that came along would destroy civilization.

Frank Millman

unread,
Jan 6, 2010, 12:57:08 AM1/6/10
to pytho...@python.org

"Aahz" <aa...@pythoncraft.com> wrote:
> Frank Millman <fr...@chagford.com> wrote:
>>
>>Is this worth reporting, if it has not been reported already?
>
> Defiitely report it.

Thanks, Aahz.

I took the lack of responses to indicate that there was no reason *not* to
report it, so I reported it on 24th December (issue 7571), and it was fixed
on the same day (r77038).

Frank

0 new messages