skip to main content
10.1145/3368089.3409735acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

Exploring how deprecated Python library APIs are (not) handled

Published:08 November 2020Publication History

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.

Skip Supplemental Material Section

Supplemental Material

fse20main-p467-p-teaser.mp4

mp4

7.5 MB

fse20main-p467-p-video.mp4

mp4

61.9 MB

References

  1. [n.d.]. 5. The import systemÂű. https://docs.python.org/3/reference/import.htmlGoogle ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle Scholar
  6. 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 ScholarGoogle ScholarCross RefCross Ref
  7. 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 ScholarGoogle Scholar
  8. 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 ScholarGoogle Scholar
  9. cppreference. [n.d.]. C attribute: deprecated (since C 14). https://en.cppreference. com/w/cpp/language/attributes/deprecatedGoogle ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. Microsoft Docs. [n.d.]. ObsoleteAttribute Class (System). https://docs.microsoft. com/en-us/dotnet/api/system. obsoleteattribute?redirectedfrom=MSDN&view= netframework-4. 8Google ScholarGoogle Scholar
  12. 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 ScholarGoogle Scholar
  13. 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 ScholarGoogle ScholarCross RefCross Ref
  14. Glossary. Last Accessed: March 2020. Argument. https://docs.python.org/2/ glossary.html#glossary.Google ScholarGoogle Scholar
  15. 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 ScholarGoogle ScholarCross RefCross Ref
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. Einar W Høst and Bjarte M Østvold. 2009. Debugging method names. In European Conference on Object-Oriented Programming. Springer, 294-317.Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. John D Hunter. 2007. Matplotlib: A 2D graphics environment. Computing in science & engineering 9, 3 ( 2007 ), 90-95.Google ScholarGoogle Scholar
  21. Suntae Kim and Dongsun Kim. 2016. Automatic identifier inconsistency detection using code dictionary. Empirical Software Engineering 21, 2 ( 2016 ), 565-604.Google ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle Scholar
  24. 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 ScholarGoogle Scholar
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle Scholar
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarCross RefCross Ref
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle Scholar
  35. Stack Overflow. Last Accessed: March 2020. Where Developers Learn, Share, & Build Careers. https://stackoverflow.com/.Google ScholarGoogle Scholar
  36. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  39. PyPI. Last Accessed: March 2020. Find, install and publish Python packages with the Python Package Index. https://pypi.org/.Google ScholarGoogle Scholar
  40. Python. Last Accessed: March 2020. https://www.python.org/.Google ScholarGoogle Scholar
  41. Python.org. Last Accessed: March 2020. Quotes about Python. https://www. python.org/about/quotes/.Google ScholarGoogle Scholar
  42. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  43. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  44. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  45. 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 ScholarGoogle ScholarCross RefCross Ref
  46. 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 ScholarGoogle Scholar
  47. 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 ScholarGoogle Scholar
  48. Seaborn. Last Accessed: March 2020. Seaborn: statistical data visualization. http://seaborn.pydata.org/.Google ScholarGoogle Scholar
  49. NASA Software. Last Accessed: March 2020. Swim: A Software Information Metacatalog for the Grid. https://software.nasa.gov/software/ARC-15469-1.Google ScholarGoogle Scholar
  50. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  51. TIOBE. Last Accessed: March 2020. TIOBE Index for January 2020. https://www. tiobe.com/tiobe-index/.Google ScholarGoogle Scholar
  52. 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 ScholarGoogle Scholar
  53. 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 ScholarGoogle Scholar
  54. 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 ScholarGoogle Scholar
  55. 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 ScholarGoogle Scholar
  56. Witowski and Sebastian. Last Accessed: March 2020. Python at CERN. https: //cds.cern.ch/record/2274794.Google ScholarGoogle Scholar
  57. 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 ScholarGoogle ScholarCross RefCross Ref
  58. 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 ScholarGoogle ScholarCross RefCross Ref
  59. 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 ScholarGoogle ScholarCross RefCross Ref
  60. 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 ScholarGoogle ScholarCross RefCross Ref
  61. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Exploring how deprecated Python library APIs are (not) handled

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ESEC/FSE 2020: Proceedings of the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering
      November 2020
      1703 pages
      ISBN:9781450370431
      DOI:10.1145/3368089

      Copyright © 2020 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 8 November 2020

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate112of543submissions,21%

      Upcoming Conference

      FSE '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader