Skip to content

Commit

Permalink
ignore kw_only on Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Feb 5, 2025
1 parent 2d38751 commit 48bd095
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/h2/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from __future__ import annotations

import binascii
import sys
from dataclasses import dataclass
from typing import TYPE_CHECKING

Expand All @@ -23,6 +24,12 @@
from .errors import ErrorCodes


if sys.version_info < (3, 10): # pragma: no cover
kw_only: dict[str, bool] = {}
else: # pragma: no cover
kw_only = {"kw_only": True}


class Event:
"""
Base class for h2 events.
Expand Down Expand Up @@ -293,7 +300,7 @@ def __repr__(self) -> str:
)


@dataclass(kw_only=True)
@dataclass(**kw_only)
class WindowUpdated(Event):
"""
The WindowUpdated event is fired whenever a flow control window changes
Expand Down

0 comments on commit 48bd095

Please sign in to comment.