forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into unsupportedmethod-str-7744
* trunk: (2745 commits) too many newlines as per review dev0 prefix ok maybe fix twistedchecker for realises? fix twistedchecker topfile make the test pass add tox minversion because of `extras` usage failing test topfile Explicitly ignore extension modules to work around twisted/twistedchecker#118. twistedchecker defer acquisition of the threadpool forward and backward compatibility twistedchecker distinct names since these need to live on the same object compatibility layer socktype socket types no, Nones are bad None first less code more data fewer lines hoist constant tests & fix for various AF_ types twistedchecker clean vws pacify twistedchecker docstring adjustment without that class, it should pass misc file for dev process change and now it should fail something that will _really_ fail diff-cover deleted lines won't warn it's not failing anyway be consistent about naming This should cause a new twistedchecker error, but it doesn't. address family selection quote of the release final newsfiles Revert "newsfiles" versions Remove unused import Move ConchOptions parsing tests to test_default Remove unused import Move ConchOptions parsing tests to test_default Modules used by tkconch on Python 3 should be removed from here Fix test on Python 3 Fix the name of the topfile for twisted#3746. Update topfile. Test the default timeout. ...
- Loading branch information
Showing
1,787 changed files
with
209,765 additions
and
180,550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[run] | ||
branch = True | ||
parallel = True | ||
source = twisted | ||
|
||
[paths] | ||
source= | ||
src/twisted | ||
build/*/lib/python*/site-packages/twisted | ||
build/*/Lib/site-packages/twisted | ||
build/pypy*/site-packages/twisted | ||
|
||
[report] | ||
precision = 2 | ||
ignore_errors = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
*.egg-info/ | ||
.eggs/ | ||
*.o | ||
*.py[co] | ||
*.so | ||
*.DS_Store | ||
_trial_temp*/ | ||
build/ | ||
dropin.cache | ||
doc/ | ||
docs/_build/ | ||
dist/ | ||
venv/ | ||
htmlcov/ | ||
.coverage* | ||
*~ | ||
*.lock | ||
apidocs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# | ||
# This is the Travis-CI configuration. | ||
# | ||
# The actual dependency installation and test execution is done via tox as a | ||
# way to share the same process between Travis-CI and Buildbot. | ||
# | ||
language: python | ||
sudo: false | ||
|
||
|
||
# Only run tests on push on a few branches. | ||
# Test on PR should be execute for all branches and forks. | ||
branches: | ||
only: | ||
- trunk | ||
- /^release-.*$/ | ||
|
||
|
||
env: | ||
global: | ||
- TRIAL_REPORTER=text | ||
|
||
|
||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: TOXENV=py27-alldeps-withcov-posix,codecov-publish | ||
# FIXME: https://twistedmatrix.com/trac/ticket/8633 | ||
# Coverage should also be reported for nomodules tests so that we also | ||
# get report for those conditional branches. | ||
- python: 2.7 | ||
env: TOXENV=py27-nodeps-withcov-posix,codecov-publish | ||
- python: 3.3 | ||
env: TOXENV=py33-alldeps-withcov-posix,codecov-publish | ||
- python: 3.4 | ||
env: TOXENV=py34-alldeps-withcov-posix,codecov-publish | ||
- python: 3.5 | ||
env: TOXENV=py35-alldeps-withcov-posix,codecov-publish | ||
# For now all non-trial tests are in a single job to reduce the time spent | ||
# on starting separate jobs. | ||
- python: 2.7 | ||
env: TOXENV=narrativedocs,apidocs,pyflakes,topfile,manifest-checker | ||
- python: 3.5 | ||
env: TOXENV=pyflakes3 | ||
# Twistedchecker is running as a separate job so that we can ignore if it | ||
# fails. | ||
- python: 2.7 | ||
env: TOXENV=txchecker-travis | ||
# | ||
# OSX 10.10 | ||
# | ||
- language: generic | ||
os: osx | ||
# 7.1 is OS X 10.10.x | ||
# see: https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions | ||
osx_image: xcode7.1 | ||
python: 2.7 | ||
env: TOXENV=py27-alldeps-withcov-macos1010,codecov-publish | ||
# | ||
# OSX 10.11 | ||
# | ||
- language: generic | ||
os: osx | ||
# 8 is OS X 10.11.x | ||
# see: https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions | ||
osx_image: xcode8 | ||
env: TOXENV=py35-alldeps-withcov-macos,codecov-publish | ||
- language: generic | ||
os: osx | ||
osx_image: xcode8 | ||
# Test cfreactor explicitly | ||
env: | ||
- TOXENV=py35-alldeps-withcov-macos,codecov-publish | ||
- TWISTED_REACTOR=cf | ||
|
||
|
||
allow_failures: | ||
- osx_image: xcode7.1 | ||
- osx_image: xcode8 | ||
|
||
|
||
addons: | ||
apt: | ||
packages: | ||
- libssl-dev | ||
- libssl1.0.0 | ||
|
||
|
||
cache: | ||
directories: | ||
- $HOME/.cache/pip | ||
- $HOME/.pyenv | ||
|
||
|
||
install: | ||
- ./.travis/install.sh tox | ||
|
||
|
||
# FIXME: https://twistedmatrix.com/trac/ticket/8373 | ||
# By default, Travis only clones one branch. | ||
# Some tests require the presence of the `trunk` branch so here we are, also | ||
# fetching `trunk` for each test. | ||
before_script: | ||
- git remote set-branches --add origin trunk | ||
- git fetch origin trunk | ||
|
||
|
||
# Run tox from the created virtualenv. | ||
script: | ||
- ./.travis/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
if [[ "$(uname -s)" == 'Darwin' ]]; then | ||
curl -O https://bootstrap.pypa.io/get-pip.py | ||
python get-pip.py --user | ||
python -m pip install --user virtualenv | ||
python -m virtualenv ~/.venv | ||
source ~/.venv/bin/activate | ||
|
||
if [[ "${TOXENV}" == "py35-alldeps-withcov-macos,codecov-publish" ]]; then | ||
|
||
brew update; | ||
brew upgrade openssl; | ||
brew install pyenv; | ||
PYENV_ROOT="$HOME/.pyenv"; | ||
PATH="$PYENV_ROOT/bin:$PATH"; | ||
eval "$(pyenv init -)"; | ||
pyenv install -s 3.5.2; | ||
pyenv global system 3.5.2; | ||
pyenv rehash; | ||
|
||
fi | ||
fi | ||
|
||
# Temporary workaround for https://github.com/pypa/setuptools/issues/776; | ||
# install (and thereby cache a built wheel of) cryptography. (NB: We're | ||
# already using the same Python version in this venv as in the test env, | ||
# thanks to travis.yml). | ||
pip install -U pip 'setuptools<26' | ||
pip install cryptography | ||
|
||
pip install $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
if [[ "$(uname -s)" == "Darwin" ]]; then | ||
# Initialize the virtualenv created at install time. | ||
source ~/.venv/bin/activate | ||
|
||
if [[ "${TOXENV}" == "py35-alldeps-withcov-macos,codecov-publish" ]]; then | ||
# Add pyenv path | ||
PYENV_ROOT="$HOME/.pyenv"; | ||
PATH="$PYENV_ROOT/bin:$PATH"; | ||
eval "$(pyenv init -)"; | ||
fi | ||
fi | ||
|
||
tox -- $TOX_FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env sh | ||
# | ||
# Helper for running twistedchecker and reporting only errors that are part | ||
# of the changes since trunk. | ||
# | ||
# Call it as: | ||
# * SCRIPT_NAME twisted | ||
# * SCRIPT_NAME twisted/words/ | ||
# * SCRIPT_NAME twisted.words | ||
|
||
target=$1 | ||
|
||
# FIXME: https://github.com/twisted/twistedchecker/issues/116 | ||
# Since for unknown modules twistedchecker will return the same error, the | ||
# diff will fail to detect that we are trying to check an invalid path or | ||
# module. | ||
# This is why we check that the argument is a path and if not a path, it is | ||
# an importable module. | ||
if [ ! -d "$target" ]; then | ||
python -c "import $target" 2> /dev/null | ||
if [ $? -ne 0 ]; then | ||
>&2 echo "$target does not exists as a path or as a module." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Make sure we have trunk on the local repo. | ||
git fetch origin +refs/heads/trunk:refs/remotes/origin/trunk | ||
|
||
# Explicitly ignore extension modules. See: https://github.com/twisted/twistedchecker/issues/118 | ||
mkdir -p build/ | ||
twistedchecker --ignore='raiser.so,portmap.so,_sendmsg.so' -f parseable "$target" > build/twistedchecker-branch.report | ||
|
||
# Make sure repo is producing the diff with prefix so that the output of | ||
# `git diff` can be parsed by diff_cover. | ||
git config diff.noprefix false | ||
|
||
diff-quality \ | ||
--violations=pylint \ | ||
--fail-under=100 \ | ||
--compare-branch=origin/trunk build/twistedchecker-branch.report | ||
|
||
diff_exit_code=$? | ||
exit $diff_exit_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Installing Twisted | ||
================== | ||
|
||
Installation Requirements | ||
------------------------- | ||
|
||
To install Twisted, you need: | ||
|
||
- Python 2.7 (full functionality) or 3.3/3.4/3.5 (subset of functionality). | ||
|
||
- `setuptools <https://pypi.python.org/pypi/setuptools>`_ | ||
(installed automatically if you use pip). | ||
|
||
- `Zope Interface <https://pypi.python.org/pypi/zope.interface>`_ 3.6.0 or newer. | ||
Zope Interface 4.0 or newer is required for Python 3. | ||
Installing via pip will automatically download a suitable Zope Interface. | ||
|
||
- On Windows `pywin32 <https://pypi.python.org/pypi/pypiwin32>`_ is required. | ||
Build 219 or later is highly recommended for reliable operation (this is already included in ActivePython). | ||
|
||
We also have `setuptools extras <http://twistedmatrix.com/documents/current/installation/howto/optional.html>`_ for automatically installing optional packages used by Twisted. | ||
|
||
|
||
Installing Twisted | ||
------------------ | ||
|
||
To install the latest version of Twisted using pip:: | ||
|
||
$ pip install twisted | ||
|
||
You can install optional dependencies for specific functionality in Twisted (such as TLS or serial support) by using our setuptools extras (see above). | ||
|
||
As an example, to install Twisted with the TLS dependencies, use:: | ||
|
||
$ pip install twisted[tls] | ||
|
||
Additionally, there are packages available in the repositories of: | ||
|
||
- Debian and Ubuntu as ``python-twisted`` for Python 2. | ||
- FreeBSD as ``py-twisted`` for Python 2. | ||
- Arch as ``python-twisted`` for Python 2. | ||
- Fedora and RHEL as ``python-twisted`` for Python 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.