Context: Technical leverage is the ratio between dependencies (other people's code) and own codes of a software package. It has been shown to be useful to characterize the Java ecosystem and there are also studies on the NPM ecosystem available.Objective: By using this metric we aim to analyze the Python ecosystem, how it evolves, and how secure it is, as a developer would perceive it when deciding to adopt or update (or not) a library.Method:We collect a dataset of the top 600 Python packages (corresponding to 21,205 versions) and used a number of innovative approaches for its analysis including the use of a two-part statistical model to deal with excess zeros, a mathematical closed formulation to estimate vulnerabilities that we confirm with bootstrapping on the actual dataset.Results: Small Python package versions have a median technical leverage of 6.9x their own code, while bigger package versions rely on dependencies code a tenth of their own (median leverage of 0.1). In terms of evolution, Python packages tend to have stable technical leverage through their evolution (once highly leveraged, always leveraged). On security, the chance of getting a safe package version when choosing a package is actually better than previous research has shown based on the ratio of safe package versions in the ecosystem.Coclusions: Python packages ship a lot of other people's code and tend to keep doing so. However, developers will have a good chance to choose a safe package version.

Technical leverage analysis in the Python ecosystem / Paramitha, R.; Massacci, F.. - In: EMPIRICAL SOFTWARE ENGINEERING. - ISSN 1382-3256. - ELETTRONICO. - 28:(2023), pp. 13901-13931. [10.1007/s10664-023-10355-2]

Technical leverage analysis in the Python ecosystem

Paramitha R.
Primo
;
Massacci F.
Ultimo
2023-01-01

Abstract

Context: Technical leverage is the ratio between dependencies (other people's code) and own codes of a software package. It has been shown to be useful to characterize the Java ecosystem and there are also studies on the NPM ecosystem available.Objective: By using this metric we aim to analyze the Python ecosystem, how it evolves, and how secure it is, as a developer would perceive it when deciding to adopt or update (or not) a library.Method:We collect a dataset of the top 600 Python packages (corresponding to 21,205 versions) and used a number of innovative approaches for its analysis including the use of a two-part statistical model to deal with excess zeros, a mathematical closed formulation to estimate vulnerabilities that we confirm with bootstrapping on the actual dataset.Results: Small Python package versions have a median technical leverage of 6.9x their own code, while bigger package versions rely on dependencies code a tenth of their own (median leverage of 0.1). In terms of evolution, Python packages tend to have stable technical leverage through their evolution (once highly leveraged, always leveraged). On security, the chance of getting a safe package version when choosing a package is actually better than previous research has shown based on the ratio of safe package versions in the ecosystem.Coclusions: Python packages ship a lot of other people's code and tend to keep doing so. However, developers will have a good chance to choose a safe package version.
2023
Paramitha, R.; Massacci, F.
Technical leverage analysis in the Python ecosystem / Paramitha, R.; Massacci, F.. - In: EMPIRICAL SOFTWARE ENGINEERING. - ISSN 1382-3256. - ELETTRONICO. - 28:(2023), pp. 13901-13931. [10.1007/s10664-023-10355-2]
File in questo prodotto:
File Dimensione Formato  
s10664-023-10355-2.pdf

accesso aperto

Tipologia: Post-print referato (Refereed author’s manuscript)
Licenza: Creative commons
Dimensione 2.89 MB
Formato Adobe PDF
2.89 MB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11572/399033
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact