mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Use more portable syntax using attrs package.
Newer syntax attr.ib(factory=dict) is just a syntactic sugar for attr.ib(default=attr.Factory(dict)) It was introduced in newest version of attrs package (18.1.0) and doesn't work with older versions. We should either require minimum version of attrs to be 18.1.0, or use older (slightly more verbose) syntax. Requiring newest version is not a good solution because Linux distributions may have older version of attrs (17.4.0 in Fedora 28), and requiring to build (and package) newer version just to use newer syntactic sugar in only one test is just too much. It's much better to fix that test to use older syntax. Signed-off-by: Oleg Girko <ol@infoserver.lv>
This commit is contained in:
parent
395fa8d1fd
commit
6c1ec5a1bd
@ -22,7 +22,7 @@ class FakeChannel(object):
|
|||||||
wire).
|
wire).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
result = attr.ib(factory=dict)
|
result = attr.ib(default=attr.Factory(dict))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def json_body(self):
|
def json_body(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user