Bug 854943 - the version of xmlrpclib in use cannot marshal datetime.datetime
Summary: the version of xmlrpclib in use cannot marshal datetime.datetime
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-06 11:03 UTC by Felix Dewaleyne
Modified: 2018-12-01 18:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-18 10:12:35 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Article) 203873 0 None None None 2012-10-11 15:50:08 UTC

Description Felix Dewaleyne 2012-09-06 11:03:50 UTC
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 Program Management 2013-05-01 07:17:50 UTC
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 06:09:50 UTC
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 09:33:57 UTC
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 10:12:35 UTC
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.