ldc: Update from 1.8 to 1.9
[termux-packages] / packages / asciinema / asciinema-asciicast-v2.py.patch
CommitLineData
52c7c339
FF
1See https://github.com/asciinema/asciinema/issues/271
2
3diff -u -r ../asciinema-2.0.1/asciinema/asciicast/v2.py ./asciinema/asciicast/v2.py
4--- ../asciinema-2.0.1/asciinema/asciicast/v2.py 2018-04-04 09:05:41.000000000 +0200
5+++ ./asciinema/asciicast/v2.py 2018-04-06 23:24:44.432657505 +0200
6@@ -4,7 +4,16 @@
7 import json.decoder
8 import time
9 import codecs
10-from multiprocessing import Process, Queue
11+
12+try:
13+ # Importing synchronize is to detect platforms where
14+ # multiprocessing does not work (python issue 3770)
15+ # and cause an ImportError. Otherwise it will happen
16+ # later when trying to use Queue().
17+ from multiprocessing import synchronize, Process, Queue
18+except ImportError:
19+ from threading import Thread as Process
20+ from queue import Queue
21
22 from asciinema.pty_recorder import PtyRecorder
23