Skip to content

Commit

Permalink
One more python 3.10 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jun 12, 2021
1 parent 2a563ec commit bc6a2ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mechanize/_clientcookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ def __getitem__(self, i):


try:
from http.cookiejar import NETSCAPE_MAGIC_RGX
from http.cookiejar import NETSCAPE_MAGIC_RGX, NETSCAPE_HEADER_TEXT
except ImportError: # python < 3.10
NETSCAPE_MAGIC_RGX = MCJ.magic_re
NETSCAPE_HEADER_TEXT = MCJ.header
else:
MCJ.header = NETSCAPE_HEADER_TEXT # needed for tests


class MozillaCookieJar(MCJ):
Expand Down

0 comments on commit bc6a2ca

Please # to comment.