Skip to content

Commit

Permalink
Merge branch 'trunk' into 9781-https-everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
twm committed Apr 17, 2020
2 parents 37beed6 + 9276788 commit c553bec
Show file tree
Hide file tree
Showing 139 changed files with 2,139 additions and 6,989 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Expand Up @@ -74,9 +74,9 @@ jobs:
static_checkers:
working_directory: ~/static-checkers
docker:
- image: circleci/python:2.7
- image: circleci/python:3.6
environment:
PYTHON: python2
PYTHON: python3
steps:
# Get the source.
- checkout
Expand All @@ -102,9 +102,9 @@ jobs:
documentation:
working_directory: ~/documentation
docker:
- image: circleci/python:2.7
- image: circleci/python:3.6
environment:
PYTHON: python2
PYTHON: python3
steps:
# Get the source.
- checkout
Expand Down
10 changes: 3 additions & 7 deletions .travis.yml
Expand Up @@ -31,26 +31,22 @@ matrix:
- services:
- docker
env: PIP=pip TOXENV=wheels
- python: 2.7
env: TOXENV=py27-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 2.7
env: TOXENV=py27-nodeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 3.5
env: TOXENV=py35-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 3.6
env: TOXENV=py36-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 3.7
env: TOXENV=py37-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 3.8
env: TOXENV=py38-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push
- python: 3.5
env: TOXENV=lint
# We need a builder without IPv6. This is going to be slower than all the
# others, but that's ok.
- python: 3.6
env: TOXENV=py36-alldeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push DISABLE_IPV6=yes
- python: pypy
env: TOXENV=pypy-nodeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push PYPY_VERSION=pypy2.7-7.1.1
- python: pypy3
env: TOXENV=pypy-nodeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push PYPY_VERSION=pypy3.6-7.1.1
env: TOXENV=pypy-nodeps-withcov-posix,coverage-prepare,codecov-push,coveralls-push PYPY_VERSION=pypy3.6-7.3.0

addons:
apt:
Expand Down
9 changes: 1 addition & 8 deletions INSTALL.rst
Expand Up @@ -6,7 +6,7 @@ Installation Requirements

To install Twisted, you need:

- Python 2.7 (full functionality) or 3.5/3.6/3.7 (subset of functionality).
- Python 3.5/3.6/3.7.

