This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Change 'name' of Process - assertion failure if Unicode
Type: behavior Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, frankmillman
Priority: normal Keywords:

Created on 2009-12-24 06:48 by frankmillman, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg96849 - (view) Author: Frank Millman (frankmillman) Date: 2009-12-24 06:48
At the top of my program, I have 'from __future__ import 
unicode_literals'.

I subclassed Process, and passed "name='test'" as an argument. I got 
the following traceback.

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.
msg96859 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2009-12-24 15:20
Done in r77038.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51820
2009-12-24 15:20:10benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg96859

resolution: fixed
2009-12-24 06:48:40frankmillmancreate