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机器学习,361页pdf
专知会员服务
252+阅读 · 2021年2月25日
专知会员服务
38+阅读 · 2020年9月6日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
94+阅读 · 2019年12月4日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
143+阅读 · 2019年10月12日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
89+阅读 · 2019年10月10日
移动端机器学习资源合集
专知
8+阅读 · 2019年4月21日
34个最优秀好用的Python开源框架
专知
9+阅读 · 2019年3月1日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
15+阅读 · 2018年12月24日
开发者应当了解的18套机器学习平台
深度学习世界
5+阅读 · 2018年8月14日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
Python | 50行代码实现人脸检测
计算机与网络安全
3+阅读 · 2018年1月23日
【推荐】(TensorFlow)SSD实时手部检测与追踪(附代码)
机器学习研究会
10+阅读 · 2017年12月5日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
14+阅读 · 2017年11月16日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Memory Error Detection in Security Testing
Arxiv
0+阅读 · 2021年4月9日
Arxiv
13+阅读 · 2021年3月3日
Few-shot Scene-adaptive Anomaly Detection
Arxiv
8+阅读 · 2020年7月15日
Object Detection in 20 Years: A Survey
Arxiv
48+阅读 · 2019年5月13日
VIP会员
相关VIP内容
【干货书】Python机器学习,361页pdf
专知会员服务
252+阅读 · 2021年2月25日
专知会员服务
38+阅读 · 2020年9月6日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
【干货】大数据入门指南:Hadoop、Hive、Spark、 Storm等
专知会员服务
94+阅读 · 2019年12月4日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
143+阅读 · 2019年10月12日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
89+阅读 · 2019年10月10日
相关资讯
移动端机器学习资源合集
专知
8+阅读 · 2019年4月21日
34个最优秀好用的Python开源框架
专知
9+阅读 · 2019年3月1日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
15+阅读 · 2018年12月24日
开发者应当了解的18套机器学习平台
深度学习世界
5+阅读 · 2018年8月14日
Python机器学习教程资料/代码
机器学习研究会
8+阅读 · 2018年2月22日
Python | 50行代码实现人脸检测
计算机与网络安全
3+阅读 · 2018年1月23日
【推荐】(TensorFlow)SSD实时手部检测与追踪(附代码)
机器学习研究会
10+阅读 · 2017年12月5日
【推荐】用Python/OpenCV实现增强现实
机器学习研究会
14+阅读 · 2017年11月16日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Top
微信扫码咨询专知VIP会员