trailofbits / fickling

A Python pickling decompiler and static analyzer
GNU Lesser General Public License v3.0
417 stars 48 forks source link

Not python3.12 compatible due to distutils deprecation. #102

Closed jace0x21 closed 6 months ago

jace0x21 commented 6 months ago

On python3.12, import fickling leads to ModuleNotFoundError: No module named 'distutils'

distutils has been deprecated in python3.12.

distutils.sysconfig.get_python_lib specifically is called as having no direct replacement and is used in fickle.py to determine if a module is in the standard library or not.

woodruffw commented 6 months ago

Thanks for the report @jace0x21!

Looks like this is the primary offending section:

https://github.com/trailofbits/fickling/blob/a44456ebe07eac518adee1f83d718ca01b75cf76/fickling/fickle.py#L60-L69

I believe we can straightforwardly replace this with stdlib-list.