Skip to content

Commit

Permalink
Merge branch 'trunk' into unsupportedmethod-str-7744
Browse files Browse the repository at this point in the history
* 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
Julian committed Nov 26, 2016
2 parents 11f068e + 5178c33 commit a21da78
Show file tree
Hide file tree
Showing 1,787 changed files with 209,765 additions and 180,550 deletions.
15 changes: 15 additions & 0 deletions .coveragerc
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
9 changes: 9 additions & 0 deletions .gitignore
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/
110 changes: 110 additions & 0 deletions .travis.yml
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
34 changes: 34 additions & 0 deletions .travis/install.sh
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 $@
17 changes: 17 additions & 0 deletions .travis/run.sh
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
44 changes: 44 additions & 0 deletions .travis/twistedchecker-trunk-diff.sh
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
13 changes: 12 additions & 1 deletion CONTRIBUTING
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ Extensive contribution guidelines are available online at:

https://twistedmatrix.com/trac/wiki/ContributingToTwistedLabs

**Warning: pull requests are ignored!** File a ticket at:
Twisted has a Code of Conduct, available at code_of_conduct.md.

**Warning: pull requests are ignored** unless they have an associated ticket in trac.

File a ticket at:

https://twistedmatrix.com/trac/newticket

Twisted uses Trac to keep track of bugs, feature requests, and associated
patches because GitHub doesn't provide adequate tooling for its community.

For a PR to be accepted it needs to have:

* all Travis CI tests passing
* patch coverage of 100% as reported by codecov.io

The Travis CI tests currently represent only a subset of the all the platforms Twisted supports, so the buildbot tests are still the actual gate for PR acceptance.
32 changes: 0 additions & 32 deletions INSTALL

This file was deleted.

42 changes: 42 additions & 0 deletions INSTALL.rst
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.
18 changes: 12 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Copyright (c) 2001-2014
Copyright (c) 2001-2016
Allen Short
Andy Gayton
Amber Hawkie Brown
Andrew Bennetts
Andy Gayton
Antoine Pitrou
Apple Computer, Inc.
Ashwini Oruganti
Expand All @@ -10,6 +11,7 @@ Bob Ippolito
Canonical Limited
Christopher Armstrong
David Reid
Divmod Inc.
Donovan Preston
Eric Mangold
Eyal Lotem
Expand All @@ -21,29 +23,33 @@ James Knight
Jason A. Mobarak
Jean-Paul Calderone
Jessica McKellar
Jonathan D. Simms
Jonathan Jacobs
Jonathan Lange
Jonathan D. Simms
Jürgen Hermann
Julian Berman
Jürgen Hermann
Kevin Horn
Kevin Turner
Laurens Van Houtven
Mary Gardiner
Matthew Lefkowitz
Massachusetts Institute of Technology
Matthew Lefkowitz
Moshe Zadka
Paul Swartz
Pavel Pergamenshchik
Rackspace, US Inc.
Ralph Meijer
Richard Wall
Sean Riley
Software Freedom Conservancy
Travis B. Hartwell
Tavendo GmbH
Thijs Triemstra
Thomas Herve
Timothy Allen
Tom Prince
Travis B. Hartwell

and others that have contributed code to the public domain.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
Loading

0 comments on commit a21da78

Please sign in to comment.