Skip to content

Commit 25b849a

Browse files
authored
FIx #620 Various Python 3.13 fixes (#621)
1 parent 43d7c6c commit 25b849a

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

pykern/api/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def destroy(self):
253253
self._destroyed = True
254254
self._client.remove_call(self._call_id)
255255
if x := getattr(self._reply_q, "shutdown", None):
256-
x.shutdown(immediate=True)
256+
x(immediate=True)
257257
else:
258258
# Inferior to shutdown, but necessary pre-Python 3.13
259259
self._reply_q.put_nowait(None)

pykern/pkcli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
The basic form is: <project> <simple-module> <function>. <simple-module>
99
is the module without `<root_pkg>.pkcli`. <function> is any function
10-
that begins with a letter and contains word characters (\w).
10+
that begins with a letter and contains word characters.
1111
1212
If the module only has one public function named default_command,
1313
the form is: <project> <simple-module>.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""Force a coroutine never awaited warning
32
43
:copyright: Copyright (c) 2023 RadiaSoft LLC. All Rights Reserved.
@@ -7,9 +6,11 @@
76

87

98
def test_coroutine_never_awaited():
9+
from pykern import pkdebug
1010
import asyncio
1111

1212
async def coroutine():
1313
asyncio.sleep(0)
1414

15+
pkdebug.pkdlog("expect 'RuntimeWarning: coroutine 'sleep' was never awaited'")
1516
asyncio.run(coroutine())

tests/sql_db_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def _validate_schema(meta):
127127
t = []
128128
i = []
129129
for l in re.split(
130-
"\s*\n\s*",
130+
r"\s*\n\s*",
131131
# Assumes in same directory
132132
subprocess.check_output(["sqlite3", _PATH, ".schema"], text=True),
133133
):

0 commit comments

Comments
 (0)