[PR #104] [MERGED] fix python 3.10 bug by updating dependencies #104

Closed
opened 2026-03-03 01:21:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cs01/termpair/pull/104
Author: @cs01
Created: 6/22/2022
Status: Merged
Merged: 6/22/2022
Merged by: @cs01

Base: masterHead: cs01/fix-python-3.10-bug


📝 Commits (1)

📊 Changes

10 files changed (+88 additions, -37 deletions)

View changed files

📝 .github/workflows/build_executable.yml (+3 -3)
📝 .github/workflows/tests.yml (+4 -4)
📝 CHANGELOG.md (+4 -0)
📝 CONTRIBUTING.md (+11 -3)
📝 noxfile.py (+10 -1)
📝 requirements.txt (+49 -19)
📝 setup.py (+2 -2)
📝 termpair/constants.py (+2 -2)
📝 termpair/frontend_src/src/constants.tsx (+1 -1)
📝 termpair/share.py (+2 -2)

📄 Description

  • I have added an entry to CHANGELOG.md

Summary of changes

Fix error so Python 3.10 can use termpair.

The fix was to update the websockets package.

Ran

pip-compile > requirements.txt

which updated dependencies and fixed the issue

Test plan

Before

> termpair share --host "https://chadsmith.dev/termpair/" --port 443
TermPair encountered an error. If you think this is a bug, it can be reported at https://github.com/cs01/termpair/issues

Traceback (most recent call last):
  File "/home/csmith/git/termpair/termpair/main.py", line 135, in main
    run_command(args)
  File "/home/csmith/git/termpair/termpair/main.py", line 111, in run_command
    asyncio.get_event_loop().run_until_complete(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/home/csmith/git/termpair/termpair/share.py", line 413, in broadcast_terminal
    async with websockets.connect(ws_endpoint, ssl=ssl_context) as ws:
  File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 604, in __aenter__
    return await self
  File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 622, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1098, in _create_connection_transport
    protocol = protocol_factory()
  File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 160, in __init__
    super().__init__(**kwargs)
  File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 154, in __init__
    self._drain_lock = asyncio.Lock(
  File "/usr/lib/python3.10/asyncio/locks.py", line 77, in __init__
    super().__init__(loop=loop)
  File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary

After

> termpair share --host "https://chadsmith.dev/termpair/" --port 443

works


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cs01/termpair/pull/104 **Author:** [@cs01](https://github.com/cs01) **Created:** 6/22/2022 **Status:** ✅ Merged **Merged:** 6/22/2022 **Merged by:** [@cs01](https://github.com/cs01) **Base:** `master` ← **Head:** `cs01/fix-python-3.10-bug` --- ### 📝 Commits (1) - [`e2dd791`](https://github.com/cs01/termpair/commit/e2dd791cd652bea619c00ded58823b474d5bfb72) update requirements.txt ### 📊 Changes **10 files changed** (+88 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build_executable.yml` (+3 -3) 📝 `.github/workflows/tests.yml` (+4 -4) 📝 `CHANGELOG.md` (+4 -0) 📝 `CONTRIBUTING.md` (+11 -3) 📝 `noxfile.py` (+10 -1) 📝 `requirements.txt` (+49 -19) 📝 `setup.py` (+2 -2) 📝 `termpair/constants.py` (+2 -2) 📝 `termpair/frontend_src/src/constants.tsx` (+1 -1) 📝 `termpair/share.py` (+2 -2) </details> ### 📄 Description <!-- add an 'x' in the brackets below --> * [x] I have added an entry to `CHANGELOG.md` ## Summary of changes Fix error so Python 3.10 can use termpair. The fix was to update the websockets package. Ran ``` pip-compile > requirements.txt ``` which updated dependencies and fixed the issue ## Test plan <!-- provide evidence of testing, preferably with command(s) that can be copy+pasted by others --> Before ``` > termpair share --host "https://chadsmith.dev/termpair/" --port 443 TermPair encountered an error. If you think this is a bug, it can be reported at https://github.com/cs01/termpair/issues Traceback (most recent call last): File "/home/csmith/git/termpair/termpair/main.py", line 135, in main run_command(args) File "/home/csmith/git/termpair/termpair/main.py", line 111, in run_command asyncio.get_event_loop().run_until_complete( File "/usr/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete return future.result() File "/home/csmith/git/termpair/termpair/share.py", line 413, in broadcast_terminal async with websockets.connect(ws_endpoint, ssl=ssl_context) as ws: File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 604, in __aenter__ return await self File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 622, in __await_impl__ transport, protocol = await self._create_connection() File "/usr/lib/python3.10/asyncio/base_events.py", line 1080, in create_connection transport, protocol = await self._create_connection_transport( File "/usr/lib/python3.10/asyncio/base_events.py", line 1098, in _create_connection_transport protocol = protocol_factory() File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/client.py", line 160, in __init__ super().__init__(**kwargs) File "/home/csmith/git/termpair/venv/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 154, in __init__ self._drain_lock = asyncio.Lock( File "/usr/lib/python3.10/asyncio/locks.py", line 77, in __init__ super().__init__(loop=loop) File "/usr/lib/python3.10/asyncio/mixins.py", line 17, in __init__ raise TypeError( TypeError: As of 3.10, the *loop* parameter was removed from Lock() since it is no longer necessary ``` After ``` > termpair share --host "https://chadsmith.dev/termpair/" --port 443 ``` works --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 01:21:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termpair#104
No description provided.