fabulaws
fabulaws copied to clipboard
Pickling Error On Python 3.8
When trying to do a deploy (fab deploy_serial:<my-project-name>,<my-environment-name>
) from within a virtual environment with Python3.8.3, I get the following pickling error: AttributeError: Can't pickle local object '_execute.<locals>.inner'
.
Looking deeper, this seems to be caused by fabric having a function _execute()
that defines a nested function named inner()
(https://github.com/mathiasertl/fabric/blob/master/fabric/tasks.py#L236), which is not picklable.
Some more information:
- the
_execute()
function named above has had a nested function for years, and this didn't cause deployment issues - running the same deployment command in a virtual environment with Python3.7.8 succeeds
This leads me to suspect that something about Python3.8 causes this pickling error.
http://gael-varoquaux.info/programming/decoration-in-python-done-right-decorating-and-pickling.html