zprocess 2.24.0__tar.gz → 2.25.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {zprocess-2.24.0/zprocess.egg-info → zprocess-2.25.0}/PKG-INFO +10 -1
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/tasks.py +8 -0
- {zprocess-2.24.0 → zprocess-2.25.0/zprocess.egg-info}/PKG-INFO +10 -1
- {zprocess-2.24.0 → zprocess-2.25.0}/.coveragerc +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/.github/workflows/release.yml +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/.gitignore +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/.travis.yml +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/LICENSE.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/README.md +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/doc/Makefile +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/doc/conf.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/doc/index.rst +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/doc/requirements.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/pyproject.toml +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/requirements.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/run_tests.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/setup.cfg +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/setup.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/GUI_output_redirection.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/output_redirection.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/test_remote.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/test_zlock_server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/test_zlog_server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/tests/tests.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/__version__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/clientserver.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/cryptoproxy.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/examples/example_child.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/examples/example_parent.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/examples/processclass_example.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/examples/processclass_remote_example.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/locking/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/locking/__main__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/makesecret.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/process_class_wrapper.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/process_tree.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/remote/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/remote/__main__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/remote/curses_server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/remote/server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/security.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/socks/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/socks/server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/utils.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlock/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlock/__main__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlock/server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlog/__init__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlog/__main__.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess/zlog/server.py +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess.egg-info/SOURCES.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess.egg-info/dependency_links.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess.egg-info/not-zip-safe +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess.egg-info/requires.txt +0 -0
- {zprocess-2.24.0 → zprocess-2.25.0}/zprocess.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zprocess
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.25.0
|
|
4
4
|
Summary: A set of utilities for multiprocessing using zeromq.
|
|
5
5
|
Home-page: http://github.com/chrisjbillington/zprocess
|
|
6
6
|
Author: Chris Billington
|
|
@@ -9,6 +9,15 @@ License: BSD
|
|
|
9
9
|
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE.txt
|
|
12
|
+
Requires-Dist: pyzmq>=18.0
|
|
13
|
+
Requires-Dist: ipaddress; python_version == "2.7"
|
|
14
|
+
Requires-Dist: subprocess32; python_version == "2.7"
|
|
15
|
+
Requires-Dist: enum34; python_version == "2.7"
|
|
16
|
+
Requires-Dist: pathlib; python_version == "2.7"
|
|
17
|
+
Requires-Dist: pywin32; sys_platform == "win32"
|
|
18
|
+
Requires-Dist: windows-curses; sys_platform == "win32"
|
|
19
|
+
Requires-Dist: importlib_metadata; python_version < "3.8"
|
|
20
|
+
Requires-Dist: setuptools_scm>=4.1.0
|
|
12
21
|
|
|
13
22
|
# zprocess
|
|
14
23
|
|
|
@@ -42,6 +42,7 @@ import copy
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
class Task(object):
|
|
45
|
+
_next_id = 0
|
|
45
46
|
def __init__(self, due_in, func, *args, **kwargs):
|
|
46
47
|
"""Wrapper for a function call to be executed after a specified time interval.
|
|
47
48
|
`due_in` is how long in the future, in seconds, the function should be called,
|
|
@@ -56,6 +57,8 @@ class Task(object):
|
|
|
56
57
|
self.kwargs = kwargs
|
|
57
58
|
self._called = False
|
|
58
59
|
self.repeat = False
|
|
60
|
+
self._id = self._next_id
|
|
61
|
+
Task._next_id += 1
|
|
59
62
|
|
|
60
63
|
def due_in(self):
|
|
61
64
|
"""The time interval in seconds until the task is due"""
|
|
@@ -72,6 +75,9 @@ class Task(object):
|
|
|
72
75
|
# insort() and pop() as used with TaskQueue.
|
|
73
76
|
return self.due_at < other.due_at
|
|
74
77
|
|
|
78
|
+
def __eq__(self, other):
|
|
79
|
+
return isinstance(other, Task) and self._id == other._id
|
|
80
|
+
|
|
75
81
|
|
|
76
82
|
class TaskQueue(list):
|
|
77
83
|
"""A list of pending tasks due at certain times. Tasks are stored with the soonest
|
|
@@ -96,6 +102,8 @@ class TaskQueue(list):
|
|
|
96
102
|
be re-added to the queue after it is removed via a call to `TaskQueue.pop()`."""
|
|
97
103
|
if repeat is not None:
|
|
98
104
|
task.repeat = repeat
|
|
105
|
+
# Re-adding an already-called task resets it
|
|
106
|
+
task._called = False
|
|
99
107
|
insort(self, task)
|
|
100
108
|
|
|
101
109
|
def next(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: zprocess
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.25.0
|
|
4
4
|
Summary: A set of utilities for multiprocessing using zeromq.
|
|
5
5
|
Home-page: http://github.com/chrisjbillington/zprocess
|
|
6
6
|
Author: Chris Billington
|
|
@@ -9,6 +9,15 @@ License: BSD
|
|
|
9
9
|
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE.txt
|
|
12
|
+
Requires-Dist: pyzmq>=18.0
|
|
13
|
+
Requires-Dist: ipaddress; python_version == "2.7"
|
|
14
|
+
Requires-Dist: subprocess32; python_version == "2.7"
|
|
15
|
+
Requires-Dist: enum34; python_version == "2.7"
|
|
16
|
+
Requires-Dist: pathlib; python_version == "2.7"
|
|
17
|
+
Requires-Dist: pywin32; sys_platform == "win32"
|
|
18
|
+
Requires-Dist: windows-curses; sys_platform == "win32"
|
|
19
|
+
Requires-Dist: importlib_metadata; python_version < "3.8"
|
|
20
|
+
Requires-Dist: setuptools_scm>=4.1.0
|
|
12
21
|
|
|
13
22
|
# zprocess
|
|
14
23
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|