Skip to content

Commit f9a68e6

Browse files
authored
get CI back to green (#1433)
1 parent 62a0f50 commit f9a68e6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- {VERSION: "pypy-3.10", TOXENV: "pypy3"}
2323
- {VERSION: "3.11", TOXENV: "py311-useWheel", OS: "windows-2022" }
2424
# -cryptographyMain
25-
- {VERSION: "3.7", TOXENV: "py37-cryptographyMain"}
2625
- {VERSION: "3.8", TOXENV: "py38-cryptographyMain"}
2726
- {VERSION: "3.9", TOXENV: "py39-cryptographyMain"}
2827
- {VERSION: "3.10", TOXENV: "py310-cryptographyMain"}

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ show_missing = true
1919
[tool.mypy]
2020
warn_unused_configs = true
2121
strict = true
22+
strict_bytes = true
2223

2324
[[tool.mypy.overrides]]
2425
module = "OpenSSL.*"

src/OpenSSL/SSL.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
SSL_CB_HANDSHAKE_START: int = _lib.SSL_CB_HANDSHAKE_START
277277
SSL_CB_HANDSHAKE_DONE: int = _lib.SSL_CB_HANDSHAKE_DONE
278278

279+
_Buffer = typing.Union[bytes, bytearray, memoryview]
279280
_T = TypeVar("_T")
280281

281282

@@ -2210,7 +2211,7 @@ def pending(self) -> int:
22102211
"""
22112212
return _lib.SSL_pending(self._ssl)
22122213

2213-
def send(self, buf: bytes, flags: int = 0) -> int:
2214+
def send(self, buf: _Buffer, flags: int = 0) -> int:
22142215
"""
22152216
Send data on the connection. NOTE: If you get one of the WantRead,
22162217
WantWrite or WantX509Lookup exceptions on this, you have to call the
@@ -2238,7 +2239,7 @@ def send(self, buf: bytes, flags: int = 0) -> int:
22382239

22392240
write = send
22402241

2241-
def sendall(self, buf: bytes, flags: int = 0) -> int:
2242+
def sendall(self, buf: _Buffer, flags: int = 0) -> int:
22422243
"""
22432244
Send "all" data on the connection. This calls send() repeatedly until
22442245
all data is sent. If an error occurs, it's impossible to tell how much
@@ -2370,7 +2371,7 @@ def bio_read(self, bufsiz: int) -> bytes:
23702371

23712372
return _ffi.buffer(buf, result)[:]
23722373

2373-
def bio_write(self, buf: bytes) -> int:
2374+
def bio_write(self, buf: _Buffer) -> int:
23742375
"""
23752376
If the Connection was created with a memory BIO, this method can be
23762377
used to add bytes to the read end of that memory BIO. The Connection

0 commit comments

Comments
 (0)