1 |
commit: 8b3dd3537a2c50035d6369946e65305d448d7f1b |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 30 19:11:52 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 30 19:25:20 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b3dd353 |
7 |
|
8 |
AbstractPollTask: remove deprecated _read_* event parameter |
9 |
|
10 |
Fixes: c11a6ec05f02 ("AbstractPollTask: add_reader asyncio compat (bug 654382)") |
11 |
|
12 |
pym/_emerge/AbstractPollTask.py | 6 ++---- |
13 |
pym/_emerge/AsynchronousLock.py | 2 +- |
14 |
pym/_emerge/EbuildIpcDaemon.py | 2 +- |
15 |
pym/_emerge/EbuildMetadataPhase.py | 2 +- |
16 |
pym/_emerge/PipeReader.py | 4 ++-- |
17 |
pym/portage/dbapi/_MergeProcess.py | 2 +- |
18 |
pym/portage/util/_async/PipeLogger.py | 2 +- |
19 |
7 files changed, 9 insertions(+), 11 deletions(-) |
20 |
|
21 |
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py |
22 |
index f68cd3a15..6cccb27d9 100644 |
23 |
--- a/pym/_emerge/AbstractPollTask.py |
24 |
+++ b/pym/_emerge/AbstractPollTask.py |
25 |
@@ -19,7 +19,7 @@ class AbstractPollTask(AsynchronousTask): |
26 |
def isAlive(self): |
27 |
return bool(self._registered) |
28 |
|
29 |
- def _read_array(self, f, event): |
30 |
+ def _read_array(self, f): |
31 |
""" |
32 |
NOTE: array.fromfile() is used here only for testing purposes, |
33 |
because it has bugs in all known versions of Python (including |
34 |
@@ -65,7 +65,7 @@ class AbstractPollTask(AsynchronousTask): |
35 |
|
36 |
return buf |
37 |
|
38 |
- def _read_buf(self, fd, event): |
39 |
+ def _read_buf(self, fd): |
40 |
""" |
41 |
Read self._bufsize into a string of bytes, handling EAGAIN and |
42 |
EIO. This will only call os.read() once, so the caller should |
43 |
@@ -78,8 +78,6 @@ class AbstractPollTask(AsynchronousTask): |
44 |
|
45 |
@param fd: file descriptor (non-blocking mode required) |
46 |
@type fd: int |
47 |
- @param event: poll event flags |
48 |
- @type event: int |
49 |
@rtype: bytes or None |
50 |
@return: A string of bytes, or None |
51 |
""" |
52 |
|
53 |
diff --git a/pym/_emerge/AsynchronousLock.py b/pym/_emerge/AsynchronousLock.py |
54 |
index 6cf37369f..aed1bcb15 100644 |
55 |
--- a/pym/_emerge/AsynchronousLock.py |
56 |
+++ b/pym/_emerge/AsynchronousLock.py |
57 |
@@ -266,7 +266,7 @@ class _LockProcess(AbstractPollTask): |
58 |
return self.returncode |
59 |
|
60 |
def _output_handler(self): |
61 |
- buf = self._read_buf(self._files['pipe_in'], None) |
62 |
+ buf = self._read_buf(self._files['pipe_in']) |
63 |
if buf: |
64 |
self._acquired = True |
65 |
self._unregister() |
66 |
|
67 |
diff --git a/pym/_emerge/EbuildIpcDaemon.py b/pym/_emerge/EbuildIpcDaemon.py |
68 |
index c16049ee4..d0dbe18bd 100644 |
69 |
--- a/pym/_emerge/EbuildIpcDaemon.py |
70 |
+++ b/pym/_emerge/EbuildIpcDaemon.py |
71 |
@@ -34,7 +34,7 @@ class EbuildIpcDaemon(FifoIpcDaemon): |
72 |
|
73 |
def _input_handler(self): |
74 |
# Read the whole pickle in a single atomic read() call. |
75 |
- data = self._read_buf(self._files.pipe_in, None) |
76 |
+ data = self._read_buf(self._files.pipe_in) |
77 |
if data is None: |
78 |
pass # EAGAIN |
79 |
elif data: |
80 |
|
81 |
diff --git a/pym/_emerge/EbuildMetadataPhase.py b/pym/_emerge/EbuildMetadataPhase.py |
82 |
index 42bcd6739..4940d40b6 100644 |
83 |
--- a/pym/_emerge/EbuildMetadataPhase.py |
84 |
+++ b/pym/_emerge/EbuildMetadataPhase.py |
85 |
@@ -130,7 +130,7 @@ class EbuildMetadataPhase(SubProcess): |
86 |
|
87 |
def _output_handler(self): |
88 |
while True: |
89 |
- buf = self._read_buf(self._files.ebuild, None) |
90 |
+ buf = self._read_buf(self._files.ebuild) |
91 |
if buf is None: |
92 |
break # EAGAIN |
93 |
elif buf: |
94 |
|
95 |
diff --git a/pym/_emerge/PipeReader.py b/pym/_emerge/PipeReader.py |
96 |
index 6a3fc9ea6..151be94ea 100644 |
97 |
--- a/pym/_emerge/PipeReader.py |
98 |
+++ b/pym/_emerge/PipeReader.py |
99 |
@@ -61,7 +61,7 @@ class PipeReader(AbstractPollTask): |
100 |
def _output_handler(self, fd): |
101 |
|
102 |
while True: |
103 |
- data = self._read_buf(fd, None) |
104 |
+ data = self._read_buf(fd) |
105 |
if data is None: |
106 |
break |
107 |
if data: |
108 |
@@ -79,7 +79,7 @@ class PipeReader(AbstractPollTask): |
109 |
break |
110 |
|
111 |
while True: |
112 |
- data = self._read_array(f, None) |
113 |
+ data = self._read_array(f) |
114 |
if data is None: |
115 |
break |
116 |
if data: |
117 |
|
118 |
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py |
119 |
index 42f2d84e5..fefdf8635 100644 |
120 |
--- a/pym/portage/dbapi/_MergeProcess.py |
121 |
+++ b/pym/portage/dbapi/_MergeProcess.py |
122 |
@@ -79,7 +79,7 @@ class MergeProcess(ForkProcess): |
123 |
self._locked_vdb = False |
124 |
|
125 |
def _elog_output_handler(self): |
126 |
- output = self._read_buf(self._elog_reader_fd, None) |
127 |
+ output = self._read_buf(self._elog_reader_fd) |
128 |
if output: |
129 |
lines = _unicode_decode(output).split('\n') |
130 |
if len(lines) == 1: |
131 |
|
132 |
diff --git a/pym/portage/util/_async/PipeLogger.py b/pym/portage/util/_async/PipeLogger.py |
133 |
index 61000271d..a4258f350 100644 |
134 |
--- a/pym/portage/util/_async/PipeLogger.py |
135 |
+++ b/pym/portage/util/_async/PipeLogger.py |
136 |
@@ -72,7 +72,7 @@ class PipeLogger(AbstractPollTask): |
137 |
log_file = self._log_file |
138 |
|
139 |
while True: |
140 |
- buf = self._read_buf(fd, None) |
141 |
+ buf = self._read_buf(fd) |
142 |
|
143 |
if buf is None: |
144 |
# not a POLLIN event, EAGAIN, etc... |