Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Usage of Python 2 __metaclass__ #7932

Closed
auscompgeek opened this issue Jul 22, 2020 · 1 comment · Fixed by #8326
Closed

Usage of Python 2 __metaclass__ #7932

auscompgeek opened this issue Jul 22, 2020 · 1 comment · Fixed by #8326
Labels
Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)

Comments

@auscompgeek
Copy link
Contributor

There are 7 instances of __metaclass__ in Synapse, which does nothing in Python 3.
These should probably be changed to use class Foo(metaclass=abc.ABCMeta).

synapse/handlers/room_member.py
48:    __metaclass__ = abc.ABCMeta

synapse/server.py
141:    __metaclass__ = abc.ABCMeta

synapse/replication/http/_base.py
77:    __metaclass__ = abc.ABCMeta

synapse/storage/data_stores/main/account_data.py
41:    __metaclass__ = abc.ABCMeta

synapse/storage/data_stores/main/receipts.py
41:    __metaclass__ = abc.ABCMeta

synapse/storage/data_stores/main/push_rule.py
80:    __metaclass__ = abc.ABCMeta

synapse/storage/data_stores/main/stream.py
251:    __metaclass__ = abc.ABCMeta
@auscompgeek
Copy link
Contributor Author

Probably also worth noting that flake8-bugbear lints for this.

@clokep clokep added Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution maintenance z-p3 (Deprecated Label) labels Jul 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Z-Help-Wanted We know exactly how to fix this issue, and would be grateful for any contribution z-p3 (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants