Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: 使用 importlib.metadata 替换 pkg_resources #1388

Merged
merged 3 commits into from
Nov 12, 2022

Conversation

A-kirami
Copy link
Contributor

@A-kirami A-kirami commented Nov 12, 2022

importlib.metadata 是一个提供对已安装包的元数据访问的库。这个库部分建立在 Python 的导入系统上,旨在取代 pkg_resources 的 entry point APImetadata API 中的类似功能。 通过和 Python 3.7 或更高版本中的 importlib.resources 一同使用(对于旧版本的 Python 则作为 importlib_resources 向后移植),这可以消除对使用较旧且较为低效的 pkg_resources 包的需要。

移除对setuptools的依赖,移除变量nonebot.VERSION支持,自行使用packaging.version.parse

@codecov
Copy link

codecov bot commented Nov 12, 2022

Codecov Report

Merging #1388 (83855c7) into master (0bc8a39) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1388      +/-   ##
==========================================
- Coverage   85.91%   85.90%   -0.01%     
==========================================
  Files          41       41              
  Lines        3230     3228       -2     
==========================================
- Hits         2775     2773       -2     
  Misses        455      455              
Flag Coverage Δ
unittests 85.90% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nonebot/__init__.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 12, 2022

🚀 Deployed on https://deploy-preview-1388--nonebot2.netlify.app

@github-actions github-actions bot temporarily deployed to pull request November 12, 2022 04:33 Inactive
@yanyongyu yanyongyu added the enhancement New feature or request label Nov 12, 2022
@yanyongyu yanyongyu added the Breaking Breaking change label Nov 12, 2022
@github-actions github-actions bot temporarily deployed to pull request November 12, 2022 10:09 Inactive
@github-actions github-actions bot temporarily deployed to pull request November 12, 2022 10:17 Inactive
@yanyongyu yanyongyu merged commit 4355025 into nonebot:master Nov 12, 2022
@A-kirami A-kirami deleted the metadata branch November 12, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Breaking change enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants