Skip to content
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

AsyncFile.readinto() has incorrect return type #825

Closed
2 tasks done
sanmai-NL opened this issue Nov 17, 2024 · 3 comments
Closed
2 tasks done

AsyncFile.readinto() has incorrect return type #825

sanmai-NL opened this issue Nov 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sanmai-NL
Copy link

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

AnyIO version

4.6.2.post1

Python version

3.12.6

What happened?

For one, AsyncFile.readinto() was declared to return the generic type parameter rather than int, the number of bytes written like the standard library method. Should this method even be available for text IO?

How can we reproduce the bug?

N.A.

@sanmai-NL sanmai-NL added the bug Something isn't working label Nov 17, 2024
@agronholm
Copy link
Owner

I fixed the immediate reported issue. If you have ideas on how to further improve the type annotations, let me know.

@sanmai-NL
Copy link
Author

@agronholm Thanks! I raised a question in addition. I question whether readinto() etc. may even be provided for text IO objects. From my reading of the standard library docs, these are only available for binary IO objects.

@agronholm
Copy link
Owner

Yeah so there is no way to remove methods from a class just based on the type variables so the method exists but won't work.

mkjpryor pushed a commit to azimuth-cloud/cluster-api-addon-provider that referenced this issue Dec 6, 2024
Bumps [anyio](https://github.com/agronholm/anyio) from 4.6.2.post1 to
4.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/releases">anyio's
releases</a>.</em></p>
<blockquote>
<h2>4.7.0</h2>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories (<a
href="https://redirect.github.com/agronholm/anyio/issues/764">#764</a>)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept an object with
a <code>.fileno()</code> method or an integer handle, and deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code> to work even before an
async backend is bound to it (<a
href="https://redirect.github.com/agronholm/anyio/issues/819">#819</a>)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code> (used on
asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures (<a
href="https://redirect.github.com/agronholm/anyio/issues/815">#815</a>;
PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the <code>anyio.AsyncFile</code>
class (<a
href="https://redirect.github.com/agronholm/anyio/issues/825">#825</a>)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in cleanup code on Python &gt;= 3.11 (<a
href="https://redirect.github.com/agronholm/anyio/issues/832">#832</a>;
PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when propagating a
<code>CancelledError</code> on exit to a cancelled parent scope (<a
href="https://redirect.github.com/agronholm/anyio/pull/790">#790</a>; PR
by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst">anyio's
changelog</a>.</em></p>
<blockquote>
<h1>Version history</h1>
<p>This library adheres to <code>Semantic Versioning 2.0
&lt;http://semver.org/&gt;</code>_.</p>
<p><strong>4.7.0</strong></p>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories
(<code>[#764](agronholm/anyio#764)
&lt;https://github.com/agronholm/anyio/issues/764&gt;</code>_)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept
an object with a <code>.fileno()</code> method or an integer handle, and
deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code>
to work even before an async backend is bound to it
(<code>[#819](agronholm/anyio#819)
&lt;https://github.com/agronholm/anyio/issues/819&gt;</code>_)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code>
(used on asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures
(<code>[#815](agronholm/anyio#815)
&lt;https://github.com/agronholm/anyio/issues/815&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the
<code>anyio.AsyncFile</code> class
(<code>[#825](agronholm/anyio#825)
&lt;https://github.com/agronholm/anyio/issues/825&gt;</code>_)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in
cleanup code on Python &gt;= 3.11
(<code>[#832](agronholm/anyio#832)
&lt;https://github.com/agronholm/anyio/issues/832&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when
propagating a <code>CancelledError</code> on exit to a cancelled parent
scope
(<code>[#790](agronholm/anyio#790)
&lt;https://github.com/agronholm/anyio/pull/790&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
<p><strong>4.6.2</strong></p>
<ul>
<li>Fixed regression caused by
(<code>[#807](agronholm/anyio#807)
&lt;https://github.com/agronholm/anyio/pull/807&gt;</code>_)
that prevented the use of parametrized async fixtures</li>
</ul>
<p><strong>4.6.1</strong></p>
<p>This release contains all the changes from both v4.5.1 and v4.6.0,
plus:</p>
<ul>
<li>Fixed TaskGroup and CancelScope producing cyclic references in
tracebacks
when raising exceptions
(<code>[#806](agronholm/anyio#806)
&lt;https://github.com/agronholm/anyio/pull/806&gt;</code>_)
(PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
</ul>
<p><strong>4.6.0</strong></p>
<p>This release is the successor to v4.5.0 with Python 3.8 support
dropped, and does not
contain the changes from v4.5.1.</p>
<ul>
<li>Dropped support for Python 3.8
(as <code>[#698](agronholm/anyio#698)
&lt;https://github.com/agronholm/anyio/issues/698&gt;</code>_ cannot be
resolved</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/agronholm/anyio/commit/c967f5c644b4e535af4cb230d9bcb8be06e2559f"><code>c967f5c</code></a>
Bumped up the version</li>
<li><a
href="https://github.com/agronholm/anyio/commit/f47ac5eb32b695ba76b94f811c4fa0e2d040c311"><code>f47ac5e</code></a>
Rearranged changelog entries</li>
<li><a
href="https://github.com/agronholm/anyio/commit/f316ce5cefb3fa4ebb87518fa58ea205230ba24e"><code>f316ce5</code></a>
Allowed Event to be set before it's bound to an async backend (<a
href="https://redirect.github.com/agronholm/anyio/issues/835">#835</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/93a57466c3b226ef2bc6fb2f0d361ed9ce8f707c"><code>93a5746</code></a>
Fixed <code>asyncio.Task.cancelling</code> issues (<a
href="https://redirect.github.com/agronholm/anyio/issues/790">#790</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/39cf394713f06f1d008a18b489ad042252ddb469"><code>39cf394</code></a>
Avoid exposing extra variables key and value in anyio.abc (<a
href="https://redirect.github.com/agronholm/anyio/issues/833">#833</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/a2150f525ea96fa6c14f9a1adca5ee36b9b61992"><code>a2150f5</code></a>
Fixed design issues in PR template (<a
href="https://redirect.github.com/agronholm/anyio/issues/834">#834</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/0f8061148b3c038c2211a2e37c63f7ce94c0a2a4"><code>0f80611</code></a>
Added support for wait_readable() and wait_writable() on
ProactorEventLoop (#...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/97d5fe6f92608807f4e1a2feed8be80d280250a8"><code>97d5fe6</code></a>
Made asyncio TaskGroup work with eager task factories (<a
href="https://redirect.github.com/agronholm/anyio/issues/822">#822</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/44405f4a6c33cea9c0e0e4cf169248fd800e6ffe"><code>44405f4</code></a>
Updated downstream test workflows and their target Python versions</li>
<li><a
href="https://github.com/agronholm/anyio/commit/93c0cd61b5c3b296fa4115957eab8f76a9cf23a1"><code>93c0cd6</code></a>
Replaced mentions to run_sync_in_process with to_process.run_sync (<a
href="https://redirect.github.com/agronholm/anyio/issues/829">#829</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/agronholm/anyio/compare/4.6.2.post1...4.7.0">compare
view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mkjpryor pushed a commit to azimuth-cloud/azimuth that referenced this issue Dec 6, 2024
Bumps [anyio](https://github.com/agronholm/anyio) from 4.6.2.post1 to
4.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/releases">anyio's
releases</a>.</em></p>
<blockquote>
<h2>4.7.0</h2>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories (<a
href="https://redirect.github.com/agronholm/anyio/issues/764">#764</a>)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept an object with
a <code>.fileno()</code> method or an integer handle, and deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code> to work even before an
async backend is bound to it (<a
href="https://redirect.github.com/agronholm/anyio/issues/819">#819</a>)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code> (used on
asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures (<a
href="https://redirect.github.com/agronholm/anyio/issues/815">#815</a>;
PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the <code>anyio.AsyncFile</code>
class (<a
href="https://redirect.github.com/agronholm/anyio/issues/825">#825</a>)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in cleanup code on Python &gt;= 3.11 (<a
href="https://redirect.github.com/agronholm/anyio/issues/832">#832</a>;
PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when propagating a
<code>CancelledError</code> on exit to a cancelled parent scope (<a
href="https://redirect.github.com/agronholm/anyio/pull/790">#790</a>; PR
by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst">anyio's
changelog</a>.</em></p>
<blockquote>
<h1>Version history</h1>
<p>This library adheres to <code>Semantic Versioning 2.0
&lt;http://semver.org/&gt;</code>_.</p>
<p><strong>4.7.0</strong></p>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories
(<code>[#764](agronholm/anyio#764)
&lt;https://github.com/agronholm/anyio/issues/764&gt;</code>_)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept
an object with a <code>.fileno()</code> method or an integer handle, and
deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code>
to work even before an async backend is bound to it
(<code>[#819](agronholm/anyio#819)
&lt;https://github.com/agronholm/anyio/issues/819&gt;</code>_)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code>
(used on asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures
(<code>[#815](agronholm/anyio#815)
&lt;https://github.com/agronholm/anyio/issues/815&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the
<code>anyio.AsyncFile</code> class
(<code>[#825](agronholm/anyio#825)
&lt;https://github.com/agronholm/anyio/issues/825&gt;</code>_)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in
cleanup code on Python &gt;= 3.11
(<code>[#832](agronholm/anyio#832)
&lt;https://github.com/agronholm/anyio/issues/832&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when
propagating a <code>CancelledError</code> on exit to a cancelled parent
scope
(<code>[#790](agronholm/anyio#790)
&lt;https://github.com/agronholm/anyio/pull/790&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
<p><strong>4.6.2</strong></p>
<ul>
<li>Fixed regression caused by
(<code>[#807](agronholm/anyio#807)
&lt;https://github.com/agronholm/anyio/pull/807&gt;</code>_)
that prevented the use of parametrized async fixtures</li>
</ul>
<p><strong>4.6.1</strong></p>
<p>This release contains all the changes from both v4.5.1 and v4.6.0,
plus:</p>
<ul>
<li>Fixed TaskGroup and CancelScope producing cyclic references in
tracebacks
when raising exceptions
(<code>[#806](agronholm/anyio#806)
&lt;https://github.com/agronholm/anyio/pull/806&gt;</code>_)
(PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
</ul>
<p><strong>4.6.0</strong></p>
<p>This release is the successor to v4.5.0 with Python 3.8 support
dropped, and does not
contain the changes from v4.5.1.</p>
<ul>
<li>Dropped support for Python 3.8
(as <code>[#698](agronholm/anyio#698)
&lt;https://github.com/agronholm/anyio/issues/698&gt;</code>_ cannot be
resolved</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/agronholm/anyio/commit/c967f5c644b4e535af4cb230d9bcb8be06e2559f"><code>c967f5c</code></a>
Bumped up the version</li>
<li><a
href="https://github.com/agronholm/anyio/commit/f47ac5eb32b695ba76b94f811c4fa0e2d040c311"><code>f47ac5e</code></a>
Rearranged changelog entries</li>
<li><a
href="https://github.com/agronholm/anyio/commit/f316ce5cefb3fa4ebb87518fa58ea205230ba24e"><code>f316ce5</code></a>
Allowed Event to be set before it's bound to an async backend (<a
href="https://redirect.github.com/agronholm/anyio/issues/835">#835</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/93a57466c3b226ef2bc6fb2f0d361ed9ce8f707c"><code>93a5746</code></a>
Fixed <code>asyncio.Task.cancelling</code> issues (<a
href="https://redirect.github.com/agronholm/anyio/issues/790">#790</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/39cf394713f06f1d008a18b489ad042252ddb469"><code>39cf394</code></a>
Avoid exposing extra variables key and value in anyio.abc (<a
href="https://redirect.github.com/agronholm/anyio/issues/833">#833</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/a2150f525ea96fa6c14f9a1adca5ee36b9b61992"><code>a2150f5</code></a>
Fixed design issues in PR template (<a
href="https://redirect.github.com/agronholm/anyio/issues/834">#834</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/0f8061148b3c038c2211a2e37c63f7ce94c0a2a4"><code>0f80611</code></a>
Added support for wait_readable() and wait_writable() on
ProactorEventLoop (#...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/97d5fe6f92608807f4e1a2feed8be80d280250a8"><code>97d5fe6</code></a>
Made asyncio TaskGroup work with eager task factories (<a
href="https://redirect.github.com/agronholm/anyio/issues/822">#822</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/44405f4a6c33cea9c0e0e4cf169248fd800e6ffe"><code>44405f4</code></a>
Updated downstream test workflows and their target Python versions</li>
<li><a
href="https://github.com/agronholm/anyio/commit/93c0cd61b5c3b296fa4115957eab8f76a9cf23a1"><code>93c0cd6</code></a>
Replaced mentions to run_sync_in_process with to_process.run_sync (<a
href="https://redirect.github.com/agronholm/anyio/issues/829">#829</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/agronholm/anyio/compare/4.6.2.post1...4.7.0">compare
view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mkjpryor pushed a commit to azimuth-cloud/azimuth that referenced this issue Jan 7, 2025
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [anyio](https://github.com/agronholm/anyio) from 4.7.0 to 4.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/releases">anyio's
releases</a>.</em></p>
<blockquote>
<h2>4.8.0</h2>
<ul>
<li>Added <strong>experimental</strong> support for running functions in
subinterpreters on Python 3.13 and later</li>
<li>Added support for the <code>copy()</code>, <code>copy_into()</code>,
<code>move()</code> and <code>move_into()</code> methods in
<code>anyio.Path</code>, available in Python 3.14</li>
<li>Changed <code>TaskGroup</code> on asyncio to always spawn tasks
non-eagerly, even if using a task factory created via
<code>asyncio.create_eager_task_factory()</code>, to preserve expected
Trio-like task scheduling semantics (PR by <a
href="https://github.com/agronholm"><code>@​agronholm</code></a> and <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Configure <code>SO_RCVBUF</code>, <code>SO_SNDBUF</code> and
<code>TCP_NODELAY</code> on the selector thread waker socket pair (this
should improve the performance of <code>wait_readable()</code> and
<code>wait_writable()</code> when using the
<code>ProactorEventLoop</code>) (<a
href="https://redirect.github.com/agronholm/anyio/pull/836">#836</a>; PR
by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed <code>AssertionError</code> when using
<code>nest-asyncio</code> (<a
href="https://redirect.github.com/agronholm/anyio/issues/840">#840</a>)</li>
<li>Fixed return type annotation of various context managers'
<code>__exit__</code> method (<a
href="https://redirect.github.com/agronholm/anyio/issues/847">#847</a>;
PR by <a href="https://github.com/Enegg"><code>@​Enegg</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst">anyio's
changelog</a>.</em></p>
<blockquote>
<h1>Version history</h1>
<p>This library adheres to <code>Semantic Versioning 2.0
&lt;http://semver.org/&gt;</code>_.</p>
<p><strong>4.8.0</strong></p>
<ul>
<li>Added <strong>experimental</strong> support for running functions in
subinterpreters on Python
3.13 and later</li>
<li>Added support for the <code>copy()</code>, <code>copy_into()</code>,
<code>move()</code> and <code>move_into()</code>
methods in <code>anyio.Path</code>, available in Python 3.14</li>
<li>Changed <code>TaskGroup</code> on asyncio to always spawn tasks
non-eagerly, even if using a
task factory created via
<code>asyncio.create_eager_task_factory()</code>, to preserve expected
Trio-like task scheduling semantics (PR by <a
href="https://github.com/agronholm"><code>@​agronholm</code></a> and <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Configure <code>SO_RCVBUF</code>, <code>SO_SNDBUF</code> and
<code>TCP_NODELAY</code> on the selector
thread waker socket pair (this should improve the performance of
<code>wait_readable()</code>)
and <code>wait_writable()</code> when using the
<code>ProactorEventLoop</code>
(<code>[#836](agronholm/anyio#836)
&lt;https://github.com/agronholm/anyio/pull/836&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed <code>AssertionError</code> when using
<code>nest-asyncio</code>
(<code>[#840](agronholm/anyio#840)
&lt;https://github.com/agronholm/anyio/issues/840&gt;</code>_)</li>
<li>Fixed return type annotation of various context managers'
<code>__exit__</code> method
(<code>[#847](agronholm/anyio#847)
&lt;https://github.com/agronholm/anyio/issues/847&gt;</code>_; PR by <a
href="https://github.com/Enegg"><code>@​Enegg</code></a>)</li>
</ul>
<p><strong>4.7.0</strong></p>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories
(<code>[#764](agronholm/anyio#764)
&lt;https://github.com/agronholm/anyio/issues/764&gt;</code>_)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept
an object with a <code>.fileno()</code> method or an integer handle, and
deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code>
to work even before an async backend is bound to it
(<code>[#819](agronholm/anyio#819)
&lt;https://github.com/agronholm/anyio/issues/819&gt;</code>_)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code>
(used on asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures
(<code>[#815](agronholm/anyio#815)
&lt;https://github.com/agronholm/anyio/issues/815&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the
<code>anyio.AsyncFile</code> class
(<code>[#825](agronholm/anyio#825)
&lt;https://github.com/agronholm/anyio/issues/825&gt;</code>_)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in
cleanup code on Python &gt;= 3.11
(<code>[#832](agronholm/anyio#832)
&lt;https://github.com/agronholm/anyio/issues/832&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when
propagating a <code>CancelledError</code> on exit to a cancelled parent
scope
(<code>[#790](agronholm/anyio#790)
&lt;https://github.com/agronholm/anyio/pull/790&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
<p><strong>4.6.2</strong></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/agronholm/anyio/commit/74022ec53cde6c2e5d7441de37d5a0dcf9d6daad"><code>74022ec</code></a>
Bumped up the version</li>
<li><a
href="https://github.com/agronholm/anyio/commit/264a6f9f911ebd5a6b7d9d79dfa4bf91ac5d8ceb"><code>264a6f9</code></a>
Added support for subinterpreter workers (<a
href="https://redirect.github.com/agronholm/anyio/issues/850">#850</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/6d612a9fbd037352507209543bc8dde6462f62d6"><code>6d612a9</code></a>
Refactored waiting for tasks to complete from task group on the asyncio
backe...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/8b7a5352aec2c0cdd2f9a991da601f2f5b22cf8b"><code>8b7a535</code></a>
Removed the unwarranted gc_collect fixture</li>
<li><a
href="https://github.com/agronholm/anyio/commit/acdac7abf59761a77e17738abfabbda9dea68ad7"><code>acdac7a</code></a>
Changed TaskGroup to always spawn tasks lazily, even with eager task
factorie...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/43e1f5fd133b2f53993d606af207b06a0d09fecc"><code>43e1f5f</code></a>
Fixed <code>__exit__()</code> return type of various context managers
(<a
href="https://redirect.github.com/agronholm/anyio/issues/849">#849</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/e8730ae116aa924b0386fef15dcb3a7c15490283"><code>e8730ae</code></a>
Added preliminary support for Python 3.14 (<a
href="https://redirect.github.com/agronholm/anyio/issues/813">#813</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/9a792f3568f450ad97363d7bf0baa04f768ae291"><code>9a792f3</code></a>
Pruned unnecessary mypy options</li>
<li><a
href="https://github.com/agronholm/anyio/commit/2a105b2bc6ebb4d12b67b4c9c1777ff5cc54f42b"><code>2a105b2</code></a>
Updated downstream test workflow</li>
<li><a
href="https://github.com/agronholm/anyio/commit/3f8c639d36d0ac01d341b25f6f99f1bc7aff6d12"><code>3f8c639</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/agronholm/anyio/issues/846">#846</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/agronholm/anyio/compare/4.7.0...4.8.0">compare
view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
mkjpryor pushed a commit to azimuth-cloud/cluster-api-addon-provider that referenced this issue Jan 15, 2025
Bumps [anyio](https://github.com/agronholm/anyio) from 4.7.0 to 4.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/releases">anyio's
releases</a>.</em></p>
<blockquote>
<h2>4.8.0</h2>
<ul>
<li>Added <strong>experimental</strong> support for running functions in
subinterpreters on Python 3.13 and later</li>
<li>Added support for the <code>copy()</code>, <code>copy_into()</code>,
<code>move()</code> and <code>move_into()</code> methods in
<code>anyio.Path</code>, available in Python 3.14</li>
<li>Changed <code>TaskGroup</code> on asyncio to always spawn tasks
non-eagerly, even if using a task factory created via
<code>asyncio.create_eager_task_factory()</code>, to preserve expected
Trio-like task scheduling semantics (PR by <a
href="https://github.com/agronholm"><code>@​agronholm</code></a> and <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Configure <code>SO_RCVBUF</code>, <code>SO_SNDBUF</code> and
<code>TCP_NODELAY</code> on the selector thread waker socket pair (this
should improve the performance of <code>wait_readable()</code> and
<code>wait_writable()</code> when using the
<code>ProactorEventLoop</code>) (<a
href="https://redirect.github.com/agronholm/anyio/pull/836">#836</a>; PR
by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed <code>AssertionError</code> when using
<code>nest-asyncio</code> (<a
href="https://redirect.github.com/agronholm/anyio/issues/840">#840</a>)</li>
<li>Fixed return type annotation of various context managers'
<code>__exit__</code> method (<a
href="https://redirect.github.com/agronholm/anyio/issues/847">#847</a>;
PR by <a href="https://github.com/Enegg"><code>@​Enegg</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/agronholm/anyio/blob/master/docs/versionhistory.rst">anyio's
changelog</a>.</em></p>
<blockquote>
<h1>Version history</h1>
<p>This library adheres to <code>Semantic Versioning 2.0
&lt;http://semver.org/&gt;</code>_.</p>
<p><strong>4.8.0</strong></p>
<ul>
<li>Added <strong>experimental</strong> support for running functions in
subinterpreters on Python
3.13 and later</li>
<li>Added support for the <code>copy()</code>, <code>copy_into()</code>,
<code>move()</code> and <code>move_into()</code>
methods in <code>anyio.Path</code>, available in Python 3.14</li>
<li>Changed <code>TaskGroup</code> on asyncio to always spawn tasks
non-eagerly, even if using a
task factory created via
<code>asyncio.create_eager_task_factory()</code>, to preserve expected
Trio-like task scheduling semantics (PR by <a
href="https://github.com/agronholm"><code>@​agronholm</code></a> and <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Configure <code>SO_RCVBUF</code>, <code>SO_SNDBUF</code> and
<code>TCP_NODELAY</code> on the selector
thread waker socket pair (this should improve the performance of
<code>wait_readable()</code>)
and <code>wait_writable()</code> when using the
<code>ProactorEventLoop</code>
(<code>[#836](agronholm/anyio#836)
&lt;https://github.com/agronholm/anyio/pull/836&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed <code>AssertionError</code> when using
<code>nest-asyncio</code>
(<code>[#840](agronholm/anyio#840)
&lt;https://github.com/agronholm/anyio/issues/840&gt;</code>_)</li>
<li>Fixed return type annotation of various context managers'
<code>__exit__</code> method
(<code>[#847](agronholm/anyio#847)
&lt;https://github.com/agronholm/anyio/issues/847&gt;</code>_; PR by <a
href="https://github.com/Enegg"><code>@​Enegg</code></a>)</li>
</ul>
<p><strong>4.7.0</strong></p>
<ul>
<li>Updated <code>TaskGroup</code> to work with asyncio's eager task
factories
(<code>[#764](agronholm/anyio#764)
&lt;https://github.com/agronholm/anyio/issues/764&gt;</code>_)</li>
<li>Added the <code>wait_readable()</code> and
<code>wait_writable()</code> functions which will accept
an object with a <code>.fileno()</code> method or an integer handle, and
deprecated
their now obsolete versions (<code>wait_socket_readable()</code> and
<code>wait_socket_writable()</code>) (PR by <a
href="https://github.com/davidbrochart"><code>@​davidbrochart</code></a>)</li>
<li>Changed <code>EventAdapter</code> (an <code>Event</code> with no
bound async backend) to allow <code>set()</code>
to work even before an async backend is bound to it
(<code>[#819](agronholm/anyio#819)
&lt;https://github.com/agronholm/anyio/issues/819&gt;</code>_)</li>
<li>Added support for <code>wait_readable()</code> and
<code>wait_writable()</code> on <code>ProactorEventLoop</code>
(used on asyncio + Windows by default)</li>
<li>Fixed a misleading <code>ValueError</code> in the context of DNS
failures
(<code>[#815](agronholm/anyio#815)
&lt;https://github.com/agronholm/anyio/issues/815&gt;</code>_; PR by <a
href="https://github.com/graingert"><code>@​graingert</code></a>)</li>
<li>Fixed the return type annotations of <code>readinto()</code> and
<code>readinto1()</code> methods in the
<code>anyio.AsyncFile</code> class
(<code>[#825](agronholm/anyio#825)
&lt;https://github.com/agronholm/anyio/issues/825&gt;</code>_)</li>
<li>Fixed <code>TaskInfo.has_pending_cancellation()</code> on asyncio
returning false positives in
cleanup code on Python &gt;= 3.11
(<code>[#832](agronholm/anyio#832)
&lt;https://github.com/agronholm/anyio/issues/832&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
<li>Fixed cancelled cancel scopes on asyncio calling
<code>asyncio.Task.uncancel</code> when
propagating a <code>CancelledError</code> on exit to a cancelled parent
scope
(<code>[#790](agronholm/anyio#790)
&lt;https://github.com/agronholm/anyio/pull/790&gt;</code>_; PR by <a
href="https://github.com/gschaffner"><code>@​gschaffner</code></a>)</li>
</ul>
<p><strong>4.6.2</strong></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/agronholm/anyio/commit/74022ec53cde6c2e5d7441de37d5a0dcf9d6daad"><code>74022ec</code></a>
Bumped up the version</li>
<li><a
href="https://github.com/agronholm/anyio/commit/264a6f9f911ebd5a6b7d9d79dfa4bf91ac5d8ceb"><code>264a6f9</code></a>
Added support for subinterpreter workers (<a
href="https://redirect.github.com/agronholm/anyio/issues/850">#850</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/6d612a9fbd037352507209543bc8dde6462f62d6"><code>6d612a9</code></a>
Refactored waiting for tasks to complete from task group on the asyncio
backe...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/8b7a5352aec2c0cdd2f9a991da601f2f5b22cf8b"><code>8b7a535</code></a>
Removed the unwarranted gc_collect fixture</li>
<li><a
href="https://github.com/agronholm/anyio/commit/acdac7abf59761a77e17738abfabbda9dea68ad7"><code>acdac7a</code></a>
Changed TaskGroup to always spawn tasks lazily, even with eager task
factorie...</li>
<li><a
href="https://github.com/agronholm/anyio/commit/43e1f5fd133b2f53993d606af207b06a0d09fecc"><code>43e1f5f</code></a>
Fixed <code>__exit__()</code> return type of various context managers
(<a
href="https://redirect.github.com/agronholm/anyio/issues/849">#849</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/e8730ae116aa924b0386fef15dcb3a7c15490283"><code>e8730ae</code></a>
Added preliminary support for Python 3.14 (<a
href="https://redirect.github.com/agronholm/anyio/issues/813">#813</a>)</li>
<li><a
href="https://github.com/agronholm/anyio/commit/9a792f3568f450ad97363d7bf0baa04f768ae291"><code>9a792f3</code></a>
Pruned unnecessary mypy options</li>
<li><a
href="https://github.com/agronholm/anyio/commit/2a105b2bc6ebb4d12b67b4c9c1777ff5cc54f42b"><code>2a105b2</code></a>
Updated downstream test workflow</li>
<li><a
href="https://github.com/agronholm/anyio/commit/3f8c639d36d0ac01d341b25f6f99f1bc7aff6d12"><code>3f8c639</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/agronholm/anyio/issues/846">#846</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/agronholm/anyio/compare/4.7.0...4.8.0">compare
view</a></li>
</ul>
</details>
<br />


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

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually 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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants