#18457: Failed test: pyyaml serializer,
-------------------------------------+-------------------------------------
     Reporter:  jpaugh64             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  master
  (Serialization)                    |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:  unicode              |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by jpaugh64):

 * cc: jpaugh64 (added)
 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * keywords:   => unicode
 * needs_docs:   => 0
 * has_patch:  0 => 1


Comment:

 I just added a patch that fixes the bug. The problem was caused because
 `pyyaml.Deserializer` assumed it was dealing with a `bytestring`, but
 tested for `basestring` instead--causing it to try wrapping `unicode`
 objects in an `io.BytesIO` instance. (The bug wasn't uncovered until
 commit '''4a10308''' caused all strings in the test case to default to
 `unicode`) This patch tests for `str` and and `unicode` objects, and
 handles each appropriately.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18457#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to