Skip to content

Commit

Permalink
fix #2 dateutil
Browse files Browse the repository at this point in the history
  • Loading branch information
LibbaLawrence committed Jul 16, 2020
1 parent f546351 commit 31b68ee
Show file tree
Hide file tree
Showing 64 changed files with 4,723 additions and 1,105 deletions.
2 changes: 1 addition & 1 deletion sdk/table/azure-table/azure/table/_deserialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _convert_to_entity(entry_element):
etag = 'W/"datetime\'' + url_quote(timestamp) + '\'"'
entity['etag'] = etag

entity.set_metadata()
entity._set_metadata()
return entity


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import hmac
from io import (SEEK_SET)
import six
from dateutil.tz import tzutc
from datetime import tzinfo
from azure.table._shared.parser import _str


Expand Down Expand Up @@ -51,7 +51,7 @@ def _datetime_to_utc_string(value):
return None

if value.tzinfo:
value = value.astimezone(tzutc())
value = value.astimezone(tzinfo())

return value.strftime('%a, %d %b %Y %H:%M:%S GMT')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:46 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:46 GMT
x-ms-version:
- '2019-07-07'
method: POST
Expand All @@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:25:07 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
location:
- https://storagename.table.core.windows.net/Tables('uttable99fe1256')
server:
Expand All @@ -49,7 +49,7 @@ interactions:
message: Created
- request:
body: '{"PartitionKey": "pk99fe1256", "RowKey": "rk99fe1256", "binary": "AQIDBAUGBwgJCg==",
"binary@odata.type": "EdmType.BINARY"}'
"binary@odata.type": "Edm.Binary"}'
headers:
Accept:
- application/json;odata=minimalmetadata
Expand All @@ -58,30 +58,79 @@ interactions:
Connection:
- keep-alive
Content-Length:
- '123'
- '119'
Content-Type:
- application/json;odata=nometadata
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: POST
uri: https://storagename.table.core.windows.net/uttable99fe1256
response:
body:
string: '{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"An
error occurred while processing this request.\nRequestId:e02f5e09-0002-00e6-6485-5bfcf2000000\nTime:2020-07-16T15:25:09.5537027Z"}}}'
string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-07-16T15%3A32%3A45.7387783Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-07-16T15:32:45.7387783Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}'
headers:
cache-control:
- no-cache
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:32:45 GMT
etag:
- W/"datetime'2020-07-16T15%3A32%3A45.7387783Z'"
location:
- https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey='pk99fe1256',RowKey='rk99fe1256')
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
- chunked
x-content-type-options:
- nosniff
x-ms-version:
- '2019-07-07'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- application/json;odata=minimalmetadata
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: GET
uri: https://storagename.table.core.windows.net/uttable99fe1256(PartitionKey='pk99fe1256',RowKey='rk99fe1256')
response:
body:
string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable99fe1256/@Element","odata.etag":"W/\"datetime''2020-07-16T15%3A32%3A45.7387783Z''\"","PartitionKey":"pk99fe1256","RowKey":"rk99fe1256","Timestamp":"2020-07-16T15:32:45.7387783Z","binary@odata.type":"Edm.Binary","binary":"AQIDBAUGBwgJCg=="}'
headers:
cache-control:
- no-cache
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
etag:
- W/"datetime'2020-07-16T15%3A32%3A45.7387783Z'"
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
Expand All @@ -91,8 +140,8 @@ interactions:
x-ms-version:
- '2019-07-07'
status:
code: 400
message: Bad Request
code: 200
message: OK
- request:
body: null
headers:
Expand All @@ -105,11 +154,11 @@ interactions:
Content-Length:
- '0'
Date:
- Thu, 16 Jul 2020 15:25:10 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:10 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: DELETE
Expand All @@ -123,7 +172,7 @@ interactions:
content-length:
- '0'
date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:25:11 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:11 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: POST
Expand All @@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:25:09 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
location:
- https://storagename.table.core.windows.net/Tables('uttable12440ee0')
server:
Expand All @@ -49,12 +49,12 @@ interactions:
message: Created
- request:
body: '{"PartitionKey": "pk12440ee0", "RowKey": "rk12440ee0", "age": "39", "age@odata.type":
"EdmType.INT64", "sex": "male", "married": true, "deceased": false, "ratio":
3.1, "evenratio": 3.0, "large": "933311100", "large@odata.type": "EdmType.INT64",
"Birthday": "1973-10-04T00:00:00Z", "Birthday@odata.type": "EdmType.DATETIME",
"birthday": "1970-10-04T00:00:00Z", "birthday@odata.type": "EdmType.DATETIME",
"binary": "YmluYXJ5", "binary@odata.type": "EdmType.BINARY", "other": 20, "clsid":
"c9da6455-213d-42c9-9a79-3e9149a57833", "clsid@odata.type": "EdmType.GUID"}'
"Edm.Int64", "sex": "male", "married": true, "deceased": false, "ratio": 3.1,
"evenratio": 3.0, "large": "933311100", "large@odata.type": "Edm.Int64", "Birthday":
"1973-10-04T00:00:00Z", "Birthday@odata.type": "Edm.DateTime", "birthday": "1970-10-04T00:00:00Z",
"birthday@odata.type": "Edm.DateTime", "binary": "YmluYXJ5", "binary@odata.type":
"Edm.Binary", "other": 20, "clsid": "c9da6455-213d-42c9-9a79-3e9149a57833",
"clsid@odata.type": "Edm.Guid"}'
headers:
Accept:
- application/json;odata=minimalmetadata
Expand All @@ -63,30 +63,122 @@ interactions:
Connection:
- keep-alive
Content-Length:
- '561'
- '537'
Content-Type:
- application/json;odata=nometadata
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:25:11 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:11 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: POST
uri: https://storagename.table.core.windows.net/uttable12440ee0
response:
body:
string: '{"odata.error":{"code":"InvalidInput","message":{"lang":"en-US","value":"An
error occurred while processing this request.\nRequestId:211fa0ed-0002-0003-7a85-5bee05000000\nTime:2020-07-16T15:25:11.5741183Z"}}}'
string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#uttable12440ee0/@Element","odata.etag":"W/\"datetime''2020-07-16T15%3A32%3A46.3623741Z''\"","PartitionKey":"pk12440ee0","RowKey":"rk12440ee0","Timestamp":"2020-07-16T15:32:46.3623741Z","age@odata.type":"Edm.Int64","age":"39","sex":"male","married":true,"deceased":false,"ratio":3.1,"evenratio":3.0,"large@odata.type":"Edm.Int64","large":"933311100","Birthday@odata.type":"Edm.DateTime","Birthday":"1973-10-04T00:00:00Z","birthday@odata.type":"Edm.DateTime","birthday":"1970-10-04T00:00:00Z","binary@odata.type":"Edm.Binary","binary":"YmluYXJ5","other":20,"clsid@odata.type":"Edm.Guid","clsid":"c9da6455-213d-42c9-9a79-3e9149a57833"}'
headers:
cache-control:
- no-cache
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:32:45 GMT
etag:
- W/"datetime'2020-07-16T15%3A32%3A46.3623741Z'"
location:
- https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0')
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
- chunked
x-content-type-options:
- nosniff
x-ms-version:
- '2019-07-07'
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '0'
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:32:47 GMT
If-Match:
- '*'
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: DELETE
uri: https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0')
response:
body:
string: ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Thu, 16 Jul 2020 15:32:45 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
- nosniff
x-ms-version:
- '2019-07-07'
status:
code: 204
message: No Content
- request:
body: null
headers:
Accept:
- application/json;odata=minimalmetadata
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
DataServiceVersion:
- '3.0'
Date:
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: GET
uri: https://storagename.table.core.windows.net/uttable12440ee0(PartitionKey='pk12440ee0',RowKey='rk12440ee0')
response:
body:
string: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The
specified resource does not exist.\nRequestId:0039691e-c002-0048-2b86-5becfc000000\nTime:2020-07-16T15:32:46.5465021Z"}}}'
headers:
cache-control:
- no-cache
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Thu, 16 Jul 2020 15:25:10 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
Expand All @@ -96,8 +188,8 @@ interactions:
x-ms-version:
- '2019-07-07'
status:
code: 400
message: Bad Request
code: 404
message: Not Found
- request:
body: null
headers:
Expand All @@ -110,11 +202,11 @@ interactions:
Content-Length:
- '0'
Date:
- Thu, 16 Jul 2020 15:25:12 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
User-Agent:
- azsdk-python-storage-table/2019-07-07 Python/3.8.3 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Thu, 16 Jul 2020 15:25:12 GMT
- Thu, 16 Jul 2020 15:32:47 GMT
x-ms-version:
- '2019-07-07'
method: DELETE
Expand All @@ -128,7 +220,7 @@ interactions:
content-length:
- '0'
date:
- Thu, 16 Jul 2020 15:25:10 GMT
- Thu, 16 Jul 2020 15:32:45 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
Expand Down
Loading

0 comments on commit 31b68ee

Please sign in to comment.