From f30e4de36019927a50d05b5a884ef73b204b9592 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 9 Feb 2022 09:58:38 +0200 Subject: [PATCH] Rename ``pythonpath`` plugin to ``python_path`` Fix #9636. --- changelog/9636.bugfix.rst | 1 + src/_pytest/config/__init__.py | 2 +- src/_pytest/{pythonpath.py => python_path.py} | 0 testing/{test_pythonpath.py => test_python_path.py} | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog/9636.bugfix.rst rename src/_pytest/{pythonpath.py => python_path.py} (100%) rename testing/{test_pythonpath.py => test_python_path.py} (98%) diff --git a/changelog/9636.bugfix.rst b/changelog/9636.bugfix.rst new file mode 100644 index 00000000000..2288c37ffc7 --- /dev/null +++ b/changelog/9636.bugfix.rst @@ -0,0 +1 @@ +The ``pythonpath`` plugin was renamed to ``python_path``. This avoids a conflict with the ``pytest-pythonpath`` plugin. diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 59c88885df5..f4818c861cf 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -254,7 +254,7 @@ def directory_arg(path: str, optname: str) -> str: "warnings", "logging", "reports", - "pythonpath", + "python_path", *(["unraisableexception", "threadexception"] if sys.version_info >= (3, 8) else []), "faulthandler", ) diff --git a/src/_pytest/pythonpath.py b/src/_pytest/python_path.py similarity index 100% rename from src/_pytest/pythonpath.py rename to src/_pytest/python_path.py diff --git a/testing/test_pythonpath.py b/testing/test_python_path.py similarity index 98% rename from testing/test_pythonpath.py rename to testing/test_python_path.py index 97c439ce0c3..5ee0f55e36a 100644 --- a/testing/test_pythonpath.py +++ b/testing/test_python_path.py @@ -81,7 +81,7 @@ def test_no_ini(pytester: Pytester, file_structure) -> None: def test_clean_up(pytester: Pytester) -> None: - """Test that the pythonpath plugin cleans up after itself.""" + """Test that the plugin cleans up after itself.""" # This is tough to test behaviorly because the cleanup really runs last. # So the test make several implementation assumptions: # - Cleanup is done in pytest_unconfigure().