Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-txtorcon for openSUSE:Factory checked in at 2023-09-20 13:30:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-txtorcon (Old) and /work/SRC/openSUSE:Factory/.python-txtorcon.new.16627 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-txtorcon" Wed Sep 20 13:30:24 2023 rev:14 rq:1112330 version:23.5.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-txtorcon/python-txtorcon.changes 2022-06-28 15:23:11.502015776 +0200 +++ /work/SRC/openSUSE:Factory/.python-txtorcon.new.16627/python-txtorcon.changes 2023-09-20 13:34:01.889053198 +0200 @@ -1,0 +2,9 @@ +Tue Sep 19 12:02:42 UTC 2023 - OndÅej Súkup <mimi...@gmail.com> + +- update to 23.5.0 + * Fix a bug with CONTROLLER_WAIT events + * drop python2 support + * Added support for Python 3.11. + * No more ipaddress dependency + +------------------------------------------------------------------- Old: ---- txtorcon-22.0.0.tar.gz New: ---- txtorcon-23.5.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-txtorcon.spec ++++++ --- /var/tmp/diff_new_pack.A9z9L0/_old 2023-09-20 13:34:03.001093038 +0200 +++ /var/tmp/diff_new_pack.A9z9L0/_new 2023-09-20 13:34:03.005093181 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-txtorcon # -# 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,10 +16,8 @@ # -%{?!python_module:%define python_module() python-%{**} %{!?skip_python3:python3-%{**}}} -%bcond_without python2 Name: python-txtorcon -Version: 22.0.0 +Version: 23.5.0 Release: 0 Summary: Twisted-based asynchronous Tor control protocol implementation License: MIT @@ -30,21 +28,19 @@ BuildRequires: python-rpm-macros Requires: python-Automat Requires: python-Twisted-tls >= 15.5.0 +Requires: python-cryptography Requires: python-incremental +Requires: python-six Requires: python-zope.interface >= 3.6.1 BuildArch: noarch # SECTION test requirements BuildRequires: lsof BuildRequires: %{python_module Automat} BuildRequires: %{python_module Twisted-tls >= 15.5.0} +BuildRequires: %{python_module cryptography} +BuildRequires: %{python_module incremental} +BuildRequires: %{python_module six} BuildRequires: %{python_module zope.interface >= 3.6.1} -%if %{with python2} -BuildRequires: python-ipaddress -%endif -# /SECTION -%ifpython2 -Requires: python-ipaddress >= 1.0.16 -%endif %python_subpackages %description @@ -76,5 +72,7 @@ %files %{python_files} %license LICENSE docs/*.rst -%{python_sitelib}/* +%{python_sitelib}/txtorcon +%{python_sitelib}/txtorcon-%{version}*-info +%{python_sitelib}/twisted/plugins/* ++++++ txtorcon-22.0.0.tar.gz -> txtorcon-23.5.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/INSTALL new/txtorcon-23.5.0/INSTALL --- old/txtorcon-22.0.0/INSTALL 2018-05-31 20:59:02.000000000 +0200 +++ new/txtorcon-23.5.0/INSTALL 2023-02-16 06:50:25.000000000 +0100 @@ -24,13 +24,11 @@ use virtualenv: apt-get install python-setuptools python-pip - python setup.py build mkdir tmp - virtualenv --never-download --extra-search-dir=/usr/lib/python2.7/dist-packages/ tmp/txtorcon_env + virtualenv tmp/txtorcon_env cd tmp/txtorcon_env source bin/activate - pip install Twisted ipaddress pygeoip # this will download from internets: - export PYTHONPATH=../../build/lib.linux-x86_64-2.7/ + pip install --editable . # this will download from internets: (Or you can type "make virtualenv" which creates tmp/txtorcon_env, up to the "activate" step above) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/Makefile new/txtorcon-23.5.0/Makefile --- old/txtorcon-22.0.0/Makefile 2022-03-16 22:26:15.000000000 +0100 +++ new/txtorcon-23.5.0/Makefile 2023-05-19 03:13:45.000000000 +0200 @@ -1,6 +1,6 @@ .PHONY: test html counts coverage sdist clean install doc integration diagrams default: test -VERSION = 22.0.0 +VERSION = 23.5.0 test: PYTHONPATH=. trial --reporter=text test @@ -99,20 +99,20 @@ test-release: dist ./scripts/test-release.sh $(shell pwd) ${VERSION} -dist: dist/txtorcon-${VERSION}-py2.py3-none-any.whl dist/txtorcon-${VERSION}.tar.gz +dist: dist/txtorcon-${VERSION}-py3-none-any.whl dist/txtorcon-${VERSION}.tar.gz -dist-sigs: dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc dist/txtorcon-${VERSION}.tar.gz.asc +dist-sigs: dist/txtorcon-${VERSION}-py3-none-any.whl.asc dist/txtorcon-${VERSION}.tar.gz.asc sdist: setup.py python setup.py check python setup.py sdist -dist/txtorcon-${VERSION}-py2.py3-none-any.whl: +dist/txtorcon-${VERSION}-py3-none-any.whl: python setup.py check - python setup.py bdist_wheel --universal + python setup.py bdist_wheel -dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc: dist/txtorcon-${VERSION}-py2.py3-none-any.whl - gpg --verify dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc || gpg --pinentry loopback --no-version --detach-sign --armor --local-user mee...@meejah.ca dist/txtorcon-${VERSION}-py2.py3-none-any.whl +dist/txtorcon-${VERSION}-py3-none-any.whl.asc: dist/txtorcon-${VERSION}-py3-none-any.whl + gpg --verify dist/txtorcon-${VERSION}-py3-none-any.whl.asc || gpg --pinentry loopback --no-version --detach-sign --armor --local-user mee...@meejah.ca dist/txtorcon-${VERSION}-py3-none-any.whl dist/txtorcon-${VERSION}.tar.gz: sdist dist/txtorcon-${VERSION}.tar.gz.asc: dist/txtorcon-${VERSION}.tar.gz @@ -120,16 +120,14 @@ release: twine upload -r pypi -c "txtorcon v${VERSION} tarball" dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}.tar.gz.asc - twine upload -r pypi -c "txtorcon v${VERSION} wheel" dist/txtorcon-${VERSION}-py2.py3-none-any.whl dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc + twine upload -r pypi -c "txtorcon v${VERSION} wheel" dist/txtorcon-${VERSION}-py3-none-any.whl dist/txtorcon-${VERSION}-py3-none-any.whl.asc venv: - virtualenv --never-download --extra-search-dir=/usr/lib/python2.7/dist-packages/ venv + virtualenv venv + ./venv/bin/pip install -r requirements.txt + ./venv/bin/pip install -r dev-requirements.txt @echo "created venv" - @echo "see INSTALL for more information; to use:" - @echo ". ./venv/bin/activate" - @echo "pip install -r requirements.txt" - @echo "pip install -r dev-requirements.txt" @echo "python examples/monitor.py" html: docs/*.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/PKG-INFO new/txtorcon-23.5.0/PKG-INFO --- old/txtorcon-22.0.0/PKG-INFO 2022-03-16 22:28:53.509965000 +0100 +++ new/txtorcon-23.5.0/PKG-INFO 2023-05-19 03:21:31.507377600 +0200 @@ -1,13 +1,12 @@ Metadata-Version: 2.1 Name: txtorcon -Version: 22.0.0 +Version: 23.5.0 Summary: Twisted-based Tor controller client, with state-tracking and configuration abstractions. https://txtorcon.readthedocs.org https://github.com/meejah/txtorcon Home-page: https://github.com/meejah/txtorcon Author: meejah Author-email: mee...@meejah.ca License: MIT Keywords: python,twisted,tor,tor controller -Platform: UNKNOWN Classifier: Framework :: Twisted Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers @@ -16,14 +15,12 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Unix Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Internet :: Proxy Servers Classifier: Topic :: Internet Classifier: Topic :: Security +Requires-Python: >=3.8 Provides-Extra: dev License-File: LICENSE @@ -48,8 +45,8 @@ :target: https://coveralls.io/github/meejah/txtorcon?branch=main :alt: coveralls -.. image:: http://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main - :target: http://codecov.io/github/meejah/txtorcon?branch=main +.. image:: https://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main + :target: https://codecov.io/github/meejah/txtorcon?branch=main :alt: codecov .. image:: https://readthedocs.org/projects/txtorcon/badge/?version=stable @@ -60,10 +57,6 @@ :target: https://txtorcon.readthedocs.io/en/latest :alt: ReadTheDocs -.. image:: https://landscape.io/github/meejah/txtorcon/main/landscape.svg?style=flat - :target: https://landscape.io/github/meejah/txtorcon/main - :alt: Code Health - txtorcon ======== @@ -72,11 +65,10 @@ - **code**: https://github.com/meejah/txtorcon - ``torsocks git clone git://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon.git`` - MIT-licensed; -- Python 2.7, PyPy 5.0.0+, Python 3.5+; +- Python 3.8+, PyPy 7.3.7+; - depends on `Twisted`_, - `Automat <https://github.com/glyph/automat>`_, - (and the `ipaddress <https://pypi.python.org/pypi/ipaddress>`_ backport for non Python 3) + `Automat <https://github.com/glyph/automat>`_ Ten Thousand Feet @@ -100,7 +92,6 @@ --------------------------------------- `download <examples/readme.py>`_ -(also `python2 style <examples/readme2.py>`_) .. code:: python @@ -177,5 +168,3 @@ <https://txtorcon.readthedocs.org/en/latest/introduction.html>`_). .. _Twisted: https://twistedmatrix.com/trac - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/README.rst new/txtorcon-23.5.0/README.rst --- old/txtorcon-22.0.0/README.rst 2022-03-16 21:58:15.000000000 +0100 +++ new/txtorcon-23.5.0/README.rst 2023-05-19 03:11:14.000000000 +0200 @@ -19,8 +19,8 @@ :target: https://coveralls.io/github/meejah/txtorcon?branch=main :alt: coveralls -.. image:: http://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main - :target: http://codecov.io/github/meejah/txtorcon?branch=main +.. image:: https://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main + :target: https://codecov.io/github/meejah/txtorcon?branch=main :alt: codecov .. image:: https://readthedocs.org/projects/txtorcon/badge/?version=stable @@ -31,10 +31,6 @@ :target: https://txtorcon.readthedocs.io/en/latest :alt: ReadTheDocs -.. image:: https://landscape.io/github/meejah/txtorcon/main/landscape.svg?style=flat - :target: https://landscape.io/github/meejah/txtorcon/main - :alt: Code Health - txtorcon ======== @@ -43,11 +39,10 @@ - **code**: https://github.com/meejah/txtorcon - ``torsocks git clone git://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon.git`` - MIT-licensed; -- Python 2.7, PyPy 5.0.0+, Python 3.5+; +- Python 3.8+, PyPy 7.3.7+; - depends on `Twisted`_, - `Automat <https://github.com/glyph/automat>`_, - (and the `ipaddress <https://pypi.python.org/pypi/ipaddress>`_ backport for non Python 3) + `Automat <https://github.com/glyph/automat>`_ Ten Thousand Feet @@ -71,7 +66,6 @@ --------------------------------------- `download <examples/readme.py>`_ -(also `python2 style <examples/readme2.py>`_) .. code:: python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/docs/conf.py new/txtorcon-23.5.0/docs/conf.py --- old/txtorcon-22.0.0/docs/conf.py 2018-05-31 20:59:02.000000000 +0200 +++ new/txtorcon-23.5.0/docs/conf.py 2022-06-17 21:32:04.000000000 +0200 @@ -152,7 +152,7 @@ 'github_button': 'false', 'github_user': 'meejah', 'github_repo': 'txtorcon', - 'travis_button': 'true', + 'travis_button': 'false', 'coveralls_button': 'true', 'logo_name': 'true', 'description': 'Control Tor from Twisted', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/docs/index.rst new/txtorcon-23.5.0/docs/index.rst --- old/txtorcon-22.0.0/docs/index.rst 2020-06-10 00:35:15.000000000 +0200 +++ new/txtorcon-23.5.0/docs/index.rst 2022-06-17 21:32:04.000000000 +0200 @@ -6,19 +6,17 @@ - **docs**: - v3 onion: http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/ - - v2 onion: http://timaq4ygg2iegci7.onion - clearnet: https://txtorcon.readthedocs.org - **code**: https://github.com/meejah/txtorcon -- ``torsocks git clone git://timaq4ygg2iegci7.onion/txtorcon.git`` -- .. image:: https://travis-ci.org/meejah/txtorcon.png?branch=main - :target: https://www.travis-ci.org/meejah/txtorcon +- ``torsocks git clone git://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon.git`` + +- .. image:: https://github.com/meejah/txtorcon/actions/workflows/python3.yaml/badge.svg + :target: https://github.com/meejah/txtorcon/actions + :alt: github-actions .. image:: https://coveralls.io/repos/meejah/txtorcon/badge.svg :target: https://coveralls.io/r/meejah/txtorcon - .. image:: https://codecov.io/gh/meejah/txtorcon/branch/main/graphs/badge.svg?branch=main - :target: https://codecov.io/github/meejah/txtorcon?branch=main - .. image:: https://readthedocs.org/projects/txtorcon/badge/?version=stable :target: https://txtorcon.readthedocs.io/en/stable :alt: ReadTheDocs @@ -27,10 +25,6 @@ :target: https://txtorcon.readthedocs.io/en/latest :alt: ReadTheDocs - .. image:: https://landscape.io/github/meejah/txtorcon/main/landscape.svg?style=flat - :target: https://landscape.io/github/meejah/txtorcon/main - :alt: Code Health - .. container:: first_time If this is your first time exploring txtorcon, please **look at the** @@ -49,8 +43,8 @@ +---------------+---------+---------+ Supported and tested platforms: Python 3.5+, PyPy 5.0.0+, Python 2.7+ (deprecated) -using Twisted 15.5.0+, 16.3.0+, or 17.1.0+ (see `travis -<https://travis-ci.org/meejah/txtorcon>`_). +using Twisted 15.5.0+, 16.3.0+, or 17.1.0+ (see `GitHub Actions +<https://github.com/meejah/txtorcon/actions>`_). **Asycnio inter-operation** is now possible, see :ref:`interop_asyncio` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/docs/introduction.rst new/txtorcon-23.5.0/docs/introduction.rst --- old/txtorcon-22.0.0/docs/introduction.rst 2018-05-31 20:59:02.000000000 +0200 +++ new/txtorcon-23.5.0/docs/introduction.rst 2022-04-12 00:21:37.000000000 +0200 @@ -121,3 +121,4 @@ - `torperf2 <https://github.com/gsathya/torperf2>`_ new Tor node network performance measurement service - `torweb <https://github.com/coffeemakr/torweb>`_ web-based Tor controller/monitor - `potator <https://github.com/mixxorz/potator>`_ "A Tor-based Decentralized Virtual Private Network Application" +- `JoinMarket <https://github.com/JoinMarket-Org/joinmarket-clientserver>`_ Bitcoin CoinJoin (privacy technique) implementation with incentive structure to convince people to take part diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/docs/release-checklist.rst new/txtorcon-23.5.0/docs/release-checklist.rst --- old/txtorcon-22.0.0/docs/release-checklist.rst 2022-03-16 22:27:56.000000000 +0100 +++ new/txtorcon-23.5.0/docs/release-checklist.rst 2023-05-19 03:20:48.000000000 +0200 @@ -21,6 +21,7 @@ * update docs/releases.rst to reflect upcoming reality * blindly make links to the signatures * update heading, date + * commit it all * on both signing-machine and build-machine shells: * export VERSION=22.0.0 @@ -28,23 +29,23 @@ * (if on signing machine) "make dist" and "make dist-sigs" * creates: dist/txtorcon-${VERSION}.tar.gz.asc - dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc + dist/txtorcon-${VERSION}-py3-none-any.whl.asc * add the signatures to "signatures/" - cp dist/txtorcon-${VERSION}.tar.gz.asc dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc signatures/ + cp dist/txtorcon-${VERSION}.tar.gz.asc dist/txtorcon-${VERSION}-py3-none-any.whl.asc signatures/ * add ALL FOUR files to dist/ (OR fix twine commands) * (if not on signing machine) do "make dist" - * scp dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}-py2-none-any.whl signingmachine: + * scp dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}-py3-none-any.whl signingmachine: * sign both, with .asc detached signatures - * gpg --no-version --detach-sign --armor --local-user mee...@meejah.ca txtorcon-${VERSION}-py2-none-any.whl + * gpg --no-version --detach-sign --armor --local-user mee...@meejah.ca txtorcon-${VERSION}-py3-none-any.whl * gpg --no-version --detach-sign --armor --local-user mee...@meejah.ca txtorcon-${VERSION}.tar.gz * copy signatures back to build machine, in dist/ * double-check that they validate:: - gpg --verify dist/txtorcon-${VERSION}-py2.py3-none-any.whl.asc + gpg --verify dist/txtorcon-${VERSION}-py3-none-any.whl.asc gpg --verify dist/txtorcon-${VERSION}.tar.gz.asc * generate sha256sum for each:: - sha256sum dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}-py2.py3-none-any.whl + sha256sum dist/txtorcon-${VERSION}.tar.gz dist/txtorcon-${VERSION}-py3-none-any.whl * copy signature files to <root of dist>/signatures and commit them along with the above changes for versions, etc. @@ -85,7 +86,7 @@ in a shell wherever you have the files downloaded: cat <<EOF | sha256sum --check - 910ff3216035de0a779cfc167c0545266ff1f26687b163fc4655f298aca52d74 txtorcon-0.10.0-py2-none-any.whl + 910ff3216035de0a779cfc167c0545266ff1f26687b163fc4655f298aca52d74 txtorcon-0.10.0-py3-none-any.whl c93f3d0f21d53c6b4c1521fc8d9dc2c9aff4a9f60497becea207d1738fa78279 txtorcon-0.10.0.tar.gz EOF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/docs/releases.rst new/txtorcon-23.5.0/docs/releases.rst --- old/txtorcon-22.0.0/docs/releases.rst 2022-03-16 22:28:27.000000000 +0100 +++ new/txtorcon-23.5.0/docs/releases.rst 2023-05-19 03:18:27.000000000 +0200 @@ -15,7 +15,31 @@ See also :ref:`api_stability`. -`git main <https://github.com/meejah/txtorcon>`_ *will likely become v21.1.0* +`git main <https://github.com/meejah/txtorcon>`_ *will likely become v23.6.0* + + + +v23.5.0 +------- + +May 18, 2023 + + * `txtorcon-23.5.0.tar.gz <http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.5.0.tar.gz>`_ (`PyPI <https://pypi.python.org/pypi/txtorcon/23.5.0>`_ (:download:`local-sig </../signatues/txtorcon-23.5.0.tar.gz.asc>` or `github-sig <https://github.com/meejah/txtorcon/blob/main/signatues/txtorcon-23.5.0.tar.gz.asc?raw=true>`_) (`source <https://github.com/meejah/txtorcon/archive/v23.5.0.tar.gz>`_) +* ``twisted.web.client.Agent`` instances now use the same HTTPS policy by default as ``twisted.web.client.Agent``. + It is possible to override this policy with the ``tls_context_factory`` argument, the equivalent to ``Agent``'s ``contextFactory=``. +* Added support for Python 3.11. +* No more ipaddress dependency + + +v23.0.0 +------- + +February 15, 2023 + + * `txtorcon-23.0.0.tar.gz <http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon-23.0.0.tar.gz>`_ (`PyPI <https://pypi.python.org/pypi/txtorcon/23.0.0>`_ (:download:`local-sig </../signatues/txtorcon-23.0.0.tar.gz.asc>` or `github-sig <https://github.com/meejah/txtorcon/blob/main/signatues/txtorcon-23.0.0.tar.gz.asc?raw=true>`_) (`source <https://github.com/meejah/txtorcon/archive/v23.0.0.tar.gz>`_) + * Drop python2 support + * Fix a bug with `CONTROLLER_WAIT` events + v22.0.0 ------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/requirements.txt new/txtorcon-23.5.0/requirements.txt --- old/txtorcon-22.0.0/requirements.txt 2020-04-20 04:58:02.000000000 +0200 +++ new/txtorcon-23.5.0/requirements.txt 2023-05-19 03:11:14.000000000 +0200 @@ -2,7 +2,6 @@ ## hmm, travis-ci doesn't like this since we need a GeoIP-dev package ##GeoIP>=1.2.9 Twisted[tls]>=15.5.0 -ipaddress>=1.0.16 ; python_version<'3' zope.interface>=3.6.1 incremental automat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/setup.py new/txtorcon-23.5.0/setup.py --- old/txtorcon-22.0.0/setup.py 2022-03-16 21:55:58.000000000 +0100 +++ new/txtorcon-23.5.0/setup.py 2023-05-19 03:11:14.000000000 +0200 @@ -41,6 +41,7 @@ name='txtorcon', version=__version__, description=description, + python_requires=">=3.8", ## setup_requires="setuptools>=36.2", long_description=open('README.rst', 'r').read(), keywords=['python', 'twisted', 'tor', 'tor controller'], @@ -58,9 +59,6 @@ 'Operating System :: POSIX :: Linux', 'Operating System :: Unix', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Internet :: Proxy Servers', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/test/test_endpoints.py new/txtorcon-23.5.0/test/test_endpoints.py --- old/txtorcon-22.0.0/test/test_endpoints.py 2021-08-16 23:06:49.000000000 +0200 +++ new/txtorcon-23.5.0/test/test_endpoints.py 2023-02-16 06:25:43.000000000 +0100 @@ -542,7 +542,11 @@ args = (50, "blarg", "Doing that thing we talked about.") # kind-of cheating, test-wise? ep._tor_progress_update(*args) - self.assertTrue(ding.called_with(*args)) + ding.assert_called() + self.assertEqual( + ding.call_args[0][1:], + args[1:], + ) def test_progress_updates_error(self, ftb): config = TorConfig() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/test/test_torstate.py new/txtorcon-23.5.0/test/test_torstate.py --- old/txtorcon-22.0.0/test/test_torstate.py 2020-04-20 05:04:40.000000000 +0200 +++ new/txtorcon-23.5.0/test/test_torstate.py 2023-02-16 06:25:43.000000000 +0100 @@ -648,7 +648,8 @@ for ignored in self.state.event_map.items(): self.send(b"250 OK") - self.send(b"650 STREAM 1 NEW 0 ca.yahoo.com:80 SOURCE_ADDR=127.0.0.1:54327 PURPOSE=USER") + self.send(b"650 STREAM 1 NEW 0 links.duckduckgo.com:443 SOURCE_ADDR=127.0.0.1:54327 PURPOSE=USER") + self.send(b'650 STREAM 1 CONTROLLER_WAIT 0 links.duckduckgo.com:443 SOCKS_USERNAME="duckduckgo.com" SOCKS_PASSWORD="4a2f6ef74fe3aa0bf8876b4e927a28f7" CLIENT_PROTOCOL=SOCKS5 NYM_EPOCH=0 SESSION_GROUP=-5 ISO_FIELDS=SOCKS_USERNAME,SOCKS_PASSWORD,CLIENTADDR,SESSION_GROUP,NYM_EPOCH') self.send(b"650 STREAM 1 REMAP 0 87.248.112.181:80 SOURCE=CACHE") self.assertEqual(len(attacher.streams), 1) self.assertEqual(attacher.streams[0].id, 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/test/test_web.py new/txtorcon-23.5.0/test/test_web.py --- old/txtorcon-22.0.0/test/test_web.py 2021-08-16 22:24:40.000000000 +0200 +++ new/txtorcon-23.5.0/test/test_web.py 2023-05-19 03:11:14.000000000 +0200 @@ -1,6 +1,7 @@ from mock import Mock +from twisted.web.client import BrowserLikePolicyForHTTPS from twisted.trial import unittest from twisted.internet import defer @@ -14,6 +15,11 @@ from txtorcon.circuit import TorCircuitEndpoint +class CustomTLSContextFactory(BrowserLikePolicyForHTTPS): + def creatorForNetloc(self, hostname, port): + return super().creatorForNetloc(b"custom.domain", port) + + class WebAgentTests(unittest.TestCase): if not _HAVE_WEB: skip = "Missing web" @@ -56,7 +62,12 @@ def getConnection(key, endpoint): self.assertTrue(isinstance(endpoint, TorSocksEndpoint)) - self.assertTrue(endpoint._tls) + self.assertIsInstance( + endpoint._tls, + BrowserLikePolicyForHTTPS().creatorForNetloc(b"host", 443).__class__ + ) + # This uses a Twisted private interface... + self.assertEqual(endpoint._tls._hostname, "meejah.ca") self.assertEqual(endpoint._host, u'meejah.ca') self.assertEqual(endpoint._port, 443) return defer.succeed(proto) @@ -71,6 +82,38 @@ self.assertIs(res, gold) @defer.inlineCallbacks + def test_socks_agent_custom_tls_context_factory(self): + reactor = Mock() + config = Mock() + config.SocksPort = [] + proto = Mock() + gold = object() + proto.request = Mock(return_value=defer.succeed(gold)) + + def getConnection(key, endpoint): + + self.assertIsInstance( + endpoint._tls, + BrowserLikePolicyForHTTPS().creatorForNetloc(b"host", 443).__class__ + ) + # This uses a Twisted private interface... + self.assertEqual(endpoint._tls._hostname, "custom.domain") + self.assertEqual(endpoint._host, 'meejah.ca') + return defer.succeed(proto) + pool = Mock() + pool.getConnection = getConnection + + # do the test + agent = yield agent_for_socks_port( + reactor, config, '127.0.0.50:1234', pool=pool, + tls_context_factory=CustomTLSContextFactory() + ) + + # apart from the getConnection asserts... + res = yield agent.request(b'GET', b'https://meejah.ca') + self.assertIs(res, gold) + + @defer.inlineCallbacks def test_agent(self): reactor = Mock() socks_ep = Mock() @@ -95,7 +138,12 @@ def getConnection(key, endpoint): self.assertTrue(isinstance(endpoint, TorCircuitEndpoint)) target = endpoint._target_endpoint - self.assertTrue(target._tls) + self.assertIsInstance( + target._tls, + BrowserLikePolicyForHTTPS().creatorForNetloc(b"host", 443).__class__ + ) + # This uses a Twisted private interface... + self.assertEqual(target._tls._hostname, "meejah.ca") self.assertEqual(target._host, u'meejah.ca') self.assertEqual(target._port, 443) return defer.succeed(proto) @@ -106,4 +154,35 @@ # apart from the getConnection asserts... res = yield agent.request(b'GET', b'https://meejah.ca') + self.assertIs(res, gold) + + @defer.inlineCallbacks + def test_agent_with_circuit_tls_context_factory(self): + reactor = Mock() + circuit = Mock() + socks_ep = Mock() + proto = Mock() + gold = object() + proto.request = Mock(return_value=defer.succeed(gold)) + + def getConnection(key, endpoint): + target = endpoint._target_endpoint + self.assertIsInstance( + target._tls, + BrowserLikePolicyForHTTPS().creatorForNetloc(b"host", 443).__class__ + ) + # This uses a Twisted private interface... + self.assertEqual(target._tls._hostname, "custom.domain") + self.assertEqual(target._host, 'meejah.ca') + return defer.succeed(proto) + pool = Mock() + pool.getConnection = getConnection + + agent = yield tor_agent( + reactor, socks_ep, circuit=circuit, pool=pool, + tls_context_factory=CustomTLSContextFactory() + ) + + # apart from the getConnection asserts... + res = yield agent.request(b'GET', b'https://meejah.ca') self.assertIs(res, gold) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/_metadata.py new/txtorcon-23.5.0/txtorcon/_metadata.py --- old/txtorcon-22.0.0/txtorcon/_metadata.py 2022-03-16 22:26:28.000000000 +0100 +++ new/txtorcon-23.5.0/txtorcon/_metadata.py 2023-05-19 03:13:53.000000000 +0200 @@ -1,6 +1,6 @@ -__version__ = '22.0.0' +__version__ = '23.5.0' __author__ = 'meejah' __contact__ = 'mee...@meejah.ca' __url__ = 'https://github.com/meejah/txtorcon' __license__ = 'MIT' -__copyright__ = 'Copyright 2012-2022' +__copyright__ = 'Copyright 2012-2023' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/circuit.py new/txtorcon-23.5.0/txtorcon/circuit.py --- old/txtorcon-22.0.0/txtorcon/circuit.py 2019-06-18 01:29:41.000000000 +0200 +++ new/txtorcon-23.5.0/txtorcon/circuit.py 2023-05-19 03:11:14.000000000 +0200 @@ -264,13 +264,16 @@ return defer.succeed(self) return self._when_closed.when_fired() - def web_agent(self, reactor, socks_endpoint, pool=None): + def web_agent(self, reactor, socks_endpoint, pool=None, tls_context_factory=None): """ :param socks_endpoint: create one with :meth:`txtorcon.TorConfig.create_socks_endpoint`. Can be a Deferred. :param pool: passed on to the Agent (as ``pool=``) + + :param tls_context_factory: A factory for TLS contexts. If ``None``, + ``BrowserLikePolicyForHTTPS`` is used. """ # local import because there isn't Agent stuff on some # platforms we support, so this will only error if you try @@ -281,6 +284,7 @@ socks_endpoint, circuit=self, pool=pool, + tls_context_factory=tls_context_factory, ) # XXX should make this API match above web_agent (i.e. pass a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/controller.py new/txtorcon-23.5.0/txtorcon/controller.py --- old/txtorcon-22.0.0/txtorcon/controller.py 2020-04-20 04:58:02.000000000 +0200 +++ new/txtorcon-23.5.0/txtorcon/controller.py 2023-05-19 03:11:14.000000000 +0200 @@ -566,7 +566,7 @@ self._config = yield TorConfig.from_protocol(self._protocol) returnValue(self._config) - def web_agent(self, pool=None, socks_endpoint=None): + def web_agent(self, pool=None, socks_endpoint=None, tls_context_factory=None): """ :param socks_endpoint: If ``None`` (the default), a suitable SOCKS port is chosen from our config (or added). If supplied, @@ -577,6 +577,9 @@ this. :param pool: passed on to the Agent (as ``pool=``) + + :param tls_context_factory: A factory for TLS contexts. If ``None``, + ``BrowserLikePolicyForHTTPS`` is used. """ if self._non_anonymous: raise Exception( @@ -597,6 +600,7 @@ self._reactor, socks_endpoint, pool=pool, + tls_context_factory=tls_context_factory ) @inlineCallbacks @@ -935,7 +939,7 @@ "status/circuit-established", ) returnValue( - not( + not ( int(info["dormant"]) or not int(info["status/enough-dir-info"]) or not int(info["status/circuit-established"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/interface.py new/txtorcon-23.5.0/txtorcon/interface.py --- old/txtorcon-22.0.0/txtorcon/interface.py 2018-05-31 20:59:02.000000000 +0200 +++ new/txtorcon-23.5.0/txtorcon/interface.py 2023-05-19 03:11:14.000000000 +0200 @@ -41,9 +41,9 @@ :class:`txtorcon.TorState` instance. """ - def web_agent(self, pool=None, _socks_endpoint=None): + def web_agent(self, pool=None, socks_endpoint=None, tls_context_factory=None): """ - :param _socks_endpoint: If ``None`` (the default), a suitable + :param socks_endpoint: If ``None`` (the default), a suitable SOCKS port is chosen from our config (or added). If supplied, should be a Deferred which fires an IStreamClientEndpoint (e.g. the return-value from @@ -52,6 +52,9 @@ this. :param pool: passed on to the Agent (as ``pool=``) + + :param tls_context_factory: A factory for TLS contexts. If ``None``, + ``BrowserLikePolicyForHTTPS`` is used. """ def dns_resolve(self, hostname): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/stream.py new/txtorcon-23.5.0/txtorcon/stream.py --- old/txtorcon-22.0.0/txtorcon/stream.py 2018-05-31 20:59:02.000000000 +0200 +++ new/txtorcon-23.5.0/txtorcon/stream.py 2023-02-16 06:25:43.000000000 +0100 @@ -244,6 +244,9 @@ elif self.state in ['NEWRESOLVE', 'SENTRESOLVE']: pass # print self.state, self, args + elif self.state == 'CONTROLLER_WAIT': + pass # waiting for us to ATTACHSTREAM + else: raise RuntimeError("Unknown state: %s" % self.state) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon/web.py new/txtorcon-23.5.0/txtorcon/web.py --- old/txtorcon-22.0.0/txtorcon/web.py 2018-09-22 11:49:26.000000000 +0200 +++ new/txtorcon-23.5.0/txtorcon/web.py 2023-05-19 03:11:14.000000000 +0200 @@ -5,7 +5,7 @@ from __future__ import with_statement from twisted.web.iweb import IAgentEndpointFactory -from twisted.web.client import Agent +from twisted.web.client import Agent, BrowserLikePolicyForHTTPS from twisted.internet.defer import inlineCallbacks, returnValue, Deferred from twisted.internet.endpoints import TCP4ClientEndpoint, UNIXClientEndpoint @@ -18,7 +18,7 @@ @implementer(IAgentEndpointFactory) class _AgentEndpointFactoryUsingTor(object): - def __init__(self, reactor, tor_socks_endpoint): + def __init__(self, reactor, tor_socks_endpoint, tls_context_factory): self._reactor = reactor self._proxy_ep = SingleObserver() # if _proxy_ep is Deferred, but we get called twice, we must @@ -28,32 +28,47 @@ else: self._proxy_ep.fire(tor_socks_endpoint) + if tls_context_factory is None: + tls_context_factory = BrowserLikePolicyForHTTPS() + self._tls_context_factory = tls_context_factory + def _set_proxy(self, p): self._proxy_ep.fire(p) return p def endpointForURI(self, uri): + if uri.scheme == b'https': + tls = self._tls_context_factory.creatorForNetloc(uri.host, uri.port) + else: + tls = False return TorSocksEndpoint( self._proxy_ep.when_fired(), uri.host, uri.port, - tls=(uri.scheme == b'https'), + tls=tls, ) @implementer(IAgentEndpointFactory) class _AgentEndpointFactoryForCircuit(object): - def __init__(self, reactor, tor_socks_endpoint, circ): + def __init__(self, reactor, tor_socks_endpoint, circ, tls_context_factory): self._reactor = reactor self._socks_ep = tor_socks_endpoint self._circ = circ + if tls_context_factory is None: + tls_context_factory = BrowserLikePolicyForHTTPS() + self._tls_context_factory = tls_context_factory def endpointForURI(self, uri): """IAgentEndpointFactory API""" + if uri.scheme == b'https': + tls = self._tls_context_factory.creatorForNetloc(uri.host, uri.port) + else: + tls = False torsocks = TorSocksEndpoint( self._socks_ep, uri.host, uri.port, - tls=uri.scheme == b'https', + tls=tls, ) from txtorcon.circuit import TorCircuitEndpoint return TorCircuitEndpoint( @@ -61,7 +76,7 @@ ) -def tor_agent(reactor, socks_endpoint, circuit=None, pool=None): +def tor_agent(reactor, socks_endpoint, circuit=None, pool=None, tls_context_factory=None): """ This is the low-level method used by :meth:`txtorcon.Tor.web_agent` and @@ -83,21 +98,29 @@ which points at a SOCKS5 port of our Tor :param pool: passed on to the Agent (as ``pool=``) - """ + :param tls_context_factory: A factory for TLS contexts. If ``None``, + ``BrowserLikePolicyForHTTPS`` is used. + """ if socks_endpoint is None: raise ValueError( "Must provide socks_endpoint as Deferred or IStreamClientEndpoint" ) if circuit is not None: - factory = _AgentEndpointFactoryForCircuit(reactor, socks_endpoint, circuit) + factory = _AgentEndpointFactoryForCircuit( + reactor, socks_endpoint, circuit, tls_context_factory + ) else: - factory = _AgentEndpointFactoryUsingTor(reactor, socks_endpoint) + factory = _AgentEndpointFactoryUsingTor( + reactor, socks_endpoint, tls_context_factory + ) + return Agent.usingEndpointFactory(reactor, factory, pool=pool) @inlineCallbacks -def agent_for_socks_port(reactor, torconfig, socks_config, pool=None): +def agent_for_socks_port(reactor, torconfig, socks_config, pool=None, + tls_context_factory=None): """ This returns a Deferred that fires with an object that implements :class:`twisted.web.iweb.IAgent` and is thus suitable for passing @@ -116,13 +139,10 @@ containing ``socket``). If the given SOCKS option is not already available in the underlying Tor instance, it is re-configured to add the SOCKS option. - """ - # :param tls: True (the default) will use Twisted's default options - # with the hostname in the URI -- that is, TLS verification - # similar to a Browser. Otherwise, you can pass whatever Twisted - # returns for `optionsForClientTLS - # <https://twistedmatrix.com/documents/current/api/twisted.internet.ssl.optionsForClientTLS.html>`_ + :param tls_context_factory: A factory for TLS contexts. If ``None``, + ``BrowserLikePolicyForHTTPS`` is used. + """ socks_config = str(socks_config) # sadly, all lists are lists-of-strings to Tor :/ if socks_config not in torconfig.SocksPort: txtorlog.msg("Adding SOCKS port '{}' to Tor".format(socks_config)) @@ -149,7 +169,9 @@ returnValue( Agent.usingEndpointFactory( reactor, - _AgentEndpointFactoryUsingTor(reactor, socks_ep), + _AgentEndpointFactoryUsingTor( + reactor, socks_ep, tls_context_factory=tls_context_factory + ), pool=pool, ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon.egg-info/PKG-INFO new/txtorcon-23.5.0/txtorcon.egg-info/PKG-INFO --- old/txtorcon-22.0.0/txtorcon.egg-info/PKG-INFO 2022-03-16 22:28:53.000000000 +0100 +++ new/txtorcon-23.5.0/txtorcon.egg-info/PKG-INFO 2023-05-19 03:21:31.000000000 +0200 @@ -1,13 +1,12 @@ Metadata-Version: 2.1 Name: txtorcon -Version: 22.0.0 +Version: 23.5.0 Summary: Twisted-based Tor controller client, with state-tracking and configuration abstractions. https://txtorcon.readthedocs.org https://github.com/meejah/txtorcon Home-page: https://github.com/meejah/txtorcon Author: meejah Author-email: mee...@meejah.ca License: MIT Keywords: python,twisted,tor,tor controller -Platform: UNKNOWN Classifier: Framework :: Twisted Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers @@ -16,14 +15,12 @@ Classifier: Operating System :: POSIX :: Linux Classifier: Operating System :: Unix Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Internet :: Proxy Servers Classifier: Topic :: Internet Classifier: Topic :: Security +Requires-Python: >=3.8 Provides-Extra: dev License-File: LICENSE @@ -48,8 +45,8 @@ :target: https://coveralls.io/github/meejah/txtorcon?branch=main :alt: coveralls -.. image:: http://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main - :target: http://codecov.io/github/meejah/txtorcon?branch=main +.. image:: https://codecov.io/github/meejah/txtorcon/coverage.svg?branch=main + :target: https://codecov.io/github/meejah/txtorcon?branch=main :alt: codecov .. image:: https://readthedocs.org/projects/txtorcon/badge/?version=stable @@ -60,10 +57,6 @@ :target: https://txtorcon.readthedocs.io/en/latest :alt: ReadTheDocs -.. image:: https://landscape.io/github/meejah/txtorcon/main/landscape.svg?style=flat - :target: https://landscape.io/github/meejah/txtorcon/main - :alt: Code Health - txtorcon ======== @@ -72,11 +65,10 @@ - **code**: https://github.com/meejah/txtorcon - ``torsocks git clone git://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtorcon.git`` - MIT-licensed; -- Python 2.7, PyPy 5.0.0+, Python 3.5+; +- Python 3.8+, PyPy 7.3.7+; - depends on `Twisted`_, - `Automat <https://github.com/glyph/automat>`_, - (and the `ipaddress <https://pypi.python.org/pypi/ipaddress>`_ backport for non Python 3) + `Automat <https://github.com/glyph/automat>`_ Ten Thousand Feet @@ -100,7 +92,6 @@ --------------------------------------- `download <examples/readme.py>`_ -(also `python2 style <examples/readme2.py>`_) .. code:: python @@ -177,5 +168,3 @@ <https://txtorcon.readthedocs.org/en/latest/introduction.html>`_). .. _Twisted: https://twistedmatrix.com/trac - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/txtorcon-22.0.0/txtorcon.egg-info/requires.txt new/txtorcon-23.5.0/txtorcon.egg-info/requires.txt --- old/txtorcon-22.0.0/txtorcon.egg-info/requires.txt 2022-03-16 22:28:53.000000000 +0100 +++ new/txtorcon-23.5.0/txtorcon.egg-info/requires.txt 2023-05-19 03:21:31.000000000 +0200 @@ -4,9 +4,6 @@ automat cryptography -[:python_version < "3"] -ipaddress>=1.0.16 - [dev] tox coverage<5.0