diff --git a/.github/renovate.json b/.github/renovate.json index 2526b21dda40..afceb5b31b9e 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,8 +2,11 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "dependencyDashboard": true, "suppressNotifications": ["prEditedNotification"], - "extends": ["config:base"], + "extends": ["config:recommended"], "labels": ["bot: dependencies"], + "semanticCommits": "disabled", + "separateMajorMinor": false, + "prHourlyLimit": 10, "pre-commit": { "enabled": true }, @@ -12,7 +15,6 @@ "groupName": "GitHub Actions", "matchManagers": ["github-actions"], "description": "Quarterly update of GitHub Action dependencies", - "separateMajorMinor": "false", "schedule": ["every 3 months on the first day of the month"] }, { @@ -20,7 +22,6 @@ "matchManagers": ["pip_requirements", "pre-commit"], "excludePackageNames": ["pytype", "pyright"], "description": "Quarterly update of most test dependencies", - "separateMajorMinor": "false", "schedule": ["every 3 months on the first day of the month"] }, { @@ -28,7 +29,6 @@ "matchManagers": ["pip_requirements"], "matchPackageNames": ["pytype", "pyright"], "description": "Daily update of pyright and pytype", - "separateMajorMinor": "false", "schedule": ["before 4am"] } ] diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1a96d5a14892..59393429306b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,16 +34,6 @@ jobs: - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/check_typeshed_structure.py - new-syntax: - name: Ensure new syntax usage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - run: ./tests/check_new_syntax.py - pytype: name: Run pytype against the stubs runs-on: ubuntu-latest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ba361da9d1ac..5dbeac0d84c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: flake8 additional_dependencies: - "flake8-noqa==1.4.0" # must match requirements-tests.txt - - "flake8-pyi==24.4.0" # must match requirements-tests.txt + - "flake8-pyi==24.4.1" # must match requirements-tests.txt types: [file] types_or: [python, pyi] - repo: meta diff --git a/requirements-tests.txt b/requirements-tests.txt index eb9698f2ccf4..eaaa1f42ca6d 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -4,7 +4,7 @@ black==24.3.0 # must match .pre-commit-config.yaml flake8==7.0.0 # must match .pre-commit-config.yaml flake8-noqa==1.4.0 # must match .pre-commit-config.yaml -flake8-pyi==24.4.0 # must match .pre-commit-config.yaml +flake8-pyi==24.4.1 # must match .pre-commit-config.yaml mypy==1.9.0 pre-commit-hooks==4.5.0 # must match .pre-commit-config.yaml pyright==1.1.358 diff --git a/scripts/generate_proto_stubs.sh b/scripts/generate_proto_stubs.sh index 1c062939e884..1d238a0bcfbc 100755 --- a/scripts/generate_proto_stubs.sh +++ b/scripts/generate_proto_stubs.sh @@ -15,38 +15,25 @@ set -ex -o pipefail PROTOBUF_VERSION=26.1 MYPY_PROTOBUF_VERSION=3.6.0 -if uname -a | grep Darwin; then - # brew install coreutils wget - PLAT=osx -else - # sudo apt install -y unzip - PLAT=linux -fi +# brew install coreutils wget +# sudo apt install -y unzip REPO_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")"/..)" TMP_DIR="$(mktemp -d)" PYTHON_PROTOBUF_FILENAME="protobuf-$PROTOBUF_VERSION.zip" -PROTOC_FILENAME="protoc-$PROTOBUF_VERSION-$PLAT-x86_64.zip" -PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/$PROTOC_FILENAME" PYTHON_PROTOBUF_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/$PYTHON_PROTOBUF_FILENAME" +PYTHON_PROTOBUF_DIR="protobuf-$PROTOBUF_VERSION" cd "$TMP_DIR" echo "Working in $TMP_DIR" -# Install protoc -wget "$PROTOC_URL" -mkdir protoc_install -unzip "$PROTOC_FILENAME" -d protoc_install -protoc_install/bin/protoc --version - # Fetch protoc-python (which contains all the .proto files) wget "$PYTHON_PROTOBUF_URL" unzip "$PYTHON_PROTOBUF_FILENAME" -PYTHON_PROTOBUF_DIR="protobuf-$PROTOBUF_VERSION" # Prepare virtualenv python3 -m venv .venv source .venv/bin/activate -python3 -m pip install pre-commit mypy-protobuf=="$MYPY_PROTOBUF_VERSION" +python3 -m pip install grpcio-tools pre-commit mypy-protobuf=="$MYPY_PROTOBUF_VERSION" # Remove existing pyi find "$REPO_ROOT/stubs/protobuf/" -name '*_pb2.pyi' -delete @@ -62,8 +49,9 @@ PROTO_FILES=$(grep '"//:.*_proto"' $PYTHON_PROTOBUF_DIR/python/dist/BUILD.bazel ) # And regenerate! -# shellcheck disable=SC2086 -protoc_install/bin/protoc \ +PROTOC_VERSION=$(python3 -m grpc_tools.protoc --version) +echo $PROTOC_VERSION +python3 -m grpc_tools.protoc \ --proto_path="$PYTHON_PROTOBUF_DIR/src" \ --mypy_out="relax_strict_optional_primitives:$REPO_ROOT/stubs/protobuf" \ $PROTO_FILES @@ -76,7 +64,11 @@ rm -rf "$TMP_DIR" cd "$REPO_ROOT" sed --in-place="" \ - "s/extra_description = .*$/extra_description = \"Generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) on [protobuf v$PROTOBUF_VERSION](https:\/\/github.com\/protocolbuffers\/protobuf\/releases\/tag\/v$PROTOBUF_VERSION) (python protobuf==$PYTHON_PROTOBUF_VERSION)\"/" \ + "s/extra_description = .*$/extra_description = \"\ +Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \ +and $PROTOC_VERSION \ +on [protobuf v$PROTOBUF_VERSION](https:\/\/github.com\/protocolbuffers\/protobuf\/releases\/tag\/v$PROTOBUF_VERSION) \ +(python protobuf==$PYTHON_PROTOBUF_VERSION).\"/" \ stubs/protobuf/METADATA.toml # use `|| true` so the script still continues even if a pre-commit hook diff --git a/scripts/runtests.py b/scripts/runtests.py index 219886aca867..7a17c299f01f 100755 --- a/scripts/runtests.py +++ b/scripts/runtests.py @@ -86,8 +86,6 @@ def main() -> None: print("\nRunning check_typeshed_structure.py...") check_structure_result = subprocess.run([sys.executable, "tests/check_typeshed_structure.py"]) - print("\nRunning check_new_syntax.py...") - check_new_syntax_result = subprocess.run([sys.executable, "tests/check_new_syntax.py"]) strict_params = _get_strict_params(path) print(f"\nRunning Pyright ({'stricter' if strict_params else 'base' } configs) for Python {python_version}...") @@ -180,7 +178,6 @@ def main() -> None: [ pre_commit_result.returncode, check_structure_result.returncode, - check_new_syntax_result.returncode, pyright_returncode, mypy_result.returncode, getattr(stubtest_result, "returncode", 0), @@ -207,7 +204,6 @@ def main() -> None: that the autofixes did sensible things.""" ) print("Check structure:", _SUCCESS if check_structure_result.returncode == 0 else _FAILED) - print("Check new syntax:", _SUCCESS if check_new_syntax_result.returncode == 0 else _FAILED) if pyright_skipped: print("Pyright:", _SKIPPED) else: diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py index 19fe1fcd66f0..fc034289ad55 100644 --- a/scripts/stubsabot.py +++ b/scripts/stubsabot.py @@ -498,7 +498,7 @@ async def determine_action(stub_path: Path, session: aiohttp.ClientSession) -> U "Release": f"{pypi_info.pypi_root}/{relevant_version}", "Homepage": project_urls.get("Homepage"), "Repository": stub_info.upstream_repository, - "Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/{stub_info.distribution}", + "Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}", "Changelog": project_urls.get("Changelog") or project_urls.get("Changes") or project_urls.get("Change Log"), } links = {k: v for k, v in maybe_links.items() if v is not None} diff --git a/scripts/sync_tensorflow_protobuf_stubs.sh b/scripts/sync_tensorflow_protobuf_stubs.sh index 9376b19e0f2e..ab35fffdb506 100755 --- a/scripts/sync_tensorflow_protobuf_stubs.sh +++ b/scripts/sync_tensorflow_protobuf_stubs.sh @@ -5,44 +5,30 @@ set -euxo pipefail -# Need protoc >= 3.15 for explicit optional -PROTOBUF_VERSION=25.3 # 4.25.3 # Whenever you update TENSORFLOW_VERSION here, version should be updated # in stubs/tensorflow/METADATA.toml and vice-versa. TENSORFLOW_VERSION=2.16.1 MYPY_PROTOBUF_VERSION=3.6.0 -if uname -a | grep Darwin; then - # brew install coreutils wget - PLAT=osx -else - PLAT=linux -fi +# brew install coreutils wget +# sudo apt install -y unzip REPO_ROOT="$(realpath "$(dirname "${BASH_SOURCE[0]}")"/..)" TMP_DIR="$(mktemp -d)" TENSORFLOW_FILENAME="v$TENSORFLOW_VERSION.zip" -PROTOC_FILENAME="protoc-$PROTOBUF_VERSION-$PLAT-x86_64.zip" -PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_VERSION/$PROTOC_FILENAME" TENSORFLOW_URL="https://github.com/tensorflow/tensorflow/archive/refs/tags/$TENSORFLOW_FILENAME" +TENSORFLOW_DIR="tensorflow-$TENSORFLOW_VERSION" cd "$TMP_DIR" echo "Working in $TMP_DIR" -# Install protoc -wget "$PROTOC_URL" -mkdir protoc_install -unzip "$PROTOC_FILENAME" -d protoc_install -protoc_install/bin/protoc --version - # Fetch tensorflow (which contains all the .proto files) wget "$TENSORFLOW_URL" unzip "$TENSORFLOW_FILENAME" -TENSORFLOW_DIR="tensorflow-$TENSORFLOW_VERSION" # Prepare virtualenv python3 -m venv .venv source .venv/bin/activate -python3 -m pip install pre-commit mypy-protobuf=="$MYPY_PROTOBUF_VERSION" +python3 -m pip install grpcio-tools pre-commit mypy-protobuf=="$MYPY_PROTOBUF_VERSION" # Empty target folders or the mv command below will fail rm -rf "$REPO_ROOT/stubs/tensorflow/tensorflow/tsl/" @@ -52,7 +38,9 @@ find "$REPO_ROOT/stubs/tensorflow/" -name "*_pb2.pyi" -delete # Folders here cover the more commonly used protobufs externally and # their dependencies. Tensorflow has more protobufs and can be added if requested. -protoc_install/bin/protoc \ +PROTOC_VERSION=$(python3 -m grpc_tools.protoc --version) +echo $PROTOC_VERSION +python3 -m grpc_tools.protoc \ --proto_path="$TENSORFLOW_DIR/third_party/xla/third_party/tsl" \ --proto_path="$TENSORFLOW_DIR/third_party/xla" \ --proto_path="$TENSORFLOW_DIR" \ @@ -102,7 +90,10 @@ rm -r \ stubs/tensorflow/tensorflow/core/util/example_proto_fast_parsing_test_pb2.pyi \ sed --in-place="" \ - "s/extra_description = .*$/extra_description = \"Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) on tensorflow==$TENSORFLOW_VERSION\"/" \ + "s/extra_description = .*$/extra_description = \"\ +Partially generated using [mypy-protobuf==$MYPY_PROTOBUF_VERSION](https:\/\/github.com\/nipunn1313\/mypy-protobuf\/tree\/v$MYPY_PROTOBUF_VERSION) \ +and $PROTOC_VERSION \ +on tensorflow==$TENSORFLOW_VERSION .\"/" \ stubs/tensorflow/METADATA.toml # use `|| true` so the script still continues even if a pre-commit hook diff --git a/stdlib/typing.pyi b/stdlib/typing.pyi index a9f17cc80253..745f1bec382a 100644 --- a/stdlib/typing.pyi +++ b/stdlib/typing.pyi @@ -444,7 +444,7 @@ class Coroutine(Awaitable[_ReturnT_co], Generic[_YieldT_co, _SendT_contra, _Retu @property def cr_code(self) -> CodeType: ... @property - def cr_frame(self) -> FrameType: ... + def cr_frame(self) -> FrameType | None: ... @property def cr_running(self) -> bool: ... @abstractmethod diff --git a/stubs/editdistance/METADATA.toml b/stubs/editdistance/METADATA.toml index 67d467b51800..076f99ee8e0c 100644 --- a/stubs/editdistance/METADATA.toml +++ b/stubs/editdistance/METADATA.toml @@ -1,2 +1,2 @@ -version = "0.6.*" +version = "0.8.*" upstream_repository = "https://github.com/roy-ht/editdistance" diff --git a/stubs/editdistance/editdistance/__init__.pyi b/stubs/editdistance/editdistance/__init__.pyi index 360884973e74..048d56125afa 100644 --- a/stubs/editdistance/editdistance/__init__.pyi +++ b/stubs/editdistance/editdistance/__init__.pyi @@ -2,3 +2,5 @@ from collections.abc import Hashable, Iterable def eval(a: Iterable[Hashable], b: Iterable[Hashable]) -> int: ... def distance(a: Iterable[Hashable], b: Iterable[Hashable]) -> int: ... +def eval_criterion(a: Iterable[Hashable], b: Iterable[Hashable], thr: int) -> bool: ... +def distance_le_than(a: Iterable[Hashable], b: Iterable[Hashable], thr: int) -> bool: ... diff --git a/stubs/protobuf/METADATA.toml b/stubs/protobuf/METADATA.toml index b962f09c4bb8..ad7078f37e31 100644 --- a/stubs/protobuf/METADATA.toml +++ b/stubs/protobuf/METADATA.toml @@ -2,7 +2,7 @@ # in scripts/generate_proto_stubs.sh and vice-versa. version = "5.26.*" upstream_repository = "https://github.com/protocolbuffers/protobuf" -extra_description = "Generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) on [protobuf v26.1](https://github.com/protocolbuffers/protobuf/releases/tag/v26.1) (python protobuf==5.26.1)" +extra_description = "Generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 25.1 on [protobuf v26.1](https://github.com/protocolbuffers/protobuf/releases/tag/v26.1) (python protobuf==5.26.1)" partial_stub = true [tool.stubtest] diff --git a/stubs/pycurl/METADATA.toml b/stubs/pycurl/METADATA.toml index a50bf415417e..f6e2bec005ce 100644 --- a/stubs/pycurl/METADATA.toml +++ b/stubs/pycurl/METADATA.toml @@ -1,16 +1,5 @@ -version = "7.45.2" +version = "7.45.3" upstream_repository = "https://github.com/pycurl/pycurl" [tool.stubtest] -# Install on Windows requires building PycURL from source -# -# Install on MacOS is too complicated for the CI and does not work with stubtest: -# % brew install openssl -# % export LDFLAGS="-L/usr/local/opt/openssl@3/lib" -# % export CPPFLAGS="-I/usr/local/opt/openssl@3/include" -# % pip install --compile --install-option="--with-openssl" pycurl -# TODO: Test on Windows and/or MacOS once wheels are available. -platforms = ["linux"] -apt_dependencies = ["libcurl4-openssl-dev", "libssl-dev"] -# No need to install on the CI. Leaving here as information for MacOS contributors. -# brew_dependencies = ["openssl"] +platforms = ["darwin", "linux", "win32"] diff --git a/stubs/pycurl/pycurl.pyi b/stubs/pycurl/pycurl.pyi index 51f34d19fb7b..db0bb87c7902 100644 --- a/stubs/pycurl/pycurl.pyi +++ b/stubs/pycurl/pycurl.pyi @@ -1,6 +1,6 @@ import sys from _typeshed import Incomplete -from typing import final +from typing import Final, final from typing_extensions import Self version: str @@ -30,7 +30,8 @@ class Curl: def errstr(self) -> str: ... def duphandle(self) -> Self: ... def errstr_raw(self) -> bytes: ... - def set_ca_certs(self, value: bytes | str, /) -> None: ... + if sys.platform == "linux": + def set_ca_certs(self, value: bytes | str, /) -> None: ... @final class CurlMulti: @@ -52,633 +53,662 @@ class CurlShare: def close(self) -> None: ... def setopt(self, option: int, value): ... -if sys.platform != "darwin": - CURL_VERSION_HTTP3: int - MAXAGE_CONN: int - M_MAX_CONCURRENT_STREAMS: int +if sys.platform != "linux": + AWS_SIGV4: Final = 10305 + CAINFO_BLOB: Final = 40309 + CURL_HTTP_VERSION_3: Final = 30 + CURL_VERSION_ALTSVC: Final = 16777216 + CURL_VERSION_GSASL: Final = 536870912 + CURL_VERSION_HSTS: Final = 268435456 + CURL_VERSION_HTTP3: Final = 33554432 + CURL_VERSION_UNICODE: Final = 134217728 + CURL_VERSION_ZSTD: Final = 67108864 + DOH_URL: Final = 10279 + HTTP09_ALLOWED: Final = 285 + ISSUERCERT_BLOB: Final = 40295 + MAXLIFETIME_CONN: Final = 314 + MAXAGE_CONN: Final = 288 + M_MAX_CONCURRENT_STREAMS: Final = 16 + PROXY_CAINFO_BLOB: Final = 40310 + PROXY_ISSUERCERT: Final = 10296 + PROXY_ISSUERCERT_BLOB: Final = 40297 + PROXY_SSLCERT_BLOB: Final = 40293 + PROXY_SSLKEY_BLOB: Final = 40294 + SSLCERT_BLOB: Final = 40291 + SSLKEY_BLOB: Final = 40292 + UPLOAD_BUFFERSIZE: Final = 280 + VERSION_ALTSVC: Final = 16777216 + VERSION_GSASL: Final = 536870912 + VERSION_HSTS: Final = 268435456 + VERSION_HTTP3: Final = 33554432 + VERSION_UNICODE: Final = 134217728 + VERSION_ZSTD: Final = 67108864 -ACCEPTTIMEOUT_MS: int -ACCEPT_ENCODING: int -ADDRESS_SCOPE: int -APPCONNECT_TIME: int -APPEND: int -AUTOREFERER: int -BUFFERSIZE: int -CAINFO: int -CAPATH: int -CLOSESOCKETFUNCTION: int -COMPILE_LIBCURL_VERSION_NUM: int -COMPILE_PY_VERSION_HEX: int -CONDITION_UNMET: int -CONNECTTIMEOUT: int -CONNECTTIMEOUT_MS: int -CONNECT_ONLY: int -CONNECT_TIME: int -CONNECT_TO: int -CONTENT_LENGTH_DOWNLOAD: int -CONTENT_LENGTH_UPLOAD: int -CONTENT_TYPE: int -COOKIE: int -COOKIEFILE: int -COOKIEJAR: int -COOKIELIST: int -COOKIESESSION: int -COPYPOSTFIELDS: int -CRLF: int -CRLFILE: int -CSELECT_ERR: int -CSELECT_IN: int -CSELECT_OUT: int -CURL_HTTP_VERSION_1_0: int -CURL_HTTP_VERSION_1_1: int -CURL_HTTP_VERSION_2: int -CURL_HTTP_VERSION_2TLS: int -CURL_HTTP_VERSION_2_0: int -CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: int -CURL_HTTP_VERSION_3: int -CURL_HTTP_VERSION_LAST: int -CURL_HTTP_VERSION_NONE: int -CURL_VERSION_ALTSVC: int -CURL_VERSION_BROTLI: int -CURL_VERSION_GSASL: int -CURL_VERSION_HSTS: int -CURL_VERSION_HTTPS_PROXY: int -CURL_VERSION_MULTI_SSL: int -CURL_VERSION_UNICODE: int -CURL_VERSION_ZSTD: int -CUSTOMREQUEST: int -DEBUGFUNCTION: int -DEFAULT_PROTOCOL: int -DIRLISTONLY: int -DNS_CACHE_TIMEOUT: int -DNS_SERVERS: int -DNS_USE_GLOBAL_CACHE: int -DOH_URL: int -EFFECTIVE_URL: int -EGDSOCKET: int -ENCODING: int -EXPECT_100_TIMEOUT_MS: int -FAILONERROR: int -FILE: int -FOLLOWLOCATION: int -FORBID_REUSE: int -FORM_BUFFER: int -FORM_BUFFERPTR: int -FORM_CONTENTS: int -FORM_CONTENTTYPE: int -FORM_FILE: int -FORM_FILENAME: int -FRESH_CONNECT: int -FTPAPPEND: int -FTPAUTH_DEFAULT: int -FTPAUTH_SSL: int -FTPAUTH_TLS: int -FTPLISTONLY: int -FTPMETHOD_DEFAULT: int -FTPMETHOD_MULTICWD: int -FTPMETHOD_NOCWD: int -FTPMETHOD_SINGLECWD: int -FTPPORT: int -FTPSSLAUTH: int -FTPSSL_ALL: int -FTPSSL_CONTROL: int -FTPSSL_NONE: int -FTPSSL_TRY: int -FTP_ACCOUNT: int -FTP_ALTERNATIVE_TO_USER: int -FTP_CREATE_MISSING_DIRS: int -FTP_ENTRY_PATH: int -FTP_FILEMETHOD: int -FTP_RESPONSE_TIMEOUT: int -FTP_SKIP_PASV_IP: int -FTP_SSL: int -FTP_SSL_CCC: int -FTP_USE_EPRT: int -FTP_USE_EPSV: int -FTP_USE_PRET: int -GLOBAL_ACK_EINTR: int -GLOBAL_ALL: int -GLOBAL_DEFAULT: int -GLOBAL_NOTHING: int -GLOBAL_SSL: int -GLOBAL_WIN32: int -GSSAPI_DELEGATION: int -GSSAPI_DELEGATION_FLAG: int -GSSAPI_DELEGATION_NONE: int -GSSAPI_DELEGATION_POLICY_FLAG: int -HAPROXYPROTOCOL: int -HEADER: int -HEADERFUNCTION: int -HEADEROPT: int -HEADER_SEPARATE: int -HEADER_SIZE: int -HEADER_UNIFIED: int -HTTP09_ALLOWED: int -HTTP200ALIASES: int -HTTPAUTH: int -HTTPAUTH_ANY: int -HTTPAUTH_ANYSAFE: int -HTTPAUTH_AVAIL: int -HTTPAUTH_BASIC: int -HTTPAUTH_DIGEST: int -HTTPAUTH_DIGEST_IE: int -HTTPAUTH_GSSNEGOTIATE: int -HTTPAUTH_NEGOTIATE: int -HTTPAUTH_NONE: int -HTTPAUTH_NTLM: int -HTTPAUTH_NTLM_WB: int -HTTPAUTH_ONLY: int -HTTPGET: int -HTTPHEADER: int -HTTPPOST: int -HTTPPROXYTUNNEL: int -HTTP_CODE: int -HTTP_CONNECTCODE: int -HTTP_CONTENT_DECODING: int -HTTP_TRANSFER_DECODING: int -HTTP_VERSION: int -IGNORE_CONTENT_LENGTH: int -INFILE: int -INFILESIZE: int -INFILESIZE_LARGE: int -INFOTYPE_DATA_IN: int -INFOTYPE_DATA_OUT: int -INFOTYPE_HEADER_IN: int -INFOTYPE_HEADER_OUT: int -INFOTYPE_SSL_DATA_IN: int -INFOTYPE_SSL_DATA_OUT: int -INFOTYPE_TEXT: int -INFO_CERTINFO: int -INFO_COOKIELIST: int -INFO_FILETIME: int -INFO_HTTP_VERSION: int -INFO_RTSP_CLIENT_CSEQ: int -INFO_RTSP_CSEQ_RECV: int -INFO_RTSP_SERVER_CSEQ: int -INFO_RTSP_SESSION_ID: int -INTERFACE: int -IOCMD_NOP: int -IOCMD_RESTARTREAD: int -IOCTLFUNCTION: int -IOE_FAILRESTART: int -IOE_OK: int -IOE_UNKNOWNCMD: int -IPRESOLVE: int -IPRESOLVE_V4: int -IPRESOLVE_V6: int -IPRESOLVE_WHATEVER: int -ISSUERCERT: int -KEYPASSWD: int -KHMATCH_MISMATCH: int -KHMATCH_MISSING: int -KHMATCH_OK: int -KHSTAT_DEFER: int -KHSTAT_FINE: int -KHSTAT_FINE_ADD_TO_FILE: int -KHSTAT_REJECT: int -KHTYPE_DSS: int -KHTYPE_RSA: int -KHTYPE_RSA1: int -KHTYPE_UNKNOWN: int -KRB4LEVEL: int -KRBLEVEL: int -LASTSOCKET: int -LOCALPORT: int -LOCALPORTRANGE: int -LOCAL_IP: int -LOCAL_PORT: int -LOCK_DATA_CONNECT: int -LOCK_DATA_COOKIE: int -LOCK_DATA_DNS: int -LOCK_DATA_PSL: int -LOCK_DATA_SSL_SESSION: int -LOGIN_OPTIONS: int -LOW_SPEED_LIMIT: int -LOW_SPEED_TIME: int -MAIL_AUTH: int -MAIL_FROM: int -MAIL_RCPT: int -MAXCONNECTS: int -MAXFILESIZE: int -MAXFILESIZE_LARGE: int -MAXLIFETIME_CONN: int -MAXREDIRS: int -MAX_RECV_SPEED_LARGE: int -MAX_SEND_SPEED_LARGE: int -M_CHUNK_LENGTH_PENALTY_SIZE: int -M_CONTENT_LENGTH_PENALTY_SIZE: int -M_MAXCONNECTS: int -M_MAX_HOST_CONNECTIONS: int -M_MAX_PIPELINE_LENGTH: int -M_MAX_TOTAL_CONNECTIONS: int -M_PIPELINING: int -M_PIPELINING_SERVER_BL: int -M_PIPELINING_SITE_BL: int -M_SOCKETFUNCTION: int -M_TIMERFUNCTION: int -NAMELOOKUP_TIME: int -NETRC: int -NETRC_FILE: int -NETRC_IGNORED: int -NETRC_OPTIONAL: int -NETRC_REQUIRED: int -NEW_DIRECTORY_PERMS: int -NEW_FILE_PERMS: int -NOBODY: int -NOPROGRESS: int -NOPROXY: int -NOSIGNAL: int -NUM_CONNECTS: int -OPENSOCKETFUNCTION: int -OPT_CERTINFO: int -OPT_COOKIELIST: int -OPT_FILETIME: int -OPT_RTSP_CLIENT_CSEQ: int -OPT_RTSP_REQUEST: int -OPT_RTSP_SERVER_CSEQ: int -OPT_RTSP_SESSION_ID: int -OPT_RTSP_STREAM_URI: int -OPT_RTSP_TRANSPORT: int -OS_ERRNO: int -PASSWORD: int -PATH_AS_IS: int -PAUSE_ALL: int -PAUSE_CONT: int -PAUSE_RECV: int -PAUSE_SEND: int -PINNEDPUBLICKEY: int -PIPEWAIT: int -PIPE_HTTP1: int -PIPE_MULTIPLEX: int -PIPE_NOTHING: int -POLL_IN: int -POLL_INOUT: int -POLL_NONE: int -POLL_OUT: int -POLL_REMOVE: int -PORT: int -POST: int -POST301: int -POSTFIELDS: int -POSTFIELDSIZE: int -POSTFIELDSIZE_LARGE: int -POSTQUOTE: int -POSTREDIR: int -PREQUOTE: int -PRETRANSFER_TIME: int -PRE_PROXY: int -PRIMARY_IP: int -PRIMARY_PORT: int -PROGRESSFUNCTION: int -PROTOCOLS: int -PROTO_ALL: int -PROTO_DICT: int -PROTO_FILE: int -PROTO_FTP: int -PROTO_FTPS: int -PROTO_GOPHER: int -PROTO_HTTP: int -PROTO_HTTPS: int -PROTO_IMAP: int -PROTO_IMAPS: int -PROTO_LDAP: int -PROTO_LDAPS: int -PROTO_POP3: int -PROTO_POP3S: int -PROTO_RTMP: int -PROTO_RTMPE: int -PROTO_RTMPS: int -PROTO_RTMPT: int -PROTO_RTMPTE: int -PROTO_RTMPTS: int -PROTO_RTSP: int -PROTO_SCP: int -PROTO_SFTP: int -PROTO_SMB: int -PROTO_SMBS: int -PROTO_SMTP: int -PROTO_SMTPS: int -PROTO_TELNET: int -PROTO_TFTP: int -PROXY: int -PROXYAUTH: int -PROXYAUTH_AVAIL: int -PROXYHEADER: int -PROXYPASSWORD: int -PROXYPORT: int -PROXYTYPE: int -PROXYTYPE_HTTP: int -PROXYTYPE_HTTP_1_0: int -PROXYTYPE_SOCKS4: int -PROXYTYPE_SOCKS4A: int -PROXYTYPE_SOCKS5: int -PROXYTYPE_SOCKS5_HOSTNAME: int -PROXYUSERNAME: int -PROXYUSERPWD: int -PROXY_CAINFO: int -PROXY_CAPATH: int -PROXY_SERVICE_NAME: int -PROXY_SSLCERT: int -PROXY_SSLCERTTYPE: int -PROXY_SSLKEY: int -PROXY_SSLKEYTYPE: int -PROXY_SSL_VERIFYHOST: int -PROXY_SSL_VERIFYPEER: int -PROXY_TLS13_CIPHERS: int -PROXY_TRANSFER_MODE: int -PUT: int -QUOTE: int -RANDOM_FILE: int -RANGE: int -READDATA: int -READFUNCTION: int -READFUNC_ABORT: int -READFUNC_PAUSE: int -REDIRECT_COUNT: int -REDIRECT_TIME: int -REDIRECT_URL: int -REDIR_POST_301: int -REDIR_POST_302: int -REDIR_POST_303: int -REDIR_POST_ALL: int -REDIR_PROTOCOLS: int -REFERER: int -REQUEST_SIZE: int -RESOLVE: int -RESPONSE_CODE: int -RESUME_FROM: int -RESUME_FROM_LARGE: int -RTSPREQ_ANNOUNCE: int -RTSPREQ_DESCRIBE: int -RTSPREQ_GET_PARAMETER: int -RTSPREQ_LAST: int -RTSPREQ_NONE: int -RTSPREQ_OPTIONS: int -RTSPREQ_PAUSE: int -RTSPREQ_PLAY: int -RTSPREQ_RECEIVE: int -RTSPREQ_RECORD: int -RTSPREQ_SETUP: int -RTSPREQ_SET_PARAMETER: int -RTSPREQ_TEARDOWN: int -SASL_IR: int -SEEKFUNCTION: int -SEEKFUNC_CANTSEEK: int -SEEKFUNC_FAIL: int -SEEKFUNC_OK: int -SERVICE_NAME: int -SHARE: int -SH_SHARE: int -SH_UNSHARE: int -SIZE_DOWNLOAD: int -SIZE_UPLOAD: int -SOCKET_BAD: int -SOCKET_TIMEOUT: int -SOCKOPTFUNCTION: int -SOCKOPT_ALREADY_CONNECTED: int -SOCKOPT_ERROR: int -SOCKOPT_OK: int -SOCKS5_GSSAPI_NEC: int -SOCKS5_GSSAPI_SERVICE: int -SOCKTYPE_ACCEPT: int -SOCKTYPE_IPCXN: int -SPEED_DOWNLOAD: int -SPEED_UPLOAD: int -SSH_AUTH_AGENT: int -SSH_AUTH_ANY: int -SSH_AUTH_DEFAULT: int -SSH_AUTH_HOST: int -SSH_AUTH_KEYBOARD: int -SSH_AUTH_NONE: int -SSH_AUTH_PASSWORD: int -SSH_AUTH_PUBLICKEY: int -SSH_AUTH_TYPES: int -SSH_HOST_PUBLIC_KEY_MD5: int -SSH_KEYFUNCTION: int -SSH_KNOWNHOSTS: int -SSH_PRIVATE_KEYFILE: int -SSH_PUBLIC_KEYFILE: int -SSLCERT: int -SSLCERTPASSWD: int -SSLCERTTYPE: int -SSLENGINE: int -SSLENGINE_DEFAULT: int -SSLKEY: int -SSLKEYPASSWD: int -SSLKEYTYPE: int -SSLOPT_ALLOW_BEAST: int -SSLOPT_NO_REVOKE: int -SSLVERSION: int -SSLVERSION_DEFAULT: int -SSLVERSION_MAX_DEFAULT: int -SSLVERSION_MAX_TLSv1_0: int -SSLVERSION_MAX_TLSv1_1: int -SSLVERSION_MAX_TLSv1_2: int -SSLVERSION_MAX_TLSv1_3: int -SSLVERSION_SSLv2: int -SSLVERSION_SSLv3: int -SSLVERSION_TLSv1: int -SSLVERSION_TLSv1_0: int -SSLVERSION_TLSv1_1: int -SSLVERSION_TLSv1_2: int -SSLVERSION_TLSv1_3: int -SSL_CIPHER_LIST: int -SSL_ENABLE_ALPN: int -SSL_ENABLE_NPN: int -SSL_ENGINES: int -SSL_FALSESTART: int -SSL_OPTIONS: int -SSL_SESSIONID_CACHE: int -SSL_VERIFYHOST: int -SSL_VERIFYPEER: int -SSL_VERIFYRESULT: int -SSL_VERIFYSTATUS: int -STARTTRANSFER_TIME: int -STDERR: int -TCP_FASTOPEN: int -TCP_KEEPALIVE: int -TCP_KEEPIDLE: int -TCP_KEEPINTVL: int -TCP_NODELAY: int -TELNETOPTIONS: int -TFTP_BLKSIZE: int -TIMECONDITION: int -TIMECONDITION_IFMODSINCE: int -TIMECONDITION_IFUNMODSINCE: int -TIMECONDITION_LASTMOD: int -TIMECONDITION_NONE: int -TIMEOUT: int -TIMEOUT_MS: int -TIMEVALUE: int -TLS13_CIPHERS: int -TLSAUTH_PASSWORD: int -TLSAUTH_TYPE: int -TLSAUTH_USERNAME: int -TOTAL_TIME: int -TRANSFERTEXT: int -TRANSFER_ENCODING: int -UNIX_SOCKET_PATH: int -UNRESTRICTED_AUTH: int -UPLOAD: int -UPLOAD_BUFFERSIZE: int -URL: int -USERAGENT: int -USERNAME: int -USERPWD: int -USESSL_ALL: int -USESSL_CONTROL: int -USESSL_NONE: int -USESSL_TRY: int -USE_SSL: int -VERBOSE: int -VERSION_ASYNCHDNS: int -VERSION_CONV: int -VERSION_CURLDEBUG: int -VERSION_DEBUG: int -VERSION_GSSAPI: int -VERSION_GSSNEGOTIATE: int -VERSION_HTTP2: int -VERSION_IDN: int -VERSION_IPV6: int -VERSION_KERBEROS4: int -VERSION_KERBEROS5: int -VERSION_LARGEFILE: int -VERSION_LIBZ: int -VERSION_NTLM: int -VERSION_NTLM_WB: int -VERSION_PSL: int -VERSION_SPNEGO: int -VERSION_SSL: int -VERSION_SSPI: int -VERSION_TLSAUTH_SRP: int -VERSION_UNIX_SOCKETS: int -WILDCARDMATCH: int -WRITEDATA: int -WRITEFUNCTION: int -WRITEFUNC_PAUSE: int -WRITEHEADER: int -XFERINFOFUNCTION: int -XOAUTH2_BEARER: int - -E_ABORTED_BY_CALLBACK: int -E_AGAIN: int -E_ALREADY_COMPLETE: int -E_BAD_CALLING_ORDER: int -E_BAD_CONTENT_ENCODING: int -E_BAD_DOWNLOAD_RESUME: int -E_BAD_FUNCTION_ARGUMENT: int -E_BAD_PASSWORD_ENTERED: int -E_CALL_MULTI_PERFORM: int -E_CHUNK_FAILED: int -E_CONV_FAILED: int -E_CONV_REQD: int -E_COULDNT_CONNECT: int -E_COULDNT_RESOLVE_HOST: int -E_COULDNT_RESOLVE_PROXY: int -E_FAILED_INIT: int -E_FILESIZE_EXCEEDED: int -E_FILE_COULDNT_READ_FILE: int -E_FTP_ACCEPT_FAILED: int -E_FTP_ACCEPT_TIMEOUT: int -E_FTP_ACCESS_DENIED: int -E_FTP_BAD_DOWNLOAD_RESUME: int -E_FTP_BAD_FILE_LIST: int -E_FTP_CANT_GET_HOST: int -E_FTP_CANT_RECONNECT: int -E_FTP_COULDNT_GET_SIZE: int -E_FTP_COULDNT_RETR_FILE: int -E_FTP_COULDNT_SET_ASCII: int -E_FTP_COULDNT_SET_BINARY: int -E_FTP_COULDNT_SET_TYPE: int -E_FTP_COULDNT_STOR_FILE: int -E_FTP_COULDNT_USE_REST: int -E_FTP_PARTIAL_FILE: int -E_FTP_PORT_FAILED: int -E_FTP_PRET_FAILED: int -E_FTP_QUOTE_ERROR: int -E_FTP_SSL_FAILED: int -E_FTP_USER_PASSWORD_INCORRECT: int -E_FTP_WEIRD_227_FORMAT: int -E_FTP_WEIRD_PASS_REPLY: int -E_FTP_WEIRD_PASV_REPLY: int -E_FTP_WEIRD_SERVER_REPLY: int -E_FTP_WEIRD_USER_REPLY: int -E_FTP_WRITE_ERROR: int -E_FUNCTION_NOT_FOUND: int -E_GOT_NOTHING: int -E_HTTP2: int -E_HTTP_NOT_FOUND: int -E_HTTP_PORT_FAILED: int -E_HTTP_POST_ERROR: int -E_HTTP_RANGE_ERROR: int -E_HTTP_RETURNED_ERROR: int -E_INTERFACE_FAILED: int -E_LDAP_CANNOT_BIND: int -E_LDAP_INVALID_URL: int -E_LDAP_SEARCH_FAILED: int -E_LIBRARY_NOT_FOUND: int -E_LOGIN_DENIED: int -E_MALFORMAT_USER: int -E_MULTI_ADDED_ALREADY: int -E_MULTI_BAD_EASY_HANDLE: int -E_MULTI_BAD_HANDLE: int -E_MULTI_BAD_SOCKET: int -E_MULTI_CALL_MULTI_PERFORM: int -E_MULTI_CALL_MULTI_SOCKET: int -E_MULTI_INTERNAL_ERROR: int -E_MULTI_OK: int -E_MULTI_OUT_OF_MEMORY: int -E_MULTI_UNKNOWN_OPTION: int -E_NOT_BUILT_IN: int -E_NO_CONNECTION_AVAILABLE: int -E_OK: int -E_OPERATION_TIMEDOUT: int -E_OPERATION_TIMEOUTED: int -E_OUT_OF_MEMORY: int -E_PARTIAL_FILE: int -E_PEER_FAILED_VERIFICATION: int -E_QUOTE_ERROR: int -E_RANGE_ERROR: int -E_READ_ERROR: int -E_RECV_ERROR: int -E_REMOTE_ACCESS_DENIED: int -E_REMOTE_DISK_FULL: int -E_REMOTE_FILE_EXISTS: int -E_REMOTE_FILE_NOT_FOUND: int -E_RTSP_CSEQ_ERROR: int -E_RTSP_SESSION_ERROR: int -E_SEND_ERROR: int -E_SEND_FAIL_REWIND: int -E_SHARE_IN_USE: int -E_SSH: int -E_SSL_CACERT: int -E_SSL_CACERT_BADFILE: int -E_SSL_CERTPROBLEM: int -E_SSL_CIPHER: int -E_SSL_CONNECT_ERROR: int -E_SSL_CRL_BADFILE: int -E_SSL_ENGINE_INITFAILED: int -E_SSL_ENGINE_NOTFOUND: int -E_SSL_ENGINE_SETFAILED: int -E_SSL_INVALIDCERTSTATUS: int -E_SSL_ISSUER_ERROR: int -E_SSL_PEER_CERTIFICATE: int -E_SSL_PINNEDPUBKEYNOTMATCH: int -E_SSL_SHUTDOWN_FAILED: int -E_TELNET_OPTION_SYNTAX: int -E_TFTP_DISKFULL: int -E_TFTP_EXISTS: int -E_TFTP_ILLEGAL: int -E_TFTP_NOSUCHUSER: int -E_TFTP_NOTFOUND: int -E_TFTP_PERM: int -E_TFTP_UNKNOWNID: int -E_TOO_MANY_REDIRECTS: int -E_UNKNOWN_OPTION: int -E_UNKNOWN_TELNET_OPTION: int -E_UNSUPPORTED_PROTOCOL: int -E_UPLOAD_FAILED: int -E_URL_MALFORMAT: int -E_URL_MALFORMAT_USER: int -E_USE_SSL_FAILED: int -E_WRITE_ERROR: int +ACCEPTTIMEOUT_MS: Final = 212 +ACCEPT_ENCODING: Final = 10102 +ADDRESS_SCOPE: Final = 171 +APPCONNECT_TIME: Final = 3145761 +APPEND: Final = 50 +AUTOREFERER: Final = 58 +BUFFERSIZE: Final = 98 +CAINFO: Final = 10065 +CAPATH: Final = 10097 +CLOSESOCKETFUNCTION: Final = 20208 +COMPILE_LIBCURL_VERSION_NUM: Final = 525824 +COMPILE_PY_VERSION_HEX: Final = 50925040 +COMPILE_SSL_LIB: Final = "schannel" +CONDITION_UNMET: Final = 2097187 +CONNECTTIMEOUT: Final = 78 +CONNECTTIMEOUT_MS: Final = 156 +CONNECT_ONLY: Final = 141 +CONNECT_TIME: Final = 3145733 +CONNECT_TO: Final = 10243 +CONTENT_LENGTH_DOWNLOAD: Final = 3145743 +CONTENT_LENGTH_UPLOAD: Final = 3145744 +CONTENT_TYPE: Final = 1048594 +COOKIE: Final = 10022 +COOKIEFILE: Final = 10031 +COOKIEJAR: Final = 10082 +COOKIELIST: Final = 10135 +COOKIESESSION: Final = 96 +COPYPOSTFIELDS: Final = 10165 +CRLF: Final = 27 +CRLFILE: Final = 10169 +CSELECT_ERR: Final = 4 +CSELECT_IN: Final = 1 +CSELECT_OUT: Final = 2 +CURL_HTTP_VERSION_1_0: Final = 1 +CURL_HTTP_VERSION_1_1: Final = 2 +CURL_HTTP_VERSION_2: Final = 3 +CURL_HTTP_VERSION_2TLS: Final = 4 +CURL_HTTP_VERSION_2_0: Final = 3 +CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE: Final = 5 +CURL_HTTP_VERSION_LAST: Final = 32 +CURL_HTTP_VERSION_NONE: Final = 0 +CURL_VERSION_BROTLI: Final = 8388608 +CURL_VERSION_HTTPS_PROXY: Final = 2097152 +CURL_VERSION_MULTI_SSL: Final = 4194304 +CUSTOMREQUEST: Final = 10036 +DEBUGFUNCTION: Final = 20094 +DEFAULT_PROTOCOL: Final = 10238 +DIRLISTONLY: Final = 48 +DNS_CACHE_TIMEOUT: Final = 92 +DNS_SERVERS: Final = 10211 +DNS_USE_GLOBAL_CACHE: Final = 91 +EFFECTIVE_URL: Final = 1048577 +EGDSOCKET: Final = 10077 +ENCODING: Final = 10102 +EXPECT_100_TIMEOUT_MS: Final = 227 +E_ABORTED_BY_CALLBACK: Final = 42 +E_AGAIN: Final = 81 +E_ALREADY_COMPLETE: Final = 99999 +E_BAD_CALLING_ORDER: Final = 44 +E_BAD_CONTENT_ENCODING: Final = 61 +E_BAD_DOWNLOAD_RESUME: Final = 36 +E_BAD_FUNCTION_ARGUMENT: Final = 43 +E_BAD_PASSWORD_ENTERED: Final = 46 +E_CALL_MULTI_PERFORM: Final = -1 +E_CHUNK_FAILED: Final = 88 +E_CONV_FAILED: Final = 75 +E_CONV_REQD: Final = 76 +E_COULDNT_CONNECT: Final = 7 +E_COULDNT_RESOLVE_HOST: Final = 6 +E_COULDNT_RESOLVE_PROXY: Final = 5 +E_FAILED_INIT: Final = 2 +E_FILESIZE_EXCEEDED: Final = 63 +E_FILE_COULDNT_READ_FILE: Final = 37 +E_FTP_ACCEPT_FAILED: Final = 10 +E_FTP_ACCEPT_TIMEOUT: Final = 12 +E_FTP_ACCESS_DENIED: Final = 9 +E_FTP_BAD_DOWNLOAD_RESUME: Final = 36 +E_FTP_BAD_FILE_LIST: Final = 87 +E_FTP_CANT_GET_HOST: Final = 15 +E_FTP_CANT_RECONNECT: Final = 16 +E_FTP_COULDNT_GET_SIZE: Final = 32 +E_FTP_COULDNT_RETR_FILE: Final = 19 +E_FTP_COULDNT_SET_ASCII: Final = 29 +E_FTP_COULDNT_SET_BINARY: Final = 17 +E_FTP_COULDNT_SET_TYPE: Final = 17 +E_FTP_COULDNT_STOR_FILE: Final = 25 +E_FTP_COULDNT_USE_REST: Final = 31 +E_FTP_PARTIAL_FILE: Final = 18 +E_FTP_PORT_FAILED: Final = 30 +E_FTP_PRET_FAILED: Final = 84 +E_FTP_QUOTE_ERROR: Final = 21 +E_FTP_SSL_FAILED: Final = 64 +E_FTP_USER_PASSWORD_INCORRECT: Final = 10 +E_FTP_WEIRD_227_FORMAT: Final = 14 +E_FTP_WEIRD_PASS_REPLY: Final = 11 +E_FTP_WEIRD_PASV_REPLY: Final = 13 +E_FTP_WEIRD_SERVER_REPLY: Final = 8 +E_FTP_WEIRD_USER_REPLY: Final = 12 +E_FTP_WRITE_ERROR: Final = 20 +E_FUNCTION_NOT_FOUND: Final = 41 +E_GOT_NOTHING: Final = 52 +E_HTTP2: Final = 16 +E_HTTP_NOT_FOUND: Final = 22 +E_HTTP_PORT_FAILED: Final = 45 +E_HTTP_POST_ERROR: Final = 34 +E_HTTP_RANGE_ERROR: Final = 33 +E_HTTP_RETURNED_ERROR: Final = 22 +E_INTERFACE_FAILED: Final = 45 +E_LDAP_CANNOT_BIND: Final = 38 +E_LDAP_INVALID_URL: Final = 62 +E_LDAP_SEARCH_FAILED: Final = 39 +E_LIBRARY_NOT_FOUND: Final = 40 +E_LOGIN_DENIED: Final = 67 +E_MALFORMAT_USER: Final = 24 +E_MULTI_ADDED_ALREADY: Final = 7 +E_MULTI_BAD_EASY_HANDLE: Final = 2 +E_MULTI_BAD_HANDLE: Final = 1 +E_MULTI_BAD_SOCKET: Final = 5 +E_MULTI_CALL_MULTI_PERFORM: Final = -1 +E_MULTI_CALL_MULTI_SOCKET: Final = -1 +E_MULTI_INTERNAL_ERROR: Final = 4 +E_MULTI_OK: Final = 0 +E_MULTI_OUT_OF_MEMORY: Final = 3 +E_MULTI_UNKNOWN_OPTION: Final = 6 +E_NOT_BUILT_IN: Final = 4 +E_NO_CONNECTION_AVAILABLE: Final = 89 +E_OK: Final = 0 +E_OPERATION_TIMEDOUT: Final = 28 +E_OPERATION_TIMEOUTED: Final = 28 +E_OUT_OF_MEMORY: Final = 27 +E_PARTIAL_FILE: Final = 18 +E_PEER_FAILED_VERIFICATION: Final = 60 +E_QUOTE_ERROR: Final = 21 +E_RANGE_ERROR: Final = 33 +E_READ_ERROR: Final = 26 +E_RECV_ERROR: Final = 56 +E_REMOTE_ACCESS_DENIED: Final = 9 +E_REMOTE_DISK_FULL: Final = 70 +E_REMOTE_FILE_EXISTS: Final = 73 +E_REMOTE_FILE_NOT_FOUND: Final = 78 +E_RTSP_CSEQ_ERROR: Final = 85 +E_RTSP_SESSION_ERROR: Final = 86 +E_SEND_ERROR: Final = 55 +E_SEND_FAIL_REWIND: Final = 65 +E_SHARE_IN_USE: Final = 57 +E_SSH: Final = 79 +E_SSL_CACERT: Final = 60 +E_SSL_CACERT_BADFILE: Final = 77 +E_SSL_CERTPROBLEM: Final = 58 +E_SSL_CIPHER: Final = 59 +E_SSL_CONNECT_ERROR: Final = 35 +E_SSL_CRL_BADFILE: Final = 82 +E_SSL_ENGINE_INITFAILED: Final = 66 +E_SSL_ENGINE_NOTFOUND: Final = 53 +E_SSL_ENGINE_SETFAILED: Final = 54 +E_SSL_INVALIDCERTSTATUS: Final = 91 +E_SSL_ISSUER_ERROR: Final = 83 +E_SSL_PEER_CERTIFICATE: Final = 60 +E_SSL_PINNEDPUBKEYNOTMATCH: Final = 90 +E_SSL_SHUTDOWN_FAILED: Final = 80 +E_TELNET_OPTION_SYNTAX: Final = 49 +E_TFTP_DISKFULL: Final = 70 +E_TFTP_EXISTS: Final = 73 +E_TFTP_ILLEGAL: Final = 71 +E_TFTP_NOSUCHUSER: Final = 74 +E_TFTP_NOTFOUND: Final = 68 +E_TFTP_PERM: Final = 69 +E_TFTP_UNKNOWNID: Final = 72 +E_TOO_MANY_REDIRECTS: Final = 47 +E_UNKNOWN_OPTION: Final = 48 +E_UNKNOWN_TELNET_OPTION: Final = 48 +E_UNSUPPORTED_PROTOCOL: Final = 1 +E_UPLOAD_FAILED: Final = 25 +E_URL_MALFORMAT: Final = 3 +E_URL_MALFORMAT_USER: Final = 4 +E_USE_SSL_FAILED: Final = 64 +E_WRITE_ERROR: Final = 23 +FAILONERROR: Final = 45 +FILE: Final = 10001 +FOLLOWLOCATION: Final = 52 +FORBID_REUSE: Final = 75 +FORM_BUFFER: Final = 11 +FORM_BUFFERPTR: Final = 12 +FORM_CONTENTS: Final = 4 +FORM_CONTENTTYPE: Final = 14 +FORM_FILE: Final = 10 +FORM_FILENAME: Final = 16 +FRESH_CONNECT: Final = 74 +FTPAPPEND: Final = 50 +FTPAUTH_DEFAULT: Final = 0 +FTPAUTH_SSL: Final = 1 +FTPAUTH_TLS: Final = 2 +FTPLISTONLY: Final = 48 +FTPMETHOD_DEFAULT: Final = 0 +FTPMETHOD_MULTICWD: Final = 1 +FTPMETHOD_NOCWD: Final = 2 +FTPMETHOD_SINGLECWD: Final = 3 +FTPPORT: Final = 10017 +FTPSSLAUTH: Final = 129 +FTPSSL_ALL: Final = 3 +FTPSSL_CONTROL: Final = 2 +FTPSSL_NONE: Final = 0 +FTPSSL_TRY: Final = 1 +FTP_ACCOUNT: Final = 10134 +FTP_ALTERNATIVE_TO_USER: Final = 10147 +FTP_CREATE_MISSING_DIRS: Final = 110 +FTP_ENTRY_PATH: Final = 1048606 +FTP_FILEMETHOD: Final = 138 +FTP_RESPONSE_TIMEOUT: Final = 112 +FTP_SKIP_PASV_IP: Final = 137 +FTP_SSL: Final = 119 +FTP_SSL_CCC: Final = 154 +FTP_USE_EPRT: Final = 106 +FTP_USE_EPSV: Final = 85 +FTP_USE_PRET: Final = 188 +GLOBAL_ACK_EINTR: Final = 4 +GLOBAL_ALL: Final = 3 +GLOBAL_DEFAULT: Final = 3 +GLOBAL_NOTHING: Final = 0 +GLOBAL_SSL: Final = 1 +GLOBAL_WIN32: Final = 2 +GSSAPI_DELEGATION: Final = 210 +GSSAPI_DELEGATION_FLAG: Final = 2 +GSSAPI_DELEGATION_NONE: Final = 0 +GSSAPI_DELEGATION_POLICY_FLAG: Final = 1 +HAPROXYPROTOCOL: Final = 274 +HEADER: Final = 42 +HEADERFUNCTION: Final = 20079 +HEADEROPT: Final = 229 +HEADER_SEPARATE: Final = 1 +HEADER_SIZE: Final = 2097163 +HEADER_UNIFIED: Final = 0 +HTTP200ALIASES: Final = 10104 +HTTPAUTH: Final = 107 +HTTPAUTH_ANY: Final = -17 +HTTPAUTH_ANYSAFE: Final = -18 +HTTPAUTH_AVAIL: Final = 2097175 +HTTPAUTH_BASIC: Final = 1 +HTTPAUTH_DIGEST: Final = 2 +HTTPAUTH_DIGEST_IE: Final = 16 +HTTPAUTH_GSSNEGOTIATE: Final = 4 +HTTPAUTH_NEGOTIATE: Final = 4 +HTTPAUTH_NONE: Final = 0 +HTTPAUTH_NTLM: Final = 8 +HTTPAUTH_NTLM_WB: Final = 32 +HTTPAUTH_ONLY: Final = -2147483648 +HTTPGET: Final = 80 +HTTPHEADER: Final = 10023 +HTTPPOST: Final = 10024 +HTTPPROXYTUNNEL: Final = 61 +HTTP_CODE: Final = 2097154 +HTTP_CONNECTCODE: Final = 2097174 +HTTP_CONTENT_DECODING: Final = 158 +HTTP_TRANSFER_DECODING: Final = 157 +HTTP_VERSION: Final = 84 +IGNORE_CONTENT_LENGTH: Final = 136 +INFILE: Final = 10009 +INFILESIZE: Final = 30115 +INFILESIZE_LARGE: Final = 30115 +INFOTYPE_DATA_IN: Final = 3 +INFOTYPE_DATA_OUT: Final = 4 +INFOTYPE_HEADER_IN: Final = 1 +INFOTYPE_HEADER_OUT: Final = 2 +INFOTYPE_SSL_DATA_IN: Final = 5 +INFOTYPE_SSL_DATA_OUT: Final = 6 +INFOTYPE_TEXT: Final = 0 +INFO_CERTINFO: Final = 4194338 +INFO_COOKIELIST: Final = 4194332 +INFO_FILETIME: Final = 2097166 +INFO_HTTP_VERSION: Final = 2097198 +INFO_RTSP_CLIENT_CSEQ: Final = 2097189 +INFO_RTSP_CSEQ_RECV: Final = 2097191 +INFO_RTSP_SERVER_CSEQ: Final = 2097190 +INFO_RTSP_SESSION_ID: Final = 1048612 +INTERFACE: Final = 10062 +IOCMD_NOP: Final = 0 +IOCMD_RESTARTREAD: Final = 1 +IOCTLFUNCTION: Final = 20130 +IOE_FAILRESTART: Final = 2 +IOE_OK: Final = 0 +IOE_UNKNOWNCMD: Final = 1 +IPRESOLVE: Final = 113 +IPRESOLVE_V4: Final = 1 +IPRESOLVE_V6: Final = 2 +IPRESOLVE_WHATEVER: Final = 0 +ISSUERCERT: Final = 10170 +KEYPASSWD: Final = 10026 +KHMATCH_MISMATCH: Final = 1 +KHMATCH_MISSING: Final = 2 +KHMATCH_OK: Final = 0 +KHSTAT_DEFER: Final = 3 +KHSTAT_FINE: Final = 1 +KHSTAT_FINE_ADD_TO_FILE: Final = 0 +KHSTAT_REJECT: Final = 2 +KHTYPE_DSS: Final = 3 +KHTYPE_RSA: Final = 2 +KHTYPE_RSA1: Final = 1 +KHTYPE_UNKNOWN: Final = 0 +KRB4LEVEL: Final = 10063 +KRBLEVEL: Final = 10063 +LASTSOCKET: Final = 2097181 +LOCALPORT: Final = 139 +LOCALPORTRANGE: Final = 140 +LOCAL_IP: Final = 1048617 +LOCAL_PORT: Final = 2097194 +LOCK_DATA_CONNECT: Final = 5 +LOCK_DATA_COOKIE: Final = 2 +LOCK_DATA_DNS: Final = 3 +LOCK_DATA_PSL: Final = 6 +LOCK_DATA_SSL_SESSION: Final = 4 +LOGIN_OPTIONS: Final = 10224 +LOW_SPEED_LIMIT: Final = 19 +LOW_SPEED_TIME: Final = 20 +MAIL_AUTH: Final = 10217 +MAIL_FROM: Final = 10186 +MAIL_RCPT: Final = 10187 +MAXCONNECTS: Final = 71 +MAXFILESIZE: Final = 30117 +MAXFILESIZE_LARGE: Final = 30117 +MAXREDIRS: Final = 68 +MAX_RECV_SPEED_LARGE: Final = 30146 +MAX_SEND_SPEED_LARGE: Final = 30145 +M_CHUNK_LENGTH_PENALTY_SIZE: Final = 30010 +M_CONTENT_LENGTH_PENALTY_SIZE: Final = 30009 +M_MAXCONNECTS: Final = 6 +M_MAX_HOST_CONNECTIONS: Final = 7 +M_MAX_PIPELINE_LENGTH: Final = 8 +M_MAX_TOTAL_CONNECTIONS: Final = 13 +M_PIPELINING: Final = 3 +M_PIPELINING_SERVER_BL: Final = 10012 +M_PIPELINING_SITE_BL: Final = 10011 +M_SOCKETFUNCTION: Final = 20001 +M_TIMERFUNCTION: Final = 20004 +NAMELOOKUP_TIME: Final = 3145732 +NETRC: Final = 51 +NETRC_FILE: Final = 10118 +NETRC_IGNORED: Final = 0 +NETRC_OPTIONAL: Final = 1 +NETRC_REQUIRED: Final = 2 +NEW_DIRECTORY_PERMS: Final = 160 +NEW_FILE_PERMS: Final = 159 +NOBODY: Final = 44 +NOPROGRESS: Final = 43 +NOPROXY: Final = 10177 +NOSIGNAL: Final = 99 +NUM_CONNECTS: Final = 2097178 +OPENSOCKETFUNCTION: Final = 20163 +OPT_CERTINFO: Final = 172 +OPT_COOKIELIST: Final = 10135 +OPT_FILETIME: Final = 69 +OPT_RTSP_CLIENT_CSEQ: Final = 193 +OPT_RTSP_REQUEST: Final = 189 +OPT_RTSP_SERVER_CSEQ: Final = 194 +OPT_RTSP_SESSION_ID: Final = 10190 +OPT_RTSP_STREAM_URI: Final = 10191 +OPT_RTSP_TRANSPORT: Final = 10192 +OS_ERRNO: Final = 2097177 +PASSWORD: Final = 10174 +PATH_AS_IS: Final = 234 +PAUSE_ALL: Final = 5 +PAUSE_CONT: Final = 0 +PAUSE_RECV: Final = 1 +PAUSE_SEND: Final = 4 +PINNEDPUBLICKEY: Final = 10230 +PIPEWAIT: Final = 237 +PIPE_HTTP1: Final = 1 +PIPE_MULTIPLEX: Final = 2 +PIPE_NOTHING: Final = 0 +POLL_IN: Final = 1 +POLL_INOUT: Final = 3 +POLL_NONE: Final = 0 +POLL_OUT: Final = 2 +POLL_REMOVE: Final = 4 +PORT: Final = 3 +POST: Final = 47 +POST301: Final = 161 +POSTFIELDS: Final = 10015 +POSTFIELDSIZE: Final = 30120 +POSTFIELDSIZE_LARGE: Final = 30120 +POSTQUOTE: Final = 10039 +POSTREDIR: Final = 161 +PREQUOTE: Final = 10093 +PRETRANSFER_TIME: Final = 3145734 +PRE_PROXY: Final = 10262 +PRIMARY_IP: Final = 1048608 +PRIMARY_PORT: Final = 2097192 +PROGRESSFUNCTION: Final = 20056 +PROTOCOLS: Final = 181 +PROTO_ALL: Final = -1 +PROTO_DICT: Final = 512 +PROTO_FILE: Final = 1024 +PROTO_FTP: Final = 4 +PROTO_FTPS: Final = 8 +PROTO_GOPHER: Final = 33554432 +PROTO_HTTP: Final = 1 +PROTO_HTTPS: Final = 2 +PROTO_IMAP: Final = 4096 +PROTO_IMAPS: Final = 8192 +PROTO_LDAP: Final = 128 +PROTO_LDAPS: Final = 256 +PROTO_POP3: Final = 16384 +PROTO_POP3S: Final = 32768 +PROTO_RTMP: Final = 524288 +PROTO_RTMPE: Final = 2097152 +PROTO_RTMPS: Final = 8388608 +PROTO_RTMPT: Final = 1048576 +PROTO_RTMPTE: Final = 4194304 +PROTO_RTMPTS: Final = 16777216 +PROTO_RTSP: Final = 262144 +PROTO_SCP: Final = 16 +PROTO_SFTP: Final = 32 +PROTO_SMB: Final = 67108864 +PROTO_SMBS: Final = 134217728 +PROTO_SMTP: Final = 65536 +PROTO_SMTPS: Final = 131072 +PROTO_TELNET: Final = 64 +PROTO_TFTP: Final = 2048 +PROXY: Final = 10004 +PROXYAUTH: Final = 111 +PROXYAUTH_AVAIL: Final = 2097176 +PROXYHEADER: Final = 10228 +PROXYPASSWORD: Final = 10176 +PROXYPORT: Final = 59 +PROXYTYPE: Final = 101 +PROXYTYPE_HTTP: Final = 0 +PROXYTYPE_HTTP_1_0: Final = 1 +PROXYTYPE_SOCKS4: Final = 4 +PROXYTYPE_SOCKS4A: Final = 6 +PROXYTYPE_SOCKS5: Final = 5 +PROXYTYPE_SOCKS5_HOSTNAME: Final = 7 +PROXYUSERNAME: Final = 10175 +PROXYUSERPWD: Final = 10006 +PROXY_CAINFO: Final = 10246 +PROXY_CAPATH: Final = 10247 +PROXY_CRLFILE: Final = 10260 +PROXY_KEYPASSWD: Final = 10258 +PROXY_PINNEDPUBLICKEY: Final = 10263 +PROXY_SERVICE_NAME: Final = 10235 +PROXY_SSLCERT: Final = 10254 +PROXY_SSLCERTTYPE: Final = 10255 +PROXY_SSLKEY: Final = 10256 +PROXY_SSLKEYTYPE: Final = 10257 +PROXY_SSLVERSION: Final = 250 +PROXY_SSL_CIPHER_LIST: Final = 10259 +PROXY_SSL_OPTIONS: Final = 261 +PROXY_SSL_VERIFYHOST: Final = 249 +PROXY_SSL_VERIFYPEER: Final = 248 +PROXY_TLS13_CIPHERS: Final = 10277 +PROXY_TLSAUTH_PASSWORD: Final = 10252 +PROXY_TLSAUTH_TYPE: Final = 10253 +PROXY_TLSAUTH_USERNAME: Final = 10251 +PROXY_TRANSFER_MODE: Final = 166 +PUT: Final = 54 +QUOTE: Final = 10028 +RANDOM_FILE: Final = 10076 +RANGE: Final = 10007 +READDATA: Final = 10009 +READFUNCTION: Final = 20012 +READFUNC_ABORT: Final = 268435456 +READFUNC_PAUSE: Final = 268435457 +REDIRECT_COUNT: Final = 2097172 +REDIRECT_TIME: Final = 3145747 +REDIRECT_URL: Final = 1048607 +REDIR_POST_301: Final = 1 +REDIR_POST_302: Final = 2 +REDIR_POST_303: Final = 4 +REDIR_POST_ALL: Final = 7 +REDIR_PROTOCOLS: Final = 182 +REFERER: Final = 10016 +REQUEST_SIZE: Final = 2097164 +REQUEST_TARGET: Final = 10266 +RESOLVE: Final = 10203 +RESPONSE_CODE: Final = 2097154 +RESUME_FROM: Final = 30116 +RESUME_FROM_LARGE: Final = 30116 +RTSPREQ_ANNOUNCE: Final = 3 +RTSPREQ_DESCRIBE: Final = 2 +RTSPREQ_GET_PARAMETER: Final = 8 +RTSPREQ_LAST: Final = 12 +RTSPREQ_NONE: Final = 0 +RTSPREQ_OPTIONS: Final = 1 +RTSPREQ_PAUSE: Final = 6 +RTSPREQ_PLAY: Final = 5 +RTSPREQ_RECEIVE: Final = 11 +RTSPREQ_RECORD: Final = 10 +RTSPREQ_SETUP: Final = 4 +RTSPREQ_SET_PARAMETER: Final = 9 +RTSPREQ_TEARDOWN: Final = 7 +SASL_IR: Final = 218 +SEEKFUNCTION: Final = 20167 +SEEKFUNC_CANTSEEK: Final = 2 +SEEKFUNC_FAIL: Final = 1 +SEEKFUNC_OK: Final = 0 +SERVICE_NAME: Final = 10236 +SHARE: Final = 10100 +SH_SHARE: Final = 1 +SH_UNSHARE: Final = 2 +SIZE_DOWNLOAD: Final = 3145736 +SIZE_UPLOAD: Final = 3145735 +SOCKET_BAD: Final = -1 +SOCKET_TIMEOUT: Final = -1 +SOCKOPTFUNCTION: Final = 20148 +SOCKOPT_ALREADY_CONNECTED: Final = 2 +SOCKOPT_ERROR: Final = 1 +SOCKOPT_OK: Final = 0 +SOCKS5_GSSAPI_NEC: Final = 180 +SOCKS5_GSSAPI_SERVICE: Final = 10179 +SOCKTYPE_ACCEPT: Final = 1 +SOCKTYPE_IPCXN: Final = 0 +SPEED_DOWNLOAD: Final = 3145737 +SPEED_UPLOAD: Final = 3145738 +SSH_AUTH_AGENT: Final = 16 +SSH_AUTH_ANY: Final = -1 +SSH_AUTH_DEFAULT: Final = -1 +SSH_AUTH_HOST: Final = 4 +SSH_AUTH_KEYBOARD: Final = 8 +SSH_AUTH_NONE: Final = 0 +SSH_AUTH_PASSWORD: Final = 2 +SSH_AUTH_PUBLICKEY: Final = 1 +SSH_AUTH_TYPES: Final = 151 +SSH_HOST_PUBLIC_KEY_MD5: Final = 10162 +SSH_KEYFUNCTION: Final = 20184 +SSH_KNOWNHOSTS: Final = 10183 +SSH_PRIVATE_KEYFILE: Final = 10153 +SSH_PUBLIC_KEYFILE: Final = 10152 +SSLCERT: Final = 10025 +SSLCERTPASSWD: Final = 10026 +SSLCERTTYPE: Final = 10086 +SSLENGINE: Final = 10089 +SSLENGINE_DEFAULT: Final = 90 +SSLKEY: Final = 10087 +SSLKEYPASSWD: Final = 10026 +SSLKEYTYPE: Final = 10088 +SSLOPT_ALLOW_BEAST: Final = 1 +SSLOPT_NO_REVOKE: Final = 2 +SSLVERSION: Final = 32 +SSLVERSION_DEFAULT: Final = 0 +SSLVERSION_MAX_DEFAULT: Final = 65536 +SSLVERSION_MAX_TLSv1_0: Final = 262144 +SSLVERSION_MAX_TLSv1_1: Final = 327680 +SSLVERSION_MAX_TLSv1_2: Final = 393216 +SSLVERSION_MAX_TLSv1_3: Final = 458752 +SSLVERSION_SSLv2: Final = 2 +SSLVERSION_SSLv3: Final = 3 +SSLVERSION_TLSv1: Final = 0 +SSLVERSION_TLSv1_0: Final = 4 +SSLVERSION_TLSv1_1: Final = 5 +SSLVERSION_TLSv1_2: Final = 6 +SSLVERSION_TLSv1_3: Final = 7 +SSL_CIPHER_LIST: Final = 10083 +SSL_ENABLE_ALPN: Final = 226 +SSL_ENABLE_NPN: Final = 225 +SSL_ENGINES: Final = 4194331 +SSL_FALSESTART: Final = 233 +SSL_OPTIONS: Final = 216 +SSL_SESSIONID_CACHE: Final = 150 +SSL_VERIFYHOST: Final = 81 +SSL_VERIFYPEER: Final = 64 +SSL_VERIFYRESULT: Final = 2097165 +SSL_VERIFYSTATUS: Final = 232 +STARTTRANSFER_TIME: Final = 3145745 +STDERR: Final = 10037 +TCP_FASTOPEN: Final = 244 +TCP_KEEPALIVE: Final = 213 +TCP_KEEPIDLE: Final = 214 +TCP_KEEPINTVL: Final = 215 +TCP_NODELAY: Final = 121 +TELNETOPTIONS: Final = 10070 +TFTP_BLKSIZE: Final = 178 +TIMECONDITION: Final = 33 +TIMECONDITION_IFMODSINCE: Final = 1 +TIMECONDITION_IFUNMODSINCE: Final = 2 +TIMECONDITION_LASTMOD: Final = 3 +TIMECONDITION_NONE: Final = 0 +TIMEOUT: Final = 13 +TIMEOUT_MS: Final = 155 +TIMEVALUE: Final = 34 +TLS13_CIPHERS: Final = 10276 +TLSAUTH_PASSWORD: Final = 10205 +TLSAUTH_TYPE: Final = 10206 +TLSAUTH_USERNAME: Final = 10204 +TOTAL_TIME: Final = 3145731 +TRANSFERTEXT: Final = 53 +TRANSFER_ENCODING: Final = 207 +UNIX_SOCKET_PATH: Final = 10231 +UNRESTRICTED_AUTH: Final = 105 +UPLOAD: Final = 46 +URL: Final = 10002 +USERAGENT: Final = 10018 +USERNAME: Final = 10173 +USERPWD: Final = 10005 +USESSL_ALL: Final = 3 +USESSL_CONTROL: Final = 2 +USESSL_NONE: Final = 0 +USESSL_TRY: Final = 1 +USE_SSL: Final = 119 +VERBOSE: Final = 41 +VERSION_ASYNCHDNS: Final = 128 +VERSION_BROTLI: Final = 8388608 +VERSION_CONV: Final = 4096 +VERSION_CURLDEBUG: Final = 8192 +VERSION_DEBUG: Final = 64 +VERSION_GSSAPI: Final = 131072 +VERSION_GSSNEGOTIATE: Final = 32 +VERSION_HTTP2: Final = 65536 +VERSION_HTTPS_PROXY: Final = 2097152 +VERSION_IDN: Final = 1024 +VERSION_IPV6: Final = 1 +VERSION_KERBEROS4: Final = 2 +VERSION_KERBEROS5: Final = 262144 +VERSION_LARGEFILE: Final = 512 +VERSION_LIBZ: Final = 8 +VERSION_MULTI_SSL: Final = 4194304 +VERSION_NTLM: Final = 16 +VERSION_NTLM_WB: Final = 32768 +VERSION_PSL: Final = 1048576 +VERSION_SPNEGO: Final = 256 +VERSION_SSL: Final = 4 +VERSION_SSPI: Final = 2048 +VERSION_TLSAUTH_SRP: Final = 16384 +VERSION_UNIX_SOCKETS: Final = 524288 +WILDCARDMATCH: Final = 197 +WRITEDATA: Final = 10001 +WRITEFUNCTION: Final = 20011 +WRITEFUNC_PAUSE: Final = 268435457 +WRITEHEADER: Final = 10029 +XFERINFOFUNCTION: Final = 20219 +XOAUTH2_BEARER: Final = 10220 diff --git a/stubs/tensorflow/METADATA.toml b/stubs/tensorflow/METADATA.toml index e00f35d9e156..8d9abbc7fea5 100644 --- a/stubs/tensorflow/METADATA.toml +++ b/stubs/tensorflow/METADATA.toml @@ -4,7 +4,7 @@ version = "2.16.*" upstream_repository = "https://github.com/tensorflow/tensorflow" # requires a version of numpy with a `py.typed` file requires = ["numpy>=1.20", "types-protobuf", "types-requests"] -extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) on tensorflow==2.16.1" +extra_description = "Partially generated using [mypy-protobuf==3.6.0](https://github.com/nipunn1313/mypy-protobuf/tree/v3.6.0) and libprotoc 25.1 on tensorflow==2.16.1 ." partial_stub = true [tool.stubtest] diff --git a/stubs/waitress/@tests/stubtest_allowlist.txt b/stubs/waitress/@tests/stubtest_allowlist.txt index e9d6b575c30b..9756420e3411 100644 --- a/stubs/waitress/@tests/stubtest_allowlist.txt +++ b/stubs/waitress/@tests/stubtest_allowlist.txt @@ -1,33 +1,4 @@ -waitress.adjustments.Adjustments.clear_untrusted_proxy_headers -waitress.adjustments.PY2 -waitress.adjustments.string_types -waitress.channel.HTTPChannel.addr -waitress.channel.HTTPChannel.error_task_class -waitress.channel.HTTPChannel.parser_class -waitress.channel.HTTPChannel.request -waitress.channel.HTTPChannel.task_class -waitress.compat.PY2 -waitress.compat.PY3 -waitress.compat.ResourceWarning -waitress.compat.class_types -waitress.compat.exec_ -waitress.compat.integer_types -waitress.compat.qualname -waitress.compat.reraise -waitress.compat.set_nonblocking -waitress.compat.string_types -waitress.compat.text_ -waitress.compat.tobytes -waitress.compat.tostr -waitress.compat.unquote_bytes_to_wsgi -waitress.rfc7230.tobytes -waitress.server.BaseWSGIServer.channel_class -waitress.server.BaseWSGIServer.get_server_name -waitress.server.MultiSocketServer.__init__ -waitress.server.WSGIServer -waitress.task.ErrorTask.content_length -waitress.task.ThreadedTaskDispatcher.start_new_thread -waitress.task.WSGITask.content_length -waitress.rfc7230.BWS -waitress.wasyncore.map -waitress.wasyncore.dispatcher_with_send.handle_write +waitress.__main__ + +# Leaked loop variable +waitress.utilities.i diff --git a/stubs/waitress/@tests/stubtest_allowlist_darwin.txt b/stubs/waitress/@tests/stubtest_allowlist_darwin.txt deleted file mode 100644 index 3aad82a7a12d..000000000000 --- a/stubs/waitress/@tests/stubtest_allowlist_darwin.txt +++ /dev/null @@ -1 +0,0 @@ -waitress.server.UnixWSGIServer.get_server_name diff --git a/stubs/waitress/@tests/stubtest_allowlist_linux.txt b/stubs/waitress/@tests/stubtest_allowlist_linux.txt deleted file mode 100644 index 3aad82a7a12d..000000000000 --- a/stubs/waitress/@tests/stubtest_allowlist_linux.txt +++ /dev/null @@ -1 +0,0 @@ -waitress.server.UnixWSGIServer.get_server_name diff --git a/stubs/waitress/METADATA.toml b/stubs/waitress/METADATA.toml index 48c7151c440a..bb43db9f27e1 100644 --- a/stubs/waitress/METADATA.toml +++ b/stubs/waitress/METADATA.toml @@ -1,9 +1,6 @@ version = "2.1.*" upstream_repository = "https://github.com/Pylons/waitress" -requires = [] -partial_stub = true [tool.stubtest] -ignore_missing_stub = true # linux and darwin are equivalent platforms = ["linux", "win32"] diff --git a/stubs/waitress/waitress/__init__.pyi b/stubs/waitress/waitress/__init__.pyi index f3aef6fbab97..844846f22a79 100644 --- a/stubs/waitress/waitress/__init__.pyi +++ b/stubs/waitress/waitress/__init__.pyi @@ -1,7 +1,18 @@ -from typing import Any +from _typeshed import Unused +from _typeshed.wsgi import WSGIApplication +from collections.abc import Callable, Iterable +from typing import Any, Literal -from waitress.server import create_server as create_server +from waitress.adjustments import _AdjustmentsParams +from waitress.server import BaseWSGIServer -def serve(app: Any, **kw: Any) -> None: ... -def serve_paste(app: Any, global_conf: Any, **kw: Any) -> int: ... -def profile(cmd: Any, globals: Any, locals: Any, sort_order: tuple[str, ...], callers: bool) -> None: ... +def serve( + app: WSGIApplication, + *, + _server: Callable[..., BaseWSGIServer] = ..., + _quiet: bool = False, + _profile: bool = False, + **kw: _AdjustmentsParams, +) -> None: ... +def serve_paste(app: WSGIApplication, global_conf: Unused, **kw: _AdjustmentsParams) -> Literal[0]: ... +def profile(cmd: str, globals: dict[str, Any], locals: dict[str, Any], sort_order: Iterable[str], callers: bool) -> None: ... diff --git a/stubs/waitress/waitress/adjustments.pyi b/stubs/waitress/waitress/adjustments.pyi index 79cbde1fbb93..8e909583d65c 100644 --- a/stubs/waitress/waitress/adjustments.pyi +++ b/stubs/waitress/waitress/adjustments.pyi @@ -1,12 +1,14 @@ +from _typeshed import Incomplete from collections.abc import Iterable, Sequence from socket import socket -from typing import Any +from typing import Final +from typing_extensions import TypeAlias -from .compat import HAS_IPV6 as HAS_IPV6, PY2 as PY2, WIN as WIN, string_types as string_types -from .proxy_headers import PROXY_HEADERS as PROXY_HEADERS +# Really complex, consider unpacking a TypedDict +_AdjustmentsParams: TypeAlias = Incomplete -truthy: frozenset[Any] -KNOWN_PROXY_HEADERS: frozenset[Any] +truthy: frozenset[str] +KNOWN_PROXY_HEADERS: Final[frozenset[str]] def asbool(s: bool | str | int | None) -> bool: ... def asoctal(s: str) -> int: ... @@ -30,7 +32,7 @@ class Adjustments: trusted_proxy_count: int | None trusted_proxy_headers: set[str] log_untrusted_proxy_headers: bool - clear_untrusted_proxy_headers: _bool_marker | bool + clear_untrusted_proxy_headers: type[_bool_marker] | bool url_scheme: str url_prefix: str ident: str @@ -55,8 +57,10 @@ class Adjustments: ipv4: bool ipv6: bool sockets: list[socket] - def __init__(self, **kw: Any) -> None: ... + channel_request_lookahead: int + server_name: str + def __init__(self, **kw: _AdjustmentsParams) -> None: ... @classmethod - def parse_args(cls, argv: str) -> tuple[dict[str, Any], Any]: ... + def parse_args(cls, argv: str) -> tuple[dict[str, bool], list[str]]: ... @classmethod def check_sockets(cls, sockets: Iterable[socket]) -> None: ... diff --git a/stubs/waitress/waitress/buffers.pyi b/stubs/waitress/waitress/buffers.pyi index 940c013e853e..c8a356234623 100644 --- a/stubs/waitress/waitress/buffers.pyi +++ b/stubs/waitress/waitress/buffers.pyi @@ -1,22 +1,22 @@ +from _typeshed import ReadableBuffer from io import BufferedIOBase, BufferedRandom, BytesIO -from typing import Any, Literal +from typing import Final, Literal, NoReturn -COPY_BYTES: int -STRBUF_LIMIT: int +COPY_BYTES: Final = 262144 +STRBUF_LIMIT: Final = 8192 class FileBasedBuffer: remain: int file: BytesIO def __init__(self, file: BytesIO, from_buffer: BytesIO | None = None) -> None: ... def __len__(self) -> int: ... - def __nonzero__(self) -> bool: ... def __bool__(self) -> Literal[True]: ... - def append(self, s: Any) -> None: ... + def append(self, s: ReadableBuffer) -> None: ... def get(self, numbytes: int = -1, skip: bool = False) -> bytes: ... def skip(self, numbytes: int, allow_prune: int = 0) -> None: ... - def newfile(self) -> Any: ... + def newfile(self) -> BufferedIOBase: ... def prune(self) -> None: ... - def getfile(self) -> Any: ... + def getfile(self) -> BytesIO: ... def close(self) -> None: ... class TempfileBasedBuffer(FileBasedBuffer): @@ -38,7 +38,7 @@ class ReadOnlyFileBasedBuffer(FileBasedBuffer): def __iter__(self) -> ReadOnlyFileBasedBuffer: ... def next(self) -> bytes | None: ... __next__ = next - def append(self, s: Any) -> None: ... + def append(self, s: ReadableBuffer) -> NoReturn: ... class OverflowableBuffer: overflowed: bool @@ -47,7 +47,6 @@ class OverflowableBuffer: overflow: int def __init__(self, overflow: int) -> None: ... def __len__(self) -> int: ... - def __nonzero__(self) -> bool: ... def __bool__(self) -> bool: ... def append(self, s: bytes) -> None: ... def get(self, numbytes: int = -1, skip: bool = False) -> bytes: ... diff --git a/stubs/waitress/waitress/channel.pyi b/stubs/waitress/waitress/channel.pyi index 05bebc1cd9af..40c67a20a298 100644 --- a/stubs/waitress/waitress/channel.pyi +++ b/stubs/waitress/waitress/channel.pyi @@ -1,5 +1,5 @@ -from collections.abc import Mapping, Sequence -from socket import socket +from collections.abc import Sequence +from socket import _RetAddress, socket from threading import Condition, Lock from waitress.adjustments import Adjustments @@ -8,15 +8,16 @@ from waitress.parser import HTTPRequestParser from waitress.server import BaseWSGIServer from waitress.task import ErrorTask, WSGITask -from . import wasyncore as wasyncore +from . import wasyncore +from .wasyncore import _SocketMap class ClientDisconnected(Exception): ... class HTTPChannel(wasyncore.dispatcher): - task_class: WSGITask - error_task_class: ErrorTask - parser_class: HTTPRequestParser - request: HTTPRequestParser + task_class: type[WSGITask] + error_task_class: type[ErrorTask] + parser_class: type[HTTPRequestParser] + request: HTTPRequestParser | None last_activity: float will_close: bool close_when_flushed: bool @@ -31,19 +32,21 @@ class HTTPChannel(wasyncore.dispatcher): sendbuf_len: int task_lock: Lock outbuf_lock: Condition - addr: tuple[str, int] + addr: _RetAddress def __init__( - self, server: BaseWSGIServer, sock: socket, addr: str, adj: Adjustments, map: Mapping[int, socket] | None = None + self, server: BaseWSGIServer, sock: socket, addr: _RetAddress, adj: Adjustments, map: _SocketMap | None = None ) -> None: ... + def check_client_disconnected(self) -> None: ... def writable(self) -> bool: ... def handle_write(self) -> None: ... def readable(self) -> bool: ... def handle_read(self) -> None: ... + def send_continue(self) -> None: ... def received(self, data: bytes) -> bool: ... connected: bool def handle_close(self) -> None: ... - def add_channel(self, map: Mapping[int, socket] | None = None) -> None: ... - def del_channel(self, map: Mapping[int, socket] | None = None) -> None: ... + def add_channel(self, map: _SocketMap | None = None) -> None: ... + def del_channel(self, map: _SocketMap | None = None) -> None: ... def write_soon(self, data: bytes) -> int: ... def service(self) -> None: ... def cancel(self) -> None: ... diff --git a/stubs/waitress/waitress/compat.pyi b/stubs/waitress/waitress/compat.pyi index 30e994ad81fb..addb331dbe3f 100644 --- a/stubs/waitress/waitress/compat.pyi +++ b/stubs/waitress/waitress/compat.pyi @@ -1,29 +1,7 @@ -from io import TextIOWrapper -from typing import Any, Literal +from typing import Final -PY2: Literal[False] -PY3: Literal[True] -WIN: bool -string_types: tuple[str] -integer_types: tuple[int] -class_types: tuple[type] - -def unquote_bytes_to_wsgi(bytestring: bytes) -> str: ... -def text_(s: str, encoding: str = ..., errors: str = ...) -> str: ... -def tostr(s: str) -> str: ... -def tobytes(s: str) -> bytes: ... - -exec_: Any - -def reraise(tp: Any, value: BaseException, tb: str | None = ...) -> None: ... - -MAXINT: int -HAS_IPV6: bool -IPPROTO_IPV6: int -IPV6_V6ONLY: int - -def set_nonblocking(fd: TextIOWrapper) -> None: ... - -ResourceWarning: Warning - -def qualname(cls: Any) -> str: ... +WIN: Final[bool] +MAXINT: Final[int] +HAS_IPV6: Final[bool] +IPPROTO_IPV6: Final[int] +IPV6_V6ONLY: Final[int] diff --git a/stubs/waitress/waitress/parser.pyi b/stubs/waitress/waitress/parser.pyi index ec2f57e8bd1a..939d5c8c0952 100644 --- a/stubs/waitress/waitress/parser.pyi +++ b/stubs/waitress/waitress/parser.pyi @@ -1,12 +1,13 @@ from collections.abc import Mapping, Sequence from io import BytesIO from re import Pattern -from typing import Any from waitress.adjustments import Adjustments from waitress.receiver import ChunkedReceiver, FixedStreamReceiver from waitress.utilities import Error +def unquote_bytes_to_wsgi(bytestring: str | bytes | bytearray) -> str: ... + class ParsingError(Exception): ... class TransferEncodingNotImplemented(Exception): ... @@ -38,6 +39,6 @@ class HTTPRequestParser: def split_uri(uri: bytes) -> tuple[str, str, bytes, str, str]: ... def get_header_lines(header: bytes) -> Sequence[bytes]: ... -first_line_re: Pattern[Any] +first_line_re: Pattern[str] def crack_first_line(line: str) -> tuple[bytes, bytes, bytes]: ... diff --git a/stubs/waitress/waitress/proxy_headers.pyi b/stubs/waitress/waitress/proxy_headers.pyi index 0861feff5eff..c86afbb75831 100644 --- a/stubs/waitress/waitress/proxy_headers.pyi +++ b/stubs/waitress/waitress/proxy_headers.pyi @@ -1,16 +1,17 @@ -from collections.abc import Callable, Mapping, Sequence +from _typeshed.wsgi import WSGIApplication +from collections.abc import Mapping, Sequence from logging import Logger -from typing import Any, NamedTuple +from typing import Final, NamedTuple, TypeVar -from .utilities import BadRequest as BadRequest +_T = TypeVar("_T") -PROXY_HEADERS: frozenset[Any] +PROXY_HEADERS: Final[frozenset[str]] class Forwarded(NamedTuple): - by: Any - for_: Any - host: Any - proto: Any + by: str + for_: str + host: str + proto: str class MalformedProxyHeader(Exception): header: str @@ -19,18 +20,18 @@ class MalformedProxyHeader(Exception): def __init__(self, header: str, reason: str, value: str) -> None: ... def proxy_headers_middleware( - app: Any, + app: WSGIApplication, trusted_proxy: str | None = None, trusted_proxy_count: int = 1, trusted_proxy_headers: set[str] | None = None, clear_untrusted: bool = True, log_untrusted: bool = False, logger: Logger = ..., -) -> Callable[..., Any]: ... +) -> WSGIApplication: ... def parse_proxy_headers( environ: Mapping[str, str], trusted_proxy_count: int, trusted_proxy_headers: set[str], logger: Logger = ... ) -> set[str]: ... -def strip_brackets(addr: str) -> str: ... +def strip_brackets(addr: Sequence[_T]) -> Sequence[_T]: ... def clear_untrusted_headers( environ: Mapping[str, str], untrusted_headers: Sequence[str], log_warning: bool = False, logger: Logger = ... ) -> None: ... diff --git a/stubs/waitress/waitress/rfc7230.pyi b/stubs/waitress/waitress/rfc7230.pyi index 27593779f1eb..1b02b6a4a3b4 100644 --- a/stubs/waitress/waitress/rfc7230.pyi +++ b/stubs/waitress/waitress/rfc7230.pyi @@ -1,13 +1,28 @@ -from .compat import tobytes as tobytes +from re import Pattern +from typing import Final -WS: str -OWS: str -RWS: str -BWS = str -TCHAR: str -OBS_TEXT: str -TOKEN: str -VCHAR: str -FIELD_VCHAR: str -FIELD_CONTENT: str -FIELD_VALUE: str +BWS: Final = r"[ \t]{0,}?" +CHUNK_EXT: Final[str] +CHUNK_EXT_NAME: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]{1,}" +CHUNK_EXT_RE: Final[Pattern[str]] +CHUNK_EXT_VAL: Final[str] +DIGIT: Final = "[0-9]" +FIELD_CONTENT: Final[str] +FIELD_VALUE: Final[str] +FIELD_VCHAR: Final = r"[\x21-\x7e\x80-\xff]" +HEADER_FIELD_RE: Final[Pattern[str]] +HEXDIG: Final = r"[0-9a-fA-F]" +OBS_TEXT: Final = r"\x80-\xff" +ONLY_DIGIT_RE: Final[Pattern[str]] +ONLY_HEXDIG_RE: Final[Pattern[str]] +OWS: Final = r"[ \t]{0,}?" +QDTEXT: Final = r"[\t !#-[\]-~\x80-\xff]" +QUOTED_PAIR: Final = r"\\([\t \x21-\x7e\x80-\xff])" +QUOTED_PAIR_RE: Final[Pattern[str]] +QUOTED_STRING: Final[str] +QUOTED_STRING_RE: Final[Pattern[str]] +RWS: Final = r"[ \t]{1,}?" +TCHAR: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]" +TOKEN: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]{1,}" +VCHAR: Final = r"\x21-\x7e" +WS: Final = r"[ \t]" diff --git a/stubs/waitress/waitress/runner.pyi b/stubs/waitress/waitress/runner.pyi index c716ee7e10e9..bf023947d9a9 100644 --- a/stubs/waitress/waitress/runner.pyi +++ b/stubs/waitress/waitress/runner.pyi @@ -1,13 +1,14 @@ +from _typeshed import Unused from collections.abc import Callable, Sequence from io import TextIOWrapper from re import Pattern -from typing import Any +from typing import Any, Final -HELP: str -RUNNER_PATTERN: Pattern[Any] +HELP: Final[str] +RUNNER_PATTERN: Final[Pattern[str]] def match(obj_name: str) -> tuple[str, str]: ... -def resolve(module_name: str, object_name: str) -> Any: ... +def resolve(module_name: str, object_name: str) -> Any: ... # Any module attribute def show_help(stream: TextIOWrapper, name: str, error: str | None = None) -> None: ... def show_exception(stream: TextIOWrapper) -> None: ... -def run(argv: Sequence[str] = ..., _serve: Callable[..., object] = ...) -> None: ... +def run(argv: Sequence[str] = ..., _serve: Callable[..., Unused] = ...) -> None: ... diff --git a/stubs/waitress/waitress/server.pyi b/stubs/waitress/waitress/server.pyi index 2a6ec7a315dc..abe769f75870 100644 --- a/stubs/waitress/waitress/server.pyi +++ b/stubs/waitress/waitress/server.pyi @@ -1,49 +1,54 @@ import sys -from _typeshed import Incomplete -from collections.abc import Sequence -from socket import socket -from typing import Any +from _typeshed import Unused +from _typeshed.wsgi import WSGIApplication +from collections.abc import Callable, Sequence +from socket import _RetAddress, socket +from typing import Literal from waitress import wasyncore -from waitress.adjustments import Adjustments +from waitress.adjustments import Adjustments, _AdjustmentsParams from waitress.channel import HTTPChannel from waitress.task import Task, ThreadedTaskDispatcher +from waitress.wasyncore import _SocketMap def create_server( - application: Any, - map: Incomplete | None = None, + application: WSGIApplication, + map: _SocketMap | None = None, _start: bool = True, _sock: socket | None = None, _dispatcher: ThreadedTaskDispatcher | None = None, - **kw: Any, + **kw: _AdjustmentsParams, ) -> MultiSocketServer | BaseWSGIServer: ... class MultiSocketServer: - asyncore: Any + asyncore = wasyncore adj: Adjustments - map: Any + map: _SocketMap | None effective_listen: Sequence[tuple[str, int]] task_dispatcher: ThreadedTaskDispatcher def __init__( self, - map: Incomplete | None = None, + map: _SocketMap | None = None, adj: Adjustments | None = None, effective_listen: Sequence[tuple[str, int]] | None = None, dispatcher: ThreadedTaskDispatcher | None = None, + # Can be None, but print_listen will fail + log_info: Callable[[str], Unused] | None = None, ) -> None: ... def print_listen(self, format_str: str) -> None: ... def run(self) -> None: ... def close(self) -> None: ... class BaseWSGIServer(wasyncore.dispatcher): - channel_class: HTTPChannel + channel_class: type[HTTPChannel] next_channel_cleanup: int socketmod: socket - asyncore: Any - sockinfo: tuple[int, int, int, tuple[str, int]] + asyncore = wasyncore + in_connection_overflow: bool + sockinfo: tuple[int, int, int | None, _RetAddress] family: int socktype: int - application: Any + application: WSGIApplication adj: Adjustments trigger: int task_dispatcher: ThreadedTaskDispatcher @@ -51,19 +56,18 @@ class BaseWSGIServer(wasyncore.dispatcher): active_channels: HTTPChannel def __init__( self, - application: Any, - map: Incomplete | None = None, + application: WSGIApplication, + map: _SocketMap | None = None, _start: bool = True, - _sock: Incomplete | None = None, + _sock: socket | None = None, dispatcher: ThreadedTaskDispatcher | None = None, adj: Adjustments | None = None, - sockinfo: Incomplete | None = None, + sockinfo: tuple[int, int, int | None, _RetAddress] | None = None, bind_socket: bool = True, - **kw: Any, + **kw: _AdjustmentsParams, ) -> None: ... def bind_server_socket(self) -> None: ... - def get_server_name(self, ip: str) -> str: ... - def getsockname(self) -> Any: ... + def getsockname(self) -> tuple[str, str]: ... accepting: bool def accept_connections(self) -> None: ... def add_task(self, task: Task) -> None: ... @@ -74,33 +78,32 @@ class BaseWSGIServer(wasyncore.dispatcher): def handle_accept(self) -> None: ... def run(self) -> None: ... def pull_trigger(self) -> None: ... - def set_socket_options(self, conn: Any) -> None: ... - def fix_addr(self, addr: Any) -> Any: ... + def set_socket_options(self, conn: socket) -> None: ... + def fix_addr(self, addr: _RetAddress) -> _RetAddress: ... def maintenance(self, now: int) -> None: ... def print_listen(self, format_str: str) -> None: ... def close(self) -> None: ... class TcpWSGIServer(BaseWSGIServer): def bind_server_socket(self) -> None: ... - def getsockname(self) -> tuple[str, tuple[str, int]]: ... + def getsockname(self) -> tuple[str, str]: ... def set_socket_options(self, conn: socket) -> None: ... if sys.platform != "win32": class UnixWSGIServer(BaseWSGIServer): def __init__( self, - application: Any, - map: Incomplete | None = ..., - _start: bool = ..., - _sock: Incomplete | None = ..., - dispatcher: Incomplete | None = ..., - adj: Adjustments | None = ..., - sockinfo: Incomplete | None = ..., - **kw: Any, + application: WSGIApplication, + map: _SocketMap | None = None, + _start: bool = True, + _sock: socket | None = None, + dispatcher: ThreadedTaskDispatcher | None = None, + adj: Adjustments | None = None, + sockinfo: tuple[int, int, int | None, _RetAddress] | None = None, + **kw: _AdjustmentsParams, ) -> None: ... def bind_server_socket(self) -> None: ... - def getsockname(self) -> tuple[str, tuple[str, int]]: ... - def fix_addr(self, addr: Any) -> tuple[str, None]: ... - def get_server_name(self, ip: Any) -> str: ... + def getsockname(self) -> tuple[str, str]: ... + def fix_addr(self, addr: _RetAddress) -> tuple[Literal["localhost"], None]: ... -WSGIServer: TcpWSGIServer +WSGIServer = TcpWSGIServer diff --git a/stubs/waitress/waitress/task.pyi b/stubs/waitress/waitress/task.pyi index 9cd2aeb3fbe8..837cd679fab3 100644 --- a/stubs/waitress/waitress/task.pyi +++ b/stubs/waitress/waitress/task.pyi @@ -1,6 +1,6 @@ -from _typeshed import Incomplete +from _typeshed import Unused from collections import deque -from collections.abc import Mapping, Sequence +from collections.abc import Callable, Mapping, Sequence from logging import Logger from threading import Condition, Lock from typing import Any @@ -9,19 +9,19 @@ from .channel import HTTPChannel from .utilities import Error rename_headers: Mapping[str, str] -hop_by_hop: frozenset[Any] +hop_by_hop: frozenset[str] class ThreadedTaskDispatcher: stop_count: int active_count: int logger: Logger queue_logger: Logger - threads: set[Any] + threads: set[int] queue: deque[Task] lock: Lock queue_cv: Condition thread_exit_cv: Condition - def start_new_thread(self, target: Any, args: Any) -> None: ... + def start_new_thread(self, target: Callable[[int], Unused], thread_no: int) -> None: ... def handler_thread(self, thread_no: int) -> None: ... def set_thread_count(self, count: int) -> None: ... def add_task(self, task: Task) -> None: ... @@ -57,15 +57,16 @@ class ErrorTask(Task): complete: bool status: str close_on_finish: bool - content_length: int + content_length: int | None def execute(self) -> None: ... class WSGITask(Task): - environ: Incomplete | None + # Environment dict union too complex + environ: dict[str, Any] | None response_headers: Sequence[tuple[str, str]] complete: bool status: str - content_length: int + content_length: int | None close_on_finish: bool def execute(self) -> None: ... - def get_environment(self) -> Any: ... + def get_environment(self) -> dict[str, Any]: ... diff --git a/stubs/waitress/waitress/trigger.pyi b/stubs/waitress/waitress/trigger.pyi index eae488ef6f91..ee986c7efb66 100644 --- a/stubs/waitress/waitress/trigger.pyi +++ b/stubs/waitress/waitress/trigger.pyi @@ -1,21 +1,22 @@ import sys +from _typeshed import Unused from collections.abc import Callable, Mapping from socket import socket from threading import Lock from typing import Literal -from waitress import wasyncore as wasyncore +from waitress import wasyncore class _triggerbase: kind: str | None lock: Lock - thunks: Callable[[None], None] + thunks: list[Callable[[None], None]] def readable(self) -> Literal[True]: ... def writable(self) -> Literal[False]: ... def handle_connect(self) -> None: ... def handle_close(self) -> None: ... def close(self) -> None: ... - def pull_trigger(self, thunk: Callable[[None], object] | None = None) -> None: ... + def pull_trigger(self, thunk: Callable[[None], Unused] | None = None) -> None: ... def handle_read(self) -> None: ... if sys.platform != "win32": diff --git a/stubs/waitress/waitress/utilities.pyi b/stubs/waitress/waitress/utilities.pyi index 1af73e6db6ff..9bf8434fc6d6 100644 --- a/stubs/waitress/waitress/utilities.pyi +++ b/stubs/waitress/waitress/utilities.pyi @@ -1,16 +1,16 @@ +from _typeshed import Unused from _typeshed.wsgi import StartResponse -from collections.abc import Iterator, Mapping, Sequence +from collections.abc import Iterable, Iterator, Mapping, Sequence from logging import Logger from re import Match, Pattern -from typing import Any logger: Logger queue_logger: Logger def find_double_newline(s: bytes) -> int: ... -def concat(*args: Any) -> str: ... -def join(seq: Any, field: str = " ") -> str: ... -def group(s: Any) -> str: ... +def concat(*args: str) -> str: ... +def join(seq: Iterable[str], field: str = " ") -> str: ... +def group(s: object) -> str: ... short_days: Sequence[str] long_days: Sequence[str] @@ -22,14 +22,14 @@ months: Sequence[str] monmap: Mapping[str, int] months_reg: str rfc822_date: str -rfc822_reg: Pattern[Any] +rfc822_reg: Pattern[str] -def unpack_rfc822(m: Match[Any]) -> tuple[int, int, int, int, int, int, int, int, int]: ... +def unpack_rfc822(m: Match[str]) -> tuple[int, int, int, int, int, int, int, int, int]: ... rfc850_date: str -rfc850_reg: Pattern[Any] +rfc850_reg: Pattern[str] -def unpack_rfc850(m: Match[Any]) -> tuple[int, int, int, int, int, int, int, int, int]: ... +def unpack_rfc850(m: Match[str]) -> tuple[int, int, int, int, int, int, int, int, int]: ... weekdayname: Sequence[str] monthname: Sequence[str] @@ -45,7 +45,7 @@ class Error: body: str def __init__(self, body: str) -> None: ... def to_response(self) -> tuple[str, Sequence[tuple[str, str]], str]: ... - def wsgi_response(self, environ: Any, start_response: StartResponse) -> Iterator[str]: ... + def wsgi_response(self, environ: Unused, start_response: StartResponse) -> Iterator[str]: ... class BadRequest(Error): code: int diff --git a/stubs/waitress/waitress/wasyncore.pyi b/stubs/waitress/waitress/wasyncore.pyi index 2f2e8e3ab198..facac6cbca0a 100644 --- a/stubs/waitress/waitress/wasyncore.pyi +++ b/stubs/waitress/waitress/wasyncore.pyi @@ -1,31 +1,27 @@ import sys -from collections.abc import Callable, Mapping +from _typeshed import ReadableBuffer +from collections.abc import Mapping from io import BytesIO from logging import Logger -from socket import socket -from typing import Any +from socket import _RetAddress, socket from typing_extensions import TypeAlias -from waitress import compat as compat, utilities as utilities - _Socket: TypeAlias = socket +_SocketMap: TypeAlias = Mapping[int, socket] -socket_map: Mapping[int, socket] -map: Mapping[int, socket] +socket_map: _SocketMap class ExitNow(Exception): ... def read(obj: dispatcher) -> None: ... def write(obj: dispatcher) -> None: ... def readwrite(obj: dispatcher, flags: int) -> None: ... -def poll(timeout: float = 0.0, map: Mapping[int, socket] | None = None) -> None: ... -def poll2(timeout: float = 0.0, map: Mapping[int, socket] | None = None) -> None: ... +def poll(timeout: float = 0.0, map: _SocketMap | None = None) -> None: ... +def poll2(timeout: float = 0.0, map: _SocketMap | None = None) -> None: ... poll3 = poll2 -def loop( - timeout: float = 30.0, use_poll: bool = False, map: Mapping[int, socket] | None = None, count: int | None = None -) -> None: ... +def loop(timeout: float = 30.0, use_poll: bool = False, map: _SocketMap | None = None, count: int | None = None) -> None: ... def compact_traceback() -> tuple[tuple[str, str, str], BaseException, BaseException, str]: ... class dispatcher: @@ -34,24 +30,25 @@ class dispatcher: accepting: bool connecting: bool closing: bool - addr: tuple[str, int] | None - ignore_log_types: frozenset[Any] + addr: _RetAddress | None + ignore_log_types: frozenset[str] logger: Logger - compact_traceback: Callable[[], tuple[tuple[str, str, str], BaseException, BaseException, str]] - socket: _Socket | None - def __init__(self, sock: _Socket | None = None, map: Mapping[int, _Socket] | None = None) -> None: ... - def add_channel(self, map: Mapping[int, _Socket] | None = None) -> None: ... - def del_channel(self, map: Mapping[int, _Socket] | None = None) -> None: ... + @staticmethod + def compact_traceback() -> tuple[tuple[str, str, str], BaseException, BaseException, str]: ... + socket: socket | None + def __init__(self, sock: _Socket | None = None, map: _SocketMap | None = None) -> None: ... + def add_channel(self, map: _SocketMap | None = None) -> None: ... + def del_channel(self, map: _SocketMap | None = None) -> None: ... family_and_type: tuple[int, int] def create_socket(self, family: int = ..., type: int = ...) -> None: ... - def set_socket(self, sock: _Socket, map: Mapping[int, _Socket] | None = None) -> None: ... + def set_socket(self, sock: _Socket, map: _SocketMap | None = None) -> None: ... def set_reuse_addr(self) -> None: ... def readable(self) -> bool: ... def writable(self) -> bool: ... def listen(self, num: int) -> None: ... - def bind(self, addr: tuple[str, int]) -> None: ... - def connect(self, address: tuple[str, int]) -> None: ... - def accept(self) -> tuple[_Socket, tuple[str, int]] | None: ... + def bind(self, addr: _RetAddress) -> None: ... + def connect(self, address: _RetAddress) -> None: ... + def accept(self) -> tuple[_Socket, _RetAddress] | None: ... def send(self, data: bytes, do_close: bool = True) -> int: ... def recv(self, buffer_size: int) -> bytes: ... def close(self) -> None: ... @@ -67,34 +64,34 @@ class dispatcher: def handle_write(self) -> None: ... def handle_connect(self) -> None: ... def handle_accept(self) -> None: ... - def handle_accepted(self, sock: _Socket, addr: Any) -> None: ... + def handle_accepted(self, sock: _Socket, addr: _RetAddress) -> None: ... def handle_close(self) -> None: ... class dispatcher_with_send(dispatcher): out_buffer: bytes - def __init__(self, sock: socket | None = None, map: Mapping[int, socket] | None = None) -> None: ... + def __init__(self, sock: _Socket | None = None, map: _SocketMap | None = None) -> None: ... def initiate_send(self) -> None: ... - handle_write: Callable[[], None] + handle_write = initiate_send def writable(self) -> bool: ... def send(self, data: bytes) -> None: ... # type: ignore[override] -def close_all(map: Mapping[int, socket] | None = None, ignore_all: bool = False) -> None: ... +def close_all(map: _SocketMap | None = None, ignore_all: bool = False) -> None: ... if sys.platform != "win32": class file_wrapper: fd: BytesIO def __init__(self, fd: BytesIO) -> None: ... def __del__(self) -> None: ... - def recv(self, *args: Any) -> bytes: ... - def send(self, *args: Any) -> bytes: ... - def getsockopt(self, level: int, optname: int, buflen: bool | None = ...) -> int: ... - read: Callable[..., bytes] - write: Callable[..., bytes] + def recv(self, length: int, /) -> bytes: ... + def send(self, data: ReadableBuffer, /) -> bytes: ... + def getsockopt(self, level: int, optname: int, buflen: bool | None = None) -> int: ... + read = recv + write = send def close(self) -> None: ... def fileno(self) -> BytesIO: ... class file_dispatcher(dispatcher): connected: bool - def __init__(self, fd: BytesIO, map: Mapping[int, _Socket] | None = ...) -> None: ... - socket: _Socket + def __init__(self, fd: BytesIO, map: _SocketMap | None = None) -> None: ... + socket: socket def set_file(self, fd: BytesIO) -> None: ... diff --git a/tests/README.md b/tests/README.md index ae48d19bcb0c..9826e9a58790 100644 --- a/tests/README.md +++ b/tests/README.md @@ -9,8 +9,6 @@ tests the stubs with [mypy](https://github.com/python/mypy/) stubs, guarding against accidental regressions. - `tests/check_typeshed_structure.py` checks that typeshed's directory structure and metadata files are correct. -- `tests/check_new_syntax.py` contains linter-like checks to ensure -that certain code conventions are followed. - `tests/stubtest_stdlib.py` checks standard library stubs against the objects at runtime. - `tests/stubtest_third_party.py` checks third-party stubs against the diff --git a/tests/check_new_syntax.py b/tests/check_new_syntax.py deleted file mode 100755 index 830d1f2e5e2f..000000000000 --- a/tests/check_new_syntax.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 - -from __future__ import annotations - -import ast -import sys -from itertools import chain -from pathlib import Path - - -def check_new_syntax(tree: ast.AST, path: Path, stub: str) -> list[str]: - errors: list[str] = [] - - class IfFinder(ast.NodeVisitor): - def visit_If(self, node: ast.If) -> None: - if ( - isinstance(node.test, ast.Compare) - and ast.unparse(node.test).startswith("sys.version_info < ") - and node.orelse - and not (len(node.orelse) == 1 and isinstance(node.orelse[0], ast.If)) # elif statement (#6728) - ): - new_syntax = "if " + ast.unparse(node.test).replace("<", ">=", 1) - errors.append( - f"{path}:{node.lineno}: When using if/else with sys.version_info, " - f"put the code for new Python versions first, e.g. `{new_syntax}`" - ) - self.generic_visit(node) - - IfFinder().visit(tree) - return errors - - -def main() -> None: - errors: list[str] = [] - for path in chain(Path("stdlib").rglob("*.pyi"), Path("stubs").rglob("*.pyi")): - with open(path, encoding="UTF-8") as f: - stub = f.read() - tree = ast.parse(stub) - errors.extend(check_new_syntax(tree, path, stub)) - - if errors: - print("\n".join(errors)) - sys.exit(1) - - -if __name__ == "__main__": - assert sys.version_info >= (3, 9), "Python 3.9+ is required to run this test" - main() diff --git a/tests/stubtest_third_party.py b/tests/stubtest_third_party.py index e2e27fcafa81..7fbd940e9773 100755 --- a/tests/stubtest_third_party.py +++ b/tests/stubtest_third_party.py @@ -134,11 +134,11 @@ def run_stubtest( print_error("fail\n") print_divider() - print("Commands run:") + print("Commands run:", file=sys.stderr) print_commands(dist, pip_cmd, stubtest_cmd, mypypath) print_divider() - print("Command output:\n") + print("Command output:\n", file=sys.stderr) print_command_output(e) print_divider() diff --git a/tests/utils.py b/tests/utils.py index 2bd58d632cd3..9ed68f90c16f 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -41,19 +41,19 @@ def strip_comments(text: str) -> str: def print_command(cmd: str | Iterable[str]) -> None: if not isinstance(cmd, str): cmd = " ".join(cmd) - print(colored(f"Running: {cmd}", "blue")) + print(colored(f"Running: {cmd}", "blue"), file=sys.stderr) def print_error(error: str, end: str = "\n", fix_path: tuple[str, str] = ("", "")) -> None: error_split = error.split("\n") old, new = fix_path for line in error_split[:-1]: - print(colored(line.replace(old, new), "red")) - print(colored(error_split[-1], "red"), end=end) + print(colored(line.replace(old, new), "red"), file=sys.stderr) + print(colored(error_split[-1], "red"), end=end, file=sys.stderr) def print_success_msg() -> None: - print(colored("success", "green")) + print(colored("success", "green"), file=sys.stderr) def print_divider() -> None: @@ -61,7 +61,9 @@ def print_divider() -> None: This can be useful to divide terminal output into separate sections. """ - print("*" * 70) + print(file=sys.stderr) + print("*" * 70, file=sys.stderr) + print(file=sys.stderr) # ====================================================================