Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use StrOrBytesPath
  • Loading branch information
donbarbos committed Jan 11, 2026
commit 24e1b9c1139d159a4b3095c7afe09860775b6582
10 changes: 5 additions & 5 deletions stdlib/ftplib.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from _typeshed import SupportsRead, SupportsReadline
from _typeshed import StrOrBytesPath, SupportsRead, SupportsReadline
from collections.abc import Callable, Iterable, Iterator
from socket import socket
from ssl import SSLContext
Expand Down Expand Up @@ -144,17 +144,17 @@ class FTP_TLS(FTP):
user: str = "",
passwd: str = "",
acct: str = "",
keyfile: str | None = None,
certfile: str | None = None,
keyfile: StrOrBytesPath | None = None,
certfile: StrOrBytesPath | None = None,
context: SSLContext | None = None,
timeout: float | None = ...,
source_address: tuple[str, int] | None = None,
*,
encoding: str = "utf-8",
) -> None: ...
ssl_version: int
keyfile: str | None
certfile: str | None
keyfile: StrOrBytesPath | None
certfile: StrOrBytesPath | None
context: SSLContext
def login(self, user: str = "", passwd: str = "", acct: str = "", secure: bool = True) -> str: ...
def auth(self) -> str: ...
Expand Down
10 changes: 5 additions & 5 deletions stdlib/http/client.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import io
import ssl
import sys
import types
from _typeshed import MaybeNone, ReadableBuffer, SupportsRead, SupportsReadline, WriteableBuffer
from _typeshed import MaybeNone, ReadableBuffer, StrOrBytesPath, SupportsRead, SupportsReadline, WriteableBuffer
from collections.abc import Callable, Iterable, Iterator, Mapping
from email._policybase import _MessageT
from socket import socket
Expand Down Expand Up @@ -243,17 +243,17 @@ class HTTPSConnection(HTTPConnection):
self,
host: str,
port: int | None = None,
key_file: str | None = None,
cert_file: str | None = None,
key_file: StrOrBytesPath | None = None,
cert_file: StrOrBytesPath | None = None,
timeout: float | None = ...,
source_address: tuple[str, int] | None = None,
*,
context: ssl.SSLContext | None = None,
check_hostname: bool | None = None,
blocksize: int = 8192,
) -> None: ...
key_file: str | None
cert_file: str | None
key_file: StrOrBytesPath | None
cert_file: StrOrBytesPath | None

class HTTPException(Exception): ...

Expand Down
11 changes: 5 additions & 6 deletions stdlib/imaplib.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
import sys
import time
from _typeshed import ReadableBuffer, SizedBuffer, Unused
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, Unused
from builtins import list as _list # conflicts with a method named "list"
from collections.abc import Callable, Generator
from datetime import datetime
Expand Down Expand Up @@ -120,9 +120,6 @@ if sys.version_info >= (3, 14):
def burst(self, interval: float = 0.1) -> Generator[tuple[str, float | None]]: ...

class IMAP4_SSL(IMAP4):
if sys.version_info < (3, 12):
keyfile: str
certfile: str
if sys.version_info >= (3, 12):
def __init__(
self, host: str = "", port: int = 993, *, ssl_context: SSLContext | None = None, timeout: float | None = None
Expand All @@ -141,11 +138,13 @@ class IMAP4_SSL(IMAP4):
self,
host: str = "",
port: int = 993,
keyfile: str | None = None,
certfile: str | None = None,
keyfile: StrOrBytesPath | None = None,
certfile: StrOrBytesPath | None = None,
ssl_context: SSLContext | None = None,
timeout: float | None = None,
) -> None: ...
keyfile: StrOrBytesPath | None
certfile: StrOrBytesPath | None
sslobj: SSLSocket
if sys.version_info >= (3, 14):
@property
Expand Down
7 changes: 5 additions & 2 deletions stdlib/poplib.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import socket
import ssl
import sys
from _typeshed import StrOrBytesPath
from builtins import list as _list # conflicts with a method named "list"
from re import Pattern
from typing import Any, BinaryIO, Final, NoReturn, overload
Expand Down Expand Up @@ -71,11 +72,13 @@ class POP3_SSL(POP3):
self,
host: str,
port: int = 995,
keyfile: str | None = None,
certfile: str | None = None,
keyfile: StrOrBytesPath | None = None,
certfile: StrOrBytesPath | None = None,
timeout: float = ...,
context: ssl.SSLContext | None = None,
) -> None: ...
keyfile: StrOrBytesPath | None
certfile: StrOrBytesPath | None
# "context" is actually the last argument,
# but that breaks LSP and it doesn't really matter because all the arguments are ignored
def stls(self, context: Any = None, keyfile: Any = None, certfile: Any = None) -> NoReturn: ...
12 changes: 6 additions & 6 deletions stdlib/smtplib.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
from _socket import _Address as _SourceAddress
from _typeshed import ReadableBuffer, SizedBuffer
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
from collections.abc import Sequence
from email.message import Message as _Message
from re import Pattern
Expand Down Expand Up @@ -139,7 +139,7 @@ class SMTP:
"removed in Python 3.12. Use `context` parameter instead."
)
def starttls(
self, keyfile: str | None = None, certfile: str | None = None, context: SSLContext | None = None
self, keyfile: StrOrBytesPath | None = None, certfile: StrOrBytesPath | None = None, context: SSLContext | None = None
) -> _Reply: ...

def sendmail(
Expand Down Expand Up @@ -196,14 +196,14 @@ class SMTP_SSL(SMTP):
host: str = "",
port: int = 0,
local_hostname: str | None = None,
keyfile: str | None = None,
certfile: str | None = None,
keyfile: StrOrBytesPath | None = None,
certfile: StrOrBytesPath | None = None,
timeout: float = ...,
source_address: _SourceAddress | None = None,
context: SSLContext | None = None,
) -> None: ...
keyfile: str | None
certfile: str | None
keyfile: StrOrBytesPath | None
certfile: StrOrBytesPath | None

LMTP_PORT: Final = 2003

Expand Down
Loading