Skip to content

Commit b03f415

Browse files
authored
switch to use multiprocess to avoid awkward initialization errors (#151)
* switch to use multiprocess to avoid awkward initialization errors * update documentation requirements
1 parent 5a68b16 commit b03f415

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
authlib==1.3.0
44
Flask==3.0.3
55
httpx==0.27.0
6+
multiprocess==0.70.16
67
prompt_toolkit==3.0.43
78
psutil==5.9.8
89
python-dateutil==2.9.0.post0

schwab/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import httpx
66
import json
77
import logging
8-
import multiprocessing
8+
import multiprocess
99
import os
1010
import psutil
1111
import queue
@@ -303,9 +303,9 @@ def client_from_login_flow(api_key, app_secret, callback_url, token_path,
303303
callback_port = parsed.port if parsed.port else 443
304304
callback_path = parsed.path if parsed.path else '/'
305305

306-
output_queue = multiprocessing.Queue()
306+
output_queue = multiprocess.Queue()
307307

308-
server = multiprocessing.Process(
308+
server = multiprocess.Process(
309309
target=__run_client_from_login_flow_server,
310310
args=(output_queue, callback_port, callback_path))
311311

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'authlib',
3535
'flask',
3636
'httpx',
37+
'multiprocess',
3738
'prompt_toolkit',
3839
'psutil',
3940
'python-dateutil',

0 commit comments

Comments
 (0)