client gets json.dumps error trying to serialize datetime objects

Bug #1420442 reported by Steve Heyman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-barbicanclient
Fix Released
Medium
Steve Heyman

Bug Description

Times are returned as objects in the client. Docs say ISO-8601 formatted strings.

Steve Heyman (sheyman)
Changed in python-barbicanclient:
assignee: nobody → Steve Heyman (sheyman)
status: New → Confirmed
Revision history for this message
Douglas Mendizábal (dougmendizabal) wrote :

Docs should be fixed. It's easier to work with time objects in Python. The client should serialize the objects into a string when sending a request to Barbican.

Revision history for this message
Steve Heyman (sheyman) wrote :

If that's the way we want to go then this CR (https://review.openstack.org/#/c/155959/) should be abandoned and a new CR written to fix the (currently failing) deserialization of time strings into date objects.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-barbicanclient (master)

Change abandoned by Steve Heyman (<email address hidden>) on branch: master
Review: https://review.openstack.org/155959
Reason: Will change the direction here to use objects rather than strings.

Revision history for this message
Steve Heyman (sheyman) wrote :

Renamed this bug to reflect reality.

summary: - client returns times as objects, not strings
+ client gets json.dumps error trying to serialize datetime objects
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-barbicanclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/156336

Changed in python-barbicanclient:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-barbicanclient (master)

Reviewed: https://review.openstack.org/156336
Committed: https://git.openstack.org/cgit/openstack/python-barbicanclient/commit/?id=2fc4042fd22b2dff35418d599db167366f624a7b
Submitter: Jenkins
Branch: master

commit 2fc4042fd22b2dff35418d599db167366f624a7b
Author: Steve Heyman <email address hidden>
Date: Mon Feb 16 13:05:16 2015 -0600

    Fix serialization of datetime objects

    json.dumps needs a custom default function to handle the
    case of serializing a datetime object with an embedded Utc
    object. This CR adds a generic method to allow anyone
    needed to perform such special processing to include it
    all in one place.

    Change-Id: I84a31e38bf97d83a62108d8cb8f0466ed7fc7d03
    Closes-Bug: 1420442

Changed in python-barbicanclient:
status: In Progress → Fix Committed
Changed in python-barbicanclient:
milestone: none → 3.0.3
Changed in python-barbicanclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-barbicanclient 3.0.3

This issue was fixed in the openstack/python-barbicanclient 3.0.3 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.