From 40301effb8ffa3859efe9fca7f460e1af522d275 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 4 Jul 2020 11:45:28 +0300 Subject: [PATCH] Add changelog entry for code/source changes --- changelog/7438.breaking.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelog/7438.breaking.rst diff --git a/changelog/7438.breaking.rst b/changelog/7438.breaking.rst new file mode 100644 index 000000000..5d5d239fc --- /dev/null +++ b/changelog/7438.breaking.rst @@ -0,0 +1,11 @@ +Some changes were made to the internal ``_pytest._code.source``, listed here +for the benefit of plugin authors who may be using it: + +- The ``deindent`` argument to ``Source()`` has been removed, now it is always true. +- Support for zero or multiple arguments to ``Source()`` has been removed. +- Support for comparing ``Source`` with an ``str`` has been removed. +- The methods ``Source.isparseable()`` and ``Source.putaround()`` have been removed. +- The method ``Source.compile()`` and function ``_pytest._code.compile()`` have + been removed; use plain ``compile()`` instead. +- The function ``_pytest._code.source.getsource()`` has been removed; use + ``Source()`` directly instead.