[metadata]
name = Twisted
version = attr: twisted.__version__
description = An asynchronous networking framework written in Python
author = Twisted Matrix Laboratories
author_email = twisted-python@twistedmatrix.com
maintainer = Glyph Lefkowitz
maintainer_email = glyph@twistedmatrix.com
url = https://twistedmatrix.com/
project_urls =
    Documentation=https://docs.twistedmatrix.com/
    Source=https://github.com/twisted/twisted
    Issues=https://twistedmatrix.com/trac/report
    Twitter=https://twitter.com/twistedmatrix
    Changelog=https://github.com/twisted/twisted/blob/HEAD/NEWS.rst
license = MIT
classifiers =
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3 :: Only
    Programming Language :: Python :: 3.6
    Programming Language :: Python :: 3.7
    Programming Language :: Python :: 3.8
    Programming Language :: Python :: 3.9
    Programming Language :: Python :: 3.10
long_description_content_type = text/x-rst

[options]
# When updating this value, make sure our CI matrix includes a matching minimum version.
python_requires = >=3.6.7
install_requires =
    zope.interface >= 4.4.2
    constantly >= 15.1
    incremental >= 21.3.0
    Automat >= 0.8.0
    hyperlink >= 17.1.1
    attrs >= 19.2.0
    typing_extensions >= 3.6.5
    twisted-iocpsupport >= 1.0.2, <2; platform_system == "Windows"
include_package_data = True
zip_safe = False
package_dir = =src
packages = find:

[options.extras_require]
; This is list of minimum dependencies required to run the test.
; The plan is to remove the `test` extra requirement and skip tests that
; depend on then
; To prevent trunk failures we should pin all dev dependencies to minor
; versions.
; We trust semantic versioning and auto-upgrading to a bugfix release
; should be OK.
test =
    cython-test-exception-raiser >= 1.0.2, <2
    PyHamcrest >= 1.9.0

; List of dependencies required to build the documentation and test the
; release scripts and process.
dev_release =
    towncrier ~= 19.2
    pydoctor ~= 21.9.0; python_version >= "3.6"
    sphinx-rtd-theme ~= 0.5
    readthedocs-sphinx-ext ~= 2.1
    sphinx >= 4.1.2, <6

; All the extra tools used to help with the development process.
dev =
    %(dev_release)s
    pyflakes ~= 2.2
    # TODO: support python-subunit in py3.10 https://twistedmatrix.com/trac/ticket/10115
    python-subunit ~= 1.4; python_version < "3.10"
    twistedchecker ~= 0.7
    coverage >= 6b1, <7

tls =
    pyopenssl >= 16.0.0
    # service_identity 18.1.0 added support for validating IP addresses in
    # certificate subjectAltNames
    service_identity >= 18.1.0
    idna >= 2.4

conch =
    pyasn1
    cryptography >= 2.6
    appdirs >= 1.4.0
    bcrypt >= 3.0.0

conch_nacl =
    %(conch)s
    # Used to support Ed25519 keys on systems with OpenSSL < 1.1.1b
    PyNaCl

serial =
    pyserial >= 3.0
    pywin32 != 226; platform_system == "Windows"

http2 =
    h2 >= 3.0, < 5.0
    priority >= 1.1.0, < 2.0

contextvars =
    contextvars >= 2.4, < 3; python_version < "3.7"

all_non_platform =
    %(test)s
    %(tls)s
    %(conch)s
    %(serial)s
    %(http2)s
    %(contextvars)s

macos_platform =
    pyobjc-core
    pyobjc-framework-CFNetwork
    pyobjc-framework-Cocoa
    %(all_non_platform)s

windows_platform =
    pywin32 != 226
    %(all_non_platform)s

osx_platform =
    %(macos_platform)s

mypy =
    mypy==0.930
    mypy-zope==0.3.4
    types-setuptools
    types-pyOpenSSL
    %(dev)s
    %(all_non_platform)s
    %(conch_nacl)s

[options.packages.find]
where = src

[options.entry_points]
console_scripts =
    ckeygen = twisted.conch.scripts.ckeygen:run
    cftp = twisted.conch.scripts.cftp:run
    conch = twisted.conch.scripts.conch:run
    mailmail = twisted.mail.scripts.mailmail:run
    pyhtmlizer = twisted.scripts.htmlizer:run
    tkconch = twisted.conch.scripts.tkconch:run
    trial = twisted.scripts.trial:run
    twist = twisted.application.twist._twist:Twist.main
    twistd = twisted.scripts.twistd:run

[options.exclude_package_data]
* =
    *.c
    *.h
    *.pxi
    *.pyx
    build.bat


[flake8]
disable-noqa = True
max-line-length = 182
extend-ignore =
   E203,  # whitespace before : is not PEP8 compliant (& conflicts with black)

per-file-ignores =
    src/twisted/*:
        # block comment should start with '# '
        E265,
        # too many leading '#' for block comment
        E266,
        # multiple imports on one line
        E401,
        # module level import not at top of file
        E402,
        # comparison to None should be 'if cond is None:'
        E711,
        # comparison to True should be 'if cond is True:' or 'if cond:'
        E712,
        # do not compare types, use 'isinstance()'
        E721,
        # do not assign a lambda expression, use a def
        E731,
        # ambiguous variable name 'l'
        E741,
        # ambiguous function definition 'l'
        E743,
        # .has_key() is deprecated, use 'in'
        W601,
    docs/*:
        # block comment should start with '# '
        E265,
        # too many leading '#' for block comment
        E266,
        # multiple imports on one line
        E401,
        # module level import not at top of file
        E402,
        # ambiguous variable name 'l'
        E741,
        # 'string' imported but unused
        F401,
        # 'from Foundation import *' used; unable to detect undefined names
        F403,
        # 'USEREVENT' may be undefined, or defined from star imports: pygame.locals
        F405,
        # redefinition of unused 'pb' from line 8
        F811,
        # undefined name 'name'
        F821,
        # local variable 'd' is assigned to but never used
        F841,
        # trailing whitespace
        W291,
        # blank line contains whitespace
        W293,
