ABSTRACT
In this paper, we present the first exploratory study of deprecated Python library APIs to understand the status quo of API deprecation in the realm of Python libraries. Specifically, we aim to comprehend how deprecated library APIs are declared and documented in practice by their maintainers, and how library users react to them. By thoroughly looking into six reputed Python libraries and 1,200 GitHub projects, we experimentally observe that API deprecation is poorly handled by library contributors, which subsequently introduce difficulties for Python developers to resolve the usage of deprecated library APIs. This empirical evidence suggests that our community should take immediate actions to appropriately handle the deprecation of Python library APIs.
Supplemental Material
- [n.d.]. 5. The import systemÂű. https://docs.python.org/3/reference/import.htmlGoogle Scholar
- Miltiadis Allamanis, Earl T Barr, Christian Bird, and Charles Sutton. 2015. Suggesting accurate method and class names. In Proceedings of the 2015 10th Joint Meeting on Foundations of Software Engineering. 38-49.Google ScholarDigital Library
- Miltiadis Allamanis, Hao Peng, and Charles Sutton. 2016. A convolutional attention network for extreme summarization of source code. In International conference on machine learning. 2091-2100.Google Scholar
- Sebastian Baltes, Lorik Dumani, Christoph Treude, and Stephan Diehl. 2018. SOTorrent: reconstructing and analyzing the evolution of stack overflow posts. In Proceedings of the 15th International Conference on Mining Software Repositories. 319-330. https://doi.org/10.1145/3196398.3196430 Google ScholarDigital Library
- Gabriele Bavota, Rocco Oliveto, Malcom Gethers, Denys Poshyvanyk, and Andrea De Lucia. 2013. Methodbook: Recommending move method refactorings via relational topic models. IEEE Transactions on Software Engineering 40, 7 ( 2013 ), 671-694.Google Scholar
- Gleison Brito, Andre Hora, Marco Tulio Valente, and Romain Robbes. 2016. Do developers deprecate apis with replacement messages? a large-scale analysis on java systems. In Proceedings of the IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering, Vol. 1. IEEE, 360-369.Google ScholarCross Ref
- Gleison Brito, Andre Hora, Marco Tulio Valente, and Romain Robbes. 2018. On the use of replacement messages in API deprecation: An empirical study. Journal of Systems and Software 137 ( 2018 ), 306-321.Google Scholar
- Fabio Calefato, Filippo Lanubile, Federico Maiorano, and Nicole Novielli. 2018. Sentiment polarity detection for software development. Empirical Software Engineering 23, 3 ( 2018 ), 1352-1382.Google Scholar
- cppreference. [n.d.]. C attribute: deprecated (since C 14). https://en.cppreference. com/w/cpp/language/attributes/deprecatedGoogle Scholar
- Danny Dig and Ralph Johnson. 2005. The role of refactorings in API evolution. In 21st IEEE International Conference on Software Maintenance (ICSM'05). IEEE, 389-398.Google ScholarDigital Library
- Microsoft Docs. [n.d.]. ObsoleteAttribute Class (System). https://docs.microsoft. com/en-us/dotnet/api/system. obsoleteattribute?redirectedfrom=MSDN&view= netframework-4. 8Google Scholar
- IEEE Spectrum: Technology Engineering and Science News. Last Accessed: March 2020. Interactive: The Top Programming Languages. https://spectrum.ieee.org / static/interactive-the-top-programming-languages-2019.Google Scholar
- Tiago Espinha, Andy Zaidman, and Hans-Gerhard Gross. 2014. Web API growing pains: Stories from client developers and their code. In 2014 Software Evolution Week-IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE). IEEE, 84-93.Google ScholarCross Ref
- Glossary. Last Accessed: March 2020. Argument. https://docs.python.org/2/ glossary.html#glossary.Google Scholar
- Johannes Henkel and Amer Diwan. 2005. CatchUp! Capturing and replaying refactorings to support API evolution. In Proceedings of the 27th international conference on Software engineering. 274-283.Google ScholarCross Ref
- André Hora, Romain Robbes, Nicolas Anquetil, Anne Etien, Stéphane Ducasse, and Marco Tulio Valente. 2015. How do developers react to API evolution? The Pharo ecosystem case. In 2015 IEEE International Conference on Software Maintenance and Evolution. IEEE, 251-260.Google ScholarDigital Library
- André Hora, Romain Robbes, Marco Tulio Valente, Nicolas Anquetil, Anne Etien, and Stéphane Ducasse. 2018. How do developers react to API evolution? A large-scale empirical study. Software Quality Journal 26, 1 ( 2018 ), 161-191.Google ScholarDigital Library
- Einar W Høst and Bjarte M Østvold. 2009. Debugging method names. In European Conference on Object-Oriented Programming. Springer, 294-317.Google ScholarDigital Library
- Daqing Hou and Xiaojia Yao. 2011. Exploring the intent behind api evolution: A case study. In 2011 18th Working Conference on Reverse Engineering. IEEE, 131-140.Google ScholarDigital Library
- John D Hunter. 2007. Matplotlib: A 2D graphics environment. Computing in science & engineering 9, 3 ( 2007 ), 90-95.Google Scholar
- Suntae Kim and Dongsun Kim. 2016. Automatic identifier inconsistency detection using code dictionary. Empirical Software Engineering 21, 2 ( 2016 ), 565-604.Google Scholar
- Deokyoon Ko, Kyeongwook Ma, Sooyong Park, Suntae Kim, Dongsun Kim, and Yves Le Traon. 2014. Api document quality for resolving deprecated apis. In 2014 21st Asia-Pacific Software Engineering Conference, Vol. 2. IEEE, 27-30.Google ScholarDigital Library
- Li Li, Jun Gao, Tegawendé F Bissyandé, Lei Ma, Xin Xia, and Jacques Klein. 2018. Characterising Deprecated Android APIs. In The 15th International Conference on Mining Software Repositories (MSR 2018 ).Google Scholar
- Li Li, Jun Gao, Tegawendé F Bissyandé, Lei Ma, Xin Xia, and Jacques Klein. 2019. CDA: Characterising Deprecated Android APIs. Empirical Software Engineering (EMSE) ( 2019 ).Google Scholar
- Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Massimiliano Di Penta, Rocco Oliveto, and Denys Poshyvanyk. 2013. API change and fault proneness: a threat to the success of Android apps. In Proceedings of the 2013 9th joint meeting on foundations of software engineering. 477-487.Google ScholarDigital Library
- Mario Linares-Vásquez, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, and Denys Poshyvanyk. 2014. How do api changes trigger stack overflow discussions? a study on the android sdk. In proceedings of the 22nd International Conference on Program Comprehension. 83-94.Google ScholarDigital Library
- Kui Liu, Dongsun Kim, Tegawendé F. Bissyandé, Tae-young Kim, Kisub Kim, Anil Koyuncu, Suntae Kim, and Yves Le Traon. 2019. Learning to spot and refactor inconsistent method names. In Proceedings of the 41st International Conference on Software Engineering. IEEE, 1-12. https://doi.org/10.1109/ICSE. 2019.00019 Google ScholarDigital Library
- Tyler McDonnell, Baishakhi Ray, and Miryung Kim. 2013. An empirical study of API stability and adoption in the android ecosystem. In 2013 IEEE International Conference on Software Maintenance. IEEE, 70-79.Google ScholarDigital Library
- Wes McKinney et al. 2010. Data structures for statistical computing in python. In Proceedings of the 9th Python in Science Conference, Vol. 445. Austin, TX, 51-56.Google Scholar
- Collin McMillan, Mario Linares-Vasquez, Denys Poshyvanyk, and Mark Grechanik. 2011. Categorizing software applications for maintenance. In Procceedings of the 27th IEEE International Conference on Software Maintenance (ICSM). IEEE, 343-352.Google ScholarDigital Library
- Ariana Mirian, Nikunj Bhagat, Caitlin Sadowski, Adrienne Porter Felt, Stefan Savage, and Geofrey M Voelker. 2019. Web feature deprecation: a case study for chrome. In Proceedings of the 41st International Conference on Software Engineering: Software Engineering in Practice. IEEE Press, 302-311.Google ScholarDigital Library
- João Eduardo Montandon, Hudson Borges, Daniel Felix, and Marco Tulio Valente. 2013. Documenting apis with examples: Lessons learned with the apiminer platform. In 2013 20th Working Conference on Reverse Engineering (WCRE). IEEE, 401-408.Google ScholarCross Ref
- Marius Nita and David Notkin. 2010. Using twinning to adapt programs to alternative APIs. In Proceedings of the ACM/IEEE 32nd International Conference on Software Engineering, Vol. 1. IEEE, 205-214.Google ScholarDigital Library
- Stack Overflow. Last Accessed: March 2020. Get fully qualified class name of an object in Python. https://stackoverflow.com/questions/2020014/get-fullyqualified-class-name-of-an-object-in-python.Google Scholar
- Stack Overflow. Last Accessed: March 2020. Where Developers Learn, Share, & Build Careers. https://stackoverflow.com/.Google Scholar
- Chris Parnin and Christoph Treude. 2011. Measuring API Documentation on the Web. In Proceedings of the 2nd International Workshop on Web 2. 0 for Software Engineering. ACM, 25âĂŞ30. https://doi.org/10.1145/1984701.1984706 Google ScholarDigital Library
- Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. 2011. Scikit-learn: Machine learning in Python. Journal of machine learning research 12, Oct ( 2011 ), 2825-2830.Google ScholarDigital Library
- João Felipe Pimentel, Leonardo Murta, Vanessa Braganholo, and Juliana Freire. 2019. A large-scale study about quality and reproducibility of jupyter notebooks. In Proceedings of the 16th International Conference on Mining Software Repositories. IEEE Press, 507-517.Google ScholarDigital Library
- PyPI. Last Accessed: March 2020. Find, install and publish Python packages with the Python Package Index. https://pypi.org/.Google Scholar
- Python. Last Accessed: March 2020. https://www.python.org/.Google Scholar
- Python.org. Last Accessed: March 2020. Quotes about Python. https://www. python.org/about/quotes/.Google Scholar
- Steven Raemaekers, Arie Van Deursen, and Joost Visser. 2014. Semantic versioning versus breaking changes: A study of the maven repository. In 2014 IEEE 14th International Working Conference on Source Code Analysis and Manipulation. IEEE, 215-224.Google ScholarDigital Library
- Romain Robbes, Mircea Lungu, and David Röthlisberger. 2012. How do developers react to API deprecation? The case of a Smalltalk ecosystem. In Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering. 1-11.Google ScholarDigital Library
- Anand Ashok Sawant, Mauricio Aniche, Arie van Deursen, and Alberto Bacchelli. 2018. Understanding developers' needs on deprecation as a language feature. In 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE). IEEE, 561-571.Google ScholarDigital Library
- Anand Ashok Sawant, Romain Robbes, and Alberto Bacchelli. 2016. On the reaction to deprecation of 25,357 clients of 4+ 1 popular Java APIs. In 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, 400-410.Google ScholarCross Ref
- Anand Ashok Sawant, Romain Robbes, and Alberto Bacchelli. 2018. On the reaction to deprecation of clients of 4+ 1 popular Java APIs and the JDK. Empirical Software Engineering 23, 4 ( 2018 ), 2158-2197.Google Scholar
- Anand Ashok Sawant, Romain Robbes, and Alberto Bacchelli. 2019. To react, or not to react: Patterns of reaction to API deprecation. Empirical Software Engineering 24, 6 ( 2019 ), 3824-3870.Google Scholar
- Seaborn. Last Accessed: March 2020. Seaborn: statistical data visualization. http://seaborn.pydata.org/.Google Scholar
- NASA Software. Last Accessed: March 2020. Swim: A Software Information Metacatalog for the Grid. https://software.nasa.gov/software/ARC-15469-1.Google Scholar
- Roman Štrobl and Zdeněk Troníček. 2013. Migration from deprecated API in Java. In Proceedings of the 2013 companion publication for conference on Systems, programming, & applications: software for humanity. 85-86.Google ScholarDigital Library
- TIOBE. Last Accessed: March 2020. TIOBE Index for January 2020. https://www. tiobe.com/tiobe-index/.Google Scholar
- Stéfan van der Walt, S Chris Colbert, and Gael Varoquaux. 2011. The NumPy array: a structure for eficient numerical computation. Computing in Science & Engineering 13, 2 ( 2011 ), 22-30.Google Scholar
- Jiawei Wang, Tzu-yang Kuo, Li Li, and Andreas Zeller. 2020. Assessing and Restoring Reproducibility of Jupyter Notebooks. In The 35th IEEE/ACM International Conference on Automated Software Engineering (ASE 2020 ).Google Scholar
- Jiawei Wang, Tzu-yang Kuo, Li Li, and Andreas Zeller. 2020. Restoring Reproducibility of Jupyter Notebooks. In The 42nd International Conference on Software Engineering, Invited Poster (ICSE 2020 ).Google Scholar
- Jiawei Wang, Li Li, and Andreas Zeller. 2020. Better Code, Better Sharing: On the Need of Analyzing Jupyter Notebooks. In The 42nd International Conference on Software Engineering, NIER Track (ICSE 2020 ).Google Scholar
- Witowski and Sebastian. Last Accessed: March 2020. Python at CERN. https: //cds.cern.ch/record/2274794.Google Scholar
- Laerte Xavier, Aline Brito, Andre Hora, and Marco Tulio Valente. 2017. Historical and impact analysis of API breaking changes: A large-scale study. In 2017 IEEE 24th International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE, 138-147.Google ScholarCross Ref
- Yun Zhang, David Lo, Pavneet Singh Kochhar, Xin Xia, Quanlai Li, and Jianling Sun. 2017. Detecting similar repositories on GitHub. In Proceedings of the IEEE 24th International Conference on Software Analysis, Evolution and Reengineering. IEEE, 13-23.Google ScholarCross Ref
- Zhaoxu Zhang, Hengcheng Zhu, Ming Wen, Yida Tao, Yepang Liu, and Yingfei Xiong. 2020. How Do Python Framework APIs Evolve?. In 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER). IEEE.Google ScholarCross Ref
- Hao Zhong and Zhendong Su. 2015. An empirical study on real bug fixes. In Proceedings of the IEEE/ACM 37th IEEE International Conference on Software Engineering, Vol. 1. IEEE, 913-923.Google ScholarCross Ref
- Jing Zhou and Robert J Walker. 2016. API deprecation: a retrospective analysis and detection method for code examples on the web. In Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering. 266-277.Google ScholarDigital Library
Index Terms
- Exploring how deprecated Python library APIs are (not) handled
Recommendations
Characterising deprecated Android APIs
MSR '18: Proceedings of the 15th International Conference on Mining Software RepositoriesBecause of functionality evolution, or security and performance-related changes, some APIs eventually become unnecessary in a software system and thus need to be cleaned to ensure proper maintainability. Those APIs are typically marked first as ...
Migrating Deprecated API to Documented Replacement: Patterns and Tool
Internetware '19: Proceedings of the 11th Asia-Pacific Symposium on InternetwareDeprecation is commonly leveraged to preserve the backwards compatibility in API clients during API evolution. Client developers then usually encounter migration tasks when relying on a new version of API. Manually migrating a deprecated API to its ...
API Document Quality for Resolving Deprecated APIs
APSEC '14: Proceedings of the 2014 21st Asia-Pacific Software Engineering Conference - Volume 02Using deprecated APIs often results in security vulnerability or performance degradation. Thus, invocations to deprecated APIs should be immediately replaced by alternative APIs. To resolve deprecated APIs, most developers rely on API documents provided ...
Comments