An Empirical Study on Package-Level Deprecation in Python Ecosystem
Zhiqing Zhong, Shilin He, Haoxuan Wang, Boxi Yu, Haowen Yang, Pinjia He
TL;DR
The paper tackles the lack of a formal package-level deprecation mechanism in the Python ecosystem by conducting a mixed-method study using PyPI and GitHub data, a dependency-network analysis, regression modeling, and developer/user surveys. It demonstrates that while deprecation announcements can reduce downstream maintenance burden and unresolved issues, the vast majority of inactive packages do not publish explicit deprecations, and most users remain unaware of deprecations unless notified. The work provides actionable insights, including the value of integrating deprecation signals with code hosting platforms, introducing finer-grained risk statuses, and supporting handover and migration processes, supported by a large, publicly available dataset of 106,323 packages. Overall, the study lays the groundwork for a robust, developer-friendly deprecation mechanism in Python and guides future ecosystem-wide practices with empirical evidence and practical recommendations.
Abstract
Open-source software (OSS) plays a crucial role in modern software development. Utilizing OSS code can greatly accelerate software development, reduce redundancy, and enhance reliability. Python, a widely adopted programming language, is renowned for its extensive and diverse third-party package ecosystem. However, a significant number of OSS packages within the Python ecosystem are in poor maintenance, leading to potential risks in functionality and security. Consequently, it is essential to establish a deprecation mechanism to assist package developers and users in managing packages effectively. To facilitate the establishment of the package-level deprecation mechanism, this paper presents a mixed-method empirical study, including data analysis and surveys. We investigate the current practices of announcing, receiving, and handling package-level deprecation in the Python ecosystem. We also assess the benefits of having deprecation announcements for inactively maintained packages. Furthermore, we investigate the challenges faced by package developers and users and their expectations for future deprecation practices. Our findings reveal that 75.4% of inactive package developers have no intention of releasing deprecation declarations for various reasons, while 89.5% of users express a desire to be notified about the deprecation, highlighting a gap between developers and users; in many cases, no alternative solutions are available when deprecation occurs, emphasizing the need to explore practical approaches that enable seamless package handover and require less maintenance effort. Our work aims to enhance the understanding of existing package-level deprecation patterns within the Python OSS realm and facilitate the development of deprecation practices for the Python community in the future.
