[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
Roundup Robot added the comment: New changeset 636f75da4b9e by Richard Oudkerk in branch '3.2': Issue #14501: Clarify that authentication keys are byte strings http://hg.python.org/cpython/rev/636f75da4b9e -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
Richard Oudkerk added the comment: I have fixed the documentation and examples to say that authentication keys are byte strings. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
Richard Oudkerk shibt...@gmail.com added the comment: You could just do Server_1=TestServer(address=(127.0.0.1,5),authkey=bpasskey) so this is probably a documentation issue. The examples in the documentation should at least be updated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +jnoller stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
New submission from Максим Цыпкин drauger...@gmail.com: The following code: class TestServer(BaseManager):pass Server_1=TestServer(address=(127.0.0.1,5),authkey=passkey) produces following error in python 3.2 : TypeError: string argument without an encoding The cause is in BaseManager constructor implementation (Python32\Lib\multiprocessing\managers.py): self._authkey = AuthenticationString(authkey) The AuthenticationString class is a substitute of bytes class, and bytes class requires second encoding argument, if first argument is a string. I've solved this problem, changing the code in Python32\Lib\multiprocessing\managers.py to following: if isinstance(authkey,str): self._authkey = AuthenticationString(authkey,'utf-8') else: self._authkey = AuthenticationString(authkey) This works for me. Please consider to fix this issue in release. -- components: Extension Modules messages: 157539 nosy: Drauger priority: normal severity: normal status: open title: Error initialising BaseManager class with 'authkey' argument of string type. type: crash versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.
R. David Murray rdmur...@bitdance.com added the comment: Thanks for the report. I'm not familiar with multiprocessing, so I'll have to leave it to someone else to judge the fix. We use 'crash' to indicate a segfault in the Python interpreter, so I'm changing the type to 'behavior' (that is, a normal bug). -- nosy: +asksol, r.david.murray type: crash - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com