Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-txaio for openSUSE:Factory checked in at 2023-02-20 17:46:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-txaio (Old) and /work/SRC/openSUSE:Factory/.python-txaio.new.22824 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-txaio" Mon Feb 20 17:46:02 2023 rev:13 rq:1066674 version:23.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-txaio/python-txaio.changes 2022-06-04 23:27:28.072782013 +0200 +++ /work/SRC/openSUSE:Factory/.python-txaio.new.22824/python-txaio.changes 2023-02-20 17:46:22.311607239 +0100 @@ -1,0 +2,6 @@ +Mon Feb 20 04:48:22 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com> + +- Update to 23.1.1: + * fix: support for Python up to v3.11 + +------------------------------------------------------------------- Old: ---- txaio-22.2.1.tar.gz New: ---- txaio-23.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-txaio.spec ++++++ --- /var/tmp/diff_new_pack.DnXDVC/_old 2023-02-20 17:46:22.811610063 +0100 +++ /var/tmp/diff_new_pack.DnXDVC/_new 2023-02-20 17:46:22.815610086 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-txaio # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +16,11 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} -%define skip_python2 1 Name: python-txaio -Version: 22.2.1 +Version: 23.1.1 Release: 0 Summary: WebSocket and WAMP in Python for Twisted and asyncio License: MIT -Group: Development/Languages/Python URL: https://github.com/crossbario/txaio Source: https://files.pythonhosted.org/packages/source/t/txaio/txaio-%{version}.tar.gz BuildRequires: %{python_module setuptools} ++++++ txaio-22.2.1.tar.gz -> txaio-23.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/LICENSE new/txaio-23.1.1/LICENSE --- old/txaio-22.2.1/LICENSE 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/LICENSE 2023-01-15 15:08:20.000000000 +0100 @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) Crossbar.io Technologies GmbH +Copyright (c) typedef int GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/Makefile new/txaio-23.1.1/Makefile --- old/txaio-22.2.1/Makefile 2020-12-19 16:45:48.000000000 +0100 +++ new/txaio-23.1.1/Makefile 2023-01-15 15:08:20.000000000 +0100 @@ -58,3 +58,6 @@ publish: clean python setup.py sdist bdist_wheel twine upload dist/* + +fix_copyright: + find . -type f -exec sed -i 's/Copyright (c) typedef int GmbH/Copyright (c) typedef int GmbH/g' {} \; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/PKG-INFO new/txaio-23.1.1/PKG-INFO --- old/txaio-22.2.1/PKG-INFO 2022-02-23 18:53:33.395578600 +0100 +++ new/txaio-23.1.1/PKG-INFO 2023-01-15 15:11:23.696738000 +0100 @@ -1,94 +1,11 @@ Metadata-Version: 2.1 Name: txaio -Version: 22.2.1 +Version: 23.1.1 Summary: Compatibility API between asyncio/Twisted/Trollius Home-page: https://github.com/crossbario/txaio -Author: Crossbar.io Technologies GmbH +Author: typedef int GmbH Author-email: autobah...@googlegroups.com License: MIT License -Description: txaio - ===== - - | |Version| |Build| |Deploy| |Coverage| |Docs| - - -------------- - - **txaio** is a helper library for writing code that runs unmodified on - both `Twisted <https://twistedmatrix.com/>`_ and `asyncio <https://docs.python.org/3/library/asyncio.html>`_ / `Trollius <http://trollius.readthedocs.org/en/latest/index.html>`_. - - This is like `six <http://pythonhosted.org/six/>`_, but for wrapping - over differences between Twisted and asyncio so one can write code - that runs unmodified on both (aka *source code compatibility*). In - other words: your *users* can choose if they want asyncio **or** Twisted - as a dependency. - - Note that, with this approach, user code **runs under the native event - loop of either Twisted or asyncio**. This is different from attaching - either one's event loop to the other using some event loop adapter. - - - Platform support - ---------------- - - **txaio** runs on CPython 3.6+ and PyPy 3, on top of *Twisted* or *asyncio*. Specifically, **txaio** is tested on the following platforms: - - * CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) - * PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) - - > Note: txaio up to version 18.8.1 also supported Python 2.7 and Python 3.4. Beginning with release v20.1.1, txaio only supports Python 3.5+. Beginning with release v20.12.1, txaio only supports Python 3.6+. - - - How it works - ------------ - - Instead of directly importing, instantiating and using ``Deferred`` - (for Twisted) or ``Future`` (for asyncio) objects, **txaio** provides - helper-functions to do that for you, as well as associated things like - adding callbacks or errbacks. - - This obviously changes the style of your code, but then you can choose - at runtime (or import time) which underlying event-loop to use. This - means you can write **one** code-base that can run on Twisted *or* - asyncio (without a Twisted dependency) as you or your users see fit. - - Code like the following can then run on *either* system: - - .. sourcecode:: python - - import txaio - txaio.use_twisted() # or .use_asyncio() - - f0 = txaio.create_future() - f1 = txaio.as_future(some_func, 1, 2, key='word') - txaio.add_callbacks(f0, callback, errback) - txaio.add_callbacks(f1, callback, errback) - # ... - txaio.resolve(f0, "value") - txaio.reject(f1, RuntimeError("it failed")) - - Please refer to the `documentation <https://txaio.readthedocs.io/en/latest/>`_ for description and usage of the library features. - - - .. |Version| image:: https://img.shields.io/pypi/v/txaio.svg - :target: https://pypi.python.org/pypi/txaio - :alt: Version - - .. |Build| image:: https://github.com/crossbario/txaio/workflows/main/badge.svg - :target: https://github.com/crossbario/txaio/actions?query=workflow%3Amain - :alt: Build Workflow - - .. |Deploy| image:: https://github.com/crossbario/txaio/workflows/deploy/badge.svg - :target: https://github.com/crossbario/txaio/actions?query=workflow%3Adeploy - :alt: Deploy Workflow - - .. |Coverage| image:: https://codecov.io/github/crossbario/txaio/coverage.svg?branch=master - :target: https://codecov.io/github/crossbario/txaio - :alt: Coverage - - .. |Docs| image:: https://readthedocs.org/projects/txaio/badge/?version=latest - :target: https://txaio.readthedocs.io/en/latest/ - :alt: Docs - Keywords: asyncio twisted trollius coroutine Platform: Any Classifier: License :: OSI Approved :: MIT License @@ -99,16 +16,101 @@ Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Software Development :: Libraries :: Application Frameworks -Requires-Python: >=3.6 +Requires-Python: >=3.7 Provides-Extra: twisted Provides-Extra: asyncio Provides-Extra: dev Provides-Extra: all +License-File: LICENSE + +txaio +===== + +| |Version| |Build| |Deploy| |Coverage| |Docs| + +-------------- + +**txaio** is a helper library for writing code that runs unmodified on +both `Twisted <https://twistedmatrix.com/>`_ and `asyncio <https://docs.python.org/3/library/asyncio.html>`_ / `Trollius <http://trollius.readthedocs.org/en/latest/index.html>`_. + +This is like `six <http://pythonhosted.org/six/>`_, but for wrapping +over differences between Twisted and asyncio so one can write code +that runs unmodified on both (aka *source code compatibility*). In +other words: your *users* can choose if they want asyncio **or** Twisted +as a dependency. + +Note that, with this approach, user code **runs under the native event +loop of either Twisted or asyncio**. This is different from attaching +either one's event loop to the other using some event loop adapter. + + +Platform support +---------------- + +**txaio** runs on CPython 3.6+ and PyPy 3, on top of *Twisted* or *asyncio*. Specifically, **txaio** is tested on the following platforms: + +* CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) +* PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) + +> Note: txaio up to version 18.8.1 also supported Python 2.7 and Python 3.4. Beginning with release v20.1.1, txaio only supports Python 3.5+. Beginning with release v20.12.1, txaio only supports Python 3.6+. + + +How it works +------------ + +Instead of directly importing, instantiating and using ``Deferred`` +(for Twisted) or ``Future`` (for asyncio) objects, **txaio** provides +helper-functions to do that for you, as well as associated things like +adding callbacks or errbacks. + +This obviously changes the style of your code, but then you can choose +at runtime (or import time) which underlying event-loop to use. This +means you can write **one** code-base that can run on Twisted *or* +asyncio (without a Twisted dependency) as you or your users see fit. + +Code like the following can then run on *either* system: + +.. sourcecode:: python + + import txaio + txaio.use_twisted() # or .use_asyncio() + + f0 = txaio.create_future() + f1 = txaio.as_future(some_func, 1, 2, key='word') + txaio.add_callbacks(f0, callback, errback) + txaio.add_callbacks(f1, callback, errback) + # ... + txaio.resolve(f0, "value") + txaio.reject(f1, RuntimeError("it failed")) + +Please refer to the `documentation <https://txaio.readthedocs.io/en/latest/>`_ for description and usage of the library features. + + +.. |Version| image:: https://img.shields.io/pypi/v/txaio.svg + :target: https://pypi.python.org/pypi/txaio + :alt: Version + +.. |Build| image:: https://github.com/crossbario/txaio/workflows/main/badge.svg + :target: https://github.com/crossbario/txaio/actions?query=workflow%3Amain + :alt: Build Workflow + +.. |Deploy| image:: https://github.com/crossbario/txaio/workflows/deploy/badge.svg + :target: https://github.com/crossbario/txaio/actions?query=workflow%3Adeploy + :alt: Deploy Workflow + +.. |Coverage| image:: https://codecov.io/github/crossbario/txaio/coverage.svg?branch=master + :target: https://codecov.io/github/crossbario/txaio + :alt: Coverage + +.. |Docs| image:: https://readthedocs.org/projects/txaio/badge/?version=latest + :target: https://txaio.readthedocs.io/en/latest/ + :alt: Docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/docs/releases.rst new/txaio-23.1.1/docs/releases.rst --- old/txaio-22.2.1/docs/releases.rst 2022-02-23 18:53:04.000000000 +0100 +++ new/txaio-23.1.1/docs/releases.rst 2023-01-15 15:08:20.000000000 +0100 @@ -1,6 +1,13 @@ txio releases ============= +23.1.1 +------ + +- fix: support for Python up to v3.11 +- fix: update GitHub CI +- fix: copyright transferred to typedef int GmbH - no license change! + 22.2.1 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/examples/basic.py new/txaio-23.1.1/examples/basic.py --- old/txaio-22.2.1/examples/basic.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/examples/basic.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/examples/log_interop_stdlib.py new/txaio-23.1.1/examples/log_interop_stdlib.py --- old/txaio-22.2.1/examples/log_interop_stdlib.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/examples/log_interop_stdlib.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/examples/log_interop_twisted.py new/txaio-23.1.1/examples/log_interop_twisted.py --- old/txaio-22.2.1/examples/log_interop_twisted.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/examples/log_interop_twisted.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/examples/multiloop.py new/txaio-23.1.1/examples/multiloop.py --- old/txaio-22.2.1/examples/multiloop.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/examples/multiloop.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/setup.cfg new/txaio-23.1.1/setup.cfg --- old/txaio-22.2.1/setup.cfg 2022-02-23 18:53:33.395578600 +0100 +++ new/txaio-23.1.1/setup.cfg 2023-01-15 15:11:23.696738000 +0100 @@ -2,7 +2,7 @@ universal = 1 [metadata] -license_file = LICENSE +license_files = LICENSE [egg_info] tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/setup.py new/txaio-23.1.1/setup.py --- old/txaio-22.2.1/setup.py 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/setup.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -76,11 +76,11 @@ description='Compatibility API between asyncio/Twisted/Trollius', long_description=docstr, license='MIT License', - author='Crossbar.io Technologies GmbH', + author='typedef int GmbH', author_email='autobah...@googlegroups.com', url='https://github.com/crossbario/txaio', platforms=('Any'), - python_requires='>=3.6', + python_requires='>=3.7', extras_require={ 'twisted': extras_require_twisted, 'asyncio': extras_require_asyncio, @@ -111,10 +111,11 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/_asyncio_test_utils.py new/txaio-23.1.1/test/_asyncio_test_utils.py --- old/txaio-22.2.1/test/_asyncio_test_utils.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/test/_asyncio_test_utils.py 2023-01-15 15:08:20.000000000 +0100 @@ -34,47 +34,48 @@ from asyncio.log import logger from test import support +# FIXME: "test/_asyncio_test_utils.py:46: FileNotFoundError" -def data_file(filename): - if hasattr(support, 'TEST_HOME_DIR'): - fullname = os.path.join(support.TEST_HOME_DIR, filename) - if os.path.isfile(fullname): - return fullname - fullname = os.path.join(os.path.dirname(__file__), filename) - if os.path.isfile(fullname): - return fullname - raise FileNotFoundError(filename) - - -ONLYCERT = data_file('ssl_cert.pem') -ONLYKEY = data_file('ssl_key.pem') -SIGNED_CERTFILE = data_file('keycert3.pem') -SIGNING_CA = data_file('pycacert.pem') -PEERCERT = { - 'OCSP': ('http://testca.pythontest.net/testca/ocsp/',), - 'caIssuers': ('http://testca.pythontest.net/testca/pycacert.cer',), - 'crlDistributionPoints': ('http://testca.pythontest.net/testca/revocation.crl',), - 'issuer': ((('countryName', 'XY'),), - (('organizationName', 'Python Software Foundation CA'),), - (('commonName', 'our-ca-server'),)), - 'notAfter': 'Jul 7 14:23:16 2028 GMT', - 'notBefore': 'Aug 29 14:23:16 2018 GMT', - 'serialNumber': 'CB2D80995A69525C', - 'subject': ((('countryName', 'XY'),), - (('localityName', 'Castle Anthrax'),), - (('organizationName', 'Python Software Foundation'),), - (('commonName', 'localhost'),)), - 'subjectAltName': (('DNS', 'localhost'),), - 'version': 3 -} - - -def simple_server_sslcontext(): - server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) - server_context.load_cert_chain(ONLYCERT, ONLYKEY) - server_context.check_hostname = False - server_context.verify_mode = ssl.CERT_NONE - return server_context +# def data_file(filename): +# if hasattr(support, 'TEST_HOME_DIR'): +# fullname = os.path.join(support.TEST_HOME_DIR, filename) +# if os.path.isfile(fullname): +# return fullname +# fullname = os.path.join(os.path.dirname(__file__), filename) +# if os.path.isfile(fullname): +# return fullname +# raise FileNotFoundError(filename) +# +# +# ONLYCERT = data_file('ssl_cert.pem') +# ONLYKEY = data_file('ssl_key.pem') +# SIGNED_CERTFILE = data_file('keycert3.pem') +# SIGNING_CA = data_file('pycacert.pem') +# PEERCERT = { +# 'OCSP': ('http://testca.pythontest.net/testca/ocsp/',), +# 'caIssuers': ('http://testca.pythontest.net/testca/pycacert.cer',), +# 'crlDistributionPoints': ('http://testca.pythontest.net/testca/revocation.crl',), +# 'issuer': ((('countryName', 'XY'),), +# (('organizationName', 'Python Software Foundation CA'),), +# (('commonName', 'our-ca-server'),)), +# 'notAfter': 'Jul 7 14:23:16 2028 GMT', +# 'notBefore': 'Aug 29 14:23:16 2018 GMT', +# 'serialNumber': 'CB2D80995A69525C', +# 'subject': ((('countryName', 'XY'),), +# (('localityName', 'Castle Anthrax'),), +# (('organizationName', 'Python Software Foundation'),), +# (('commonName', 'localhost'),)), +# 'subjectAltName': (('DNS', 'localhost'),), +# 'version': 3 +# } +# +# +# def simple_server_sslcontext(): +# server_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) +# server_context.load_cert_chain(ONLYCERT, ONLYKEY) +# server_context.check_hostname = False +# server_context.verify_mode = ssl.CERT_NONE +# return server_context def simple_client_sslcontext(*, disable_verify=True): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_as_future.py new/txaio-23.1.1/test/test_as_future.py --- old/txaio-22.2.1/test/test_as_future.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_as_future.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -97,34 +97,36 @@ # twisted if not txaio.using_asyncio: return - - errors = [] - results = [] - calls = [] - - from asyncio import coroutine - - @coroutine - def method(*args, **kw): - calls.append((args, kw)) - return 42 - f = txaio.as_future(method, 1, 2, 3, key='word') - - def cb(x): - results.append(x) - - def errback(f): - errors.append(f) - - txaio.add_callbacks(f, cb, errback) - - run_once() - run_once() - - assert len(results) == 1 - assert len(errors) == 0 - assert results[0] == 42 - assert calls[0] == ((1, 2, 3), dict(key='word')) + try: + from asyncio import coroutine + except ImportError: + pytest.skip('skipping test: @asyncio.coroutine decorator is removed since Python 3.11') + else: + errors = [] + results = [] + calls = [] + + @coroutine + def method(*args, **kw): + calls.append((args, kw)) + return 42 + f = txaio.as_future(method, 1, 2, 3, key='word') + + def cb(x): + results.append(x) + + def errback(f): + errors.append(f) + + txaio.add_callbacks(f, cb, errback) + + run_once() + run_once() + + assert len(results) == 1 + assert len(errors) == 0 + assert results[0] == 42 + assert calls[0] == ((1, 2, 3), dict(key='word')) def test_as_future_exception(framework): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_batched_timers_aio.py new/txaio-23.1.1/test/test_batched_timers_aio.py --- old/txaio-22.2.1/test/test_batched_timers_aio.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_batched_timers_aio.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_batched_timers_tx.py new/txaio-23.1.1/test/test_batched_timers_tx.py --- old/txaio-22.2.1/test/test_batched_timers_tx.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_batched_timers_tx.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_call_later.py new/txaio-23.1.1/test/test_call_later.py --- old/txaio-22.2.1/test/test_call_later.py 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/test/test_call_later.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -170,24 +170,26 @@ pytest.importorskip('asyncio') if txaio.using_twisted: pytest.skip() - - from asyncio import coroutine - - @coroutine - def some_coroutine(): - yield 'nothing' - - with patch.object(txaio.config, 'loop') as fake_loop: - txaio.as_future(some_coroutine) - - if sys.version_info < (3, 4, 2): - assert len(fake_loop.method_calls) == 2 - c = fake_loop.method_calls[1] - assert c[0] == 'call_soon' - else: - assert len(fake_loop.method_calls) == 1 - c = fake_loop.method_calls[0] - assert c[0] == 'create_task' + try: + from asyncio import coroutine + except ImportError: + pytest.skip('skipping test: @asyncio.coroutine decorator is removed since Python 3.11') + else: + @coroutine + def some_coroutine(): + yield 'nothing' + + with patch.object(txaio.config, 'loop') as fake_loop: + txaio.as_future(some_coroutine) + + if sys.version_info < (3, 4, 2): + assert len(fake_loop.method_calls) == 2 + c = fake_loop.method_calls[1] + assert c[0] == 'call_soon' + else: + assert len(fake_loop.method_calls) == 1 + c = fake_loop.method_calls[0] + assert c[0] == 'create_task' def test_call_later_tx(framework_tx): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_callback.py new/txaio-23.1.1/test/test_callback.py --- old/txaio-22.2.1/test/test_callback.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_callback.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_cancel.py new/txaio-23.1.1/test/test_cancel.py --- old/txaio-22.2.1/test/test_cancel.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_cancel.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_errback.py new/txaio-23.1.1/test/test_errback.py --- old/txaio-22.2.1/test/test_errback.py 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/test/test_errback.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_gather.py new/txaio-23.1.1/test/test_gather.py --- old/txaio-22.2.1/test/test_gather.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_gather.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_is_future.py new/txaio-23.1.1/test/test_is_future.py --- old/txaio-22.2.1/test/test_is_future.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_is_future.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -42,13 +42,16 @@ Returning an immediate value from as_future ''' pytest.importorskip('asyncio') # 'aio' might be using trollius - from asyncio import coroutine - - @coroutine - def some_coroutine(): - yield 'answer' - obj = some_coroutine() - assert txaio.is_future(obj) + try: + from asyncio import coroutine + except ImportError: + pytest.skip('skipping test: @asyncio.coroutine decorator is removed since Python 3.11') + else: + @coroutine + def some_coroutine(): + yield 'answer' + obj = some_coroutine() + assert txaio.is_future(obj) def test_is_called(framework): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_legacy_logging.py new/txaio-23.1.1/test/test_legacy_logging.py --- old/txaio-22.2.1/test/test_legacy_logging.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/test/test_legacy_logging.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_logging.py new/txaio-23.1.1/test/test_logging.py --- old/txaio-22.2.1/test/test_logging.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/test/test_logging.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_packaging.py new/txaio-23.1.1/test/test_packaging.py --- old/txaio-22.2.1/test/test_packaging.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/test_packaging.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -24,30 +24,32 @@ # ############################################################################### -import sys -import tempfile -import subprocess -from shutil import rmtree +# import sys +# import tempfile +# import subprocess +# from shutil import rmtree -import pytest +# import pytest -import txaio +# import txaio +# FIXME: "/home/oberstet/anaconda3/bin/python: can't open file +# '/home/oberstet/scm/crossbario/setup.py': [Errno 2] No such file or directory" -def test_sdist(): - if not hasattr(subprocess, 'check_output'): - pytest.skip() - subprocess.check_output([sys.executable, 'setup.py', 'sdist'], cwd='..') - tmp = tempfile.mkdtemp() - try: - subprocess.check_output([ - sys.executable, - '-m', - 'pip', - 'install', - '--target', tmp, - '--no-deps', - '../dist/txaio-{}.tar.gz'.format(txaio.__version__), - ]) - finally: - rmtree(tmp) +# def test_sdist(): +# if not hasattr(subprocess, 'check_output'): +# pytest.skip() +# subprocess.check_output([sys.executable, 'setup.py', 'sdist'], cwd='..') +# tmp = tempfile.mkdtemp() +# try: +# subprocess.check_output([ +# sys.executable, +# '-m', +# 'pip', +# 'install', +# '--target', tmp, +# '--no-deps', +# '../dist/txaio-{}.tar.gz'.format(txaio.__version__), +# ]) +# finally: +# rmtree(tmp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/test_util.py new/txaio-23.1.1/test/test_util.py --- old/txaio-22.2.1/test/test_util.py 2020-01-21 10:06:33.000000000 +0100 +++ new/txaio-23.1.1/test/test_util.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/test/util.py new/txaio-23.1.1/test/util.py --- old/txaio-22.2.1/test/util.py 2020-01-21 00:10:08.000000000 +0100 +++ new/txaio-23.1.1/test/util.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/tox.ini new/txaio-23.1.1/tox.ini --- old/txaio-22.2.1/tox.ini 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/tox.ini 2023-01-15 15:08:20.000000000 +0100 @@ -2,12 +2,12 @@ skip_missing_interpreters = true envlist = flake8 - py36-{tw187,tw1910,twtrunk,asyncio} - py37-{tw187,tw1910,twtrunk,asyncio} - py38-{tw187,tw1910,twtrunk,asyncio} - py39-{tw187,tw1910,twtrunk,asyncio} - pypy36-{tw187,tw1910,twtrunk,asyncio} - pypy37-{tw187,tw1910,twtrunk,asyncio} + py37-{tw203,tw2210,twtrunk,asyncio} + # Twisted <22.10 on Python 3.11 fails with: + # src/twisted/test/raiser.c:198:12: fatal error: longintrepr.h: Datei oder Verzeichnis nicht gefunden + py311-{ tw2210,twtrunk,asyncio} + pypy37-{tw203,tw2210,twtrunk,asyncio} + pypy39-{tw203,tw2210,twtrunk,asyncio} # MAP: GitHub Actions Python Name => Tox Env Name (for Python) @@ -19,23 +19,20 @@ # [gh-actions] python = - 3.6: py36 3.7: py37 - 3.8: py38 - 3.9: py39 - pypy-3.6: pypy36 + 3.11: py311 pypy-3.7: pypy37 + pypy-3.9: pypy39 [testenv] deps = - pytest==4.6.9 - coverage==4.5.4 - - tw187: twisted==18.7.0 - tw1910: twisted==19.10.0 + pytest==7.2.1 + coverage==7.0.5 + tw203: twisted==20.3.0 + tw2210: twisted==22.10.0 twtrunk: https://github.com/twisted/twisted/archive/trunk.zip - {tw187,tw1910,twtrunk}: pytest-twisted==1.10 + {tw203,tw2210,twtrunk}: pytest-twisted==1.10 changedir=test @@ -43,8 +40,13 @@ # for the txaio code; thanks ionelmc on #python usedevelop=true +allowlist_externals = + sh + coverage + commands = - sh -c "coverage run --parallel-mode --source=txaio `which pytest` -v -s --basetemp=/tmp" + pytest -W ignore::DeprecationWarning -v -s --basetemp=/tmp +# sh -c "coverage run --parallel-mode --source=txaio `which pytest` -v -s --basetemp=/tmp" [testenv:flake8] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/__init__.py new/txaio-23.1.1/txaio/__init__.py --- old/txaio-22.2.1/txaio/__init__.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/__init__.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/_common.py new/txaio-23.1.1/txaio/_common.py --- old/txaio-22.2.1/txaio/_common.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/_common.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/_iotype.py new/txaio-23.1.1/txaio/_iotype.py --- old/txaio-22.2.1/txaio/_iotype.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/txaio/_iotype.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/_unframework.py new/txaio-23.1.1/txaio/_unframework.py --- old/txaio-22.2.1/txaio/_unframework.py 2020-01-24 09:33:11.000000000 +0100 +++ new/txaio-23.1.1/txaio/_unframework.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/_util.py new/txaio-23.1.1/txaio/_util.py --- old/txaio-22.2.1/txaio/_util.py 2020-01-21 10:06:33.000000000 +0100 +++ new/txaio-23.1.1/txaio/_util.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/_version.py new/txaio-23.1.1/txaio/_version.py --- old/txaio-22.2.1/txaio/_version.py 2022-02-23 18:53:04.000000000 +0100 +++ new/txaio-23.1.1/txaio/_version.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -24,4 +24,4 @@ # ############################################################################### -__version__ = '22.2.1' +__version__ = '23.1.1' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/aio.py new/txaio-23.1.1/txaio/aio.py --- old/txaio-22.2.1/txaio/aio.py 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/txaio/aio.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/interfaces.py new/txaio-23.1.1/txaio/interfaces.py --- old/txaio-22.2.1/txaio/interfaces.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/interfaces.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/testutil.py new/txaio-23.1.1/txaio/testutil.py --- old/txaio-22.2.1/txaio/testutil.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/testutil.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/tx.py new/txaio-23.1.1/txaio/tx.py --- old/txaio-22.2.1/txaio/tx.py 2021-11-21 10:02:35.000000000 +0100 +++ new/txaio-23.1.1/txaio/tx.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/with_asyncio.py new/txaio-23.1.1/txaio/with_asyncio.py --- old/txaio-22.2.1/txaio/with_asyncio.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/with_asyncio.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio/with_twisted.py new/txaio-23.1.1/txaio/with_twisted.py --- old/txaio-22.2.1/txaio/with_twisted.py 2020-01-30 10:03:20.000000000 +0100 +++ new/txaio-23.1.1/txaio/with_twisted.py 2023-01-15 15:08:20.000000000 +0100 @@ -2,7 +2,7 @@ # # The MIT License (MIT) # -# Copyright (c) Crossbar.io Technologies GmbH +# Copyright (c) typedef int GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txaio-22.2.1/txaio.egg-info/PKG-INFO new/txaio-23.1.1/txaio.egg-info/PKG-INFO --- old/txaio-22.2.1/txaio.egg-info/PKG-INFO 2022-02-23 18:53:33.000000000 +0100 +++ new/txaio-23.1.1/txaio.egg-info/PKG-INFO 2023-01-15 15:11:23.000000000 +0100 @@ -1,94 +1,11 @@ Metadata-Version: 2.1 Name: txaio -Version: 22.2.1 +Version: 23.1.1 Summary: Compatibility API between asyncio/Twisted/Trollius Home-page: https://github.com/crossbario/txaio -Author: Crossbar.io Technologies GmbH +Author: typedef int GmbH Author-email: autobah...@googlegroups.com License: MIT License -Description: txaio - ===== - - | |Version| |Build| |Deploy| |Coverage| |Docs| - - -------------- - - **txaio** is a helper library for writing code that runs unmodified on - both `Twisted <https://twistedmatrix.com/>`_ and `asyncio <https://docs.python.org/3/library/asyncio.html>`_ / `Trollius <http://trollius.readthedocs.org/en/latest/index.html>`_. - - This is like `six <http://pythonhosted.org/six/>`_, but for wrapping - over differences between Twisted and asyncio so one can write code - that runs unmodified on both (aka *source code compatibility*). In - other words: your *users* can choose if they want asyncio **or** Twisted - as a dependency. - - Note that, with this approach, user code **runs under the native event - loop of either Twisted or asyncio**. This is different from attaching - either one's event loop to the other using some event loop adapter. - - - Platform support - ---------------- - - **txaio** runs on CPython 3.6+ and PyPy 3, on top of *Twisted* or *asyncio*. Specifically, **txaio** is tested on the following platforms: - - * CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) - * PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) - - > Note: txaio up to version 18.8.1 also supported Python 2.7 and Python 3.4. Beginning with release v20.1.1, txaio only supports Python 3.5+. Beginning with release v20.12.1, txaio only supports Python 3.6+. - - - How it works - ------------ - - Instead of directly importing, instantiating and using ``Deferred`` - (for Twisted) or ``Future`` (for asyncio) objects, **txaio** provides - helper-functions to do that for you, as well as associated things like - adding callbacks or errbacks. - - This obviously changes the style of your code, but then you can choose - at runtime (or import time) which underlying event-loop to use. This - means you can write **one** code-base that can run on Twisted *or* - asyncio (without a Twisted dependency) as you or your users see fit. - - Code like the following can then run on *either* system: - - .. sourcecode:: python - - import txaio - txaio.use_twisted() # or .use_asyncio() - - f0 = txaio.create_future() - f1 = txaio.as_future(some_func, 1, 2, key='word') - txaio.add_callbacks(f0, callback, errback) - txaio.add_callbacks(f1, callback, errback) - # ... - txaio.resolve(f0, "value") - txaio.reject(f1, RuntimeError("it failed")) - - Please refer to the `documentation <https://txaio.readthedocs.io/en/latest/>`_ for description and usage of the library features. - - - .. |Version| image:: https://img.shields.io/pypi/v/txaio.svg - :target: https://pypi.python.org/pypi/txaio - :alt: Version - - .. |Build| image:: https://github.com/crossbario/txaio/workflows/main/badge.svg - :target: https://github.com/crossbario/txaio/actions?query=workflow%3Amain - :alt: Build Workflow - - .. |Deploy| image:: https://github.com/crossbario/txaio/workflows/deploy/badge.svg - :target: https://github.com/crossbario/txaio/actions?query=workflow%3Adeploy - :alt: Deploy Workflow - - .. |Coverage| image:: https://codecov.io/github/crossbario/txaio/coverage.svg?branch=master - :target: https://codecov.io/github/crossbario/txaio - :alt: Coverage - - .. |Docs| image:: https://readthedocs.org/projects/txaio/badge/?version=latest - :target: https://txaio.readthedocs.io/en/latest/ - :alt: Docs - Keywords: asyncio twisted trollius coroutine Platform: Any Classifier: License :: OSI Approved :: MIT License @@ -99,16 +16,101 @@ Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: Software Development :: Libraries :: Application Frameworks -Requires-Python: >=3.6 +Requires-Python: >=3.7 Provides-Extra: twisted Provides-Extra: asyncio Provides-Extra: dev Provides-Extra: all +License-File: LICENSE + +txaio +===== + +| |Version| |Build| |Deploy| |Coverage| |Docs| + +-------------- + +**txaio** is a helper library for writing code that runs unmodified on +both `Twisted <https://twistedmatrix.com/>`_ and `asyncio <https://docs.python.org/3/library/asyncio.html>`_ / `Trollius <http://trollius.readthedocs.org/en/latest/index.html>`_. + +This is like `six <http://pythonhosted.org/six/>`_, but for wrapping +over differences between Twisted and asyncio so one can write code +that runs unmodified on both (aka *source code compatibility*). In +other words: your *users* can choose if they want asyncio **or** Twisted +as a dependency. + +Note that, with this approach, user code **runs under the native event +loop of either Twisted or asyncio**. This is different from attaching +either one's event loop to the other using some event loop adapter. + + +Platform support +---------------- + +**txaio** runs on CPython 3.6+ and PyPy 3, on top of *Twisted* or *asyncio*. Specifically, **txaio** is tested on the following platforms: + +* CPython 3.6 and 3.9 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) +* PyPy 3.6 an 3.7 on Twisted 18.7, 19.10, trunk and on asyncio (stdlib) + +> Note: txaio up to version 18.8.1 also supported Python 2.7 and Python 3.4. Beginning with release v20.1.1, txaio only supports Python 3.5+. Beginning with release v20.12.1, txaio only supports Python 3.6+. + + +How it works +------------ + +Instead of directly importing, instantiating and using ``Deferred`` +(for Twisted) or ``Future`` (for asyncio) objects, **txaio** provides +helper-functions to do that for you, as well as associated things like +adding callbacks or errbacks. + +This obviously changes the style of your code, but then you can choose +at runtime (or import time) which underlying event-loop to use. This +means you can write **one** code-base that can run on Twisted *or* +asyncio (without a Twisted dependency) as you or your users see fit. + +Code like the following can then run on *either* system: + +.. sourcecode:: python + + import txaio + txaio.use_twisted() # or .use_asyncio() + + f0 = txaio.create_future() + f1 = txaio.as_future(some_func, 1, 2, key='word') + txaio.add_callbacks(f0, callback, errback) + txaio.add_callbacks(f1, callback, errback) + # ... + txaio.resolve(f0, "value") + txaio.reject(f1, RuntimeError("it failed")) + +Please refer to the `documentation <https://txaio.readthedocs.io/en/latest/>`_ for description and usage of the library features. + + +.. |Version| image:: https://img.shields.io/pypi/v/txaio.svg + :target: https://pypi.python.org/pypi/txaio + :alt: Version + +.. |Build| image:: https://github.com/crossbario/txaio/workflows/main/badge.svg + :target: https://github.com/crossbario/txaio/actions?query=workflow%3Amain + :alt: Build Workflow + +.. |Deploy| image:: https://github.com/crossbario/txaio/workflows/deploy/badge.svg + :target: https://github.com/crossbario/txaio/actions?query=workflow%3Adeploy + :alt: Deploy Workflow + +.. |Coverage| image:: https://codecov.io/github/crossbario/txaio/coverage.svg?branch=master + :target: https://codecov.io/github/crossbario/txaio + :alt: Coverage + +.. |Docs| image:: https://readthedocs.org/projects/txaio/badge/?version=latest + :target: https://txaio.readthedocs.io/en/latest/ + :alt: Docs