You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/12/20 13:28:12 UTC
[incubator-ponymail-foal] branch master updated: migrate.py does not work on macos
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 78bc803 migrate.py does not work on macos
78bc803 is described below
commit 78bc803a6b231c6d0752334142ec4e257dd35517
Author: Sebb <se...@apache.org>
AuthorDate: Mon Dec 20 13:25:10 2021 +0000
migrate.py does not work on macos
This adds work-round for #158
---
tools/migrate.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/migrate.py b/tools/migrate.py
index a981cc3..f7bd128 100644
--- a/tools/migrate.py
+++ b/tools/migrate.py
@@ -350,6 +350,17 @@ if __name__ == "__main__":
help="Fail gracefully and continue if a processing error occurs",
action='store_true'
)
+ # the default on macOS is spawn, but this fails with:
+ # ForkingPickler(file, protocol).dump(obj)
+ # TypeError: cannot pickle 'weakref' object
+ # Work-round: allow override of start method
+ parser.add_argument(
+ "--start_method",
+ help="Override start method (e.g. fork on macos)",
+ type=str
+ )
args = parser.parse_args()
+ if args.start_method:
+ multiprocessing.set_start_method(args.start_method)
loop = asyncio.get_event_loop()
loop.run_until_complete(main(args.jobs, args.graceful))