Skip to content

Commit c962339

Browse files
Merge branch 'main' into Improvement-remove-prune_dependency_tree
2 parents 946c32b + 047ba83 commit c962339

File tree

26 files changed

+227
-134
lines changed

26 files changed

+227
-134
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
persist-credentials: false
7474

7575
- name: Set up Python
76-
uses: actions/setup-python@v4
76+
uses: actions/setup-python@v5
7777
with:
7878
python-version: "3.11"
7979

.github/workflows/prepare-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fetch-depth: 0
3333

3434
- name: Set up Python
35-
uses: actions/setup-python@v4
35+
uses: actions/setup-python@v5
3636
with:
3737
python-version: "3.8"
3838

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
issues: write
1212
steps:
13-
- uses: actions/stale@v8
13+
- uses: actions/stale@v9
1414
with:
1515
debug-only: false
1616
days-before-issue-stale: 14

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
tox_env: "py312-xdist"
157157

158158
- name: "plugins"
159-
python: "3.9"
159+
python: "3.12"
160160
os: ubuntu-latest
161161
tox_env: "plugins"
162162

@@ -179,7 +179,7 @@ jobs:
179179
path: dist
180180

181181
- name: Set up Python ${{ matrix.python }}
182-
uses: actions/setup-python@v4
182+
uses: actions/setup-python@v5
183183
with:
184184
python-version: ${{ matrix.python }}
185185
check-latest: ${{ endsWith(matrix.python, '-dev') }}

.github/workflows/update-plugin-list.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
fetch-depth: 0
2626

2727
- name: Setup Python
28-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: "3.11"
3131
cache: pip

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Ariel Pillemer
4848
Armin Rigo
4949
Aron Coyle
5050
Aron Curzon
51+
Arthur Richard
5152
Ashish Kurmi
5253
Aviral Verma
5354
Aviv Palivoda

changelog/11676.breaking.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The classes :class:`~_pytest.nodes.Node`, :class:`~pytest.Collector`, :class:`~pytest.Item`, :class:`~pytest.File`, :class:`~_pytest.nodes.FSCollector` are now marked abstract (see :mod:`abc`).
2+
3+
We do not expect this change to affect users and plugin authors, it will only cause errors when the code is already wrong or problematic.

doc/en/changelog.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ Features
13441344

13451345
This is part of the movement to use :class:`pathlib.Path` objects internally, in order to remove the dependency to ``py`` in the future.
13461346

1347-
Internally, the old :class:`~pytest.Testdir` is now a thin wrapper around :class:`~pytest.Pytester`, preserving the old interface.
1347+
Internally, the old ``pytest.Testdir`` is now a thin wrapper around :class:`~pytest.Pytester`, preserving the old interface.
13481348

13491349

13501350
- :issue:`7695`: A new hook was added, `pytest_markeval_namespace` which should return a dictionary.
@@ -1592,7 +1592,7 @@ Improvements
15921592

15931593

15941594
- :issue:`7685`: Added two new attributes :attr:`rootpath <pytest.Config.rootpath>` and :attr:`inipath <pytest.Config.inipath>` to :class:`~pytest.Config`.
1595-
These attributes are :class:`pathlib.Path` versions of the existing :attr:`rootdir <pytest.Config.rootdir>` and :attr:`inifile <pytest.Config.inifile>` attributes,
1595+
These attributes are :class:`pathlib.Path` versions of the existing ``rootdir`` and ``inifile`` attributes,
15961596
and should be preferred over them when possible.
15971597

15981598

@@ -2139,7 +2139,7 @@ Bug Fixes
21392139
parameter when Python is called with the ``-bb`` flag.
21402140

21412141

2142-
- :issue:`7143`: Fix :meth:`pytest.File.from_parent` so it forwards extra keyword arguments to the constructor.
2142+
- :issue:`7143`: Fix :meth:`pytest.File.from_parent <_pytest.nodes.Node.from_parent>` so it forwards extra keyword arguments to the constructor.
21432143

