Hello community,
here is the log from the commit of package python-CherryPy for openSUSE:Factory
checked in at 2020-01-16 18:14:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-CherryPy (Old)
and /work/SRC/openSUSE:Factory/.python-CherryPy.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-CherryPy"
Thu Jan 16 18:14:51 2020 rev:24 rq:764061 version:18.5.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-CherryPy/python-CherryPy.changes
2019-11-04 17:12:45.712668512 +0100
+++
/work/SRC/openSUSE:Factory/.python-CherryPy.new.26092/python-CherryPy.changes
2020-01-16 18:14:58.812762329 +0100
@@ -1,0 +2,10 @@
+Mon Jan 13 15:00:55 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to 18.5.0
+ * Fixed issue where bytes values in a HeaderMap would be converted to
strings.
+ * Rely on jaraco.collections for its case-insensitive dictionary support.
+ * Fixed issue in cpstats where the data/ endpoint would fail with encoding
errors on Python 3.
+ * Simplify the passthrough of parameters to CPWebCase.getPage to cheroot.
+ CherryPy now requires cheroot 8.2.1 or later.
+
+-------------------------------------------------------------------
Old:
----
CherryPy-18.3.0.tar.gz
New:
----
CherryPy-18.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-CherryPy.spec ++++++
--- /var/tmp/diff_new_pack.0sveGt/_old 2020-01-16 18:15:00.880763499 +0100
+++ /var/tmp/diff_new_pack.0sveGt/_new 2020-01-16 18:15:00.884763502 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-CherryPy
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-CherryPy
-Version: 18.3.0
+Version: 18.5.0
Release: 0
Summary: Object-Oriented HTTP framework
License: BSD-3-Clause
@@ -29,7 +29,8 @@
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
-Requires: python-cheroot >= 6.2.4
+Requires: python-cheroot >= 8.2.1
+Requires: python-jaraco.collections
Requires: python-more-itertools
Requires: python-portend >= 2.1.1
Requires: python-zc.lockfile
@@ -42,7 +43,8 @@
Recommends: python-simplejson
BuildArch: noarch
# SECTION test requirements
-BuildRequires: %{python_module cheroot >= 6.2.4}
+BuildRequires: %{python_module cheroot >= 8.2.1}
+BuildRequires: %{python_module jaraco.collections}
BuildRequires: %{python_module more-itertools}
BuildRequires: %{python_module path.py}
BuildRequires: %{python_module portend >= 2.1.1}
@@ -76,14 +78,11 @@
%install
%python_install
-# Do not remove the tests as other project use them for self validation
-#%%python_expand rm -r %{buildroot}%{$python_sitelib}/cherrypy/test
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/cherryd
%check
-# test_HTTP11_Timeout_after_request
https://github.com/cherrypy/cherrypy/issues/1817
-%pytest -k 'not test_null_bytes and not test_HTTP11_Timeout_after_request'
+%pytest
%post
%python_install_alternative cherryd
++++++ CherryPy-18.3.0.tar.gz -> CherryPy-18.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/.github/FUNDING.yml
new/CherryPy-18.5.0/.github/FUNDING.yml
--- old/CherryPy-18.3.0/.github/FUNDING.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/CherryPy-18.5.0/.github/FUNDING.yml 2019-11-27 17:12:08.000000000
+0100
@@ -0,0 +1,14 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1,
user2]
+- jaraco
+- webknjaz
+# patreon: # Replace with a single Patreon username
+# open_collective: # Replace with a single Open Collective username
+# ko_fi: # Replace with a single Ko-fi username
+tidelift: pypi/CherryPy # A single Tidelift platform-name/package-name e.g.,
npm/babel
+# community_bridge: # Replace with a single Community Bridge project-name
e.g., cloud-foundry
+# liberapay: # Replace with a single Liberapay username
+# issuehunt: # Replace with a single IssueHunt username
+# otechie: # Replace with a single Otechie username
+# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1',
'link2']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/.travis.yml
new/CherryPy-18.5.0/.travis.yml
--- old/CherryPy-18.3.0/.travis.yml 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/.travis.yml 2019-11-27 17:12:08.000000000 +0100
@@ -94,6 +94,11 @@
env: TOXENV=dist-check
- <<: *lint_python_base
env: TOXENV=setup-check
+ - <<: *lint_python_base
+ name: >-
+ Ensure that docs get built
+ (non-strict until \#1797 get fixed)
+ env: TOXENV=build-docs
- <<: *pure_python_base_priority
# mainstream here (3.7)
- <<: *pure_python_base_priority
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/CHANGES.rst
new/CherryPy-18.5.0/CHANGES.rst
--- old/CherryPy-18.3.0/CHANGES.rst 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/CHANGES.rst 2019-11-27 17:12:08.000000000 +0100
@@ -1,3 +1,23 @@
+v18.5.0
+-------
+
+* :issue:`1827`: Fixed issue where bytes values in a ``HeaderMap``
+ would be converted to strings.
+
+* :pr:`1826`: Rely on
+ `jaraco.collections <https://pypi.org/project/jaraco.collections>`_
+ for its case-insensitive dictionary support.
+
+v18.4.0
+-------
+
+* :pr:`1715`: Fixed issue in cpstats where the ``data/`` endpoint
+ would fail with encoding errors on Python 3.
+
+* :pr:`1821`: Simplify the passthrough of parameters to
+ ``CPWebCase.getPage`` to cheroot. CherryPy now requires
+ cheroot 8.2.1 or later.
+
v18.3.0
-------
@@ -118,13 +138,13 @@
``digest_auth`` tools and the ``httpauth`` module, which have been
officially deprecated earlier in v14.0.0.
-* Removed deprecated properties::
+* Removed deprecated properties:
- ``cherrypy._cpreqbody.Entity.type`` deprecated in favor of
:py:attr:`cherrypy._cpreqbody.Entity.content_type`
- ``cherrypy._cprequest.Request.body_params`` deprecated in favor of
- py:attr:`cherrypy._cprequest.RequestBody.params`
+ :py:attr:`cherrypy._cprequest.RequestBody.params`
* :issue:`1377`: In _cp_native server, set ``req.status`` using bytes
(fixed in :pr:`1712`).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/CherryPy.egg-info/PKG-INFO
new/CherryPy-18.5.0/CherryPy.egg-info/PKG-INFO
--- old/CherryPy-18.3.0/CherryPy.egg-info/PKG-INFO 2019-10-03
02:02:23.000000000 +0200
+++ new/CherryPy-18.5.0/CherryPy.egg-info/PKG-INFO 2019-11-27
17:12:34.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CherryPy
-Version: 18.3.0
+Version: 18.5.0
Summary: Object-Oriented HTTP framework
Home-page: https://www.cherrypy.org
Author: CherryPy Team
@@ -15,6 +15,10 @@
Description: .. image:: https://img.shields.io/pypi/v/cherrypy.svg
:target: https://pypi.org/project/cherrypy
+ .. image:: https://tidelift.com/badges/package/pypi/CherryPy
+ :target:
https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=readme
+ :alt: CherryPy is available as part of the Tidelift Subscription
+
.. image::
https://img.shields.io/badge/Python%203%20only-pip%20install%20%22%3E%3D18.0.0%22-%234da45e.svg
:target: https://python3statement.org/
@@ -107,6 +111,17 @@
community has several `avenues for support
<https://docs.cherrypy.org/en/latest/support.html>`_.
+ For Enterprise
+ --------------
+
+ CherryPy is available as part of the Tidelift Subscription.
+
+ The CherryPy maintainers and the maintainers of thousands of other
packages
+ are working with Tidelift to deliver one enterprise subscription that
covers
+ all of the open source you use.
+
+ `Learn more
<https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=referral&utm_campaign=github>`_.
+
Contributing
------------
@@ -128,6 +143,7 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: Jython
@@ -140,10 +156,10 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Topic :: Software Development :: Libraries :: Application
Frameworks
Requires-Python: >=3.5
-Provides-Extra: ssl
+Provides-Extra: docs
+Provides-Extra: json
Provides-Extra: routes_dispatcher
+Provides-Extra: ssl
Provides-Extra: testing
-Provides-Extra: json
Provides-Extra: memcached_session
Provides-Extra: xcgi
-Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/CherryPy.egg-info/SOURCES.txt
new/CherryPy-18.5.0/CherryPy.egg-info/SOURCES.txt
--- old/CherryPy-18.3.0/CherryPy.egg-info/SOURCES.txt 2019-10-03
02:02:24.000000000 +0200
+++ new/CherryPy-18.5.0/CherryPy.egg-info/SOURCES.txt 2019-11-27
17:12:34.000000000 +0100
@@ -18,6 +18,7 @@
tox.ini
.circleci/config.yml
.github/CONTRIBUTING.rst
+.github/FUNDING.yml
.github/ISSUE_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
.github/SUPPORT.rst
@@ -158,6 +159,7 @@
docs/contribute.rst
docs/deploy.rst
docs/development.rst
+docs/enterprise.rst
docs/extend.rst
docs/glossary.rst
docs/history.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/CherryPy.egg-info/requires.txt
new/CherryPy-18.5.0/CherryPy.egg-info/requires.txt
--- old/CherryPy-18.3.0/CherryPy.egg-info/requires.txt 2019-10-03
02:02:23.000000000 +0200
+++ new/CherryPy-18.5.0/CherryPy.egg-info/requires.txt 2019-11-27
17:12:34.000000000 +0100
@@ -1,7 +1,8 @@
-cheroot>=6.2.4
+cheroot>=8.2.1
portend>=2.1.1
more_itertools
zc.lockfile
+jaraco.collections
[:sys_platform == "win32"]
pywin32
@@ -35,9 +36,7 @@
backports.unittest_mock
path.py
requests_toolbelt
-
-[testing:sys_platform != "win32"]
-pytest-services
+pytest-services>=2
[xcgi]
flup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/PKG-INFO new/CherryPy-18.5.0/PKG-INFO
--- old/CherryPy-18.3.0/PKG-INFO 2019-10-03 02:02:24.000000000 +0200
+++ new/CherryPy-18.5.0/PKG-INFO 2019-11-27 17:12:34.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CherryPy
-Version: 18.3.0
+Version: 18.5.0
Summary: Object-Oriented HTTP framework
Home-page: https://www.cherrypy.org
Author: CherryPy Team
@@ -15,6 +15,10 @@
Description: .. image:: https://img.shields.io/pypi/v/cherrypy.svg
:target: https://pypi.org/project/cherrypy
+ .. image:: https://tidelift.com/badges/package/pypi/CherryPy
+ :target:
https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=readme
+ :alt: CherryPy is available as part of the Tidelift Subscription
+
.. image::
https://img.shields.io/badge/Python%203%20only-pip%20install%20%22%3E%3D18.0.0%22-%234da45e.svg
:target: https://python3statement.org/
@@ -107,6 +111,17 @@
community has several `avenues for support
<https://docs.cherrypy.org/en/latest/support.html>`_.
+ For Enterprise
+ --------------
+
+ CherryPy is available as part of the Tidelift Subscription.
+
+ The CherryPy maintainers and the maintainers of thousands of other
packages
+ are working with Tidelift to deliver one enterprise subscription that
covers
+ all of the open source you use.
+
+ `Learn more
<https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=referral&utm_campaign=github>`_.
+
Contributing
------------
@@ -128,6 +143,7 @@
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: Jython
@@ -140,10 +156,10 @@
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Topic :: Software Development :: Libraries :: Application
Frameworks
Requires-Python: >=3.5
-Provides-Extra: ssl
+Provides-Extra: docs
+Provides-Extra: json
Provides-Extra: routes_dispatcher
+Provides-Extra: ssl
Provides-Extra: testing
-Provides-Extra: json
Provides-Extra: memcached_session
Provides-Extra: xcgi
-Provides-Extra: docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/README.rst
new/CherryPy-18.5.0/README.rst
--- old/CherryPy-18.3.0/README.rst 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/README.rst 2019-11-27 17:12:08.000000000 +0100
@@ -1,6 +1,10 @@
.. image:: https://img.shields.io/pypi/v/cherrypy.svg
:target: https://pypi.org/project/cherrypy
+.. image:: https://tidelift.com/badges/package/pypi/CherryPy
+ :target:
https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=readme
+ :alt: CherryPy is available as part of the Tidelift Subscription
+
.. image::
https://img.shields.io/badge/Python%203%20only-pip%20install%20%22%3E%3D18.0.0%22-%234da45e.svg
:target: https://python3statement.org/
@@ -93,6 +97,17 @@
community has several `avenues for support
<https://docs.cherrypy.org/en/latest/support.html>`_.
+For Enterprise
+--------------
+
+CherryPy is available as part of the Tidelift Subscription.
+
+The CherryPy maintainers and the maintainers of thousands of other packages
+are working with Tidelift to deliver one enterprise subscription that covers
+all of the open source you use.
+
+`Learn more
<https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=referral&utm_campaign=github>`_.
+
Contributing
------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/_helper.py
new/CherryPy-18.5.0/cherrypy/_helper.py
--- old/CherryPy-18.3.0/cherrypy/_helper.py 2019-10-03 02:02:02.000000000
+0200
+++ new/CherryPy-18.5.0/cherrypy/_helper.py 2019-11-27 17:12:08.000000000
+0100
@@ -83,53 +83,61 @@
This decorator may be used in one of two ways:
As a class decorator:
- @cherrypy.popargs('year', 'month', 'day')
- class Blog:
- def index(self, year=None, month=None, day=None):
- #Process the parameters here; any url like
- #/, /2009, /2009/12, or /2009/12/31
- #will fill in the appropriate parameters.
-
- def create(self):
- #This link will still be available at /create. Defined functions
- #take precedence over arguments.
+
+ .. code-block:: python
+
+ @cherrypy.popargs('year', 'month', 'day')
+ class Blog:
+ def index(self, year=None, month=None, day=None):
+ #Process the parameters here; any url like
+ #/, /2009, /2009/12, or /2009/12/31
+ #will fill in the appropriate parameters.
+
+ def create(self):
+ #This link will still be available at /create.
+ #Defined functions take precedence over arguments.
Or as a member of a class:
- class Blog:
- _cp_dispatch = cherrypy.popargs('year', 'month', 'day')
- #...
+
+ .. code-block:: python
+
+ class Blog:
+ _cp_dispatch = cherrypy.popargs('year', 'month', 'day')
+ #...
The handler argument may be used to mix arguments with built in functions.
For instance, the following setup allows different activities at the
day, month, and year level:
- class DayHandler:
- def index(self, year, month, day):
- #Do something with this day; probably list entries
-
- def delete(self, year, month, day):
- #Delete all entries for this day
-
- @cherrypy.popargs('day', handler=DayHandler())
- class MonthHandler:
- def index(self, year, month):
- #Do something with this month; probably list entries
-
- def delete(self, year, month):
- #Delete all entries for this month
-
- @cherrypy.popargs('month', handler=MonthHandler())
- class YearHandler:
- def index(self, year):
- #Do something with this year
-
- #...
-
- @cherrypy.popargs('year', handler=YearHandler())
- class Root:
- def index(self):
+ .. code-block:: python
+
+ class DayHandler:
+ def index(self, year, month, day):
+ #Do something with this day; probably list entries
+
+ def delete(self, year, month, day):
+ #Delete all entries for this day
+
+ @cherrypy.popargs('day', handler=DayHandler())
+ class MonthHandler:
+ def index(self, year, month):
+ #Do something with this month; probably list entries
+
+ def delete(self, year, month):
+ #Delete all entries for this month
+
+ @cherrypy.popargs('month', handler=MonthHandler())
+ class YearHandler:
+ def index(self, year):
+ #Do something with this year
+
#...
+ @cherrypy.popargs('year', handler=YearHandler())
+ class Root:
+ def index(self):
+ #...
+
"""
# Since keyword arg comes after *args, we have to process it ourselves
# for lower versions of python.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/lib/cpstats.py
new/CherryPy-18.5.0/cherrypy/lib/cpstats.py
--- old/CherryPy-18.3.0/cherrypy/lib/cpstats.py 2019-10-03 02:02:02.000000000
+0200
+++ new/CherryPy-18.5.0/cherrypy/lib/cpstats.py 2019-11-27 17:12:08.000000000
+0100
@@ -364,8 +364,8 @@
w['Bytes Written'] = cl
appstats['Total Bytes Written'] += cl
- w['Response Status'] = getattr(
- resp, 'output_status', None) or resp.status
+ w['Response Status'] = \
+ getattr(resp, 'output_status', resp.status).decode()
w['End Time'] = time.time()
p = w['End Time'] - w['Start Time']
@@ -677,7 +677,7 @@
def data(self):
s = extrapolate_statistics(logging.statistics)
cherrypy.response.headers['Content-Type'] = 'application/json'
- return json.dumps(s, sort_keys=True, indent=4)
+ return json.dumps(s, sort_keys=True, indent=4).encode('utf-8')
@cherrypy.expose
def pause(self, namespace):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/lib/cptools.py
new/CherryPy-18.5.0/cherrypy/lib/cptools.py
--- old/CherryPy-18.3.0/cherrypy/lib/cptools.py 2019-10-03 02:02:02.000000000
+0200
+++ new/CherryPy-18.5.0/cherrypy/lib/cptools.py 2019-11-27 17:12:08.000000000
+0100
@@ -404,23 +404,22 @@
def session_auth(**kwargs):
+ """Session authentication hook.
+
+ Any attribute of the SessionAuth class may be overridden
+ via a keyword arg to this function:
+
+ """ + '\n '.join(
+ '{!s}: {!s}'.format(k, type(getattr(SessionAuth, k)).__name__)
+ for k in dir(SessionAuth)
+ if not k.startswith('__')
+ )
sa = SessionAuth()
for k, v in kwargs.items():
setattr(sa, k, v)
return sa.run()
-session_auth.__doc__ = (
- """Session authentication hook.
-
- Any attribute of the SessionAuth class may be overridden via a keyword arg
- to this function:
-
- """ + '\n'.join(['%s: %s' % (k, type(getattr(SessionAuth, k)).__name__)
- for k in dir(SessionAuth) if not k.startswith('__')])
-)
-
-
def log_traceback(severity=logging.ERROR, debug=False):
"""Write the last error's traceback to the cherrypy error log."""
cherrypy.log('', 'HTTP', severity=severity, traceback=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/lib/httputil.py
new/CherryPy-18.5.0/cherrypy/lib/httputil.py
--- old/CherryPy-18.3.0/cherrypy/lib/httputil.py 2019-10-03
02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/cherrypy/lib/httputil.py 2019-11-27
17:12:08.000000000 +0100
@@ -17,6 +17,8 @@
from http.server import BaseHTTPRequestHandler
from urllib.parse import unquote_plus
+import jaraco.collections
+
import cherrypy
from cherrypy._cpcompat import ntob, ntou
@@ -385,77 +387,19 @@
return pm
-####
-# Inlined from jaraco.collections 1.5.2
-# Ref #1673
-class KeyTransformingDict(dict):
- """
- A dict subclass that transforms the keys before they're used.
- Subclasses may override the default transform_key to customize behavior.
- """
- @staticmethod
- def transform_key(key):
- return key
-
- def __init__(self, *args, **kargs):
- super(KeyTransformingDict, self).__init__()
- # build a dictionary using the default constructs
- d = dict(*args, **kargs)
- # build this dictionary using transformed keys.
- for item in d.items():
- self.__setitem__(*item)
-
- def __setitem__(self, key, val):
- key = self.transform_key(key)
- super(KeyTransformingDict, self).__setitem__(key, val)
-
- def __getitem__(self, key):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).__getitem__(key)
-
- def __contains__(self, key):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).__contains__(key)
-
- def __delitem__(self, key):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).__delitem__(key)
-
- def get(self, key, *args, **kwargs):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).get(key, *args, **kwargs)
-
- def setdefault(self, key, *args, **kwargs):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).setdefault(
- key, *args, **kwargs)
-
- def pop(self, key, *args, **kwargs):
- key = self.transform_key(key)
- return super(KeyTransformingDict, self).pop(key, *args, **kwargs)
-
- def matching_key_for(self, key):
- """
- Given a key, return the actual key stored in self that matches.
- Raise KeyError if the key isn't found.
- """
- try:
- return next(e_key for e_key in self.keys() if e_key == key)
- except StopIteration:
- raise KeyError(key)
-####
-
-
-class CaseInsensitiveDict(KeyTransformingDict):
+class CaseInsensitiveDict(jaraco.collections.KeyTransformingDict):
"""A case-insensitive dict subclass.
- Each key is changed on entry to str(key).title().
+ Each key is changed on entry to title case.
"""
@staticmethod
def transform_key(key):
- return str(key).title()
+ if key is None:
+ # TODO(#1830): why?
+ return 'None'
+ return key.title()
# TEXT = <any OCTET except CTLs, but including LWS>
@@ -494,9 +438,7 @@
def elements(self, key):
"""Return a sorted list of HeaderElements for the given header."""
- key = str(key).title()
- value = self.get(key)
- return header_elements(key, value)
+ return header_elements(self.transform_key(key), self.get(key))
def values(self, key):
"""Return a sorted list of HeaderElement.value for the given header."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/test/helper.py
new/CherryPy-18.5.0/cherrypy/test/helper.py
--- old/CherryPy-18.3.0/cherrypy/test/helper.py 2019-10-03 02:02:02.000000000
+0200
+++ new/CherryPy-18.5.0/cherrypy/test/helper.py 2019-11-27 17:12:08.000000000
+0100
@@ -310,19 +310,12 @@
def exit(self):
sys.exit()
- def getPage(self, url, headers=None, method='GET', body=None,
- protocol=None, raise_subcls=None):
- """Open the url. Return status, headers, body.
-
- `raise_subcls` must be a tuple with the exceptions classes
- or a single exception class that are not going to be considered
- a socket.error regardless that they were are subclass of a
- socket.error and therefore not considered for a connection retry.
+ def getPage(self, url, *args, **kwargs):
+ """Open the url.
"""
if self.script_name:
url = httputil.urljoin(self.script_name, url)
- return webtest.WebCase.getPage(self, url, headers, method, body,
- protocol, raise_subcls)
+ return webtest.WebCase.getPage(self, url, *args, **kwargs)
def skip(self, msg='skipped '):
pytest.skip(msg)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/test/modwsgi.py
new/CherryPy-18.5.0/cherrypy/test/modwsgi.py
--- old/CherryPy-18.3.0/cherrypy/test/modwsgi.py 2019-10-03
02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/cherrypy/test/modwsgi.py 2019-11-27
17:12:08.000000000 +0100
@@ -9,18 +9,18 @@
KNOWN BUGS
==========
-##1. Apache processes Range headers automatically; CherryPy's truncated
-## output is then truncated again by Apache. See test_core.testRanges.
-## This was worked around in http://www.cherrypy.org/changeset/1319.
+1. Apache processes Range headers automatically; CherryPy's truncated
+ output is then truncated again by Apache. See test_core.testRanges.
+ This was worked around in http://www.cherrypy.org/changeset/1319.
2. Apache does not allow custom HTTP methods like CONNECT as per the spec.
See test_core.testHTTPMethods.
3. Max request header and body settings do not work with Apache.
-##4. Apache replaces status "reason phrases" automatically. For example,
-## CherryPy may set "304 Not modified" but Apache will write out
-## "304 Not Modified" (capital "M").
-##5. Apache does not allow custom error codes as per the spec.
-##6. Apache (or perhaps modpython, or modpython_gateway) unquotes %xx in the
-## Request-URI too early.
+4. Apache replaces status "reason phrases" automatically. For example,
+ CherryPy may set "304 Not modified" but Apache will write out
+ "304 Not Modified" (capital "M").
+5. Apache does not allow custom error codes as per the spec.
+6. Apache (or perhaps modpython, or modpython_gateway) unquotes %xx in the
+ Request-URI too early.
7. mod_wsgi will not read request bodies which use the "chunked"
transfer-coding (it passes REQUEST_CHUNKED_ERROR to ap_setup_client_block
instead of REQUEST_CHUNKED_DECHUNK, see Apache2's http_protocol.c and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/test/test_conn.py
new/CherryPy-18.5.0/cherrypy/test/test_conn.py
--- old/CherryPy-18.3.0/cherrypy/test/test_conn.py 2019-10-03
02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/cherrypy/test/test_conn.py 2019-11-27
17:12:08.000000000 +0100
@@ -352,18 +352,17 @@
conn._output(ntob('Host: %s' % self.HOST, 'ascii'))
conn._send_output()
response = conn.response_class(conn.sock, method='GET')
+ msg = (
+ "Writing to timed out socket didn't fail as it should have: %s")
try:
response.begin()
except Exception:
if not isinstance(sys.exc_info()[1],
(socket.error, BadStatusLine)):
- self.fail("Writing to timed out socket didn't fail"
- ' as it should have: %s' % sys.exc_info()[1])
+ self.fail(msg % sys.exc_info()[1])
else:
if response.status != 408:
- self.fail("Writing to timed out socket didn't fail"
- ' as it should have: %s' %
- response.read())
+ self.fail(msg % response.read())
conn.close()
@@ -390,12 +389,10 @@
except Exception:
if not isinstance(sys.exc_info()[1],
(socket.error, BadStatusLine)):
- self.fail("Writing to timed out socket didn't fail"
- ' as it should have: %s' % sys.exc_info()[1])
+ self.fail(msg % sys.exc_info()[1])
else:
- self.fail("Writing to timed out socket didn't fail"
- ' as it should have: %s' %
- response.read())
+ if response.status != 408:
+ self.fail(msg % response.read())
conn.close()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/cherrypy/test/test_http.py
new/CherryPy-18.5.0/cherrypy/test/test_http.py
--- old/CherryPy-18.3.0/cherrypy/test/test_http.py 2019-10-03
02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/cherrypy/test/test_http.py 2019-11-27
17:12:08.000000000 +0100
@@ -185,12 +185,14 @@
self.assertBody(', '.join(parts))
def test_post_filename_with_special_characters(self):
- '''Testing that we can handle filenames with special characters. This
- was reported as a bug in:
- https://github.com/cherrypy/cherrypy/issues/1146/
- https://github.com/cherrypy/cherrypy/issues/1397/
- https://github.com/cherrypy/cherrypy/issues/1694/
- '''
+ """Testing that we can handle filenames with special characters.
+
+ This was reported as a bug in:
+
+ * https://github.com/cherrypy/cherrypy/issues/1146/
+ * https://github.com/cherrypy/cherrypy/issues/1397/
+ * https://github.com/cherrypy/cherrypy/issues/1694/
+ """
# We'll upload a bunch of files with differing names.
fnames = [
'boop.csv', 'foo, bar.csv', 'bar, xxxx.csv', 'file"name.csv',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/docs/advanced.rst
new/CherryPy-18.5.0/docs/advanced.rst
--- old/CherryPy-18.3.0/docs/advanced.rst 2019-10-03 02:02:02.000000000
+0200
+++ new/CherryPy-18.5.0/docs/advanced.rst 2019-11-27 17:12:08.000000000
+0100
@@ -568,8 +568,9 @@
<http://sqlalchemy.readthedocs.org>`_ or `SQLObject
<https://pypi.python.org/pypi/SQLObject/>`_.
-You will find `here
<https://bitbucket.org/Lawouach/cherrypy-recipes/src/tip/web/database/sql_alchemy/>`_
-a recipe on how integrating SQLAlchemy using a mix of
+You will find a recipe at `cherrypy-recipes
+<https://bitbucket.org/Lawouach/cherrypy-recipes/src/tip/web/database/sql_alchemy/>`_
+that explains how to integrate SQLAlchemy using a mix of
:ref:`plugins <busplugins>` and :ref:`tools <tools>`.
HTML Templating support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/docs/basics.rst
new/CherryPy-18.5.0/docs/basics.rst
--- old/CherryPy-18.3.0/docs/basics.rst 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/docs/basics.rst 2019-11-27 17:12:08.000000000 +0100
@@ -579,8 +579,8 @@
share sessions outside of the process running CherryPy.
Requires that the Python
-`memcached <https://pypi.org/project/memcached>`_
-package is installed, which may be indicated by installing
+`memcached package <https://pypi.org/project/memcached>`_
+is installed, which may be indicated by installing
``cherrypy[memcached_session]``.
.. code-block:: ini
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/docs/enterprise.rst
new/CherryPy-18.5.0/docs/enterprise.rst
--- old/CherryPy-18.3.0/docs/enterprise.rst 1970-01-01 01:00:00.000000000
+0100
+++ new/CherryPy-18.5.0/docs/enterprise.rst 2019-11-27 17:12:08.000000000
+0100
@@ -0,0 +1,13 @@
+.. todo: consider linking to the same text in README.rst.
+.. https://github.com/cherrypy/cherrypy/pull/1813#discussion_r330805322
+
+For Enterprise
+==============
+
+CherryPy is available as part of the Tidelift Subscription.
+
+The CherryPy maintainers and the maintainers of thousands of other packages
+are working with Tidelift to deliver one enterprise subscription that covers
+all of the open source you use.
+
+`Learn more
<https://tidelift.com/subscription/pkg/pypi-cherrypy?utm_source=pypi-cherrypy&utm_medium=referral&utm_campaign=github>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/docs/index.rst
new/CherryPy-18.5.0/docs/index.rst
--- old/CherryPy-18.3.0/docs/index.rst 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/docs/index.rst 2019-11-27 17:12:08.000000000 +0100
@@ -14,6 +14,7 @@
extend.rst
deploy.rst
support.rst
+ enterprise.rst
contribute.rst
development.rst
glossary.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/setup.py new/CherryPy-18.5.0/setup.py
--- old/CherryPy-18.3.0/setup.py 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/setup.py 2019-11-27 17:12:08.000000000 +0100
@@ -28,6 +28,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: Jython',
@@ -58,10 +59,11 @@
entry_points={'console_scripts': ['cherryd = cherrypy.__main__:run']},
include_package_data=True,
install_requires=[
- 'cheroot>=6.2.4',
+ 'cheroot>=8.2.1',
'portend>=2.1.1',
'more_itertools',
'zc.lockfile',
+ 'jaraco.collections',
],
extras_require={
'docs': [
@@ -87,9 +89,7 @@
'backports.unittest_mock',
'path.py',
'requests_toolbelt',
- ],
- 'testing:sys_platform != "win32"': [
- 'pytest-services',
+ 'pytest-services>=2',
],
# Enables memcached session support via `cherrypy[memcached_session]`:
'memcached_session': ['python-memcached>=1.58'],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CherryPy-18.3.0/tox.ini new/CherryPy-18.5.0/tox.ini
--- old/CherryPy-18.3.0/tox.ini 2019-10-03 02:02:02.000000000 +0200
+++ new/CherryPy-18.5.0/tox.ini 2019-11-27 17:12:08.000000000 +0100
@@ -3,11 +3,6 @@
minversion = 2.4
[testenv]
-# Hotfix for https://github.com/pypa/pip/issues/6434
-# Based on https://github.com/jaraco/skeleton/commit/123b0b2
-# Check https://github.com/tox-dev/tox/issues/1276 for the final solution
-install_command =
- python -c 'import subprocess, sys; pip_inst_cmd = sys.executable, "-m",
"pip", "install"; subprocess.check_call(pip_inst_cmd + ("pip<19.1", ));
subprocess.check_call(pip_inst_cmd + tuple(sys.argv[1:]))' {opts} {packages}
usedevelop = True
commands_pre =
pip install -U setuptools