提交 5523f071 编写于 作者: H Hou Tianze

Accommodate Python 3 on Windows (threading.TIMEOUT_MAX is a little bit more...

Accommodate Python 3 on Windows (threading.TIMEOUT_MAX is a little bit more thant 49 days, so set multiprocess timeout to 49 days). Close #374
上级 51d74305
### Version History:
- 1.5.7: Reduce multiprocess timeout to 49 days, to accommodate Python 3 on Windows
- 1.5.6: Downloading using downloader also retries
- 1.5.5: Minor: Improve 'multiprocess' installation prompts
- 1.5.4: Print instructions on how to fix 'multiprocess' errors
......
Version History:
~~~~~~~~~~~~~~~~
- 1.5.7: Reduce multiprocess timeout to 49 days, to accommodate Python
3 on Windows
- 1.5.6: Downloading using downloader also retries
- 1.5.5: Minor: Improve 'multiprocess' installation prompts
- 1.5.4: Print instructions on how to fix 'multiprocess' errors
......
......@@ -548,7 +548,8 @@ class ByPy(object):
# http://stackoverflow.com/a/35134329/404271
# On Python 2.x, Ctrl-C won't work if we use pool.map(), wait() or get()
ar = pool.map_async(worker, iterator)
results = ar.get(const.TenYearInSeconds)
#results = ar.get(const.TenYearInSeconds)
results = ar.get(const.FortyNineDaysInSeconds)
restoremp()
return self.__filter_multi_results(results)
except pickle.PicklingError as pe:
......
......@@ -12,7 +12,7 @@ import os
# https://packaging.python.org/single_source_version/
__title__ = 'bypy'
__version__ = '1.5.6'
__version__ = '1.5.7'
__author__ = 'Hou Tianze'
__license__ = 'MIT'
__desc__ = 'Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘 Python 客户端'
......@@ -88,6 +88,10 @@ SIPrefixTimes = {
# before this, you don't know me, i don't know you - Eason
TenYearInSeconds = 60 * 60 * 24 * 366 * 10
# For Python 3 only, threading.TIMEOUT_MAX is 9223372036854.0 on all *nix systems,
# but it's a little over 49 days for Windows, if we give a value larger than that,
# Python 3 on Windows will throw towel, so we cringe.
FortyNineDaysInSeconds = 60 * 60 * 24 * 49
#### Baidu PCS constants
# ==== NOTE ====
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册