Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit 3863b43

Browse files
committed
Changed all the import statements in all modules in the examples
directory to import only what is needed. This fix issue #464
1 parent fff05d4 commit 3863b43

File tree

8 files changed

+8
-10
lines changed

8 files changed

+8
-10
lines changed

examples/fetch0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import sys
44

5-
from asyncio import *
5+
from asyncio import get_event_loop, open_connection, coroutine
66

77

88
@coroutine

examples/fetch1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import sys
77
import urllib.parse
88

9-
from asyncio import *
9+
from asyncio import get_event_loop, open_connection, coroutine
1010

1111

1212
class Response:

examples/fetch2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import urllib.parse
88
from http.client import BadStatusLine
99

10-
from asyncio import *
10+
from asyncio import get_event_loop, open_connection, coroutine
1111

1212

1313
class Request:

examples/fetch3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import urllib.parse
99
from http.client import BadStatusLine
1010

11-
from asyncio import *
11+
from asyncio import get_event_loop, open_connection, coroutine
1212

1313

1414
class ConnectionPool:

examples/sink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import sys
66

7-
from asyncio import *
7+
from asyncio import get_event_loop, coroutine, Protocol
88

99
ARGS = argparse.ArgumentParser(description="TCP data sink example.")
1010
ARGS.add_argument(

examples/source.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import argparse
44
import sys
55

6-
from asyncio import *
7-
from asyncio import test_utils
6+
from asyncio import test_utils, get_event_loop, coroutine, Protocol, Future
87

98

109
ARGS = argparse.ArgumentParser(description="TCP data sink example.")

examples/source1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
import argparse
44
import sys
55

6-
from asyncio import *
7-
from asyncio import test_utils
6+
from asyncio import test_utils, get_event_loop, coroutine, open_connection
87

98
ARGS = argparse.ArgumentParser(description="TCP data sink example.")
109
ARGS.add_argument(

examples/stacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Crude demo for print_stack()."""
22

33

4-
from asyncio import *
4+
from asyncio import get_event_loop, open_connection, coroutine, Task, async
55

66

77
@coroutine

0 commit comments

Comments
 (0)