From 8eed333343e4e9e7f11f3aee67299030d6bf2783 Mon Sep 17 00:00:00 2001 From: Michael Merickel <github@m.merickel.org> Date: Tue, 16 Oct 2018 05:19:45 +0200 Subject: [PATCH] Merge pull request #3390 from mmerickel/whatsnew-1.10 --- docs/tutorials/modwsgi/index.rst | 2 docs/tutorials/wiki2/installation.rst | 4 src/pyramid/scaffolds/tests.py | 4 docs/conf.py | 8 +- README.rst | 10 +- docs/index.rst | 1 setup.py | 2 docs/narr/project.rst | 2 MANIFEST.in | 5 - docs/whatsnew-1.10.rst | 131 ++++++++++++++++++++++++++++++++ /dev/null | 25 ------ docs/quick_tutorial/cookiecutters.rst | 2 CHANGES.rst | 21 ++++- docs/tutorials/wiki/installation.rst | 4 tox.ini | 12 +- docs/quick_tour.rst | 4 16 files changed, 176 insertions(+), 61 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 9fecafd..cc70dca 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,5 @@ -unreleased -========== +1.10a1 (2018-10-15) +=================== Features -------- @@ -38,8 +38,8 @@ See https://github.com/Pylons/pyramid/pull/3300 - Modify ``pyramid.authentication.AuthTktAuthenticationPolicy`` and - ``pyramid.csrf.CookieCSRFStoragePolicy`` to support the SameSite option on - cookies and set the default to ``'Lax'``. + ``pyramid.csrf.CookieCSRFStoragePolicy`` to support the ``SameSite`` option + on cookies and set the default to ``'Lax'``. See https://github.com/Pylons/pyramid/pull/3319 - Added new ``pyramid.httpexceptions.HTTPPermanentRedirect`` @@ -75,6 +75,12 @@ - Add a ``registry`` argument to ``pyramid.renderers.get_renderer`` to allow users to avoid threadlocals during renderer lookup. See https://github.com/Pylons/pyramid/pull/3358 + +- Pyramid's test suite is no longer distributed with the universal wheel. + See https://github.com/Pylons/pyramid/pull/3387 + +- All Python code is now formatted automatically using ``black``. + See https://github.com/Pylons/pyramid/pull/3388 Bug Fixes --------- @@ -163,11 +169,16 @@ and replaced by the ``userid`` argument. See https://github.com/Pylons/pyramid/pull/3369 +- Removed the ``pyramid.tests`` subpackage that used to contain the Pyramid + test suite. These changes also changed the format of the repository to move + the code into a ``src`` folder. + See https://github.com/Pylons/pyramid/pull/3387 + Documentation Changes --------------------- - Ad support for Read The Docs Ethical Ads. - https://github.com/Pylons/pyramid/pull/3360 + See https://github.com/Pylons/pyramid/pull/3360 and https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html - Add support for alembic to the pyramid-cookiecutter-alchemy cookiecutter diff --git a/MANIFEST.in b/MANIFEST.in index 934fc97..fa22af5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,13 +7,10 @@ include CHANGES.rst HISTORY.rst BFG_HISTORY.rst include CONTRIBUTORS.txt LICENSE.txt COPYRIGHT.txt -include contributing.md RELEASING.txt include .coveragerc .flake8 setup.cfg pyproject.toml include tox.ini appveyor.yml .travis.yml rtd.txt +include contributing.md RELEASING.txt HACKING.txt TODO.txt graft .github - -include HACKING.txt hacking-tox.ini -include TODO.txt global-exclude __pycache__ *.py[cod] global-exclude .DS_Store diff --git a/README.rst b/README.rst index 41da33f..451fe81 100644 --- a/README.rst +++ b/README.rst @@ -1,13 +1,13 @@ Pyramid ======= -.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=master +.. image:: https://travis-ci.org/Pylons/pyramid.png?branch=1.10-branch :target: https://travis-ci.org/Pylons/pyramid - :alt: master Travis CI Status + :alt: 1.10-branch Travis CI Status -.. image:: https://readthedocs.org/projects/pyramid/badge/?version=master - :target: https://docs.pylonsproject.org/projects/pyramid/en/master - :alt: master Documentation Status +.. image:: https://readthedocs.org/projects/pyramid/badge/?version=1.10-branch + :target: https://docs.pylonsproject.org/projects/pyramid/en/1.10-branch + :alt: 1.10-branch Documentation Status .. image:: https://img.shields.io/badge/irc-freenode-blue.svg :target: https://webchat.freenode.net/?channels=pyramid diff --git a/docs/conf.py b/docs/conf.py index 6e3d412..229e053 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -71,7 +71,7 @@ 'python': ('https://docs.python.org/3', None), 'pytest': ('https://docs.pytest.org/en/latest/', None), 'sphinx': ('http://www.sphinx-doc.org/en/latest', None), - 'sqla': ('http://docs.sqlalchemy.org/en/latest', None), + 'sqla': ('https://docs.sqlalchemy.org/en/latest', None), 'tm': ('https://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None), 'toolbar': ('https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest', None), 'tstring': ('https://docs.pylonsproject.org/projects/translationstring/en/latest', None), @@ -79,10 +79,10 @@ 'venusian': ('https://docs.pylonsproject.org/projects/venusian/en/latest', None), 'webob': ('https://docs.pylonsproject.org/projects/webob/en/latest/', None), 'webtest': ('http://webtest.pythonpaste.org/en/latest', None), - 'who': ('http://repozewho.readthedocs.io/en/latest', None), + 'who': ('https://repozewho.readthedocs.io/en/latest', None), 'zcml': ('https://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None), - 'zcomponent': ('http://zopecomponent.readthedocs.io/en/latest/', None), - 'zinterface': ('http://zopeinterface.readthedocs.io/en/latest/', None), + 'zcomponent': ('https://zopecomponent.readthedocs.io/en/latest/', None), + 'zinterface': ('https://zopeinterface.readthedocs.io/en/latest/', None), } diff --git a/docs/index.rst b/docs/index.rst index 19cff94..5dba6ee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -179,6 +179,7 @@ .. toctree:: :maxdepth: 1 + whatsnew-1.10 whatsnew-1.9 whatsnew-1.8 whatsnew-1.7 diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 7252634..6dec363 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -83,7 +83,7 @@ .. code-block:: bash - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch If prompted for the first item, accept the default ``yes`` by hitting return. diff --git a/docs/quick_tour.rst b/docs/quick_tour.rst index 1e2c71c..c3823b4 100644 --- a/docs/quick_tour.rst +++ b/docs/quick_tour.rst @@ -510,7 +510,7 @@ .. code-block:: bash - $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch If prompted for the first item, accept the default ``yes`` by hitting return. @@ -863,7 +863,7 @@ .. code-block:: bash cd ~ - env/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + env/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch If prompted for the first item, accept the default ``yes`` by hitting return. diff --git a/docs/quick_tutorial/cookiecutters.rst b/docs/quick_tutorial/cookiecutters.rst index e4a585a..a566e33 100644 --- a/docs/quick_tutorial/cookiecutters.rst +++ b/docs/quick_tutorial/cookiecutters.rst @@ -28,7 +28,7 @@ .. code-block:: bash - $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch If prompted for the first item, accept the default ``yes`` by hitting return. diff --git a/docs/tutorials/modwsgi/index.rst b/docs/tutorials/modwsgi/index.rst index fa0d4f0..f530cd4 100644 --- a/docs/tutorials/modwsgi/index.rst +++ b/docs/tutorials/modwsgi/index.rst @@ -39,7 +39,7 @@ .. code-block:: bash cd ~ - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch If prompted for the first item, accept the default ``yes`` by hitting return. diff --git a/docs/tutorials/wiki/installation.rst b/docs/tutorials/wiki/installation.rst index d0037e5..a375a6b 100644 --- a/docs/tutorials/wiki/installation.rst +++ b/docs/tutorials/wiki/installation.rst @@ -31,7 +31,7 @@ .. code-block:: bash cd ~ - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch On Windows ^^^^^^^^^^ @@ -39,7 +39,7 @@ .. code-block:: doscon cd \ - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch On all operating systems ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 924927c..4de2fa2 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -43,7 +43,7 @@ .. code-block:: bash cd ~ - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch On Windows ^^^^^^^^^^ @@ -51,7 +51,7 @@ .. code-block:: doscon cd \ - cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout master + cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.10-branch On all operating systems ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/whatsnew-1.10.rst b/docs/whatsnew-1.10.rst new file mode 100644 index 0000000..1e8d1a7 --- /dev/null +++ b/docs/whatsnew-1.10.rst @@ -0,0 +1,131 @@ +What's New in Pyramid 1.10 +========================== + +This article explains the new features in :app:`Pyramid` version 1.10 as compared to its predecessor, :app:`Pyramid` 1.9. It also documents backwards incompatibilities between the two versions and deprecations added to :app:`Pyramid` 1.10, as well as software dependency changes and notable documentation additions. + +.. note:: + + This release is the last planned release feature release to support Python 2.7. + Bug fixes will continue to be backported until at least 2020-01-01 when Python 2.7 reaches end of life. + New features, and backports will be reviewed and accepted for the 1.x series of Pyramid but new development will be focused on Pyramid 2.x. + +Feature Additions +----------------- + +- Add support for Python 3.7. Add testing on Python 3.8 with allowed failures. + See https://github.com/Pylons/pyramid/pull/3333 + +- Add a context manager :meth:`pyramid.config.Configurator.route_prefix_context` to allow for convenient setting of the ``route_prefix`` for :meth:`pyramid.config.Configurator.include` and :meth:`pyramid.config.Configurator.add_route` calls inside the context. + See https://github.com/Pylons/pyramid/pull/3279 + +- Added the :meth:`pyramid.config.Configurator.add_accept_view_order` directive, allowing users to specify media type preferences in ambiguous situations such as when several views match. + A default ordering is defined for media types that prefers human-readable html/text responses over JSON. + See https://github.com/Pylons/pyramid/pull/3326 + +- Support a list of media types in the ``accept`` predicate used in :meth:`pyramid.config.Configurator.add_route`. + See https://github.com/Pylons/pyramid/pull/3326 + +- Added :class:`pyramid.session.JSONSerializer`. + See "Upcoming Changes to ISession in Pyramid 2.0" in the "Sessions" chapter of the documentation for more information about this feature. + See https://github.com/Pylons/pyramid/pull/3353 + +- Modify the builtin session implementations to support ``SameSite`` options on cookies and set the default to ``'Lax'``. + This affects :func:`pyramid.session.BaseCookieSessionFactory`, :func:`pyramid.session.SignedCookieSessionFactory`, and :func:`pyramid.session.UnencryptedCookieSessionFactoryConfig`. + See https://github.com/Pylons/pyramid/pull/3300 + +- Modify :class:`pyramid.authentication.AuthTktAuthenticationPolicy` and :class:`pyramid.csrf.CookieCSRFStoragePolicy` to support the ``SameSite`` option on cookies and set the default to ``'Lax'``. + See https://github.com/Pylons/pyramid/pull/3319 + +- Added new :class:`pyramid.httpexceptions.HTTPPermanentRedirect` exception/response object for a HTTP 308 redirect. + See https://github.com/Pylons/pyramid/pull/3302 + +- Add ``_depth`` and ``_category`` arguments to all of the venusian decorators. + The ``_category`` argument can be used to affect which actions are registered when performing a ``config.scan(..., category=...)`` with a specific category. + The ``_depth`` argument should be used when wrapping the decorator in your own. + This change affects :func:`pyramid.view.view_config`, :func:`pyramid.view.exception_view_config`, :func:`pyramid.view.forbidden_view_config`, :func:`pyramid.view.notfound_view_config`, :func:`pyramid.events.subscriber` and :func:`pyramid.response.response_adapter` decorators. + See https://github.com/Pylons/pyramid/pull/3105 and https://github.com/Pylons/pyramid/pull/3122 + +- Fix the :class:`pyramid.request.Request` class name after using :meth:`pyramid.request.Request.set_property` or :meth:`pyramid.config.Configurator.add_request_method` such that the ``str(request.__class__)`` would appear as ``pyramid.request.Request`` instead of ``pyramid.util.Request``. + See https://github.com/Pylons/pyramid/pull/3129 + +- Add a ``registry`` argument to :func:`pyramid.renderers.get_renderer` to allow users to avoid threadlocals during renderer lookup. + See https://github.com/Pylons/pyramid/pull/3358 + +- Within ``pshell``, allow the user-defined ``setup`` function to be a generator, in which case it may wrap the command's lifecycle. + See https://github.com/Pylons/pyramid/pull/3318 + +- Within ``pshell``, variables defined by the ``[pshell]`` settings are available within the user-defined ``setup`` function. + See https://github.com/Pylons/pyramid/pull/3318 + +- In ``cherrypy_server_runner``, prefer imports from the ``cheroot`` package over the legacy imports from `cherrypy.wsgiserver`. + See https://github.com/Pylons/pyramid/pull/3235 + +- :app:`Pyramid`'s test suite is no longer distributed with the universal wheel. + See https://github.com/Pylons/pyramid/pull/3387 + +- All Python code is now formatted automatically using ``black``. + See https://github.com/Pylons/pyramid/pull/3388 + +Deprecations +------------ + +- The :class:`pyramid.intefaces.ISession` interface will move to require JSON-serializable objects in :app:`Pyramid` 2.0. See "Upcoming Changes to ISession in Pyramid 2.0" in the "Sessions" chapter of the documentation for more information about this change. + See https://github.com/Pylons/pyramid/pull/3353 + +- The :func:`pyramid.session.signed_serialize` and :func:`pyramid.session.signed_deserialize` functions will be removed in :app:`Pyramid` 2.0, along with the removal of :func:`pyramid.session.UnencryptedCookieSessionFactoryConfig` which was deprecated in :app:`Pyramid` 1.5. + Please switch to using the :func:`pyramid.session.SignedCookieSessionFactory`, copying the code, or another session implementation if you're still using these features. + See https://github.com/Pylons/pyramid/pull/3353 + +- Media ranges are deprecated in the ``accept`` argument of :meth:`pyramid.config.Configurator.add_route`. + Use a list of explicit media types to ``add_route`` to support multiple types. + See https://github.com/Pylons/pyramid/pull/3326 + +- Media ranges are deprecated in the ``accept`` argument of :meth:`pyramid.config.Configurator.add_view`. + There is no replacement for ranges to ``add_view``, but after much discussion the workflow is fundamentally ambiguous in the face of various client-supplied values for the ``Accept`` header. + See https://github.com/Pylons/pyramid/pull/3326 + +Backward Incompatibilities +-------------------------- + +- On Python 3.4+ the ``repoze.lru`` dependency is dropped. If you were using this package directly in your apps you should make sure that you are depending on it directly within your project. + See https://github.com/Pylons/pyramid/pull/3140 + +- Remove the ``permission`` argument from :meth:`pyramid.config.Configurator.add_route`. + This was an argument left over from a feature removed in :app:`Pyramid` 1.5 and has had no effect since then. + See https://github.com/Pylons/pyramid/pull/3299 + +- Modify the builtin session implementations to set ``SameSite='Lax'`` on cookies. + This affects :func:`pyramid.session.BaseCookieSessionFactory`, :func:`pyramid.session.SignedCookieSessionFactory`, and :func:`pyramid.session.UnencryptedCookieSessionFactoryConfig`. + See https://github.com/Pylons/pyramid/pull/3300 + +- Variables defined in the ``[pshell]`` section of the settings will no longer override those set by the ``setup`` function. + See https://github.com/Pylons/pyramid/pull/3318 + +- :meth:`pyramid.config.Configurator.add_notfound_view` uses default redirect class exception :class:`pyramid.httpexceptions.HTTPTemporaryRedirect` instead of previous :class:`pyramid.httpexceptions.HTTPFound`. + See https://github.com/Pylons/pyramid/pull/3328 + +- Removed ``pyramid.config.Configurator.set_request_property`` which had been deprecated since :app:`Pyramid` 1.5. + Instead use :meth:`pyramid.config.Configurator.add_request_method` with ``reify=True`` or ``property=True``. + See https://github.com/Pylons/pyramid/pull/3368 + +- Removed the ``principal`` keyword argument from :func:`pyramid.security.remember` which had been deprecated since :app:`Pyramid` 1.6 and replaced by the ``userid`` argument. + See https://github.com/Pylons/pyramid/pull/3369 + +- Removed the ``pyramid.tests`` subpackage that used to contain the Pyramid test suite. + These changes also changed the format of the repository to move the code into a ``src`` folder. + See https://github.com/Pylons/pyramid/pull/3387 + +Documentation Enhancements +-------------------------- + +- Ad support for Read The Docs Ethical Ads. + See https://github.com/Pylons/pyramid/pull/3360 and https://docs.readthedocs.io/en/latest/advertising/ethical-advertising.html + +- Add support for alembic to the pyramid-cookiecutter-alchemy cookiecutter and update the wiki2 tutorial to explain how it works. + See https://github.com/Pylons/pyramid/pull/3307 and https://github.com/Pylons/pyramid-cookiecutter-alchemy/pull/7 + +- Bump Sphinx to >= 1.7.4 in setup.py to support ``emphasize-lines`` in PDFs and to pave the way for xelatex support. + See https://github.com/Pylons/pyramid/pull/3271, https://github.com/Pylons/pyramid/issues/667, and https://github.com/Pylons/pyramid/issues/2572 + +- Added extra tests to the quick tutorial. + See https://github.com/Pylons/pyramid/pull/3375 diff --git a/hacking-tox.ini b/hacking-tox.ini deleted file mode 100644 index 9520b7a..0000000 --- a/hacking-tox.ini +++ /dev/null @@ -1,25 +0,0 @@ -[tox] -envlist = - env27,ttw27-create,ttw27-install - -[testenv:env27] -envdir = env27 -basepython = python2.7 -usedevelop = True -deps = setuptools-git -commands = - python setup.py dev - -[testenv:ttw27-create] -envdir = env27 -usedevelop = True -changedir = env27 -commands = - pcreate -s starter hacking - -[testenv:ttw27-install] -envdir = env27 -usedevelop = True -changedir = env27/hacking -commands = - python setup.py develop diff --git a/setup.py b/setup.py index 5133690..b64feb1 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ setup( name='pyramid', - version='1.10.dev0', + version='1.10a1', description='The Pyramid Web Framework, a Pylons project', long_description=README + '\n\n' + CHANGES, classifiers=[ diff --git a/src/pyramid/scaffolds/tests.py b/src/pyramid/scaffolds/tests.py index cb8842d..8ed2f23 100644 --- a/src/pyramid/scaffolds/tests.py +++ b/src/pyramid/scaffolds/tests.py @@ -19,7 +19,7 @@ logger = Logger([(Logger.level_for_integer(2), sys.stdout)]) virtualenv.logger = logger virtualenv.create_environment( - directory, site_packages=False, clear=False, unzip_setuptools=True + directory, site_packages=False, clear=False ) def install(self, tmpl_name): # pragma: no cover @@ -28,7 +28,7 @@ self.directory = tempfile.mkdtemp() self.make_venv(self.directory) here = os.path.abspath(os.path.dirname(__file__)) - os.chdir(os.path.dirname(os.path.dirname(here))) + os.chdir(os.path.dirname(os.path.dirname(os.path.dirname(here)))) pip = os.path.join(self.directory, 'bin', 'pip') subprocess.check_call([pip, 'install', '-e', '.']) os.chdir(self.directory) diff --git a/tox.ini b/tox.ini index f5152cb..cda08f8 100644 --- a/tox.ini +++ b/tox.ini @@ -28,37 +28,37 @@ [testenv:py27-scaffolds] basepython = python2.7 commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:py34-scaffolds] basepython = python3.4 commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:py35-scaffolds] basepython = python3.5 commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:py36-scaffolds] basepython = python3.6 commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:py37-scaffolds] basepython = python3.7 commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:pypy-scaffolds] basepython = pypy commands = - python pyramid/scaffolds/tests.py + python src/pyramid/scaffolds/tests.py deps = virtualenv [testenv:lint] -- Gitblit v1.9.3