SEFeb 18, 2021

APIScanner -- Towards Automated Detection of Deprecated APIs in Python Libraries

arXiv:2102.09251v4
Originality Synthesis-oriented
AI Analysis

This addresses the tedious and time-consuming task for Python developers in avoiding deprecated APIs, though it is incremental as it builds on existing parsing and detection methods.

The authors tackled the problem of manually detecting deprecated APIs in Python libraries by developing APIScanner, an automated tool that uses AST parsing to identify deprecated elements, achieving detection of 838 out of 871 deprecated API elements in tests on six popular libraries.

Python libraries are widely used for machine learning and scientific computing tasks today. APIs in Python libraries are deprecated due to feature enhancements and bug fixes in the same way as in other languages. These deprecated APIs are discouraged from being used in further software development. Manually detecting and replacing deprecated APIs is a tedious and time-consuming task due to the large number of API calls used in the projects. Moreover, the lack of proper documentation for these deprecated APIs makes the task challenging. To address this challenge, we propose an algorithm and a tool APIScanner that automatically detects deprecated APIs in Python libraries. This algorithm parses the source code of the libraries using abstract syntax tree (ASTs) and identifies the deprecated APIs via decorator, hard-coded warning or comments. APIScanner is a Visual Studio Code Extension that highlights and warns the developer on the use of deprecated API elements while writing the source code. The tool can help developers to avoid using deprecated API elements without the execution of code. We tested our algorithm and tool on six popular Python libraries, which detected 838 of 871 deprecated API elements. Demo of APIScanner: https://youtu.be/1hy_ugf-iek. Documentation, tool, and source code can be found here: https://rishitha957.github.io/APIScanner.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes