Skip to content
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

Remove fileno from TLSSocket API #58

Merged
merged 1 commit into from
Jun 25, 2024
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
5 changes: 0 additions & 5 deletions src/tlslib/tlslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,6 @@ def getpeercert(self) -> bytes | None:
def getpeername(self) -> tuple[str | None, int]:
"""Return the remote address to which the socket is connected."""

def fileno(self) -> int:
"""Return the socket’s file descriptor (a small integer), or -1 on failure."""

raise NotImplementedError("File descriptors from sockets not supported.")

@property
@abstractmethod
def context(self) -> ClientContext | ServerContext:
Expand Down
3 changes: 0 additions & 3 deletions test/test_tlslib.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ def test_not_implemented(self):
with self.assertRaises(NotImplementedError):
tlslib.PrivateKey.from_id(b"")

with self.assertRaises(NotImplementedError):
tlslib.TLSSocket.fileno(tlslib.TLSSocket)

def test_empty_protocols(self):
tlslib.TrustStore.from_buffer(b"")
tlslib.TrustStore.from_file("")
Expand Down