首页> 外文会议>International Conference on Software Engineering: Companion Proceedings >APIScanner - Towards Automated Detection of Deprecated APIs in Python Libraries
【24h】

APIScanner - Towards Automated Detection of Deprecated APIs in Python Libraries

机译:Apiscanner - 在Python库中自动检测弃用API

获取原文

摘要

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.
机译:Python库今天广泛用于机器学习和科学计算任务。由于特征增强功能和错误修复,以与其他语言相同的方式,弃用了Python库的API。这些弃用的API不受在进一步的软件开发中使用的。由于项目中使用的大量API调用,手动检测和替换已弃用API是一个繁琐且耗时的任务。此外,这些弃用API缺乏适当的文档使得任务具有挑战性。为了解决这一挑战,我们提出了一种算法和一个工具Apiscanner,它会在Python库中自动检测到已弃用的API。此算法使用抽象语法树(AST)解析库的源代码,并通过装饰器,硬编码警告或注释标识已弃用的API。 Apiscanner是一个Visual Studio代码扩展,突出显示并警告开发人员在编写源代码时使用已弃用的API元素。该工具可以帮助开发人员避免在没有执行代码的情况下使用已弃用的API元素。我们在六个流行的Python库上测试了我们的算法和工具,该工具检测到838的871弃用API元素。 Apiscanner的演示:https://youtu.be/1hy_ugf-iek。可以在此处找到文档,工具和源代码:https://rishitha957.github.io/apiscanner。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号