Skip to content

Commit 27d399d

Browse files
author
方佳
committed
Merge branch 'main_260131_merge' into 'main'
feat:Upgrade dependencies to support Python versions 1.2.x-1.3.x See merge request webull/webull-openapi-python-sdk!16
2 parents dc127e1 + 01bd00c commit 27d399d

118 files changed

Lines changed: 43 additions & 29344 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎samples/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.9'
1+
__version__ = '2.0.0'

‎samples/data/data_streaming_client.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,4 @@ def my_subscribe_success_func(client, api_client, quotes_session_id):
8686
# data_streaming_client.register_payload_decoder(PAYLOAD_TYPE_TICK, TickDecoder())
8787

8888
# the sync mode, blocking in current thread
89-
data_streaming_client.connect_and_loop_forever()
90-
91-
89+
data_streaming_client.connect_and_loop_forever()

‎setup.py‎

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,33 @@
1616

1717
requires = [
1818
"jmespath>=0.9.3,<1.0.0",
19-
"cryptography>=2.6.0",
20-
"cachetools==5.2.0",
21-
"paho-mqtt==1.6.1",
22-
"protobuf==4.21.12",
23-
"grpcio==1.51.1",
24-
"grpcio-tools==1.51.1"
19+
"cachetools>=5.2.0,<6",
20+
"paho-mqtt>=1.6.1,<2",
21+
"urllib3>=2.0",
22+
"requests>=2.31.0",
23+
"six>=1.16.0",
24+
25+
# cryptography
26+
"cryptography>=3.4,<42; python_version<'3.12'",
27+
"cryptography>=41.0,<43; python_version>='3.12'",
28+
29+
# protobuf
30+
"protobuf>=4.21.12,<5; python_version<'3.12'",
31+
"protobuf>=4.25.0,<6; python_version>='3.12'",
32+
33+
# grpc
34+
"grpcio>=1.51.1,<1.60; python_version<'3.12'",
35+
"grpcio>=1.60.0,<1.70; python_version>='3.12'"
2536
]
2637

38+
extras_require = {
39+
"dev": [
40+
"grpcio-tools>=1.60,<1.70",
41+
]
42+
}
43+
2744
setup_args = {
28-
'python_requires':'>=3.8,<3.12',
45+
'python_requires':'>=3.8,<3.14',
2946
'version': VERSION,
3047
'author': AUTHOR,
3148
'author_email': AUTHOR_EMAIL,

‎webull/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.1.0'
1+
__version__ = '2.0.0'

‎webull/core/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '1.1.0'
1+
__version__ = '2.0.0'
22

33
import logging
44

‎webull/core/auth/composer/default_signature_composer.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
from webull.core.exception.exceptions import ClientException
4343
from webull.core.utils import common
4444
import webull.core.headers as hd
45-
from webull.core.vendored.six import iteritems
46-
from webull.core.vendored.six.moves.urllib.parse import quote
45+
from six import iteritems
46+
from six.moves.urllib.parse import quote
4747
import logging
4848
logger = logging.getLogger(__name__)
4949

‎webull/core/auth/signers/signer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"""
4141

4242
from abc import ABCMeta, abstractmethod
43-
from webull.core.vendored.six import with_metaclass
43+
from six import with_metaclass
4444

4545
class Signer(with_metaclass(ABCMeta, object)):
4646
@abstractmethod

‎webull/core/client.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
from webull.core.retry.retry_condition import RetryCondition
6262
from webull.core.retry.retry_policy_context import RetryPolicyContext
6363
from webull.core.utils import common, validation
64-
from webull.core.vendored.requests import codes
65-
from webull.core.vendored.requests.structures import CaseInsensitiveDict
66-
from webull.core.vendored.requests.structures import OrderedDict
64+
from requests import codes
65+
from requests.structures import CaseInsensitiveDict
66+
from requests.structures import OrderedDict
6767

6868
DEFAULT_READ_TIMEOUT = 10
6969
DEFAULT_CONNECTION_TIMEOUT = 5
@@ -187,7 +187,7 @@ def default_user_agent():
187187
default_agent['Python'] = platform.python_version()
188188
default_agent['Core'] = __import__('webull.core').__version__
189189
default_agent['python-requests'] = __import__(
190-
'webull.core.vendored.requests.__version__', globals(), locals(),
190+
'requests.__version__', globals(), locals(),
191191
['vendored', 'requests', '__version__'], 0).__version__
192192

193193
return CaseInsensitiveDict(default_agent)

‎webull/core/compat.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"""
4141

4242
import sys
43-
from webull.core.vendored import six
43+
import six
4444

4545
if six.PY2:
4646
from base64 import encodestring as b64_encode_bytes

‎webull/core/http/response.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141

4242
import os
4343
import logging
44-
from webull.core.vendored.requests import Request, Session
44+
from requests import Request, Session
4545
from webull.core.http.request import Request as HttpRequest
4646
from webull.core.http import protocol_type as PT
47-
from webull.core.vendored.requests import status_codes
47+
from requests import status_codes
4848

4949

5050
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)