[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Hai Shi
Change by Hai Shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Diego Ramirez
Change by Diego Ramirez : -- nosy: +DiddiLeija ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: See also bpo-42839 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
Petr Viktorin added the comment: How to fix this? I guess: * co_filename should be converted to an actual str, or reject subclasses with an exception * for co_consts, the [marshal docs] could be updated to add code objects to "containers". The [code docs] already say co_consts "is a tuple co

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
Change by Petr Viktorin : Added file: https://bugs.python.org/file50269/reproducer_compileall.py ___ Python tracker ___ ___ Python-bugs-list

[issue45127] Code objects can contain unmarshallable objects

2021-09-07 Thread Petr Viktorin
New submission from Petr Viktorin : The `replace` method of `code` allows setting e.g. * co_filename to a subclass of str * co_consts to an arbitrary tuple and possibly more weird cases. This makes code objects unmarshallable. One way to create such a code object is to call `compileall.compile