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 图书馆中被损坏的APIS 。 这个算法用抽象的合成树(ASTs)来分析图书馆的源代码,并查明了被损坏的API, 硬编码警告或评论。 APIS Canner 是一个视觉工作室代码扩展,可以突出和警告开发者使用被损坏的 API 要素,同时写入源代码。 工具可以帮助开发者在不使用我们内部的 API IMIS 中检测到的 6- decread AS 。

0
下载
关闭预览

相关内容

Automator是苹果公司为他们的Mac OS X系统开发的一款软件。 只要通过点击拖拽鼠标等操作就可以将一系列动作组合成一个工作流,从而帮助你自动的(可重复的)完成一些复杂的工作。Automator还能横跨很多不同种类的程序,包括:查找器、Safari网络浏览器、iCal、地址簿或者其他的一些程序。它还能和一些第三方的程序一起工作,如微软的Office、Adobe公司的Photoshop或者Pixelmator等。
Python编程基础,121页ppt
专知会员服务
47+阅读 · 2021年1月1日
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
70+阅读 · 2020年8月2日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
深度强化学习策略梯度教程,53页ppt
专知会员服务
176+阅读 · 2020年2月1日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习相关资源(框架、库、软件)大列表
专知会员服务
38+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
Github项目推荐 | pikepdf - Python的PDF读写库
AI研习社
9+阅读 · 2019年3月29日
最快人脸检测遇敌手!ZQCNN vs libfacedetection
极市平台
19+阅读 · 2019年3月27日
2018机器学习开源资源盘点
专知
6+阅读 · 2019年2月2日
TorchSeg:基于pytorch的语义分割算法开源了
极市平台
20+阅读 · 2019年1月28日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Anomalous Instance Detection in Deep Learning: A Survey
Deep Learning for Deepfakes Creation and Detection
Arxiv
6+阅读 · 2019年9月25日
Augmentation for small object detection
Arxiv
11+阅读 · 2019年2月19日
Deep Learning for Generic Object Detection: A Survey
Arxiv
13+阅读 · 2018年9月6日
Arxiv
5+阅读 · 2018年5月16日
VIP会员
相关VIP内容
Python编程基础,121页ppt
专知会员服务
47+阅读 · 2021年1月1日
神经常微分方程教程,50页ppt,A brief tutorial on Neural ODEs
专知会员服务
70+阅读 · 2020年8月2日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
深度强化学习策略梯度教程,53页ppt
专知会员服务
176+阅读 · 2020年2月1日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
144+阅读 · 2019年10月12日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习相关资源(框架、库、软件)大列表
专知会员服务
38+阅读 · 2019年10月9日
最新BERT相关论文清单,BERT-related Papers
专知会员服务
52+阅读 · 2019年9月29日
相关资讯
Github项目推荐 | pikepdf - Python的PDF读写库
AI研习社
9+阅读 · 2019年3月29日
最快人脸检测遇敌手!ZQCNN vs libfacedetection
极市平台
19+阅读 · 2019年3月27日
2018机器学习开源资源盘点
专知
6+阅读 · 2019年2月2日
TorchSeg:基于pytorch的语义分割算法开源了
极市平台
20+阅读 · 2019年1月28日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
【学习】(Python)SVM数据分类
机器学习研究会
6+阅读 · 2017年10月15日
Adversarial Variational Bayes: Unifying VAE and GAN 代码
CreateAMind
7+阅读 · 2017年10月4日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Top
微信扫码咨询专知VIP会员