Skip to content

Should QuicConfiguration.load_cert_chain allow str and not just PathLike? #568

@gsnedders

Description

@gsnedders

Currently:

def load_cert_chain(
self,
certfile: PathLike,
keyfile: Optional[PathLike] = None,
password: Optional[Union[bytes, str]] = None,
) -> None:

Given this is just passed into open, I'd have expected the type signature to allow something like open's argument:

FileDescriptorOrPath: TypeAlias = int | StrOrBytesPath

Or, potentially more likely, just StrOrBytesPath:

StrOrBytesPath: TypeAlias = str | bytes | PathLike[str] | PathLike[bytes]  # stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions