| 1 |
cp -rf pypy3.8/examples . |
| 2 |
cp -rf pypy3.8/doc . |
| 3 |
cp -f pypy3.8/index.html . |
| 4 |
cp -rf pypy3.8/module . |
| 5 |
cp -rf pypy3.9-v7.3.8-src/lib-python/3/multiprocessing multiprocess |
| 6 |
cp -rf pypy3.9-v7.3.8-src/lib-python/3/test/test_multiprocessing_*py multiprocess/tests |
| 7 |
cp -rf pypy3.9-v7.3.8-src/lib-python/3/test/_test_multiprocessing.py multiprocess/tests/__init__.py |
| 8 |
cp -rf pypy3.9-v7.3.8-src/lib-python/3/test/mp_*py multiprocess/tests/ |
| 9 |
cp -rf pypy3.8/multiprocess/tests/__main__.py multiprocess/tests/ |
| 10 |
cp -rf pypy3.8/_multiprocess . |
| 11 |
# ---------------------------------------------------------------------- |
| 12 |
EDIT multiprocess/__init__: __version__ |
| 13 |
EDIT time.monotonic --> getattr(time,'monotonic',time.time) |
| 14 |
EDIT "spawn" --> "fork" for darwin context |
| 15 |
EDIT multiprocess: multiprocessing --> multiprocess |
| 16 |
EDIT multiprocess: pickle --> dill |
| 17 |
ADDED *args, **kwds for ForkingPickler in __init__ and dump |
| 18 |
EDIT multiprocess/dummy: multiprocessing --> multiprocess |
| 19 |
EDIT multiprocess/tests: multiprocessing --> multiprocess |
| 20 |
# ---------------------------------------------------------------------- |
| 21 |
diff py3.9/multiprocess/forkserver.py pypy3.9/multiprocess/forkserver.py |
| 22 |
240a241 |
| 23 |
> |
| 24 |
diff py3.9/multiprocess/managers.py pypy3.9/multiprocess/managers.py |
| 25 |
1154c1154 |
| 26 |
< '__setitem__', 'clear', 'copy', 'get', 'has_key', 'items', |
| 27 |
--- |
| 28 |
> '__setitem__', 'clear', 'copy', 'get', 'items', |
| 29 |
diff py3.9/multiprocess/shared_memory.py pypy3.9/multiprocess/shared_memory.py |
| 30 |
320,322d319 |
| 31 |
< _recreation_codes = [ |
| 32 |
< self._extract_recreation_code(item) for item in sequence |
| 33 |
< ] |
| 34 |
428c425 |
| 35 |
< offset = self._offset_data_start + self._allocated_offsets[position] |
| 36 |
--- |
| 37 |
> offset = self._offset_data_start + self._allocated_offsets[position] |
| 38 |
diff py3.9/multiprocess/synchronize.py pypy3.9/multiprocess/synchronize.py |
| 39 |
32c32 |
| 40 |
< except ImportError: |
| 41 |
--- |
| 42 |
> except (ImportError): |
| 43 |
# ---------------------------------------------------------------------- |
| 44 |
diff py3.9/multiprocess/tests/__init__.py pypy3.9/multiprocess/tests/__init__.py |
| 45 |
568a569 |
| 46 |
> @unittest.skipIf(True, 'bad pipe in pypy3') |
| 47 |
612c613,614 |
| 48 |
< gc.collect() # For PyPy or other GCs. |
| 49 |
--- |
| 50 |
> for i in range(3): |
| 51 |
> gc.collect() |
| 52 |
1940a1943 |
| 53 |
> @unittest.skipIf(True, 'bad timeout in pypy3') |
| 54 |
1959a1963 |
| 55 |
> @unittest.skipIf(True, 'bad timeout in pypy3') |
| 56 |
2671c2673,2674 |
| 57 |
< gc.collect() # For PyPy or other GCs. |
| 58 |
--- |
| 59 |
> for i in range(3): |
| 60 |
> gc.collect() |
| 61 |
2759a2763,2765 |
| 62 |
> sm = multiprocessing.get_start_method() |
| 63 |
> if sm == 'fork' and sys.implementation.name == 'pypy': |
| 64 |
> self.skipTest("race condition on PyPy") |
| 65 |
2968c2974,2975 |
| 66 |
< self.assertRaises(Exception, queue.put, time.sleep) |
| 67 |
--- |
| 68 |
> # Changed on PyPy: passing functions to xmlrpc is broken |
| 69 |
> #self.assertRaises(Exception, queue.put, time.sleep) |
| 70 |
3608c3615 |
| 71 |
< def test_heap(self): |
| 72 |
--- |
| 73 |
> def _test_heap(self): |
| 74 |
3665a3673,3674 |
| 75 |
> support.gc_collect() # for PyPy and other GCs |
| 76 |
> |
| 77 |
3671a3681 |
| 78 |
> @test.support.cpython_only |
| 79 |
3778c3788 |
| 80 |
< # running multiprocessing tests (test_multiprocessing_fork, |
| 81 |
--- |
| 82 |
> # running multiprocess tests (test_multiprocessing_fork, |
| 83 |
4191c4200,4201 |
| 84 |
< gc.collect() # For PyPy or other GCs. |
| 85 |
--- |
| 86 |
> for i in range(3): |
| 87 |
> gc.collect() |
| 88 |
4245a4256 |
| 89 |
> @test.support.cpython_only |
| 90 |
5101c5112 |
| 91 |
< def test_preload_resources(self): |
| 92 |
--- |
| 93 |
> def _test_preload_resources(self): |
| 94 |
# ---------------------------------------------------------------------- |
| 95 |
$ diff pypy3.9-v7.3.8-src/lib-python/3/test/_test_multiprocessing.py pypy3.9-v7.3.9-src/lib-python/3/test/_test_multiprocessing.py |
| 96 |
71a72,77 |
| 97 |
> if support.check_sanitizer(address=True): |
| 98 |
> # bpo-45200: Skip multiprocessing tests if Python is built with ASAN to |
| 99 |
> # work around a libasan race condition: dead lock in pthread_create(). |
| 100 |
> raise unittest.SkipTest("libasan has a pthread_create() dead lock") |
| 101 |
> |
| 102 |
# ---------------------------------------------------------------------- |
| 103 |
diff pypy3.9-v7.3.9-src/pypy/module/_multiprocessing/interp_memory.py pypy3.9-v7.3.10-src/pypy/module/_multiprocessing/interp_memory.py |
| 104 |
10,11c10,11 |
| 105 |
< return space.newtuple([space.newint(address), |
| 106 |
< space.newint(mmap.mmap.size)]) |
| 107 |
--- |
| 108 |
> return space.newtuple2(space.newint(address), |
| 109 |
> space.newint(mmap.mmap.size)) |
| 110 |
# ---------------------------------------------------------------------- |
| 111 |
diff pypy3.9-v7.3.9-src/lib-python/3/multiprocessing/connection.py pypy3.9-v7.3.10-src/lib-python/3/multiprocessing/connection.py |
| 112 |
76,80d75 |
| 113 |
< # Prefer abstract sockets if possible to avoid problems with the address |
| 114 |
< # size. When coding portable applications, some implementations have |
| 115 |
< # sun_path as short as 92 bytes in the sockaddr_un struct. |
| 116 |
< if util.abstract_sockets_supported: |
| 117 |
< return f"\0listener-{os.getpid()}-{next(_mmap_counter)}" |
| 118 |
diff pypy3.9-v7.3.9-src/lib-python/3/multiprocessing/managers.py pypy3.9-v7.3.10-src/lib-python/3/multiprocessing/managers.py |
| 119 |
672c672 |
| 120 |
< process.join(timeout=0.1) |
| 121 |
--- |
| 122 |
> process.join(timeout=1.0) |
| 123 |
diff pypy3.9-v7.3.9-src/lib-python/3/multiprocessing/queues.py pypy3.9-v7.3.10-src/lib-python/3/multiprocessing/queues.py |
| 124 |
142,148c142,145 |
| 125 |
< try: |
| 126 |
< self._reader.close() |
| 127 |
< finally: |
| 128 |
< close = self._close |
| 129 |
< if close: |
| 130 |
< self._close = None |
| 131 |
< close() |
| 132 |
--- |
| 133 |
> close = self._close |
| 134 |
> if close: |
| 135 |
> self._close = None |
| 136 |
> close() |
| 137 |
172,173c169,171 |
| 138 |
< self._wlock, self._writer.close, self._ignore_epipe, |
| 139 |
< self._on_queue_feeder_error, self._sem), |
| 140 |
--- |
| 141 |
> self._wlock, self._reader.close, self._writer.close, |
| 142 |
> self._ignore_epipe, self._on_queue_feeder_error, |
| 143 |
> self._sem), |
| 144 |
214,215c212,213 |
| 145 |
< def _feed(buffer, notempty, send_bytes, writelock, close, ignore_epipe, |
| 146 |
< onerror, queue_sem): |
| 147 |
--- |
| 148 |
> def _feed(buffer, notempty, send_bytes, writelock, reader_close, |
| 149 |
> writer_close, ignore_epipe, onerror, queue_sem): |
| 150 |
241c239,240 |
| 151 |
< close() |
| 152 |
--- |
| 153 |
> reader_close() |
| 154 |
> writer_close() |
| 155 |
diff pypy3.9-v7.3.9-src/lib-python/3/multiprocessing/util.py pypy3.9-v7.3.10-src/lib-python/3/multiprocessing/util.py |
| 156 |
123c123 |
| 157 |
< raise TypeError('address type of {address!r} unrecognized') |
| 158 |
--- |
| 159 |
> raise TypeError(f'address type of {address!r} unrecognized') |
| 160 |
# ---------------------------------------------------------------------- |
| 161 |
diff pypy3.9-v7.3.9-src/pypy/module/_multiprocessing/test/test_interp_semaphore.py pypy3.9-v7.3.11-src/pypy/module/_multiprocessing/test/test_interp_semaphore.py |
| 162 |
5d4 |
| 163 |
< from pypy.tool.pytest.objspace import gettestobjspace |
| 164 |
15a15 |
| 165 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 166 |
diff pypy3.9-v7.3.9-src/pypy/module/_multiprocessing/test/test_semaphore.py pypy3.9-v7.3.11-src/pypy/module/_multiprocessing/test/test_semaphore.py |
| 167 |
2a3 |
| 168 |
> import pytest |
| 169 |
70a72 |
| 170 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 171 |
92a95 |
| 172 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 173 |
117a121 |
| 174 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 175 |
129a134 |
| 176 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 177 |
151a157 |
| 178 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 179 |
167a174 |
| 180 |
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX") |
| 181 |
# ---------------------------------------------------------------------- |
| 182 |
diff pypy3.9-v7.3.15-src/lib-python/3/multiprocessing/managers.py pypy3.9-v7.3.16-src/lib-python/3/multiprocessing/managers.py |
| 183 |
721a722 |
| 184 |
> conn.close() |
| 185 |
diff pypy3.9-v7.3.15-src/lib-python/3/multiprocessing/popen_spawn_win32.py pypy3.9-v7.3.16-src/lib-python/3/multiprocessing/popen_spawn_win32.py |
| 186 |
25c25,27 |
| 187 |
< WINENV = not _path_eq(sys.executable, sys._base_executable) |
| 188 |
--- |
| 189 |
> # PyPy is not affected by bpo-35797 |
| 190 |
> # WINENV = not _path_eq(sys.executable, sys._base_executable) |
| 191 |
> WINENV = False |
| 192 |
# ---------------------------------------------------------------------- |
| 193 |
NOTE: semaphore_tracker throws KeyError in multiprocess and multiprocessing |
| 194 |
|
| 195 |
Traceback (most recent call last): |
| 196 |
File "multiprocess/resource_tracker.py", line 204, in main |
| 197 |
cache[rtype].remove(name) |
| 198 |
KeyError: '/mp-v2zejd7s' |