sorgerlab / indra

INDRA (Integrated Network and Dynamical Reasoning Assembler) is an automated model assembly system interfacing with NLP systems and databases to collect knowledge, and through a process of assembly, produce causal graphs and dynamical models.
http://indra.bio
BSD 2-Clause "Simplified" License
171 stars 65 forks source link

Replace `inspect.getargspec` with `inspect.getfullargspec` (or possibly `inspect.signature`) #1445

Closed kkaris closed 2 months ago

kkaris commented 2 months ago

inspect.getargspec is deprecated since 3.0(!), was removed in 3.11 and is replaced by inspect.getfullargspec. inspect.signature is also mentioned as the python 3 preferred way to deal with introspection, but inspect.getfullargspec seems to be safe from removal (for now) so easiest is to just replace it.

This affects the pipeline module: https://github.com/sorgerlab/indra/blob/master/indra/pipeline/pipeline.py#L323

See the Python 3.10 docs for the last version mentioning of inspect.getargspec: https://docs.python.org/3.10/library/inspect.html#inspect.getargspec