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

test_pluginmanager: use pluggy.manager.metadata #230

Merged
merged 1 commit into from
Aug 22, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Aug 20, 2019

This has the version switch in a central place only once.

Ref: https://github.com/pytest-dev/pluggy/pull/223/files#r315505111

@bluetech
Copy link
Member

manager.metadata doesn't read too well to me, it's not immediately clear that it refers to importlib.metadata.

It will be clearer if, in manager.py, the common name is changed to importlib_metadata, that is

 if sys.version_info >= (3, 8):
-    from importlib import metadata
+    from importlib import metadata as importlib_metadata
 else:
-     import importlib_metadata as metadata
+     import importlib_metadata

@bluetech
Copy link
Member

(And also, do from pluggy.manager import importlib_metadata instead of using it qualified).

@blueyed blueyed force-pushed the test_pluginmanager branch from 2e4e618 to 45ea38c Compare August 22, 2019 01:49
@blueyed
Copy link
Contributor Author

blueyed commented Aug 22, 2019

Done.

@blueyed blueyed merged commit 12133da into pytest-dev:master Aug 22, 2019
@blueyed blueyed deleted the test_pluginmanager branch August 22, 2019 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants