Closed qiyunzhu closed 7 years ago
the warnings module behaves slightly differently in Python 3.6, comparing to 3.5 and 2.7. Specifically, the magic command
warnings
warnings.formatwarning = lambda message, *args: str(message)
not longer works. It triggers an error:
<lambda>() got an unexpected keyword argument 'line'
To solve the problem, one has to list all arguments of formatwarning:
formatwarning
warnings.formatwarning = lambda message, category, filename, lineno, line: str(message)
Coverage remained the same at 100.0% when pulling 2cba84c0b96a7af2ca57ed4d4393f40ce900009b on qiyunzhu:bugfix into 0257fe1e097a5c0f86ba90d0e14e831f90c5427a on biocore:master.
the
warnings
module behaves slightly differently in Python 3.6, comparing to 3.5 and 2.7. Specifically, the magic commandnot longer works. It triggers an error:
To solve the problem, one has to list all arguments of
formatwarning
: