Skip to content

Commit

Permalink
Add WebSocket bindings (#419)
Browse files Browse the repository at this point in the history
`awscrt.websocket` contains bindings for aws-c-http's [websocket.h](https://github.com/awslabs/aws-c-http/blob/v0.6.28/include/aws/http/websocket.h)

This code has already been reviewed in 3 incremental pull-requests:
- #411
- #414
- #416
  • Loading branch information
graebm authored Dec 6, 2022
1 parent fbe10df commit c3d2b5e
Show file tree
Hide file tree
Showing 20 changed files with 1,785 additions and 82 deletions.
25 changes: 1 addition & 24 deletions .builder/actions/aws_crt_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,6 @@
PYTHON_DEFAULT = '{python}'


class InstallPythonReqs(Builder.Action):
def __init__(self, trust_hosts=False, deps=[], python=PYTHON_DEFAULT):
self.trust_hosts = trust_hosts
self.core = ('pip', 'setuptools', 'wheel')
self.deps = deps
self.python = python

def run(self, env):
trusted_hosts = []
# These are necessary for older hosts with out of date certs or pip
if self.trust_hosts:
trusted_hosts = ['--trusted-host', 'pypi.org', '--trusted-host', 'files.pythonhosted.org']

# setuptools must be installed before packages that need it, or else it won't be in the
# package database in time for the subsequent install and pip fails
steps = []
for deps in (self.core, self.deps):
if deps:
steps.append([self.python, '-m', 'pip', 'install', '--upgrade', *trusted_hosts, *deps])

return Builder.Script(steps, name='install-python-reqs')


class SetupForTests(Builder.Action):

def run(self, env):
Expand Down Expand Up @@ -247,7 +224,7 @@ def run(self, env):
python = args.python if args.python else PYTHON_DEFAULT

actions = [
InstallPythonReqs(deps=[], python=python),
[python, '-m', 'pip', 'install', '--upgrade', '--requirement', 'requirements-dev.txt'],
SetupForTests(),
[python, '-m', 'pip', 'install', '--verbose', '.'],
# "--failfast" because, given how our leak-detection in tests currently works,
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
AWS_SECRET_ACCESS_KEY:
AWS_DEFAULT_REGION:
run: |
python3 -m pip install --upgrade --requirement requirements-dev.txt
python3 -m pip install . --verbose
python3 -m unittest discover --failfast --verbose
Expand Down Expand Up @@ -166,7 +167,7 @@ jobs:
run: |
python3 -m pip install sphinx
python3 -m pip install --verbose .
./scripts/make-docs.sh
./scripts/make-docs.py
check-submodules:
runs-on: ubuntu-20.04 # latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
python3 -m pip install sphinx
python3 -m pip install --verbose .
./scripts/make-docs.sh
./scripts/make-docs.py
- name: Commit
run: |
Expand Down
3 changes: 2 additions & 1 deletion awscrt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
'http',
'io',
'mqtt',
's3'
's3',
'websocket',
]

__version__ = '1.0.0.dev0'
Expand Down
Loading

0 comments on commit c3d2b5e

Please sign in to comment.