Skip to content

Commit 3ab4cf1

Browse files
shinny-packshinny-chenli
authored andcommitted
Update Version 3.7.1
1 parent 0a6b40a commit 3ab4cf1

File tree

7 files changed

+17
-12
lines changed

7 files changed

+17
-12
lines changed

PKG-INFO

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Metadata-Version: 2.1
22
Name: tqsdk
3-
Version: 3.7.0
3+
Version: 3.7.1
44
Summary: TianQin SDK
55
Home-page: https://www.shinnytech.com/tqsdk
66
Author: TianQin

doc/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = u'3.7.0'
51+
version = u'3.7.1'
5252
# The full version, including alpha/beta/rc tags.
53-
release = u'3.7.0'
53+
release = u'3.7.1'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

doc/version.rst

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
版本变更
44
=============================
5+
3.7.1 (2024/08/29)
6+
7+
* 修复:在 Windows 系统上使用 :py:class:`~tqsdk.TqCtp` 账户导致多 TqApi 实例无法运行的问题
8+
* 修复::py:class:`~tqsdk.TqCtp` 文档 demo 代码拼写错误
9+
10+
511
3.7.0 (2024/08/22)
612

713
* 新增::py:class:`~tqsdk.TqCtp` 账户类型,支持直连 CTP 柜台

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name='tqsdk',
11-
version="3.7.0",
11+
version="3.7.1",
1212
description='TianQin SDK',
1313
author='TianQin',
1414
author_email='tianqincn@gmail.com',
@@ -18,7 +18,7 @@
1818
packages=setuptools.find_packages(exclude=["tqsdk.test", "tqsdk.test.*"]),
1919
python_requires='>=3.6.4',
2020
install_requires=["websockets>=8.1", "requests", "numpy", "pandas>=1.1.0", "scipy", "simplejson", "aiohttp",
21-
"certifi", "pyjwt", "psutil", "shinny_structlog", "sgqlc", "filelock", "tqsdk_ctpse", "tqsdk_sm", "tqsdk_zq_otg==1.1.0"],
21+
"certifi", "pyjwt", "psutil", "shinny_structlog", "sgqlc", "filelock", "tqsdk_ctpse", "tqsdk_sm", "tqsdk_zq_otg==1.1.1"],
2222
classifiers=[
2323
"Programming Language :: Python :: 3",
2424
"License :: OSI Approved :: Apache Software License",

tqsdk/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '3.7.0'
1+
__version__ = '3.7.1'

tqsdk/tradeable/otg/tqctp.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, account_id: str, password: str, front_broker: str, front_url:
3131
Example1::
3232
3333
from tqsdk import TqApi, TqCtp
34-
account = TqCtp(account_id="CTP 账户", password="CTP 密码", front_broker="CTP 柜台代码", "front_url"="CTP 柜台地址", app_id="CTP AppID", auth_code="CTP AuthCode")
34+
account = TqCtp(account_id="CTP 账户", password="CTP 密码", front_broker="CTP 柜台代码", front_url="CTP 柜台地址", app_id="CTP AppID", auth_code="CTP AuthCode")
3535
api = TqApi(account, auth=TqAuth("快期账户", "账户密码"))
3636
3737
"""

tqsdk/zq_otg.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import subprocess
1212
import contextlib
1313
from pathlib import Path
14-
from asyncio.subprocess import DEVNULL
14+
from asyncio.subprocess import DEVNULL, PIPE
1515

1616
from tqsdk_zq_otg import get_zq_otg_path
1717

@@ -46,9 +46,9 @@ async def get_addr(self):
4646
self._zq_otg_proc.poll()
4747
if self._zq_otg_proc is None or self._zq_otg_proc.returncode is not None:
4848
if sys.platform.startswith("win"):
49-
self._zq_otg_proc = subprocess.Popen([self._zq_otg_exe, f"--config={parameters}", "--mode=cmd"], stdin=DEVNULL, stdout=DEVNULL, stderr=DEVNULL, env=self._zq_otg_env)
49+
self._zq_otg_proc = subprocess.Popen([self._zq_otg_exe, f"--config={parameters}", "--mode=cmd"], stdin=PIPE, stdout=DEVNULL, stderr=DEVNULL, env=self._zq_otg_env)
5050
else:
51-
self._zq_otg_proc = await asyncio.create_subprocess_exec(self._zq_otg_exe, f"--config={parameters}", "--mode=cmd", stdin=DEVNULL, stdout=DEVNULL, stderr=DEVNULL, env=self._zq_otg_env)
51+
self._zq_otg_proc = await asyncio.create_subprocess_exec(self._zq_otg_exe, f"--config={parameters}", "--mode=cmd", stdin=PIPE, stdout=DEVNULL, stderr=DEVNULL, env=self._zq_otg_env)
5252

5353
for i in range(30):
5454
if port_file.exists():
@@ -62,8 +62,7 @@ async def get_addr(self):
6262

6363
async def __aexit__(self, exc_type, exc, tb):
6464
if self._zq_otg_proc is not None:
65-
with contextlib.suppress(ProcessLookupError):
66-
self._zq_otg_proc.send_signal(signal.CTRL_BREAK_EVENT if sys.platform.startswith("win") else signal.SIGTERM)
65+
self._zq_otg_proc.stdin.close()
6766
if sys.platform.startswith("win"):
6867
self._zq_otg_proc.wait()
6968
else:

0 commit comments

Comments
 (0)