arrow
Return

Characterizing and detecting Python version incompatibilities caused by inconsistent version specifications☆

delete2025-04-01
delete0
PRE
AI
S
S. Li
H
Haocheng Gao
陈伟 (Wei Chen) *
Y
Yi Li *
H
Haoxiang Tian
C
Chengwei Liu
D
Dan Ye
DOI:10.1016/j.jss.2025.112337delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Python interpreter serves as the foundation for developing Python projects. Configuring compatible Python version is essential for packaging and reusing third-party libraries (TPLs) in the Python ecosystem. When the Python distribution version range constraint of a third-party library is incorrectly declared, it may lead to installation failures or runtime errors when the library is used by a client project. We call such errors Python Distribution Version Specification Error (PDSpecErr). PDSpecErrs are not studied adequately and there still lacks a method to guarantee the correctness of Python version specifications. To combat PDSpecErrs and mitigate their adverse impacts on downstream applications, we conducted the first exploratory study on 3000 real-world TPLs to investigate PDSpecErrs about their prevalence, symptom categories, and diagnostic patterns. Based on the comprehensive study, we designed and implemented PyChecker, a tool to automatically detect PDSpecErrs in TPLs, locate root causes, and generate fixing solutions. We evaluated PyChecker on 3000 TPL releases and PyChecker detected 842 PDSpecErrs, reporting their root causes and recommending fixing solutions. We have reported 52 PDSpecErrs to the concerned developers. So far, 32 issues have been confirmed and fixed according to our suggestions.
Keywords:
Python library
Python version incompatibility
Exploratory study

Journal

Journal of Systems and Software cover
Journal of Systems and Software
IF:
4.1
Papers:
5.4K
Citations:
8.4K

Organization

C
chinese academy of sciences
Scholars:
55.9W
Papers: 44.7W
Citations: 704