types.CodeType has a new parameter in the second position of the constructor (posonlyargcount) to support positional-only arguments defined in PEP 570. The first argument (argcount) now represents the total number of positional arguments (including positional-only arguments). The new replace() method of types.CodeType can be used to make the code future-proof.
Found similar issue: https://github.com/Suor/whatever/issues/7
Also, might be helpful: https://docs.python.org/3/whatsnew/3.8.html