Skip to content

Commit 7dee8ae

Browse files
[http.cookiejar] Accept more parameter types (#16026)
The Cookie's `__init__` method accepts a `str` for both the `version` and the `expires` parameters, as well as a `float` for `expires`.
1 parent 83c2518 commit 7dee8ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

stdlib/http/cookiejar.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Cookie:
129129
domain_initial_dot: bool
130130
def __init__(
131131
self,
132-
version: int | None,
132+
version: int | str | None,
133133
name: str,
134134
value: str | None, # undocumented
135135
port: str | None,
@@ -140,7 +140,7 @@ class Cookie:
140140
path: str,
141141
path_specified: bool,
142142
secure: bool,
143-
expires: int | None,
143+
expires: float | str | None,
144144
discard: bool,
145145
comment: str | None,
146146
comment_url: str | None,

0 commit comments

Comments
 (0)