txaws-dev team mailing list archive
-
txaws-dev team
-
Mailing list archive
-
Message #00061
[Merge] lp:~clint-fewbar/txaws/drop-epsilon into lp:txaws
Clint Byrum has proposed merging lp:~clint-fewbar/txaws/drop-epsilon into lp:txaws.
Requested reviews:
txAWS Developers (txaws-dev)
Related bugs:
Bug #856067 in txAWS: "s3/client.py should not depend on epsilon library"
https://bugs.launchpad.net/txaws/+bug/856067
For more details, see:
https://code.launchpad.net/~clint-fewbar/txaws/drop-epsilon/+merge/87700
Change epsilon library to dateutil
--
https://code.launchpad.net/~clint-fewbar/txaws/drop-epsilon/+merge/87700
Your team txAWS Developers is requested to review the proposed merge of lp:~clint-fewbar/txaws/drop-epsilon into lp:txaws.
=== modified file 'setup.py'
--- setup.py 2011-03-30 19:39:55 +0000
+++ setup.py 2012-01-06 00:03:26 +0000
@@ -5,12 +5,12 @@
from txaws import version
# If setuptools is present, use it to find_packages(), and also
-# declare our dependency on epsilon.
+# declare our dependency on python-dateutil.
extra_setup_args = {}
try:
import setuptools
from setuptools import find_packages
- extra_setup_args['install_requires'] = ['Epsilon']
+ extra_setup_args['install_requires'] = ['python-dateutil']
except ImportError:
def find_packages():
"""
=== modified file 'txaws/s3/client.py'
--- txaws/s3/client.py 2011-09-22 16:57:38 +0000
+++ txaws/s3/client.py 2012-01-06 00:03:26 +0000
@@ -15,7 +15,7 @@
from twisted.web.http import datetimeToString
-from epsilon.extime import Time
+from dateutil.parser import parse as parseTime
from txaws.client.base import BaseClient, BaseQuery, error_wrapper
from txaws.s3.acls import AccessControlPolicy
@@ -96,7 +96,7 @@
for bucket_data in root.find("Buckets"):
name = bucket_data.findtext("Name")
date_text = bucket_data.findtext("CreationDate")
- date_time = Time.fromISO8601TimeAndDate(date_text).asDatetime()
+ date_time = parseTime(date_text)
bucket = Bucket(name, date_time)
buckets.append(bucket)
return buckets
@@ -143,8 +143,7 @@
for content_data in root.findall("Contents"):
key = content_data.findtext("Key")
date_text = content_data.findtext("LastModified")
- modification_date = Time.fromISO8601TimeAndDate(
- date_text).asDatetime()
+ modification_date = parseTime(date_text)
etag = content_data.findtext("ETag")
size = content_data.findtext("Size")
storage_class = content_data.findtext("StorageClass")