Skip to content

Commit

Permalink
Merge branch 'master' into get_app_data
Browse files Browse the repository at this point in the history
  • Loading branch information
chakatodd committed Sep 29, 2015
2 parents 14257cc + 3257877 commit 47a8be4
Show file tree
Hide file tree
Showing 26 changed files with 1,480 additions and 1,877 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ doc/_build/
.eggs
examples/simple/*.cert
examples/simple/*.pkey
.cache
40 changes: 30 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ language: python

cache:
directories:
- $HOME/.cache/pip
# - $HOME/.cache/pip
- $HOME/ossl-098

env:
global:
Expand All @@ -25,6 +26,8 @@ matrix:
env: TOXENV=py33
- python: "3.4"
env: TOXENV=py34
- python: "3.5"
env: TOXENV=py35
- python: "pypy"
env: TOXENV=pypy

Expand All @@ -37,19 +40,15 @@ matrix:
env: TOXENV=py33-cryptographyMaster
- python: "3.4"
env: TOXENV=py34-cryptographyMaster
- python: "3.5"
env: TOXENV=py35-cryptographyMaster
- python: "pypy"
env: TOXENV=pypy-cryptographyMaster

# Also run at least a little bit against an older version of OpenSSL.
- python: "2.7"
env:
OPENSSL=0.9.8 TOXENV=py27
addons:
apt:
sources:
- lucid
packages:
- libssl-dev/lucid

# Meta
- python: "2.7"
Expand Down Expand Up @@ -82,9 +81,9 @@ matrix:
- env: TOXENV=py27-cryptographyMaster
- env: TOXENV=py33-cryptographyMaster
- env: TOXENV=py34-cryptographyMaster
- env: TOXENV=py35-cryptographyMaster
- env: TOXENV=pypy-cryptographyMaster
- env: OPENSSL=0.9.8 TOXENV=py27
- env: TOXENV=flake8
- env: TOXENV=pypy

install:
Expand All @@ -110,10 +109,31 @@ script:
export CFLAGS="-I/usr/local/opt/openssl/include"
export PATH="/usr/local/opt/openssl/bin:$PATH"
fi
~/.venv/bin/tox
# This section potentially downloads, compiles and installs openssl 0.9.8zg
if [[ "${OPENSSL}" == "0.9.8" ]]; then
# download, compile, and install if it's not already present via travis cache
if [[ ! -f "$HOME/ossl-098/bin/openssl" ]]; then
curl -O https://www.openssl.org/source/openssl-0.9.8zg.tar.gz
tar zxvf openssl-0.9.8zg.tar.gz
cd openssl-0.9.8zg
echo "OPENSSL_0.9.8ZG_CUSTOM {
global:
*;
};" > openssl.ld
./config -Wl,--version-script=openssl.ld -Wl,-Bsymbolic-functions -fPIC shared --prefix=$HOME/ossl-098
make install
tree $HOME/ossl-098
fi
export PATH="$HOME/ossl-098/bin:$PATH"
export CFLAGS="-I$HOME/ossl-098/include"
export LDFLAGS="-L$HOME/ossl-098/lib"
export LD_LIBRARY_PATH="$HOME/ossl-098/lib"
fi
openssl version
~/.venv/bin/tox -v
after_script:
- source ~/.venv/bin/activate && bash <(curl -s https://codecov.io/bash) -e TRAVIS_OS_NAME,TOXENV,OPENSSL
- ./.travis/upload_coverage.sh

notifications:
email: false
10 changes: 10 additions & 0 deletions .travis/upload_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

set -e
set -x

NO_COVERAGE_TOXENVS=(pypy docs check-manifest pypi-readme flake8 pyroma)
if ! [[ "${NO_COVERAGE_TOXENVS[*]}" =~ "${TOXENV}" ]]; then
source ~/.venv/bin/activate
bash <(curl -s https://codecov.io/bash) -e TRAVIS_OS_NAME,TOXENV,OPENSSL
fi
21 changes: 12 additions & 9 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Filing bug reports
------------------

Bug reports are very welcome.
Please file them on the GitHub issue tracker.
Please file them on the `GitHub issue tracker`_.
Good bug reports come with extensive descriptions of the error and how to reproduce it.
Reporters are strongly encouraged to include an `short, self contained, correct example <http://www.sscce.org/>`_.

Expand All @@ -29,22 +29,23 @@ Patches
All patches to pyOpenSSL should be submitted in the form of pull requests to the main pyOpenSSL repository, `pyca/pyopenssl`_.
These pull requests should satisfy the following properties:

- The branch referenced should be a `feature branch`_ focusing on one particular improvement to pyOpenSSL.
Create different branches and different pull requests for unrelated features or bugfixes.
- The pull request should focus on one particular improvement to pyOpenSSL.
Create different pull requests for unrelated features or bugfixes.
- Code should follow `PEP 8`_, especially in the "do what code around you does" sense.
One notable way pyOpenSSL code differs, for example, is that there should be three empty lines between module-level elements,and two empty lines between class-level elements.
Methods and functions are named in ``snake_case``.
Follow OpenSSL naming for callables whenever possible is preferred.
- New tests should use `py.test-style assertions`_ instead of the old `self.assertXYZ`-style.
- Pull requests that introduce code must test all new behavior they introduce as well as for previously untested or poorly tested behavior that they touch.
- Pull requests are not allowed to break existing tests.
We usually don't comment on pull requests that are breaking the CI because we consider them work in progress.
Please note that not having 100% code coverage for the code you wrote/touched also causes our CI to fail.
- Pull requests that introduce features or fix bugs should note those changes in the ``ChangeLog`` text file in the root of the repository.
They should also document the changes, both in docstrings and in the documentation in the ``doc/`` directory.

Finally, pull requests must be reviewed before merging.
This process mirrors the `cryptography code review process`_.
Everyone can perform reviews; this is a very valuable way to contribute, and is highly encouraged.

Pull requests are merged by members of PyCA.
Pull requests are merged by `members of PyCA`_.
They should, of course, keep all the requirements detailed in this document as well as the ``pyca/cryptography`` merge requirements in mind.

The final responsibility for the reviewing of merged code lies with the person merging it.
Expand All @@ -60,12 +61,14 @@ You can also ask questions on our `mailing list`_.
Wherever we interact, we strive to follow the `Python Community Code of Conduct`_.


.. _GitHub issue tracker: https://github.com/pyca/pyopenssl/issues
.. _GPG: http://en.wikipedia.org/wiki/GNU_Privacy_Guard
.. _Keybase: https://keybase.io/hynek
.. _pyca/pyopenssl: https://github.com/pyca/pyopenssl
.. _PEP 8: https://www.python.org/dev/peps/pep-0008/
.. _py.test-style assertions: https://pytest.org/latest/assert.html
.. _cryptography code review process: https://cryptography.io/en/latest/development/reviewing-patches/
.. _feature branch: https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow
.. _freenode: https://freenode.net
.. _`mailing list`: https://mail.python.org/mailman/listinfo/cryptography-dev
.. _`Python Community Code of Conduct`: https://www.python.org/psf/codeofconduct/
.. _mailing list: https://mail.python.org/mailman/listinfo/cryptography-dev
.. _Python Community Code of Conduct: https://www.python.org/psf/codeofconduct/
.. _members of PyCA: https://github.com/orgs/pyca/people
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2015-09-07 Sam Lee <[email protected]>

* OpenSSL/SSL.py, OpenSSL/test/test_ssl.py: Implemented
the ``Connection.state_string()`` function, using
the OpenSSL binding state_string_long.

2015-08-17 Maximilian Hils <[email protected]>

* OpenSSL/SSL.py, OpenSSL/test/test_ssl.py: Add support for
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ recursive-include examples *
recursive-include rpm *
recursive-exclude leakcheck *.py *.pem
prune doc/_build
prune .travis
Loading

0 comments on commit 47a8be4

Please sign in to comment.