Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit 52976af

Browse files
authored
Merge pull request #34 from upwork/v1.3.3
v1.3.3
2 parents c2e8c81 + 31bc917 commit 52976af

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
Changelog
66
***************
77

8+
.. _1.3.3:
9+
10+
Version 1.3.3
11+
-------------
12+
* Fix Team_V3.get_workdiaries - parameters were not sent
13+
* Default `timeout` parameter for urllib3 has been set to the maximum 8 seconds
14+
* The `retries` parameter for urllib3 has been set to `False`
15+
816
.. _1.3.2:
917

1018
Version 1.3.2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
README = readme.read()
1212
readme.close()
1313

14-
VERSION = (1, 3, 2, 0, 0)
14+
VERSION = (1, 3, 3, 0, 0)
1515

1616

1717
def get_version():

upwork/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
"""
1515

16-
VERSION = '1.3.2'
16+
VERSION = '1.3.3'
1717

1818

1919
def get_version():

upwork/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ class Client(object):
9090
Whether to attach
9191
:py:mod:`upwork.routers.job` router
9292
93-
:timeout: (optional, default ``3 secs``)
93+
:timeout: (optional, default ``8 secs``)
9494
Socket operations timeout.
9595
"""
9696

9797
def __init__(self, public_key, secret_key,
9898
oauth_access_token=None, oauth_access_token_secret=None,
9999
fmt='json', finreport=True, hr=True, messages=True,
100100
offers=True, provider=True, task=True, team=True,
101-
timereport=True, job=True, timeout=3):
101+
timereport=True, job=True, timeout=8):
102102

103103
self.public_key = public_key
104104
self.secret_key = secret_key
@@ -117,8 +117,8 @@ def __init__(self, public_key, secret_key,
117117
self.http = urllib3.PoolManager(
118118
cert_reqs='CERT_REQUIRED',
119119
ca_certs=ca_certs_locater.get(),
120-
timeout=int(timeout),
121-
retries=Retry(2, backoff_factor=0.5)
120+
timeout=urllib3.Timeout(connect=0.5, read=float(timeout)),
121+
retries=False
122122
)
123123

124124
self.oauth_access_token = oauth_access_token

upwork/routers/team.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ def get_workdiaries(self, team_id, date, sort_by=None, activity=None, freelancer
9191
9292
"""
9393
url = 'workdiaries/companies/{0}/{1}'.format(team_id, date)
94-
result = self.get(url)
95-
if 'error' in result:
96-
return result
97-
9894
data = {}
9995

10096
if sort_by:
@@ -109,6 +105,10 @@ def get_workdiaries(self, team_id, date, sort_by=None, activity=None, freelancer
109105
if paging:
110106
data['paging'] = paging
111107

108+
result = self.get(url, data)
109+
if 'error' in result:
110+
return result
111+
112112
snapshots = result.get('data', data)
113113
if not isinstance(snapshots, list):
114114
snapshots = [snapshots]

0 commit comments

Comments
 (0)