cp -rf py3.8/examples .
cp -rf py3.8/doc .
cp -f py3.8/index.html .
cp -rf pypy3.8-v7.3.7-src/pypy/module/_multiprocessing module/_multiprocess
cp -rf pypy3.8-v7.3.7-src/lib-python/3/multiprocessing multiprocess
cp -rf pypy3.8-v7.3.7-src/lib-python/3/test/test_multiprocessing*py multiprocess/tests
cp -rf pypy3.8-v7.3.7-src/lib-python/3/test/_test_multiprocessing.py multiprocess/tests/__init__.py
cp -rf pypy3.8-v7.3.7-src/lib-python/3/test/mp_*py multiprocess/tests
cp -f py3.8/multiprocess/tests/__main__.py multiprocess/tests
cp -rf py3.8/_multiprocess _multiprocess
# ----------------------------------------------------------------------
EDIT multiprocess/__init__: __version__
EDIT multiprocess: multiprocessing --> multiprocess
EDIT multiprocess: pickle --> dill
ADDED *args, **kwds for ForkingPickler in __init__ and dump
EDIT time.monotonic --> getattr(time,'monotonic',time.time)
EDIT multiprocess/dummy: multiprocessing --> multiprocess
# ----------------------------------------------------------------------
diff py3.8/multiprocess/managers.py pypy3.8/multiprocess/managers.py
1177c1177
<     '__setitem__', 'clear', 'copy', 'get', 'has_key', 'items',
---
>     '__setitem__', 'clear', 'copy', 'get', 'items',
diff py3.8/multiprocess/synchronize.py pypy3.8/multiprocess/synchronize.py
32c32
< except ImportError:
---
> except (ImportError):
# ----------------------------------------------------------------------
EDIT multiprocess/tests: multiprocessing --> multiprocess
# ----------------------------------------------------------------------
diff py3.8/multiprocess/tests/__init__.py pypy3.8/multiprocess/tests/__init__.py
572a573
>     @unittest.skipIf(True, 'bad pipe in pypy3')
615a617,618
>         for i in range(3):
>             gc.collect()
1935a1939
>     @unittest.skipIf(True, 'bad timeout in pypy3')
2655a2660,2661
>         for i in range(3):
>             gc.collect()
2952c2958,2959
<         self.assertRaises(Exception, queue.put, time.sleep)
---
>         # Changed on PyPy: passing functions to xmlrpc is broken
>         #self.assertRaises(Exception, queue.put, time.sleep)
3589c3596
<     def test_heap(self):
---
>     def _test_heap(self):
3652a3660
>     @test.support.cpython_only
4124a4133,4134
>         for i in range(3):
>             gc.collect()
4135a4146
>         import gc; gc.collect()
4141a4153
>         import gc; gc.collect()
4176a4189
>     @test.support.cpython_only
5030c5043
<     def test_preload_resources(self):
---
>     def _test_preload_resources(self):
# ----------------------------------------------------------------------
$ diff pypy3.8-v7.3.8-src/lib-python/3/test/_test_multiprocessing.py pypy3.8-v7.3.9-src/lib-python/3/test/_test_multiprocessing.py 
3757a3758,3763
>     def _new_shm_name(self, prefix):
>         # Add a PID to the name of a POSIX shared memory object to allow
>         # running multiprocessing tests (test_multiprocessing_fork,
>         # test_multiprocessing_spawn, etc) in parallel.
>         return prefix + str(os.getpid())
> 
3759c3765,3766
<         sms = shared_memory.SharedMemory('test01_tsmb', create=True, size=512)
---
>         name_tsmb = self._new_shm_name('test01_tsmb')
>         sms = shared_memory.SharedMemory(name_tsmb, create=True, size=512)
3763c3770
<         self.assertEqual(sms.name, 'test01_tsmb')
---
>         self.assertEqual(sms.name, name_tsmb)
3772c3779
<         also_sms = shared_memory.SharedMemory('test01_tsmb')
---
>         also_sms = shared_memory.SharedMemory(name_tsmb)
3777c3784
<         same_sms = shared_memory.SharedMemory('test01_tsmb', size=20*sms.size)
---
>         same_sms = shared_memory.SharedMemory(name_tsmb, size=20*sms.size)
3787a3795,3800
>             name_dblunlink = self._new_shm_name('test01_dblunlink')
>             sms_uno = shared_memory.SharedMemory(
>                 name_dblunlink,
>                 create=True,
>                 size=5000
>             )
3789,3794d3801
<                 sms_uno = shared_memory.SharedMemory(
<                     'test01_dblunlink',
<                     create=True,
<                     size=5000
<                 )
< 
3798c3805
<                     sms_duo = shared_memory.SharedMemory('test01_dblunlink')
---
>                     sms_duo = shared_memory.SharedMemory(name_dblunlink)
3810c3817
<                 'test01_tsmb',
---
>                 name_tsmb,
3824c3831
<             ok_if_exists_sms = OptionalAttachSharedMemory('test01_tsmb')
---
>             ok_if_exists_sms = OptionalAttachSharedMemory(name_tsmb)
4012c4019,4020
<         sl_copy = shared_memory.ShareableList(sl, name='test03_duplicate')
---
>         name_duplicate = self._new_shm_name('test03_duplicate')
>         sl_copy = shared_memory.ShareableList(sl, name=name_duplicate)
4015c4023
<             self.assertEqual('test03_duplicate', sl_copy.shm.name)
---
>             self.assertEqual(name_duplicate, sl_copy.shm.name)
# ----------------------------------------------------------------------
diff pypy3.8-v7.3.9-src/pypy/module/_multiprocessing/interp_memory.py pypy3.9-v7.3.10-src/pypy/module/_multiprocessing/interp_memory.py
10,11c10,11
<         return space.newtuple([space.newint(address),
<                                space.newint(mmap.mmap.size)])
---
>         return space.newtuple2(space.newint(address),
>                                space.newint(mmap.mmap.size))
# ----------------------------------------------------------------------
diff pypy3.8-v7.3.9-src/pypy/module/_multiprocessing/test/test_interp_semaphore.py pypy3.8-v7.3.11-src/pypy/module/_multiprocessing/test/test_interp_semaphore.py
5d4
< from pypy.tool.pytest.objspace import gettestobjspace
15a15
> @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
diff pypy3.8-v7.3.9-src/pypy/module/_multiprocessing/test/test_semaphore.py pypy3.8-v7.3.11-src/pypy/module/_multiprocessing/test/test_semaphore.py
2a3
> import pytest
70a72
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
92a95
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
117a121
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
129a134
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
151a157
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
167a174
>     @pytest.mark.skipif(sys.platform == 'darwin', reason="Hangs on macOSX")
NOTE: semaphore_tracker throws KeyError in multiprocess and multiprocessing
NOTE: semaphore_tracker throws KeyError in multiprocess and multiprocessing
# ----------------------------------------------------------------------
Traceback (most recent call last):
  File "multiprocess/resource_tracker.py", line 204, in main
    cache[rtype].remove(name)
KeyError: '/mp-v2zejd7s'
