Failed test: pyyaml serializer,
The patch introduced by commit 4a10308 causes the pyyaml deserializer to fail the test suite. The error is caused by trying to wrap a unicode string in an io.BytesIO
. The relevant bits are in tests/regressiontests/serializers_regress/tests.py
@line 408 and in django/core/serializers/pyyaml.py
@line 51.
Cc: |
Jonathan Paugh added
|
Has patch: |
set
|
Keywords: |
unicode added
|
Owner: |
changed from nobody to Claude Paroz
|
Status: |
new → assigned
|
Triage Stage: |
Unreviewed → Accepted
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
I just added a patch that fixes the bug. The problem was caused because
pyyaml.Deserializer
assumed it was dealing with abytestring
, but tested forbasestring
instead--causing it to try wrappingunicode
objects in anio.BytesIO
instance. (The bug wasn't uncovered until commit 4a10308 caused all strings in the test case to default tounicode
) This patch tests forstr
and andunicode
objects, and handles each appropriately.