Skip to content

Commit

Permalink
Bump pytest from 7.4.4 to 8.1.1 (#8223)
Browse files Browse the repository at this point in the history
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to
8.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>8.1.1</h2>
<h1>pytest 8.1.1 (2024-03-08)</h1>
<p>::: {.note}
::: {.title}
Note
:::</p>
<p>This release is not a usual bug fix release -- it contains features
and improvements, being a follow up
to <code>8.1.0</code>, which has been yanked from PyPI.
:::</p>
<h2>Features</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11475">#11475</a>:
Added the new <code>consider_namespace_packages</code>{.interpreted-text
role=&quot;confval&quot;} configuration option, defaulting to
<code>False</code>.</p>
<p>If set to <code>True</code>, pytest will attempt to identify modules
that are part of <a
href="https://packaging.python.org/en/latest/guides/packaging-namespace-packages">namespace
packages</a> when importing modules.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11653">#11653</a>:
Added the new <code>verbosity_test_cases</code>{.interpreted-text
role=&quot;confval&quot;} configuration option for fine-grained control
of test execution verbosity.
See <code>Fine-grained verbosity
&lt;pytest.fine_grained_verbosity&gt;</code>{.interpreted-text
role=&quot;ref&quot;} for more details.</p>
</li>
</ul>
<h2>Improvements</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/10865">#10865</a>:
<code>pytest.warns</code>{.interpreted-text role=&quot;func&quot;} now
validates that <code>warnings.warn</code>{.interpreted-text
role=&quot;func&quot;} was called with a [str]{.title-ref} or a
[Warning]{.title-ref}.
Currently in Python it is possible to use other types, however this
causes an exception when
<code>warnings.filterwarnings</code>{.interpreted-text
role=&quot;func&quot;} is used to filter those warnings (see [CPython <a
href="https://redirect.github.com/pytest-dev/pytest/issues/103577">#103577</a>](<a
href="https://redirect.github.com/python/cpython/issues/103577">python/cpython#103577</a>)
for a discussion).
While this can be considered a bug in CPython, we decided to put guards
in pytest as the error message produced without this check in place is
confusing.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11311">#11311</a>:
When using <code>--override-ini</code> for paths in invocations without
a configuration file defined, the current working directory is used
as the relative directory.</p>
<p>Previoulsy this would raise an
<code>AssertionError</code>{.interpreted-text
role=&quot;class&quot;}.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11475">#11475</a>:
<code>--import-mode=importlib
&lt;import-mode-importlib&gt;</code>{.interpreted-text
role=&quot;ref&quot;} now tries to import modules using the standard
import mechanism (but still without changing
:py<code>sys.path</code>{.interpreted-text role=&quot;data&quot;}),
falling back to importing modules directly only if that fails.</p>
<p>This means that installed packages will be imported under their
canonical name if possible first, for example
<code>app.core.models</code>, instead of having the module name always
be derived from their path (for example
<code>.env310.lib.site_packages.app.core.models</code>).</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11801">#11801</a>:
Added the <code>iter_parents()
&lt;_pytest.nodes.Node.iter_parents&gt;</code>{.interpreted-text
role=&quot;func&quot;} helper method on nodes.
It is similar to <code>listchain
&lt;_pytest.nodes.Node.listchain&gt;</code>{.interpreted-text
role=&quot;func&quot;}, but goes from bottom to top, and returns an
iterator, not a list.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11850">#11850</a>:
Added support for <code>sys.last_exc</code>{.interpreted-text
role=&quot;data&quot;} for post-mortem debugging on Python&gt;=3.12.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11962">#11962</a>:
In case no other suitable candidates for configuration file are found, a
<code>pyproject.toml</code> (even without a
<code>[tool.pytest.ini_options]</code> table) will be considered as the
configuration file and define the <code>rootdir</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/11978">#11978</a>:
Add <code>--log-file-mode</code> option to the logging plugin, enabling
appending to log-files. This option accepts either
<code>&quot;w&quot;</code> or <code>&quot;a&quot;</code> and defaults to
<code>&quot;w&quot;</code>.</p>
<p>Previously, the mode was hard-coded to be <code>&quot;w&quot;</code>
which truncates the file before logging.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/81653ee385f4c62ee7e64502a7b7530096553115"><code>81653ee</code></a>
Adjust changelog manually for 8.1.1</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/e60b4b9ed80f761e3a51868a01338911a567b093"><code>e60b4b9</code></a>
Prepare release version 8.1.1</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/15fbe57c44fed6737f5c6dad99cf4437b6755a6c"><code>15fbe57</code></a>
[8.1.x] Revert legacy path removals (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/12093">#12093</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/86c3aab005a98de7e12ee5e37782837f5db70ac3"><code>86c3aab</code></a>
[8.1.x] Do not import duplicated modules with --importmode=importlib (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/12077">#12077</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/5b82b0cd20c3adcc21f34ae30c595c7355a87e23"><code>5b82b0c</code></a>
[8.1.x] Yank version 8.1.0 (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/12076">#12076</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/0a536810dc5f51dac99bdb90dde06704b5aa034e"><code>0a53681</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12054">#12054</a>
from pytest-dev/release-8.1.0</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/b9a167f9bbbd6eda4f0360c5bf5b7f5af50f2bc4"><code>b9a167f</code></a>
Prepare release version 8.1.0</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/00043f7f1047b29fdaeb18e169fe9d6146988cb8"><code>00043f7</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12038">#12038</a>
from bluetech/fixtures-rm-arg2index</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/f4e10251a4a003495b5228cea421d4de5fa0ce89"><code>f4e1025</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12048">#12048</a>
from bluetech/fixture-teardown-excgroup</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/43492f5707b38dab9b62dfb829bb41a13579629f"><code>43492f5</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12051">#12051</a>
from jakkdl/test_debugging_pythonbreakpoint</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/7.4.4...8.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=7.4.4&new-version=8.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Sam Bull <git@sambull.org>
  • Loading branch information
3 people committed Apr 19, 2024
1 parent 87b6889 commit b7cbabd
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pip-tools==7.4.1
# via -r requirements/dev.in
platformdirs==2.4.0
# via virtualenv
pluggy==1.0.0
pluggy==1.4.0
# via pytest
pre-commit==3.5.0
# via -r requirements/lint.in
Expand Down Expand Up @@ -164,7 +164,7 @@ pyproject-hooks==1.0.0
# via
# build
# pip-tools
pytest==7.4.4
pytest==8.1.1
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down
4 changes: 2 additions & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pip-tools==7.4.1
# via -r requirements/dev.in
platformdirs==3.10.0
# via virtualenv
pluggy==1.2.0
pluggy==1.4.0
# via pytest
pre-commit==3.5.0
# via -r requirements/lint.in
Expand All @@ -155,7 +155,7 @@ pyproject-hooks==1.0.0
# via
# build
# pip-tools
pytest==7.4.4
pytest==8.1.1
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down
4 changes: 2 additions & 2 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ packaging==23.1
# via pytest
platformdirs==3.10.0
# via virtualenv
pluggy==1.2.0
pluggy==1.4.0
# via pytest
pre-commit==3.5.0
# via -r requirements/lint.in
pytest==7.4.4
pytest==8.1.1
# via -r requirements/lint.in
pyyaml==6.0.1
# via pre-commit
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ packaging==23.1
# via
# gunicorn
# pytest
pluggy==1.2.0
pluggy==1.4.0
# via pytest
proxy-py==2.4.4rc4
# via -r requirements/test.in
Expand All @@ -77,7 +77,7 @@ pydantic==2.2.0
# via python-on-whales
pydantic-core==2.6.0
# via pydantic
pytest==7.4.4
pytest==8.1.1
# via
# -r requirements/test.in
# pytest-cov
Expand Down
12 changes: 6 additions & 6 deletions tests/test_pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def test_aiohttp_plugin(testdir) -> None:
from aiohttp import web
value = web.AppKey('value', str)
async def hello(request):
return web.Response(body=b'Hello, world')
Expand Down Expand Up @@ -75,10 +77,10 @@ async def test_noop() -> None:
async def previous(request):
if request.method == 'POST':
with pytest.deprecated_call(): # FIXME: this isn't actually called
request.app['value'] = (await request.post())['value']
request.app[value] = (await request.post())['value']
return web.Response(body=b'thanks for the data')
else:
v = request.app.get('value', 'unknown')
v = request.app.get(value, 'unknown')
return web.Response(body='value: {}'.format(v).encode())
Expand All @@ -98,7 +100,7 @@ async def test_set_value(cli) -> None:
assert resp.status == 200
text = await resp.text()
assert text == 'thanks for the data'
assert cli.server.app['value'] == 'foo'
assert cli.server.app[value] == 'foo'
async def test_get_value(cli) -> None:
Expand All @@ -107,7 +109,7 @@ async def test_get_value(cli) -> None:
text = await resp.text()
assert text == 'value: unknown'
with pytest.warns(DeprecationWarning):
cli.server.app['value'] = 'bar'
cli.server.app[value] = 'bar'
resp = await cli.get('/')
assert resp.status == 200
text = await resp.text()
Expand All @@ -119,7 +121,6 @@ def test_noncoro() -> None:
async def test_failed_to_create_client(aiohttp_client) -> None:
def make_app(loop):
raise RuntimeError()
Expand All @@ -142,7 +143,6 @@ async def test_custom_port_test_server(aiohttp_server, aiohttp_unused_port):
port = aiohttp_unused_port()
server = await aiohttp_server(app, port=port)
assert server.port == port
"""
)
testdir.makeconftest(CONFTEST)
Expand Down

0 comments on commit b7cbabd

Please sign in to comment.