21442144

21452145
- :issue:`7145`: Classes with broken ``__getattribute__`` methods are displayed correctly during failures.
@@ -2458,7 +2458,7 @@ Bug Fixes
24582458
- :issue:`6597`: Fix node ids which contain a parametrized empty-string variable.
24592459

24602460

2461-
- :issue:`6646`: Assertion rewriting hooks are (re)stored for the current item, which fixes them being still used after e.g. pytester's :func:`testdir.runpytest <pytest.Testdir.runpytest>` etc.
2461+
- :issue:`6646`: Assertion rewriting hooks are (re)stored for the current item, which fixes them being still used after e.g. pytester's ``testdir.runpytest`` etc.
24622462

24632463

24642464
- :issue:`6660`: :py:func:`pytest.exit` is handled when emitted from the :hook:`pytest_sessionfinish` hook. This includes quitting from a debugger.

doc/en/conf.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,50 @@
169169
}
170170

171171

172+
nitpicky = True
173+
nitpick_ignore = [
174+
# TODO (fix in pluggy?)
175+
("py:class", "HookCaller"),
176+
("py:class", "HookspecMarker"),
177+
("py:exc", "PluginValidationError"),
178+
# Might want to expose/TODO (https://github.com/pytest-dev/pytest/issues/7469)
179+
("py:class", "ExceptionRepr"),
180+
("py:class", "Exit"),
181+
("py:class", "SubRequest"),
182+
("py:class", "SubRequest"),
183+
("py:class", "TerminalReporter"),
184+
("py:class", "_pytest._code.code.TerminalRepr"),
185+
("py:class", "_pytest.fixtures.FixtureFunctionMarker"),
186+
("py:class", "_pytest.logging.LogCaptureHandler"),
187+
("py:class", "_pytest.mark.structures.ParameterSet"),
188+
# Intentionally undocumented/private
189+
("py:class", "_pytest._code.code.Traceback"),
190+
("py:class", "_pytest._py.path.LocalPath"),
191+
("py:class", "_pytest.capture.CaptureResult"),
192+
("py:class", "_pytest.compat.NotSetType"),
193+
("py:class", "_pytest.python.PyCollector"),
194+
("py:class", "_pytest.python.PyobjMixin"),
195+
("py:class", "_pytest.python_api.RaisesContext"),
196+
("py:class", "_pytest.recwarn.WarningsChecker"),
197+
("py:class", "_pytest.reports.BaseReport"),
198+
# Undocumented third parties
199+
("py:class", "_tracing.TagTracerSub"),
200+
("py:class", "warnings.WarningMessage"),
201+
# Undocumented type aliases
202+
("py:class", "LEGACY_PATH"),
203+
("py:class", "_PluggyPlugin"),
204+
# TypeVars
205+
("py:class", "_pytest._code.code.E"),
206+
("py:class", "_pytest.fixtures.FixtureFunction"),
207+
("py:class", "_pytest.nodes._NodeType"),
208+
("py:class", "_pytest.python_api.E"),
209+
("py:class", "_pytest.recwarn.T"),
210+
("py:class", "_pytest.runner.TResult"),
211+
("py:obj", "_pytest.fixtures.FixtureValue"),
212+
("py:obj", "_pytest.stash.T"),
213+
]
214+
215+
172216
# -- Options for HTML output ---------------------------------------------------
173217

174218
sys.path.append(os.path.abspath("_themes"))

doc/en/example/simple.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Now we'll get feedback on a bad argument:
168168
169169
170170
If you need to provide more detailed error messages, you can use the
171-
``type`` parameter and raise ``pytest.UsageError``:
171+
``type`` parameter and raise :exc:`pytest.UsageError`:
172172

173173
.. code-block:: python
174174

0 commit comments

Comments
 (0)