#12914: Use yaml faster C implementation when available
--------------------------------------+------------------------------------
     Reporter:  Beuc                  |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Core (Serialization)  |                  Version:  master
     Severity:  Release blocker       |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by claudep):

 Aymeric, this was not committed in 1.5. Did you still want to set this as
 a blocker?

 I can also reproduce it with Python 2. Apparently, this is only a
 difference in representation, and loading both formats seems to give back
 the appropriate datetime object.

 So this might be simply solved by changing the test assertion

 {{{
 -        self.assertIn("- fields: {dt: !!timestamp '%s'}" % dt, yaml)
 +        # Depending on the yaml dumper, '!timestamp' might be absent
 +        self.assertRegexpMatches(yaml,
 +            r"- fields: {dt: !(!timestamp)? '%s'}" % re.escape(dt))
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/12914#comment:11>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to