Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

Commit e803ae8

Browse files
Merge pull request #725 from philipdp123/bottle-websocket-fix
Fix WebSocket import error for Python 3.12 compatibility
2 parents a589ad0 + 3926a09 commit e803ae8

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ubuntu-20.04, windows-latest, macos-latest]
16-
python-version: [3.7, 3.8, 3.9, "3.10"]
16+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"]
1717
exclude:
1818
- os: macos-latest
1919
python-version: 3.7

eel/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
import gevent as gvt
1414
import json as jsn
1515
import bottle as btl
16-
import bottle.ext.websocket as wbs
16+
try:
17+
import bottle_websocket as wbs
18+
except ImportError:
19+
import bottle.ext.websocket as wbs
1720
import re as rgx
1821
import os
1922
import eel.browsers as brw

requirements-meta.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ tox>=3.15.2,<4.0.0
22
tox-pyenv==1.1.0
33
tox-gh-actions==2.0.0
44
virtualenv>=16.7.10
5+
setuptools

requirements-test.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.[jinja2]
22

3-
psutil==5.9.2
4-
pytest==7.0.1
5-
pytest-timeout==2.1.0
3+
psutil>=5.0.0,<6.0.0
4+
pytest>=7.0.0,<8.0.0
5+
pytest-timeout>=2.0.0,<3.0.0
66
selenium>=4.0.0,<5.0.0
77
webdriver_manager>=4.0.0,<5.0.0
88
mypy==0.971
9-
pyinstaller==4.10
10-
types-setuptools==67.2.0.1
9+
pyinstaller
10+
types-setuptools

tox.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = typecheck,py{37,38,39,310}
2+
envlist = typecheck,py{37,38,39,310,311,312}
33

44
[pytest]
55
timeout = 30
@@ -10,6 +10,9 @@ python =
1010
3.8: py38
1111
3.9: py39
1212
3.10: py310
13+
3.11: py311
14+
3.12: py312
15+
1316

1417
[testenv]
1518
description = run py.test tests

0 commit comments

Comments
 (0)