Closed colinappnovation closed 4 years ago
Can anybody accept this, please?
@BertrandBordage Please, accept this, we need in our project. Thanks
@mariod3w Fwiw, I simply added this to my deploy script:
sed -i "s/from django.utils.six import wraps/from six import wraps/" /path/to/venv/site-packages/wagtail_react_streamfield/monkey_patch.py
imho, the import should be from functools import wraps
since this package requires Wagtail >= 2.6 which only supports Python 3.5+ and six.wraps does the same for Python >= 3.4
Other than that đź‘Ť for merge and new version release
I’ll merge this tomorrow with @zerolab’s suggestion to use from functools import wraps
, unless someone can think of a way why this is bad idea that has escaped us.
Judging by the code it seems pretty clear that there is no reason to use six
considering our support targets, https://github.com/benjaminp/six/blob/c0be8815d13df45b6ae471c4c436cce8c192245d/six.py#L836-L837.
FYI I’ve set up a #react-streamfield channel on the Wagtail Slack if anyone wants to discuss maintenance of this project.
Thank you all, this is now released on PyPI as v1.3.6. It’s my first time publishing a release on this project so would appreciate if a few of you @colinappnovation @andsimakov @mariod3w @nkuttler tried it out on your projects and reported back.
I’ve also tried it out on https://github.com/thibaudcolas/wagtail_react_streamfield_demo but this is obviously just a toy project set up in a hurry.
As others have noticed, using the Streamfield and django >= 3 no longer supports django.utils.six.
Solves: https://github.com/wagtail/wagtail-react-streamfield/issues/55