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

Improve Python 3.12 compatibility #389

Merged
merged 9 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
FORCE_COLOR: "1" # Make tools pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"
PYTHON_LATEST: "3.11"
PYTHON_LATEST: "3.12"

# For re-actors/checkout-python-sdist
sdist-artifact: python-package-distributions
Expand Down Expand Up @@ -69,10 +69,11 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
experimental: [false]
include:
- python-version: "~3.12.0-0"
experimental: true
# include:
# - python-version: "~3.12.0-0"
# experimental: true
steps:
- name: Checkout the source code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions changes/389.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Relaxed our direct dependnecy version range of aiohttp ("3.8.5 only" to "3.8.5 and higher") to enable installation on Python 3.12
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-e .
aioconsole==0.6.1
aiohttp==3.8.5
aioconsole==0.7.0
aiohttp==3.9.1
aiotools==1.6.0
attrs==23.1.0
black==22.10.0
Expand All @@ -19,5 +19,5 @@ pytest==7.4.0
terminaltables==3.1.10
towncrier==23.6.0
types-requests
uvloop==0.17.0
uvloop==0.19.0
build==0.10.0
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ packages = find:
python_requires = >=3.8
install_requires =
attrs>=20
aiohttp~=3.8.5
click>=8
aiohttp>=3.8.5
click>=8.0
janus>=1.0
jinja2>=3.1.2
backports.strenum>=1.2.4; python_version<"3.11"
terminaltables
trafaret>=2.1.1
typing-extensions>=4.1
prompt_toolkit>=3.0
aioconsole
aioconsole>=0.7.0

[options.packages.find]
exclude =
Expand Down
8 changes: 6 additions & 2 deletions tests/test_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ async def _ui_create_event() -> asyncio.Event:
# In this case, the error is propagated to the upper stack
# immediately here.
fut = asyncio.run_coroutine_threadsafe(
command_done_event.wait(), monitor._ui_loop # type: ignore
command_done_event.wait(), # type: ignore
monitor._ui_loop,
)
await asyncio.wrap_future(fut)
finally:
Expand Down Expand Up @@ -254,8 +255,11 @@ async def _interact():
await asyncio.sleep(0.2)
try:
pipe_input.send_text("await asyncio.sleep(0.1, result=333)\r\n")
pipe_input.flush()
await asyncio.sleep(0.1)
pipe_input.send_text("foo\r\n")
await asyncio.sleep(0.25)
pipe_input.flush()
await asyncio.sleep(0.4)
resp = stdout_buf._buffer.getvalue()
assert "This console is running in an asyncio event loop." in resp
assert "333" in resp
Expand Down