Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into blacken
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Oct 26, 2023
2 parents 2970fb5 + 52ce346 commit ae69a91
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 49 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
# latest pylint/astroid doesn't support 3.7
# python3.7 is covered in build_and_test_old_deps
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12-dev']

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -52,7 +54,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['pypy-3.7']
python-version: ['pypy-3.9','pypy-3.10']

steps:
- uses: actions/checkout@v3
Expand All @@ -66,11 +68,12 @@ jobs:
- run: make test

build_and_test_latest:
# use latest package versions meeting .in requirements
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ['3.12-dev']
steps:
- uses: actions/checkout@v3
- name: Setup Python
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release history

## trio-websocket 0.11.1 (2023-09-26)
### Changed
- remove exceptiongroup dependency for Python >= 3.11

## trio-websocket 0.10.4 (2023-09-06)
### Fixed
- fix client hang when connection lost just after remote closes
Expand Down
36 changes: 11 additions & 25 deletions requirements-dev-full.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements-dev-full.txt requirements-dev.in requirements-extras.in setup.py
#
alabaster==0.7.13
# via sphinx
astroid==2.15.0
astroid==3.0.0
# via pylint
async-generator==1.10
# via trio
attrs==22.2.0
# via
# -r requirements-dev.in
# outcome
# pytest
# trio
babel==2.12.1
# via sphinx
Expand All @@ -34,14 +33,14 @@ coverage[toml]==7.2.1
# via pytest-cov
cryptography==39.0.2
# via trustme
dill==0.3.6
dill==0.3.7
# via pylint
docutils==0.18.1
# via
# readme-renderer
# sphinx
# sphinx-rtd-theme
exceptiongroup==1.1.0
exceptiongroup==1.1.3 ; python_version < "3.11"
# via
# pytest
# trio
Expand All @@ -57,14 +56,10 @@ imagesize==1.4.1
# via sphinx
importlib-metadata==6.0.0
# via
# build
# click
# keyring
# pluggy
# pytest
# sphinx
# twine
importlib-resources==5.12.0
importlib-resources==6.1.0
# via keyring
iniconfig==2.0.0
# via pytest
Expand All @@ -76,8 +71,6 @@ jinja2==3.1.2
# via sphinx
keyring==23.13.1
# via twine
lazy-object-proxy==1.9.0
# via astroid
markdown-it-py==2.2.0
# via rich
markupsafe==2.1.2
Expand All @@ -97,7 +90,7 @@ packaging==23.0
# build
# pytest
# sphinx
pip-tools==6.12.3
pip-tools==6.14.0
# via -r requirements-dev.in
pkginfo==1.9.6
# via twine
Expand All @@ -112,11 +105,11 @@ pygments==2.14.0
# readme-renderer
# rich
# sphinx
pylint==2.17.0
pylint==3.0.0a7
# via -r requirements-extras.in
pyproject-hooks==1.0.0
# via build
pytest==7.2.2
pytest==7.4.2
# via
# -r requirements-dev.in
# pytest-cov
Expand All @@ -125,7 +118,7 @@ pytest-cov==4.0.0
# via -r requirements-dev.in
pytest-trio==0.8.0
# via -r requirements-dev.in
pytz==2022.7.1
pytz==2023.3.post1
# via babel
readme-renderer==37.3
# via twine
Expand Down Expand Up @@ -175,6 +168,7 @@ tomli==2.0.1
# via
# build
# coverage
# pip-tools
# pylint
# pyproject-hooks
# pytest
Expand All @@ -188,15 +182,9 @@ trustme==0.9.0
# via -r requirements-dev.in
twine==4.0.2
# via -r requirements-extras.in
typed-ast==1.5.4
# via astroid
typing-extensions==4.5.0
typing-extensions==4.8.0
# via
# astroid
# h11
# importlib-metadata
# markdown-it-py
# platformdirs
# pylint
# rich
urllib3==1.26.15
Expand All @@ -207,8 +195,6 @@ webencodings==0.5.1
# via bleach
wheel==0.38.4
# via pip-tools
wrapt==1.15.0
# via astroid
wsproto==1.2.0
# via trio-websocket (setup.py)
zipp==3.15.0
Expand Down
24 changes: 6 additions & 18 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.7
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile --output-file=requirements-dev.txt requirements-dev.in setup.py
Expand All @@ -10,7 +10,6 @@ attrs==22.2.0
# via
# -r requirements-dev.in
# outcome
# pytest
# trio
build==0.10.0
# via pip-tools
Expand All @@ -20,9 +19,9 @@ click==8.1.3
# via pip-tools
coverage[toml]==7.2.1
# via pytest-cov
cryptography==39.0.2
cryptography==41.0.4
# via trustme
exceptiongroup==1.1.0
exceptiongroup==1.1.3 ; python_version < "3.11"
# via
# pytest
# trio
Expand All @@ -33,12 +32,6 @@ idna==3.4
# via
# trio
# trustme
importlib-metadata==6.0.0
# via
# build
# click
# pluggy
# pytest
iniconfig==2.0.0
# via pytest
outcome==1.2.0
Expand All @@ -49,15 +42,15 @@ packaging==23.0
# via
# build
# pytest
pip-tools==6.12.3
pip-tools==6.14.0
# via -r requirements-dev.in
pluggy==1.0.0
# via pytest
pycparser==2.21
# via cffi
pyproject-hooks==1.0.0
# via build
pytest==7.2.2
pytest==7.4.2
# via
# -r requirements-dev.in
# pytest-cov
Expand All @@ -74,6 +67,7 @@ tomli==2.0.1
# via
# build
# coverage
# pip-tools
# pyproject-hooks
# pytest
trio==0.22.0
Expand All @@ -82,16 +76,10 @@ trio==0.22.0
# trio-websocket (setup.py)
trustme==0.9.0
# via -r requirements-dev.in
typing-extensions==4.5.0
# via
# h11
# importlib-metadata
wheel==0.38.4
# via pip-tools
wsproto==1.2.0
# via trio-websocket (setup.py)
zipp==3.15.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
python_requires=">=3.7",
keywords='websocket client server trio',
packages=find_packages(exclude=['docs', 'examples', 'tests']),
install_requires=[
'exceptiongroup',
'exceptiongroup; python_version<"3.11"',
'trio>=0.11',
'wsproto>=0.14',
],
Expand Down
8 changes: 7 additions & 1 deletion trio_websocket/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
)
import wsproto.utilities

if sys.version_info < (3, 11):
if sys.version_info < (3, 11): # pragma: no cover
# pylint doesn't care about the version_info check, so need to ignore the warning
from exceptiongroup import BaseExceptionGroup # pylint: disable=redefined-builtin

_TRIO_MULTI_ERROR = tuple(map(int, trio.__version__.split(".")[:2])) < (0, 22)
Expand Down Expand Up @@ -68,10 +69,15 @@ def __exit__(self, ty, value, tb):
if value is None or not self._armed:
return False

<<<<<<< HEAD
if _TRIO_MULTI_ERROR:
filtered_exception = trio.MultiError.filter( # pylint: disable=no-member
_ignore_cancel, value
) # pylint: disable=no-member
=======
if _TRIO_MULTI_ERROR: # pragma: no cover
filtered_exception = trio.MultiError.filter(_ignore_cancel, value) # pylint: disable=no-member
>>>>>>> origin/master
elif isinstance(value, BaseExceptionGroup):
filtered_exception = value.subgroup(
lambda exc: not isinstance(exc, trio.Cancelled)
Expand Down
2 changes: 1 addition & 1 deletion trio_websocket/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.11.0-dev"
__version__ = '0.12.0-dev'

0 comments on commit ae69a91

Please sign in to comment.