In debug mode, BaseEventLoop._run_once() now sets the BaseEventLoop._current_handle attribute to the handle currently executed. In release mode or when no handle is executed, the attribute is None. BaseEventLoop.default_exception_handler() displays the traceback of the current handle if available.
71 lines
1.4 KiB
Bash
Executable File
71 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to copy asyncio files to the standard library tree.
|
|
# Optional argument is the root of the Python 3.4 tree.
|
|
# Assumes you have already created Lib/asyncio and
|
|
# Lib/test/test_asyncio in the destination tree.
|
|
|
|
CPYTHON=${1-$HOME/cpython}
|
|
|
|
if [ ! -d $CPYTHON ]
|
|
then
|
|
echo Bad destination $CPYTHON
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f asyncio/__init__.py ]
|
|
then
|
|
echo Bad current directory
|
|
exit 1
|
|
fi
|
|
|
|
maybe_copy()
|
|
{
|
|
SRC=$1
|
|
DST=$CPYTHON/$2
|
|
if cmp $DST $SRC
|
|
then
|
|
return
|
|
fi
|
|
echo ======== $SRC === $DST ========
|
|
diff -u $DST $SRC
|
|
echo -n "Copy $SRC? [y/N/back] "
|
|
read X
|
|
case $X in
|
|
[yY]*) echo Copying $SRC; cp $SRC $DST;;
|
|
back) echo Copying TO $SRC; cp $DST $SRC;;
|
|
*) echo Not copying $SRC;;
|
|
esac
|
|
}
|
|
|
|
for i in `(cd asyncio && ls *.py)`
|
|
do
|
|
if [ $i == test_support.py ]
|
|
then
|
|
continue
|
|
fi
|
|
|
|
if [ $i == selectors.py ]
|
|
then
|
|
if [ "`(cd $CPYTHON; hg branch)`" == "3.4" ]
|
|
then
|
|
echo "Destination is 3.4 branch -- ignoring selectors.py"
|
|
else
|
|
maybe_copy asyncio/$i Lib/$i
|
|
fi
|
|
else
|
|
maybe_copy asyncio/$i Lib/asyncio/$i
|
|
fi
|
|
done
|
|
|
|
for i in `(cd tests && ls *.py *.pem)`
|
|
do
|
|
if [ $i == test_selectors.py ]
|
|
then
|
|
continue
|
|
fi
|
|
maybe_copy tests/$i Lib/test/test_asyncio/$i
|
|
done
|
|
|
|
maybe_copy overlapped.c Modules/overlapped.c
|