You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
fromprotorpcimportmessagesclassLogMessage(messages.Message):
is_error=messages.BooleanField(1)
# message value is silently ignored if it's a bytestring# make sure it is a unicode string!message=messages.StringField(2, required=True)
>>> LogMessage(is_error=False, message='fnord')
<LogMessage
is_error: False>
>>> LogMessage(is_error=False, message=u'fnord')
<LogMessage
is_error: False
message: u'fnord'>
>>> LogMessage(is_error=False, message='fnord').check_initialized()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".tox/py27/lib/python2.7/site-packages/protorpc/messages.py", line 802, in check_initialized
(type(self).__name__, name))
protorpc.messages.ValidationError: Message LogMessage is missing required field message
>>> LogMessage(is_error=False, message=u'fnord').check_initialized()
>>> LogMessage(is_error=False, message='fnord').is_initialized()
False
>>> LogMessage(is_error=False, message=u'fnord').is_initialized()
True
I have no problem with StringFields being required to be unicode strings. I do have a problem with non-unicode strings being silently ignored.
This seems to be a regression since 0.11.1; I do not experience this problem on 0.11.1 with #25 applied manually; I do experience it on master with #25 applied. (Needless to say, one cannot use this library without #25 applied anymore.)
The text was updated successfully, but these errors were encountered:
I have no problem with StringFields being required to be unicode strings. I do have a problem with non-unicode strings being silently ignored.
This seems to be a regression since 0.11.1; I do not experience this problem on 0.11.1 with #25 applied manually; I do experience it on master with #25 applied. (Needless to say, one cannot use this library without #25 applied anymore.)
The text was updated successfully, but these errors were encountered: