Skip to content

Commit

Permalink
Bump mypy from 0.940 to 0.981 (#6977)
Browse files Browse the repository at this point in the history
Bumps [mypy](https://github.com/python/mypy) from 0.940 to 0.981.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python/mypy/commit/c7b4714e1f5e3cb8f3fec7426b6538fe1a3dcab1"><code>c7b4714</code></a>
Update version to 0.981</li>
<li><a
href="https://github.com/python/mypy/commit/2bd7da21462a59643f2aec546304db1a624ba285"><code>2bd7da2</code></a>
[0.980 backport] build changes (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13688">#13688</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/2b2953a1392368f623331d5168ccdfd39e37bbee"><code>2b2953a</code></a>
[0.980 backport] Update pos-only unit tests for Python 3.10.7 (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13660">#13660</a>)
(<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13665">#13665</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/ada007841f6a96f68d114769624a0f7b523814a7"><code>ada0078</code></a>
Remove dev from version</li>
<li><a
href="https://github.com/python/mypy/commit/efd1d38fb1db188e56fe6068ebe69d2164462b34"><code>efd1d38</code></a>
[0.980 backport] Fix stubtest custom_typeshed_dir regression (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13656">#13656</a>)
(<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13658">#13658</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/70bc34837ecbafc528e511a46219262736781d43"><code>70bc348</code></a>
[0.980 backport] Allow unpacking from TypeVars with iterable bounds (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13425">#13425</a>)
...</li>
<li><a
href="https://github.com/python/mypy/commit/e43dbb91be8eb167875bb8a9468cf7d286cf0c3e"><code>e43dbb9</code></a>
Work around mypyc test failures in CI (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13593">#13593</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/64add912d9b58340b055df58c8c0e16ba2e8e667"><code>64add91</code></a>
Another cherry-pick fix</li>
<li><a
href="https://github.com/python/mypy/commit/228bd29babd95373867e845b049f0938fe083f44"><code>228bd29</code></a>
Fix error codes option serialization (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13523">#13523</a>)</li>
<li><a
href="https://github.com/python/mypy/commit/1f8061167faac10c02eafba260f6ab8543496f90"><code>1f80611</code></a>
Allow per-module error codes (<a
href="https://github-redirect.dependabot.com/python/mypy/issues/13502">#13502</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/python/mypy/compare/v0.940...v0.981">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mypy&package-manager=pip&previous-version=0.940&new-version=0.981)](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 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>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 30, 2022
1 parent 0047a5b commit cdd25d9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
uses: actions/checkout@v3.0.2
with:
submodules: true
- name: Setup Python 3.8
- name: Setup Python
uses: actions/setup-python@v4.3.0
with:
python-version: 3.8
python-version: 3.9
- name: Cache PyPI
uses: actions/cache@v3.0.11
with:
Expand Down
2 changes: 1 addition & 1 deletion aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ async def _create_connection(
raise
raise UnixClientConnectorError(self.path, req.connection_key, exc) from exc

return cast(ResponseHandler, proto)
return proto


class NamedPipeConnector(BaseConnector):
Expand Down
2 changes: 1 addition & 1 deletion aiohttp/web_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async def start(self) -> None:
assert server is not None
self._server = await loop.create_unix_server(
server,
self._path, # type: ignore[arg-type]
self._path,
ssl=self._ssl_context,
backlog=self._backlog,
)
Expand Down
39 changes: 17 additions & 22 deletions examples/client_ws.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
#!/usr/bin/env python3
"""websocket cmd client for wssrv.py example."""
"""websocket cmd client for web_ws.py example."""

import argparse
import asyncio
import signal
import sys
from contextlib import suppress

import aiohttp


async def start_client(loop, url):
async def start_client(url: str) -> None:
name = input("Please enter your name: ")

# input reader
def stdin_callback():
line = sys.stdin.buffer.readline().decode("utf-8")
if not line:
loop.stop()
else:
ws.send_str(name + ": " + line)

loop.add_reader(sys.stdin.fileno(), stdin_callback)

async def dispatch():
async def dispatch(ws: aiohttp.ClientWebSocketResponse) -> None:
while True:
msg = await ws.receive()

Expand All @@ -30,7 +21,7 @@ async def dispatch():
elif msg.type == aiohttp.WSMsgType.BINARY:
print("Binary: ", msg.data)
elif msg.type == aiohttp.WSMsgType.PING:
ws.pong()
await ws.pong()
elif msg.type == aiohttp.WSMsgType.PONG:
print("Pong received")
else:
Expand All @@ -43,10 +34,18 @@ async def dispatch():

break

# send request
async with aiohttp.ClientSession() as session:
async with session.ws_connect(url, autoclose=False, autoping=False) as ws:
await dispatch()
# send request
dispatch_task = asyncio.create_task(dispatch(ws))

# Exit with Ctrl+D
while line := await asyncio.to_thread(sys.stdin.readline):
await ws.send_str(name + ": " + line)

dispatch_task.cancel()
with suppress(asyncio.CancelledError):
await dispatch_task


ARGS = argparse.ArgumentParser(
Expand All @@ -67,8 +66,4 @@ async def dispatch():

url = f"http://{args.host}:{args.port}"

loop = asyncio.get_event_loop()

loop.add_signal_handler(signal.SIGINT, loop.stop)
loop.create_task(start_client(loop, url))
loop.run_forever()
asyncio.run(start_client(url))
2 changes: 1 addition & 1 deletion examples/fake_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def resolve(self, host, port=0, family=socket.AF_INET):
return await self._resolver.resolve(host, port, family)

async def close(self) -> None:
self._resolver.close()
await self._resolver.close()


class FakeFacebook:
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ multidict==5.2.0
# via
# -r requirements/multidict.txt
# yarl
mypy==0.940 ; implementation_name == "cpython"
mypy==0.981 ; implementation_name == "cpython"
# via
# -r requirements/lint.txt
# -r requirements/test.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-r typing-extensions.txt
aioredis==2.0.1
mypy==0.940; implementation_name=="cpython"
mypy==0.981; implementation_name=="cpython"
pre-commit==2.17.0
pytest==7.1.3
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Brotli==1.0.9
coverage==6.4.2
cryptography==36.0.1; platform_machine!="i686" # no 32-bit wheels; no python 3.9 wheels yet
freezegun==1.1.0
mypy==0.940; implementation_name=="cpython"
mypy==0.981; implementation_name=="cpython"
mypy-extensions==0.4.3; implementation_name=="cpython"
proxy.py ~= 2.4.4rc3
pytest==7.1.3
Expand Down

0 comments on commit cdd25d9

Please sign in to comment.