- `setuptools <https://pypi.python.org/pypi/setuptools>`_
(installed automatically if you use pip).
Expand All @@ -32,10 +32,3 @@ You can install optional dependencies for specific functionality in Twisted (suc
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.
3 changes: 2 additions & 1 deletion MANIFEST.in
Expand Up @@ -23,6 +23,8 @@ exclude appveyor.yml
exclude .coveralls.yml
exclude .circleci
recursive-exclude .circleci *
exclude azure-pipelines
recursive-exclude azure-pipelines *
prune bin
prune admin
prune .travis
Expand All @@ -44,7 +46,6 @@ include src/twisted/internet/test/fake_CAs/*
include src/twisted/mail/test/rfc822.message

# Some extras
recursive-include src/twisted *.3only
recursive-include src/twisted *.glade *.pxi *.h *.c *.bat *.g *.pyx *.zsh *.txt

# Docs
Expand Down
21 changes: 21 additions & 0 deletions azure-pipelines/macos_test_jobs.yml
@@ -0,0 +1,21 @@
parameters:
- name: imageName
type: string
default: 'macOS-latest'
# Must be a mapping of id-suitable-name -> actual version number with dot
- name: pythonVersions
type: object


jobs:
- ${{ each pyver in parameters.pythonVersions }}:
- job: ${{ format('macos_{0}', pyver.key) }}
displayName: ${{ format('MacOS Py{0}', pyver.value) }}
pool:
vmImage: ${{ parameters.imageName }}
steps:
- template: 'run_test_steps.yml'
parameters:
platform: macos
pythonVersion: ${{ pyver.value }}
allowFailure: ${{ eq(pyver.value, '3.8') }}
58 changes: 58 additions & 0 deletions azure-pipelines/run_test_steps.yml
@@ -0,0 +1,58 @@
parameters:

- name: platform
type: string
values:
- macos
- windows

- name: pythonVersion
type: string
values:
- '3.5'
- '3.6'
- '3.7'
- '3.8'

- name: windowsReactor
type: string
default: select
values:
- select
- iocp

- name: allowFailure
type: boolean
default: false

steps:
- task: UsePythonVersion@0
displayName: "Use Python ${{ parameters.pythonVersion }}"
inputs:
versionSpec: "${{ parameters.pythonVersion }}"

- script: |
python --version
python -c "import sys; print(sys.prefix)"
python -c "import sys; print(sys.exec_prefix)"
python -c "import sys; print(sys.executable)"
python -c "import struct; print(struct.calcsize('P') * 8)"
displayName: 'Get Python Information'

- script: 'python -m pip install -U pip setuptools tox'
displayName: 'Update pip & install tox'

- ${{ if eq(parameters.platform, 'macos') }}:
- script: 'python -m tox -e alldeps-withcov-posix'
displayName: 'Run tests'
continueOnError: ${{ parameters.allowFailure }}

- ${{ if eq(parameters.platform, 'windows') }}:
- script: 'python -m tox -e alldeps-withcov-windows'
displayName: 'Run tests'
continueOnError: ${{ parameters.allowFailure }}
env:
TWISTED_REACTOR: ${{ parameters.windowsReactor }}

- script: 'python -m tox -e coverage-prepare,coveralls-push'
displayName: 'Report coverage'
42 changes: 42 additions & 0 deletions azure-pipelines/tests_pipeline.yml
@@ -0,0 +1,42 @@
trigger:
batch: true
branches:
include:
- trunk

pr:
branches:
include:
- trunk

variables:
INFRASTRUCTURE: "AZUREPIPELINES"
TRIAL_REPORTER: "verbose"

jobs:

- template: 'macos_test_jobs.yml'
parameters:
pythonVersions:
py35: "3.5"
py36: "3.6"
py37: "3.7"
py38: "3.8"

- template: 'windows_test_jobs.yml'
parameters:
pythonVersions:
py35: "3.5"
py36: "3.6"
py37: "3.7"
py38: "3.8"
reactor: select

- template: 'windows_test_jobs.yml'
parameters:
pythonVersions:
py35: "3.5"
py36: "3.6"
py37: "3.7"
py38: "3.8"
reactor: iocp
27 changes: 27 additions & 0 deletions azure-pipelines/windows_test_jobs.yml
@@ -0,0 +1,27 @@
parameters:
- name: imageName
type: string
default: 'windows-latest'
# Must be a mapping of id-suitable-name -> actual version number with dot
- name: pythonVersions
type: object
- name: reactor
type: string
values:
- select
- iocp


jobs:
- ${{ each pyver in parameters.pythonVersions }}:
- job: ${{ format('windows_{0}_{1}reactor', pyver.key, parameters.reactor) }}
displayName: ${{ format('Windows Py{0} {1}reactor', pyver.value, parameters.reactor) }}
pool:
vmImage: ${{ parameters.imageName }}
steps:
- template: 'run_test_steps.yml'
parameters:
platform: windows
pythonVersion: ${{ pyver.value }}
windowsReactor: ${{ parameters.reactor }}
allowFailure: ${{ eq(pyver.value, '3.8') }}
3 changes: 2 additions & 1 deletion docs/names/howto/listings/names/example-domain.com
Expand Up @@ -33,5 +33,6 @@ zone = [
CNAME('ftp.example-domain.com', 'example-domain.com'),

MX('example-domain.com', 0, 'mail.example-domain.com'),
A('mail.example-domain.com', '123.0.16.43')
A('mail.example-domain.com', '123.0.16.43'),
PTR('43.16.0.123.in-addr.arpa', 'mail.example-domain.com'),
]
17 changes: 6 additions & 11 deletions src/twisted/__init__.py
Expand Up @@ -7,17 +7,12 @@
Twisted: The Framework Of Your Internet.
"""

# setup version
import sys
from twisted._version import __version__ as version
__version__ = version.short()



from incremental import Version
from twisted.python.deprecate import deprecatedModuleAttribute
deprecatedModuleAttribute(
Version('Twisted', 20, 3, 0),
"morituri nolumus mori",
"twisted",
"news"
)
if sys.version_info < (3, 5):
raise Exception(
"This version of Twisted is not compatible with Python 3.4 "
"or below."
)
4 changes: 1 addition & 3 deletions src/twisted/application/app.py
Expand Up @@ -19,8 +19,7 @@
from twisted.internet import defer
from twisted.persisted import sob
from twisted.python import runtime, log, usage, failure, util, logfile
from twisted.python._oldstyle import _oldStyle
from twisted.python.reflect import (qual, namedAny, namedModule)
from twisted.python.reflect import qual, namedAny, namedModule
from twisted.internet.interfaces import _ISupportsExitSignalCapturing

# Expose the new implementation of installReactor at the old location.
Expand Down Expand Up @@ -488,7 +487,6 @@ def _reactorAction():



@_oldStyle
class ReactorSelectionMixin:
"""
Provides options for selecting a reactor to install.
Expand Down
2 changes: 0 additions & 2 deletions src/twisted/application/service.py
Expand Up @@ -21,7 +21,6 @@
from twisted.persisted import sob
from twisted.python.reflect import namedAny
from twisted.python import components
from twisted.python._oldstyle import _oldStyle
from twisted.internet import defer
from twisted.plugin import IPlugin

Expand Down Expand Up @@ -354,7 +353,6 @@ class IProcess(Interface):


@implementer(IProcess)
@_oldStyle
class Process:
"""
Process running parameters.
Expand Down
1 change: 1 addition & 0 deletions src/twisted/conch/newsfragments/8966.feature
@@ -0,0 +1 @@
twisted.conch.ssh now supports Ed25519 keys (requires OpenSSL >= 1.1.1b).
1 change: 1 addition & 0 deletions src/twisted/conch/newsfragments/9571.bugfix
@@ -0,0 +1 @@
t.c.ssh.filetransfer.FileTransferClient now errbacks any outstanding requests if the connection is lost before a reply is received.
Empty file.
1 change: 1 addition & 0 deletions src/twisted/conch/newsfragments/9572.bugfix
@@ -0,0 +1 @@
t.c.ssh.filetransfer.FileTransferClient immediately errbacks any attempt to send a request on a closed channel.

0 comments on commit c553bec

Please sign in to comment.