summary refs log tree commit diff
path: root/changelog.d/15604.misc
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2023-05-16 12:19:46 -0500
committerGitHub <noreply@github.com>2023-05-16 12:19:46 -0500
commitc51d2e6199a901113f2dabeb64fc64b015751988 (patch)
tree247fbf603dfa78a1bf5e00fc8b13f0107e3d49e0 /changelog.d/15604.misc
parentTweak changelog (diff)
downloadsynapse-c51d2e6199a901113f2dabeb64fc64b015751988.tar.xz
Fix subscriptable type usage in Python <3.9 (#15604)
Fix the following `mypy` errors when running `mypy` with Python 3.7:
```
synapse/storage/controllers/stats.py:58: error: "Counter" is not subscriptable, use "typing.Counter" instead  [misc]

tests/test_state.py:267: error: "dict" is not subscriptable, use "typing.Dict" instead  [misc]
```

Part of https://github.com/matrix-org/synapse/issues/15603

In Python 3.9, `typing` is deprecated and the types are subscriptable (generics) by default, https://peps.python.org/pep-0585/#implementation
Diffstat (limited to 'changelog.d/15604.misc')
-rw-r--r--changelog.d/15604.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/15604.misc b/changelog.d/15604.misc
new file mode 100644
index 0000000000..92d1d600bc
--- /dev/null
+++ b/changelog.d/15604.misc
@@ -0,0 +1 @@
+Fix subscriptable type usage in Python <3.9.