stouputils 1.19.3__py3-none-any.whl → 1.19.4__py3-none-any.whl
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.
- stouputils/parallel/capturer.py +3 -2
- stouputils/parallel/capturer.pyi +2 -2
- {stouputils-1.19.3.dist-info → stouputils-1.19.4.dist-info}/METADATA +1 -1
- {stouputils-1.19.3.dist-info → stouputils-1.19.4.dist-info}/RECORD +6 -6
- {stouputils-1.19.3.dist-info → stouputils-1.19.4.dist-info}/WHEEL +0 -0
- {stouputils-1.19.3.dist-info → stouputils-1.19.4.dist-info}/entry_points.txt +0 -0
stouputils/parallel/capturer.py
CHANGED
|
@@ -34,10 +34,10 @@ class CaptureOutput:
|
|
|
34
34
|
>>> capturer.redirect() # Redirects sys.stdout/sys.stderr to the pipe
|
|
35
35
|
|
|
36
36
|
>>> pass # in parent process:
|
|
37
|
-
>>> capturer.parent_close_write() # Close parent's write end
|
|
37
|
+
>>> #capturer.parent_close_write() # Close parent's write end
|
|
38
38
|
>>> capturer.start_listener() # Start listener thread to read from pipe
|
|
39
39
|
>>> ... # do other work
|
|
40
|
-
>>> capturer.join_listener() # Wait for listener to finish (on EOF)
|
|
40
|
+
>>> capturer.join_listener(timeout=0.1) # Wait for listener to finish (on EOF)
|
|
41
41
|
"""
|
|
42
42
|
def __init__(self, encoding: str = "utf-8", errors: str = "replace"):
|
|
43
43
|
import multiprocessing as mp
|
|
@@ -115,6 +115,7 @@ class CaptureOutput:
|
|
|
115
115
|
except Exception:
|
|
116
116
|
chunk = data.decode(self.encoding, errors="replace")
|
|
117
117
|
buffer += chunk
|
|
118
|
+
_handle_buffer()
|
|
118
119
|
finally:
|
|
119
120
|
safe_close(self.read_conn)
|
|
120
121
|
self.read_fd = -1
|
stouputils/parallel/capturer.pyi
CHANGED
|
@@ -24,10 +24,10 @@ class CaptureOutput:
|
|
|
24
24
|
\t>>> capturer.redirect() # Redirects sys.stdout/sys.stderr to the pipe
|
|
25
25
|
|
|
26
26
|
\t>>> pass # in parent process:
|
|
27
|
-
\t>>> capturer.parent_close_write() # Close parent\'s write end
|
|
27
|
+
\t>>> #capturer.parent_close_write() # Close parent\'s write end
|
|
28
28
|
\t>>> capturer.start_listener() # Start listener thread to read from pipe
|
|
29
29
|
\t>>> ... # do other work
|
|
30
|
-
\t>>> capturer.join_listener() # Wait for listener to finish (on EOF)
|
|
30
|
+
\t>>> capturer.join_listener(timeout=0.1) # Wait for listener to finish (on EOF)
|
|
31
31
|
\t'''
|
|
32
32
|
encoding: str
|
|
33
33
|
errors: str
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: stouputils
|
|
3
|
-
Version: 1.19.
|
|
3
|
+
Version: 1.19.4
|
|
4
4
|
Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
|
|
5
5
|
Keywords: utilities,tools,helpers,development,python
|
|
6
6
|
Author: Stoupy51
|
|
@@ -141,8 +141,8 @@ stouputils/lock/shared.py,sha256=G8Mcy7dXtNESyU7hSaeihNrCU4l98VhyQyO_vQYPJ7g,788
|
|
|
141
141
|
stouputils/lock/shared.pyi,sha256=0CV6TpTaDEkcGA35Q-ijp8ckImZ32umlMA4U-8C_O-I,545
|
|
142
142
|
stouputils/parallel/__init__.py,sha256=myD8KiVfPPKF26Xu8Clu0p-VaYDK74loMUjUkl6-9XU,1013
|
|
143
143
|
stouputils/parallel/__init__.pyi,sha256=UtZKtl9i__OH0Edypap9oZUcTF1h91qfpItG1-x7TfE,97
|
|
144
|
-
stouputils/parallel/capturer.py,sha256=
|
|
145
|
-
stouputils/parallel/capturer.pyi,sha256=
|
|
144
|
+
stouputils/parallel/capturer.py,sha256=s4x_o8Awe-RYyyYxTzgQSm1N2shDjFhENkJBdW-WHEY,4574
|
|
145
|
+
stouputils/parallel/capturer.pyi,sha256=UdhhJFdyBsBUyEAltaG3Im13GvZlNXi-ScQDXezFI1Q,2141
|
|
146
146
|
stouputils/parallel/common.py,sha256=niDcAiEX3flX0ow91gXOB4umlOrR8PIYvpcKPClJHfM,4910
|
|
147
147
|
stouputils/parallel/common.pyi,sha256=jbyftOYHKP2qaA8YC1f1f12-BDBkhfsQsnPdsR4oet8,2493
|
|
148
148
|
stouputils/parallel/multi.py,sha256=tHJgcQJwsI6QeKEHoGJC4tsVK_6t1Fazkb06i1u-W_8,12610
|
|
@@ -156,7 +156,7 @@ stouputils/typing.py,sha256=9sj6-_lW9pyQFmxW2K1SinGCy7IWeRouUfWjPU2qDsk,2205
|
|
|
156
156
|
stouputils/typing.pyi,sha256=XRKhGA7jWjcE-DtS2UznevBxBIFqj8IZI8-J48_3GQc,1341
|
|
157
157
|
stouputils/version_pkg.py,sha256=Jsp-s03L14DkiZ94vQgrlQmaxApfn9DC8M_nzT1SJLk,7014
|
|
158
158
|
stouputils/version_pkg.pyi,sha256=QPvqp1U3QA-9C_CC1dT9Vahv1hXEhstbM7x5uzMZSsQ,755
|
|
159
|
-
stouputils-1.19.
|
|
160
|
-
stouputils-1.19.
|
|
161
|
-
stouputils-1.19.
|
|
162
|
-
stouputils-1.19.
|
|
159
|
+
stouputils-1.19.4.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
|
|
160
|
+
stouputils-1.19.4.dist-info/entry_points.txt,sha256=tx0z9VOnE-sfkmbFbA93zaBMzV3XSsKEJa_BWIqUzxw,57
|
|
161
|
+
stouputils-1.19.4.dist-info/METADATA,sha256=UdM9eb2MdkC1t42azf7_UT8603Nafg0m7T9i6gERTko,13931
|
|
162
|
+
stouputils-1.19.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|