chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpo...@apache.org
Subject svn commit: r1129927 - in /chemistry/cmislib/trunk: .pydevproject setup.cfg setup.py src/cmislib.egg-info/PKG-INFO src/cmislib.egg-info/SOURCES.txt src/cmislib.egg-info/requires.txt src/cmislib/model.py
Date Tue, 31 May 2011 21:33:27 GMT
Author: jpotts
Date: Tue May 31 21:33:26 2011
New Revision: 1129927

URL: http://svn.apache.org/viewvc?rev=1129927&view=rev
Log:
Resolved CMIS-309 so that cmislib maintains time zone info in dates returned from servers.
Introduces a dependency on iso8601 module so the setup.py has been updated accordingly.

Added:
    chemistry/cmislib/trunk/src/cmislib.egg-info/requires.txt
Modified:
    chemistry/cmislib/trunk/.pydevproject
    chemistry/cmislib/trunk/setup.cfg
    chemistry/cmislib/trunk/setup.py
    chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO
    chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
    chemistry/cmislib/trunk/src/cmislib/model.py

Modified: chemistry/cmislib/trunk/.pydevproject
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/.pydevproject?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/.pydevproject (original)
+++ chemistry/cmislib/trunk/.pydevproject Tue May 31 21:33:26 2011
@@ -23,6 +23,9 @@ under the License.
 <pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
 <path>/cmislib/src</path>
 </pydev_pathproperty>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.6</pydev_property>
 <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_EXTERNAL_SOURCE_PATH">
+<path>/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/iso8601-0.1.4-py2.6.egg</path>
+</pydev_pathproperty>
 </pydev_project>

Modified: chemistry/cmislib/trunk/setup.cfg
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/setup.cfg?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/setup.cfg (original)
+++ chemistry/cmislib/trunk/setup.cfg Tue May 31 21:33:26 2011
@@ -18,4 +18,4 @@
 #
 
 [egg_info]
-tag_build = 
+tag_build = dev

Modified: chemistry/cmislib/trunk/setup.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/setup.py?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/setup.py (original)
+++ chemistry/cmislib/trunk/setup.py Tue May 31 21:33:26 2011
@@ -28,6 +28,9 @@ setup(
     name = "cmislib",
     description = 'Apache Chemistry CMIS client library for Python',
     version = version,
+    install_requires = [
+        'iso8601'
+        ],
     author = 'Apache Chemistry Project',
     author_email = 'dev@chemistry.apache.org',
     license = 'Apache License (2.0)',

Modified: chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO (original)
+++ chemistry/cmislib/trunk/src/cmislib.egg-info/PKG-INFO Tue May 31 21:33:26 2011
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: cmislib
-Version: 0.5
+Version: 0.5dev
 Summary: Apache Chemistry CMIS client library for Python
 Home-page: http://chemistry.apache.org/
 Author: Apache Chemistry Project

Modified: chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt (original)
+++ chemistry/cmislib/trunk/src/cmislib.egg-info/SOURCES.txt Tue May 31 21:33:26 2011
@@ -17,6 +17,7 @@ src/cmislib.egg-info/NOTICE.txt
 src/cmislib.egg-info/PKG-INFO
 src/cmislib.egg-info/SOURCES.txt
 src/cmislib.egg-info/dependency_links.txt
+src/cmislib.egg-info/requires.txt
 src/cmislib.egg-info/top_level.txt
 src/data/checkedout.alfresco.xml
 src/data/checkedout.filenet.xml

Added: chemistry/cmislib/trunk/src/cmislib.egg-info/requires.txt
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib.egg-info/requires.txt?rev=1129927&view=auto
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib.egg-info/requires.txt (added)
+++ chemistry/cmislib/trunk/src/cmislib.egg-info/requires.txt Tue May 31 21:33:26 2011
@@ -0,0 +1 @@
+iso8601
\ No newline at end of file

Modified: chemistry/cmislib/trunk/src/cmislib/model.py
URL: http://svn.apache.org/viewvc/chemistry/cmislib/trunk/src/cmislib/model.py?rev=1129927&r1=1129926&r2=1129927&view=diff
==============================================================================
--- chemistry/cmislib/trunk/src/cmislib/model.py (original)
+++ chemistry/cmislib/trunk/src/cmislib/model.py Tue May 31 21:33:26 2011
@@ -34,6 +34,7 @@ import mimetypes
 from xml.parsers.expat import ExpatError
 import datetime
 import time
+import iso8601
 
 # would kind of like to not have any parsing logic in this module,
 # but for now I'm going to put the serial/deserialization in methods
@@ -81,10 +82,6 @@ CHECKED_OUT_COLL = 'checkedout'
 UNFILED_COLL = 'unfiled'
 ROOT_COLL = 'root'
 
-# This seems to be the common pattern across known CMIS servers
-# It is essentially ISO 8601 without the microseconds or time zone offset
-timeStampPattern = re.compile('^(\d{4}\-\d{2}\-\d{2}T\d{2}:\d{2}:\d{2})?')
-
 
 class CmisClient(object):
 
@@ -3761,12 +3758,7 @@ def parseDateTimeValue(value):
     """
     Utility function to return a datetime from a string.
     """
-    timeFormat = '%Y-%m-%dT%H:%M:%S'
-    match = timeStampPattern.match(value)
-    if match:
-        return datetime.datetime.fromtimestamp(time.mktime(time.strptime(
-            match.group(),
-            timeFormat)))
+    return iso8601.parse_date(value)
 
 
 def parseBoolValue(value):



Mime
View raw message