Skip to content

Commit

Permalink
Merge pull request #107 from njsmith/ssl
Browse files Browse the repository at this point in the history
SSL support and a Stream API
  • Loading branch information
njsmith authored Jun 12, 2017
2 parents 9b04305 + b61535f commit ec4cdee
Show file tree
Hide file tree
Showing 45 changed files with 5,253 additions and 374 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ matrix:
- os: linux
language: generic
env: USE_PYPY_NIGHTLY=1
# 5.7.1 has some minor bugs that are nonetheless annoying/hard to
# work around; let's wait for the next beta before we start
# testing pypy releases.
# - os: linux
# language: generic
# env: USE_PYPY_RELEASE=1
- os: osx
language: generic
env: MACPYTHON=3.5.3
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ include LICENSE LICENSE.MIT LICENSE.APACHE2
include README.rst
include CODE_OF_CONDUCT.md
include test-requirements.txt
recursive-include trio/tests/test_ssl_certs *.pem
recursive-include docs *
prune docs/build
16 changes: 14 additions & 2 deletions ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -ex

if [ "$TRAVIS_OS_NAME" = "osx" ]; then
curl -o macpython.pkg https://www.python.org/ftp/python/${MACPYTHON}/python-${MACPYTHON}-macosx10.6.pkg
curl -Lo macpython.pkg https://www.python.org/ftp/python/${MACPYTHON}/python-${MACPYTHON}-macosx10.6.pkg
sudo installer -pkg macpython.pkg -target /
ls /Library/Frameworks/Python.framework/Versions/*/bin/
if expr "${MACPYTHON}" : 2; then
Expand All @@ -18,7 +18,7 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
fi

if [ "$USE_PYPY_NIGHTLY" = "1" ]; then
curl -o pypy.tar.bz2 http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-latest-linux64.tar.bz2
curl -Lo pypy.tar.bz2 http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-latest-linux64.tar.bz2
tar xaf pypy.tar.bz2
# something like "pypy-c-jit-89963-748aa3022295-linux64"
PYPY_DIR=$(echo pypy-c-jit-*)
Expand All @@ -29,6 +29,18 @@ if [ "$USE_PYPY_NIGHTLY" = "1" ]; then
source testenv/bin/activate
fi

if [ "$USE_PYPY_RELEASE" = "1" ]; then
curl -Lo pypy.tar.bz2 https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-5.7.1-beta-linux_x86_64-portable.tar.bz2
tar xaf pypy.tar.bz2
# something like "pypy3.5-5.7.1-beta-linux_x86_64-portable"
PYPY_DIR=$(echo pypy3.5-*)
PYTHON_EXE=$PYPY_DIR/bin/pypy3
$PYTHON_EXE -m ensurepip
$PYTHON_EXE -m pip install virtualenv
$PYTHON_EXE -m virtualenv testenv
source testenv/bin/activate
fi

pip install -U pip setuptools wheel

python setup.py sdist --formats=zip
Expand Down
11 changes: 8 additions & 3 deletions docs/source/reference-core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ work that was happening within the scope that was cancelled.
Looking at this, you might wonder how you can tell whether the inner
block timed out – perhaps you want to do something different, like try
a fallback procedure or report a failure to our caller. To make this
easier, :func:`move_on_after`'s ``__enter__`` function returns an
easier, :func:`move_on_after`s ``__enter__`` function returns an
object representing this cancel scope, which we can use to check
whether this scope caught a :exc:`Cancelled` exception::

Expand Down Expand Up @@ -1364,6 +1364,9 @@ don't have any special access to trio's internals.)
.. autoclass:: Lock
:members:

.. autoclass:: StrictFIFOLock
:members:

.. autoclass:: Condition
:members:

Expand Down Expand Up @@ -1534,12 +1537,14 @@ trio's internal scheduling decisions.
Exceptions
----------

.. autoexception:: TrioInternalError

.. autoexception:: Cancelled

.. autoexception:: TooSlowError

.. autoexception:: WouldBlock

.. autoexception:: ResourceBusyError

.. autoexception:: RunFinishedError

.. autoexception:: TrioInternalError
8 changes: 4 additions & 4 deletions docs/source/reference-hazmat.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ All environments provide the following functions:

:raises TypeError:
if the given object is not of type :func:`socket.socket`.
:raises RuntimeError:
:raises trio.ResourceBusyError:
if another task is already waiting for the given socket to
become readable.

Expand All @@ -62,7 +62,7 @@ All environments provide the following functions:

:raises TypeError:
if the given object is not of type :func:`socket.socket`.
:raises RuntimeError:
:raises trio.ResourceBusyError:
if another task is already waiting for the given socket to
become writable.

Expand All @@ -85,7 +85,7 @@ Unix-like systems provide the following functions:

:arg fd:
integer file descriptor, or else an object with a ``fileno()`` method
:raises RuntimeError:
:raises trio.ResourceBusyError:
if another task is already waiting for the given fd to
become readable.

Expand All @@ -103,7 +103,7 @@ Unix-like systems provide the following functions:

:arg fd:
integer file descriptor, or else an object with a ``fileno()`` method
:raises RuntimeError:
:raises trio.ResourceBusyError:
if another task is already waiting for the given fd to
become writable.

Expand Down
Loading

0 comments on commit ec4cdee

Please sign in to comment.