biocore / wetlab-assistant

BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

warnings module new behavior in Python 3.6 #18

Closed qiyunzhu closed 7 years ago

qiyunzhu commented 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.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:

warnings.formatwarning = lambda message, category, filename, lineno, line: str(message)
coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 2cba84c0b96a7af2ca57ed4d4393f40ce900009b on qiyunzhu:bugfix into 0257fe1e097a5c0f86ba90d0e14e831f90c5427a on biocore:master.