-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adopt '[tool.pytest-enabler]' for configuration (PEP 518) #5
Conversation
@jaraco i strongly recommend this |
pytest_enabler/__init__.py
Outdated
if "pytest" in defn and "enabler" in defn["pytest"]: | ||
msg = "pytest-enabler configuration should use the `[tool.pytest-enabler]` " | ||
msg += "table in pyproject.toml (`[pytest.enabler]` is now deprecated)." | ||
warnings.warn(msg, DeprecationWarning) | ||
return defn["pytest"]["enabler"] | ||
return defn["tool"]["pytest-enabler"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see this logic broken out as a compatibility shim that will be removed. I'll do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 746a84d.
Thank you very much Jason. |
As described in #4, PEP 518 restricts the name of tables in
pyproject.toml
(currently, with PEP 517/518/621, only[build-system]
,[project]
and[tool.*]
are allowed) and specifies that tools should use[tool.<name on PyPI>]
for storing their configuration.This PR fix #4, by deprecating
[pytest.enabler]
and migrating to[tool.pytest-enabler]
.The usage of hyphen (
-
) is preferred to underscore for the sake of consistency with PEP 517/518/621 (also the official name of the distribution, before normalisation, seems to bepytest-enabler
according tosetup.cfg
).