Skip to content

Remove symlinks! #2132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ matrix:
env: TEST_CMD="./tests/mypy_selftest.py"
- python: "3.5"
env: TEST_CMD="./tests/mypy_test.py --no-implicit-optional"
- python: "3.4"
env: TEST_CMD="./tests/check_consistent.py"
- python: "2.7"
env: TEST_CMD="./tests/pytype_test.py --num-parallel=4"
sudo: true
Expand Down
1 change: 0 additions & 1 deletion stdlib/2/SocketServer.pyi

This file was deleted.

99 changes: 99 additions & 0 deletions stdlib/2/SocketServer.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# NB: SocketServer.pyi and socketserver.pyi must remain consistent!
# Stubs for socketserver

from typing import Any, BinaryIO, Optional, Tuple, Type
from socket import SocketType
import sys
import types

class BaseServer:
address_family = ... # type: int
RequestHandlerClass = ... # type: type
server_address = ... # type: Tuple[str, int]
socket = ... # type: SocketType
allow_reuse_address = ... # type: bool
request_queue_size = ... # type: int
socket_type = ... # type: int
timeout = ... # type: Optional[float]
def __init__(self, server_address: Tuple[str, int],
RequestHandlerClass: type) -> None: ...
def fileno(self) -> int: ...
def handle_request(self) -> None: ...
def serve_forever(self, poll_interval: float = ...) -> None: ...
def shutdown(self) -> None: ...
def server_close(self) -> None: ...
def finish_request(self, request: bytes,
client_address: Tuple[str, int]) -> None: ...
def get_request(self) -> None: ...
def handle_error(self, request: bytes,
client_address: Tuple[str, int]) -> None: ...
def handle_timeout(self) -> None: ...
def process_request(self, request: bytes,
client_address: Tuple[str, int]) -> None: ...
def server_activate(self) -> None: ...
def server_bind(self) -> None: ...
def verify_request(self, request: bytes,
client_address: Tuple[str, int]) -> bool: ...
if sys.version_info >= (3, 6):
def __enter__(self) -> 'BaseServer': ...
def __exit__(self, exc_type: Optional[Type[BaseException]],
exc_val: Optional[BaseException],
exc_tb: Optional[types.TracebackType]) -> bool: ...
if sys.version_info >= (3, 3):
def service_actions(self) -> None: ...

class TCPServer(BaseServer):
def __init__(self, server_address: Tuple[str, int],
RequestHandlerClass: type,
bind_and_activate: bool = ...) -> None: ...

class UDPServer(BaseServer):
def __init__(self, server_address: Tuple[str, int],
RequestHandlerClass: type,
bind_and_activate: bool = ...) -> None: ...

if sys.platform != 'win32':
class UnixStreamServer(BaseServer):
def __init__(self, server_address: Tuple[str, int],
RequestHandlerClass: type,
bind_and_activate: bool = ...) -> None: ...

class UnixDatagramServer(BaseServer):
def __init__(self, server_address: Tuple[str, int],
RequestHandlerClass: type,
bind_and_activate: bool = ...) -> None: ...

class ForkingMixIn: ...
class ThreadingMixIn: ...

class ForkingTCPServer(ForkingMixIn, TCPServer): ...
class ForkingUDPServer(ForkingMixIn, UDPServer): ...
class ThreadingTCPServer(ThreadingMixIn, TCPServer): ...
class ThreadingUDPServer(ThreadingMixIn, UDPServer): ...
if sys.platform != 'win32':
class ThreadingUnixStreamServer(ThreadingMixIn, UnixStreamServer): ...
class ThreadingUnixDatagramServer(ThreadingMixIn, UnixDatagramServer): ...


class BaseRequestHandler:
# Those are technically of types, respectively:
# * Union[SocketType, Tuple[bytes, SocketType]]
# * Union[Tuple[str, int], str]
# But there are some concerns that having unions here would cause
# too much inconvenience to people using it (see
# https://github.com/python/typeshed/pull/384#issuecomment-234649696)
request = ... # type: Any
client_address = ... # type: Any

server = ... # type: BaseServer
def setup(self) -> None: ...
def handle(self) -> None: ...
def finish(self) -> None: ...

class StreamRequestHandler(BaseRequestHandler):
rfile = ... # type: BinaryIO
wfile = ... # type: BinaryIO

class DatagramRequestHandler(BaseRequestHandler):
rfile = ... # type: BinaryIO
wfile = ... # type: BinaryIO
1 change: 1 addition & 0 deletions stdlib/2/__builtin__.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# NB: __builtin__.pyi and builtins.pyi must remain consistent!
# Stubs for builtins (Python 2.7)

# True and False are deliberately omitted because they are keywords in
Expand Down
1 change: 0 additions & 1 deletion stdlib/2/builtins.pyi

This file was deleted.

Loading