Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-treq for openSUSE:Factory checked in at 2023-12-17 21:31:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-treq (Old)
and /work/SRC/openSUSE:Factory/.python-treq.new.25432 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-treq"
Sun Dec 17 21:31:44 2023 rev:12 rq:1133550 version:23.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-treq/python-treq.changes 2023-06-19 22:50:40.369600954 +0200
+++ /work/SRC/openSUSE:Factory/.python-treq.new.25432/python-treq.changes 2023-12-17 21:34:16.725843996 +0100
@@ -1,0 +2,23 @@
+Mon Nov 27 18:41:10 UTC 2023 - Dirk Müller
+
+- update to 23.11.0:
+ * When the collector passed to ``treq.collect(response,
+ collector)`` throws an exception, that error will now be
+ returned to the caller of ``collect()`` via the result
+ ``Deferred``, and the underlying HTTP transport will be
+ closed.
+ * Python 3.11 is now supported.
+ * Python 3.12 is now supported.
+ * PyPy 3.9 is now supported.
+ * PyPy 3.10 is now supported.
+ * Deprecations and Removals
+ * The minimum supported Twisted version has increased to
+ 22.10.0. Older versions are no longer tested in CI.
+ * Support for Python 3.6, which has reached end of support, has
+ been dropped.
+ * Support for PyPy 3.7, which has reached end of support, has
+ been removed.
+ * Support for PyPy 3.8, which has reached end of support, is
+ deprecated.
+
+-------------------------------------------------------------------
Old:
----
treq-22.2.0.tar.gz
New:
----
treq-23.11.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-treq.spec ++++++
--- /var/tmp/diff_new_pack.t1VN2Y/_old 2023-12-17 21:34:17.809883384 +0100
+++ /var/tmp/diff_new_pack.t1VN2Y/_new 2023-12-17 21:34:17.809883384 +0100
@@ -18,14 +18,14 @@
%{?sle15_python_module_pythons}
Name: python-treq
-Version: 22.2.0
+Version: 23.11.0
Release: 0
Summary: HTTP library inspired by python-requests
License: MIT
Group: Development/Languages/Python
URL: https://github.com/twisted/treq
Source: https://files.pythonhosted.org/packages/source/t/treq/treq-%{version}.tar.gz
-BuildRequires: %{python_module Twisted-tls >= 18.7.0}
+BuildRequires: %{python_module Twisted-tls >= 22.10.0}
BuildRequires: %{python_module attrs}
BuildRequires: %{python_module httpbin}
BuildRequires: %{python_module hyperlink >= 21.0.0}
@@ -37,7 +37,7 @@
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-Twisted-tls >= 18.7.0
+Requires: python-Twisted-tls >= 22.10.0
Requires: python-attrs
Requires: python-hyperlink >= 21.0.0
Requires: python-incremental
++++++ treq-22.2.0.tar.gz -> treq-23.11.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/CHANGELOG.rst new/treq-23.11.0/CHANGELOG.rst
--- old/treq-22.2.0/CHANGELOG.rst 2022-02-09 08:16:41.000000000 +0100
+++ new/treq-23.11.0/CHANGELOG.rst 2023-11-04 06:18:17.000000000 +0100
@@ -8,6 +8,35 @@
.. towncrier release notes start
+23.11.0 (2023-11-03)
+====================
+
+Features
+--------
+
+- When the collector passed to ``treq.collect(response, collector)`` throws an exception, that error will now be returned to the caller of ``collect()`` via the result ``Deferred``, and the underlying HTTP transport will be closed. (`#347 https://github.com/twisted/treq/issues/347`__)
+- Python 3.11 is now supported. (`#364 https://github.com/twisted/treq/issues/364`__)
+- Python 3.12 is now supported. (`#375 https://github.com/twisted/treq/issues/375`__)
+- PyPy 3.9 is now supported. (`#365 https://github.com/twisted/treq/issues/365`__)
+- PyPy 3.10 is now supported. (`#374 https://github.com/twisted/treq/issues/374`__)
+
+
+Deprecations and Removals
+-------------------------
+
+- The minimum supported Twisted version has increased to 22.10.0. Older versions are no longer tested in CI. (`#374 https://github.com/twisted/treq/issues/374`__)
+- Support for Python 3.6, which has reached end of support, has been dropped. (`#363 https://github.com/twisted/treq/issues/363`__)
+- Support for Python 3.7, which reaches end of support 2023-06-27, is deprecated. This is the last release with support for Python 3.7. (`#361 https://github.com/twisted/treq/issues/361`__)
+- Support for PyPy 3.7, which has reached end of support, has been removed. (`#365 https://github.com/twisted/treq/issues/365`__)
+- Support for PyPy 3.8, which has reached end of support, is deprecated. This is the last release with support for PyPy 3.8. (`#374 https://github.com/twisted/treq/issues/374`__)
+
+
+Misc
+----
+
+- `#349 https://github.com/twisted/treq/issues/349`__, `#350 https://github.com/twisted/treq/issues/350`__, `#352 https://github.com/twisted/treq/issues/352`__
+
+
22.2.0 (2022-02-08)
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/CONTRIBUTING.rst new/treq-23.11.0/CONTRIBUTING.rst
--- old/treq-22.2.0/CONTRIBUTING.rst 2021-01-25 08:28:40.000000000 +0100
+++ new/treq-23.11.0/CONTRIBUTING.rst 2023-05-01 01:39:17.000000000 +0200
@@ -1,7 +1,7 @@
Developing
==========
-This project uses `Tox https://tox.readthedocs.io/en/latest/config.html`_ to manage virtual environments.
+This project uses `Tox 3 https://tox.readthedocs.io/en/latest/config.html`_ to manage virtual environments.
To run the tests::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/PKG-INFO new/treq-23.11.0/PKG-INFO
--- old/treq-22.2.0/PKG-INFO 2022-02-09 08:20:41.575750400 +0100
+++ new/treq-23.11.0/PKG-INFO 2023-11-04 06:20:49.435006000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: treq
-Version: 22.2.0
+Version: 23.11.0
Summary: High-level Twisted HTTP Client API
Home-page: https://github.com/twisted/treq
Author: David Reid
@@ -8,25 +8,34 @@
Maintainer: Tom Most
Maintainer-email: twm@freecog.net
License: MIT/X
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Twisted
Classifier: Programming Language :: Python
-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 :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
+License-File: LICENSE
+Requires-Dist: incremental
+Requires-Dist: requests>=2.1.0
+Requires-Dist: hyperlink>=21.0.0
+Requires-Dist: Twisted[tls]>=22.10.0
+Requires-Dist: attrs
Provides-Extra: dev
+Requires-Dist: pep8; extra == "dev"
+Requires-Dist: pyflakes; extra == "dev"
+Requires-Dist: httpbin==0.7.0; extra == "dev"
+Requires-Dist: werkzeug==2.0.3; extra == "dev"
Provides-Extra: docs
-License-File: LICENSE
+Requires-Dist: sphinx<7.0.0; extra == "docs"
treq: High-level Twisted HTTP Client API
========================================
@@ -95,5 +104,3 @@
.. _documentation: https://treq.readthedocs.org
.. |documentation| image:: https://readthedocs.org/projects/treq/badge/
:alt: Documentation
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/docs/conf.py new/treq-23.11.0/docs/conf.py
--- old/treq-22.2.0/docs/conf.py 2020-07-15 06:05:23.000000000 +0200
+++ new/treq-23.11.0/docs/conf.py 2022-12-21 06:55:48.000000000 +0100
@@ -11,37 +11,38 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import os
+import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-sys.path.insert(0, os.path.abspath('..'))
+sys.path.insert(0, os.path.abspath(".."))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.viewcode', 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
+extensions = ["sphinx.ext.viewcode", "sphinx.ext.autodoc", "sphinx.ext.intersphinx"]
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
+templates_path = ["_templates"]
# The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ".rst"
# The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'
# The master toctree document.
-master_doc = 'index'
+master_doc = "index"
# General information about the project.
-project = u'treq'
-copyright = u'2014–2020 David Reid'
+project = "treq"
+copyright = "2014–2020 David Reid"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@@ -49,175 +50,170 @@
#
# The full version, including alpha/beta/rc tags.
from treq import __version__ as release
-version = '.'.join(release.split('.')[:2])
+
+version = ".".join(release.split(".")[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
-#language = None
+# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
-#today = ''
+# today = ''
# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
+exclude_patterns = ["_build"]
# The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
-#show_authors = False
+# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
+pygments_style = "sphinx"
# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+# modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+html_theme = "default"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-#html_theme_options = {}
+# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
-#html_title = None
+# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
-#html_short_title = None
+# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-#html_logo = None
+# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
-#html_favicon = None
+# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = ["_static"]
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
# If false, no module index is generated.
-#html_domain_indices = True
+# html_domain_indices = True
# If false, no index is generated.
-#html_use_index = True
+# html_use_index = True
# If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
# Output file base name for HTML help builder.
-htmlhelp_basename = 'treqdoc'
+htmlhelp_basename = "treqdoc"
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
-
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+ # The paper size ('letterpaper' or 'a4paper').
+ #'papersize': 'letterpaper',
+ # The font size ('10pt', '11pt' or '12pt').
+ #'pointsize': '10pt',
+ # Additional stuff for the LaTeX preamble.
+ #'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'treq.tex', u'treq Documentation',
- u'David Reid', 'manual'),
+ ("index", "treq.tex", "treq Documentation", "David Reid", "manual"),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
-#latex_logo = None
+# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
-#latex_use_parts = False
+# latex_use_parts = False
# If true, show page references after internal links.
-#latex_show_pagerefs = False
+# latex_show_pagerefs = False
# If true, show URL addresses after external links.
-#latex_show_urls = False
+# latex_show_urls = False
# Documents to append as an appendix to all manuals.
-#latex_appendices = []
+# latex_appendices = []
# If false, no module index is generated.
-#latex_domain_indices = True
+# latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'treq', u'treq Documentation',
- [u'David Reid'], 1)
-]
+man_pages = [("index", "treq", "treq Documentation", ["David Reid"], 1)]
# If true, show URL addresses after external links.
-#man_show_urls = False
+# man_show_urls = False
# -- Options for Texinfo output ------------------------------------------------
@@ -226,24 +222,30 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
- ('index', 'treq', u'treq Documentation',
- u'David Reid', 'treq', 'One line description of project.',
- 'Miscellaneous'),
+ (
+ "index",
+ "treq",
+ "treq Documentation",
+ "David Reid",
+ "treq",
+ "One line description of project.",
+ "Miscellaneous",
+ ),
]
# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
+# texinfo_appendices = []
# If false, no module index is generated.
-#texinfo_domain_indices = True
+# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+# texinfo_show_urls = 'footnote'
RTD_NEW_THEME = True
intersphinx_mapping = {
- 'python': ('https://docs.python.org/3/', None),
- 'twisted': ('https://twistedmatrix.com/documents/current/api/', None),
- 'hyperlink': ('https://hyperlink.readthedocs.io/en/latest/', None),
+ "python": ("https://docs.python.org/3/", None),
+ "twisted": ("https://docs.twisted.org/en/stable/api/", None),
+ "hyperlink": ("https://hyperlink.readthedocs.io/en/latest/", None),
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/setup.py new/treq-23.11.0/setup.py
--- old/treq-22.2.0/setup.py 2022-02-09 07:55:36.000000000 +0100
+++ new/treq-23.11.0/setup.py 2023-11-04 06:03:00.000000000 +0100
@@ -7,42 +7,43 @@
"Operating System :: OS Independent",
"Framework :: Twisted",
"Programming Language :: Python",
- "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 :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
if __name__ == "__main__":
- with open('README.rst') as f:
+ with open("README.rst") as f:
readme = f.read()
setup(
name="treq",
- packages=find_packages('src'),
+ packages=find_packages("src"),
package_dir={"": "src"},
setup_requires=["incremental"],
use_incremental=True,
- python_requires='>=3.6',
+ python_requires=">=3.6",
install_requires=[
"incremental",
"requests >= 2.1.0",
"hyperlink >= 21.0.0",
- "Twisted[tls] >= 18.7.0",
+ "Twisted[tls] >= 22.10.0",
"attrs",
],
extras_require={
"dev": [
"pep8",
"pyflakes",
- "httpbin==0.5.0",
+ "httpbin==0.7.0",
+ "werkzeug==2.0.3",
],
"docs": [
- "sphinx>=1.4.8",
+ "sphinx<7.0.0", # Removal of 'style' key breaks RTD.
],
},
package_data={"treq": ["_version"]},
@@ -55,5 +56,5 @@
license="MIT/X",
url="https://github.com/twisted/treq",
long_description=readme,
- long_description_content_type='text/x-rst',
+ long_description_content_type="text/x-rst",
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/_agentspy.py new/treq-23.11.0/src/treq/_agentspy.py
--- old/treq-22.2.0/src/treq/_agentspy.py 2021-01-24 23:59:32.000000000 +0100
+++ new/treq-23.11.0/src/treq/_agentspy.py 2023-11-03 05:33:42.000000000 +0100
@@ -1,11 +1,11 @@
# Copyright (c) The treq Authors.
# See LICENSE for details.
-from typing import Callable, List, Optional, Tuple
+from typing import Callable, List, Optional, Tuple # noqa
import attr
from twisted.internet.defer import Deferred
from twisted.web.http_headers import Headers
-from twisted.web.iweb import IAgent, IBodyProducer, IResponse
+from twisted.web.iweb import IAgent, IBodyProducer, IResponse # noqa
from zope.interface import implementer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/_version.py new/treq-23.11.0/src/treq/_version.py
--- old/treq-22.2.0/src/treq/_version.py 2022-02-09 08:15:32.000000000 +0100
+++ new/treq-23.11.0/src/treq/_version.py 2023-11-04 06:15:43.000000000 +0100
@@ -7,5 +7,5 @@
from incremental import Version
-__version__ = Version("treq", 22, 2, 0)
+__version__ = Version("treq", 23, 11, 0)
__all__ = ["__version__"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/auth.py new/treq-23.11.0/src/treq/auth.py
--- old/treq-22.2.0/src/treq/auth.py 2022-02-05 07:04:36.000000000 +0100
+++ new/treq-23.11.0/src/treq/auth.py 2023-11-03 05:33:42.000000000 +0100
@@ -3,7 +3,7 @@
from __future__ import absolute_import, division, print_function
import binascii
-from typing import Union
+from typing import Union # noqa
from twisted.web.http_headers import Headers
from twisted.web.iweb import IAgent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/content.py new/treq-23.11.0/src/treq/content.py
--- old/treq-22.2.0/src/treq/content.py 2021-01-24 23:59:32.000000000 +0100
+++ new/treq-23.11.0/src/treq/content.py 2023-11-03 05:33:42.000000000 +0100
@@ -2,7 +2,7 @@
import json
from twisted.internet.defer import Deferred, succeed
-
+from twisted.python.failure import Failure
from twisted.internet.protocol import Protocol
from twisted.web.client import ResponseDone
from twisted.web.http import PotentialDataLoss
@@ -30,9 +30,16 @@
self.collector = collector
def dataReceived(self, data):
- self.collector(data)
+ try:
+ self.collector(data)
+ except BaseException:
+ self.transport.loseConnection()
+ self.finished.errback(Failure())
+ self.finished = None
def connectionLost(self, reason):
+ if self.finished is None:
+ return
if reason.check(ResponseDone):
self.finished.callback(None)
elif reason.check(PotentialDataLoss):
@@ -48,9 +55,13 @@
This function may only be called **once** for a given response.
+ If the ``collector`` raises an exception, it will be set as the error value
+ on response ``Deferred`` returned from this function, and the underlying
+ HTTP transport will be closed.
+
:param IResponse response: The HTTP response to collect the body from.
- :param collector: A callable to be called each time data is available
- from the response body.
+ :param collector: A callable to be called each time data is available from
+ the response body.
:type collector: single argument callable
:rtype: Deferred that fires with None when the entire body has been read.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/test/test_content.py new/treq-23.11.0/src/treq/test/test_content.py
--- old/treq-22.2.0/src/treq/test/test_content.py 2021-01-24 23:59:32.000000000 +0100
+++ new/treq-23.11.0/src/treq/test/test_content.py 2022-12-21 06:55:48.000000000 +0100
@@ -2,13 +2,17 @@
from twisted.python.failure import Failure
+from twisted.internet.error import ConnectionDone
from twisted.trial.unittest import TestCase
from twisted.web.http_headers import Headers
from twisted.web.client import ResponseDone, ResponseFailed
from twisted.web.http import PotentialDataLoss
+from twisted.web.resource import Resource
+from twisted.web.server import NOT_DONE_YET
from treq import collect, content, json_content, text_content
from treq.client import _BufferedResponse
+from treq.testing import StubTreq
class ContentTests(TestCase):
@@ -215,3 +219,54 @@
self.protocol.connectionLost(Failure(ResponseDone()))
self.assertEqual(self.successResultOf(d), u'ᚠᚡ')
+
+
+class UnfinishedResponse(Resource):
+ """Write some data, but never finish."""
+
+ isLeaf = True
+
+ def __init__(self):
+ Resource.__init__(self)
+ # Track how requests finished.
+ self.request_finishes = []
+
+ def render(self, request):
+ request.write(b"HELLO")
+ request.notifyFinish().addBoth(self.request_finishes.append)
+ return NOT_DONE_YET
+
+
+class MoreRealisticContentTests(TestCase):
+ """Tests involving less mocking."""
+
+ def test_exception_handling(self):
+ """
+ An exception in the collector function:
+
+ 1. Always gets returned in the result ``Deferred`` from
+ ``treq.collect()``.
+
+ 2. Closes the transport.
+ """
+ resource = UnfinishedResponse()
+ stub = StubTreq(resource)
+ response = self.successResultOf(stub.request("GET", "http://127.0.0.1/"))
+ self.assertEqual(response.code, 200)
+
+ def error(data):
+ 1 / 0
+
+ d = collect(response, error)
+
+ # Exceptions in the collector are passed on to the caller via the
+ # response Deferred:
+ self.failureResultOf(d, ZeroDivisionError)
+
+ # An exception in the protocol results in the transport for the request
+ # being closed.
+ stub.flush()
+ self.assertEqual(len(resource.request_finishes), 1)
+ self.assertIsInstance(
+ resource.request_finishes[0].value, ConnectionDone
+ )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq/test/test_multipart.py new/treq-23.11.0/src/treq/test/test_multipart.py
--- old/treq-22.2.0/src/treq/test/test_multipart.py 2021-02-14 06:14:49.000000000 +0100
+++ new/treq-23.11.0/src/treq/test/test_multipart.py 2023-11-03 05:33:42.000000000 +0100
@@ -19,7 +19,7 @@
class MultiPartProducerTestCase(unittest.TestCase):
"""
Tests for the L{MultiPartProducer} which gets dictionary like object
- with post parameters, converts them to mutltipart/form-data format
+ with post parameters, converts them to multipart/form-data format
and feeds them to an L{IConsumer}.
"""
def _termination(self):
@@ -43,7 +43,7 @@
def getOutput(self, producer, with_producer=False):
"""
- A convenience function to consume and return outpute.
+ A convenience function to consume and return output.
"""
consumer = output = BytesIO()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq.egg-info/PKG-INFO new/treq-23.11.0/src/treq.egg-info/PKG-INFO
--- old/treq-22.2.0/src/treq.egg-info/PKG-INFO 2022-02-09 08:20:41.000000000 +0100
+++ new/treq-23.11.0/src/treq.egg-info/PKG-INFO 2023-11-04 06:20:49.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: treq
-Version: 22.2.0
+Version: 23.11.0
Summary: High-level Twisted HTTP Client API
Home-page: https://github.com/twisted/treq
Author: David Reid
@@ -8,25 +8,34 @@
Maintainer: Tom Most
Maintainer-email: twm@freecog.net
License: MIT/X
-Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Twisted
Classifier: Programming Language :: Python
-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 :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.6
Description-Content-Type: text/x-rst
+License-File: LICENSE
+Requires-Dist: incremental
+Requires-Dist: requests>=2.1.0
+Requires-Dist: hyperlink>=21.0.0
+Requires-Dist: Twisted[tls]>=22.10.0
+Requires-Dist: attrs
Provides-Extra: dev
+Requires-Dist: pep8; extra == "dev"
+Requires-Dist: pyflakes; extra == "dev"
+Requires-Dist: httpbin==0.7.0; extra == "dev"
+Requires-Dist: werkzeug==2.0.3; extra == "dev"
Provides-Extra: docs
-License-File: LICENSE
+Requires-Dist: sphinx<7.0.0; extra == "docs"
treq: High-level Twisted HTTP Client API
========================================
@@ -95,5 +104,3 @@
.. _documentation: https://treq.readthedocs.org
.. |documentation| image:: https://readthedocs.org/projects/treq/badge/
:alt: Documentation
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/treq-22.2.0/src/treq.egg-info/requires.txt new/treq-23.11.0/src/treq.egg-info/requires.txt
--- old/treq-22.2.0/src/treq.egg-info/requires.txt 2022-02-09 08:20:41.000000000 +0100
+++ new/treq-23.11.0/src/treq.egg-info/requires.txt 2023-11-04 06:20:49.000000000 +0100
@@ -1,13 +1,14 @@
incremental
requests>=2.1.0
hyperlink>=21.0.0
-Twisted[tls]>=18.7.0
+Twisted[tls]>=22.10.0
attrs
[dev]
pep8
pyflakes
-httpbin==0.5.0
+httpbin==0.7.0
+werkzeug==2.0.3
[docs]
-sphinx>=1.4.8
+sphinx<7.0.0