Minor bug in multiprocessing?

F

Frank Millman

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
 
F

Frank Millman

Aahz said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top