STINNER Victor <vstin...@python.org> added the comment:

Mark: Can you please document your change on types.CodeType? In:

* https://docs.python.org/dev/library/types.html#types.CodeType
* https://docs.python.org/dev/whatsnew/3.11.html

The change broke the Genshi project:
https://github.com/edgewall/genshi/issues/43

in this Genshi function:

    def build_code_chunk(code, filename, name, lineno):
        params =  [0, code.co_nlocals, code.co_kwonlyargcount,
                  code.co_stacksize, code.co_flags | 0x0040,
                  code.co_code, code.co_consts, code.co_names,
                  code.co_varnames, filename, name, lineno,
                  code.co_lnotab, (), ()]
        if hasattr(code, "co_posonlyargcount"):
            # PEP 570 added "positional only arguments"
            params.insert(2, code.co_posonlyargcount)
        return CodeType(*params)

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to