Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9600db

Browse files
emmatypingJelleZijlstra
authored andcommitted
Remove symlinks! (#2132)
1 parent 537b97e commit e9600db

15 files changed

+1494
-8
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ matrix:
99
env: TEST_CMD="./tests/mypy_selftest.py"
1010
- python: "3.5"
1111
env: TEST_CMD="./tests/mypy_test.py --no-implicit-optional"
12+
- python: "3.4"
13+
env: TEST_CMD="./tests/check_consistent.py"
1214
- python: "2.7"
1315
env: TEST_CMD="./tests/pytype_test.py --num-parallel=4"
1416
sudo: true

stdlib/2/SocketServer.pyi

-1
This file was deleted.

stdlib/2/SocketServer.pyi

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# NB: SocketServer.pyi and socketserver.pyi must remain consistent!
2+
# Stubs for socketserver
3+
4+
from typing import Any, BinaryIO, Optional, Tuple, Type
5+
from socket import SocketType
6+
import sys
7+
import types
8+
9+
class BaseServer:
10+
address_family = ... # type: int
11+
RequestHandlerClass = ... # type: type
12+
server_address = ... # type: Tuple[str, int]
13+
socket = ... # type: SocketType
14+
allow_reuse_address = ... # type: bool
15+
request_queue_size = ... # type: int
16+
socket_type = ... # type: int
17+
timeout = ... # type: Optional[float]
18+
def __init__(self, server_address: Tuple[str, int],
19+
RequestHandlerClass: type) -> None: ...
20+
def fileno(self) -> int: ...
21+
def handle_request(self) -> None: ...
22+
def serve_forever(self, poll_interval: float = ...) -> None: ...
23+
def shutdown(self) -> None: ...
24+
def server_close(self) -> None: ...
25+
def finish_request(self, request: bytes,
26+
client_address: Tuple[str, int]) -> None: ...
27+
def get_request(self) -> None: ...
28+
def handle_error(self, request: bytes,
29+
client_address: Tuple[str, int]) -> None: ...
30+
def handle_timeout(self) -> None: ...
31+
def process_request(self, request: bytes,
32+
client_address: Tuple[str, int]) -> None: ...
33+
def server_activate(self) -> None: ...
34+
def server_bind(self) -> None: ...
35+
def verify_request(self, request: bytes,
36+
client_address: Tuple[str, int]) -> bool: ...
37+
if sys.version_info >= (3, 6):
38+
def __enter__(self) -> 'BaseServer': ...
39+
def __exit__(self, exc_type: Optional[Type[BaseException]],
40+
exc_val: Optional[BaseException],
41+
exc_tb: Optional[types.TracebackType]) -> bool: ...
42+
if sys.version_info >= (3, 3):
43+
def service_actions(self) -> None: ...
44+
45+
class TCPServer(BaseServer):
46+
def __init__(self, server_address: Tuple[str, int],
47+
RequestHandlerClass: type,
48+
bind_and_activate: bool = ...) -> None: ...
49+
50+
class UDPServer(BaseServer):
51+
def __init__(self, server_address: Tuple[str, int],
52+
RequestHandlerClass: type,
53+
bind_and_activate: bool = ...) -> None: ...
54+
55+
if sys.platform != 'win32':
56+
class UnixStreamServer(BaseServer):
57+
def __init__(self, server_address: Tuple[str, int],
58+
RequestHandlerClass: type,
59+
bind_and_activate: bool = ...) -> None: ...
60+
61+
class UnixDatagramServer(BaseServer):
62+
def __init__(self, server_address: Tuple[str, int],
63+
RequestHandlerClass: type,
64+
bind_and_activate: bool = ...) -> None: ...
65+
66+
class ForkingMixIn: ...
67+
class ThreadingMixIn: ...
68+
69+
class ForkingTCPServer(ForkingMixIn, TCPServer): ...
70+
class ForkingUDPServer(ForkingMixIn, UDPServer): ...
71+
class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...
72+
class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...
73+
if sys.platform != 'win32':
74+
class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ...
75+
class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ...
76+
77+
78+
class BaseRequestHandler:
79+
# Those are technically of types, respectively:
80+
# * Union[SocketType, Tuple[bytes, SocketType]]
81+
# * Union[Tuple[str, int], str]
82+
# But there are some concerns that having unions here would cause
83+
# too much inconvenience to people using it (see
84+
# https://github.com/python/typeshed/pull/384#issuecomment-234649696)
85+
request = ... # type: Any
86+
client_address = ... # type: Any
87+
88+
server = ... # type: BaseServer
89+
def setup(self) -> None: ...
90+
def handle(self) -> None: ...
91+
def finish(self) -> None: ...
92+
93+
class StreamRequestHandler(BaseRequestHandler):
94+
rfile = ... # type: BinaryIO
95+
wfile = ... # type: BinaryIO
96+
97+
class DatagramRequestHandler(BaseRequestHandler):
98+
rfile = ... # type: BinaryIO
99+
wfile = ... # type: BinaryIO

stdlib/2/__builtin__.pyi

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# NB: __builtin__.pyi and builtins.pyi must remain consistent!
12
# Stubs for builtins (Python 2.7)
23

34
# True and False are deliberately omitted because they are keywords in

stdlib/2/builtins.pyi

-1
This file was deleted.

0 commit comments

Comments
 (0)