Bug 854943 - the version of xmlrpclib in use cannot marshal datetime.datetime
the version of xmlrpclib in use cannot marshal datetime.datetime
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python (Show other bugs)
5.8
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Python Maintainers
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-06 07:03 EDT by Felix Dewaleyne
Modified: 2013-10-18 06:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-18 06:12:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
sample script that produces the error (612 bytes, text/x-python)
2012-09-06 07:03 EDT, Felix Dewaleyne
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 203873 None None None 2012-10-11 11:50:08 EDT

  None (edit)
Description Felix Dewaleyne 2012-09-06 07:03:50 EDT
Created attachment 610258 [details]
sample script that produces the error

Description of problem:
the version of xmlrpclib in use cannot marshal datetime.datetime

Version-Release number of selected component (if applicable):
python-libs-2.4.3-46.el5_8.2.x86_64
python-2.4.3-24.el5.x86_64

How reproducible:
all the time

Steps to Reproduce:
1.create a datetime.datetime object
2.send it to a xmlrpc server

  
Actual results:
Traceback (most recent call last):
  File "./rien.py", line 45, in ?
    vmsat.system.scheduleHardwareRefresh(key, 1000011241, theDate)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1377, in __request
    allow_none=self.__allow_none)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 1029, in dumps
    data = m.dumps(params)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 603, in dumps
    dump(v, write)
  File "/usr/lib64/python2.4/xmlrpclib.py", line 613, in __dump
    raise TypeError, "cannot marshal %s objects" % type(value)
TypeError: cannot marshal <type 'datetime.datetime'> objects

Expected results:
communication does not raise this error

Additional info:
this behaviour cannot be seen in the RHEL6 implementation of python

a sample script is attached that raises the error (satellite uses xmlrpc for communications)
Comment 9 RHEL Product and Program Management 2013-05-01 03:17:50 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 10 Bohuslav "Slavek" Kabrda 2013-10-18 02:09:50 EDT
Felix, is this still an issue? As I understand it, you have been able to workaround this (and also it's fixed in RHEL 6). At I also see that the customer case was closed, so I'm considering closing this bug as well.
Comment 12 Felix Dewaleyne 2013-10-18 05:33:57 EDT
yes the bug is still there, most of the api calls for satellite that handle a date now also can treat it as if it were text to work around it. that's far from ideal, but at this point of the life of RHEL fixing it will not change much because of all the previous versions that will remain affected.
Comment 13 Bohuslav "Slavek" Kabrda 2013-10-18 06:12:35 EDT
Thanks for the info. Based on that, I'm closing this bug as wontfix. Feel free to reopen if you feel it should be fixed.

Note You need to log in before you can comment on or make changes to this bug.