From 723c521676fbc75444e4c976345ed46b9b866e44 Mon Sep 17 00:00:00 2001 From: Joan Touzet Date: Wed, 29 Jan 2020 13:40:21 -0500 Subject: [PATCH] Deprecate show, list, rewrite, vhosts --- src/api/basics.rst | 4 ---- src/api/ddoc/common.rst | 6 +++--- src/api/ddoc/render.rst | 16 ++++++++++++++++ src/api/ddoc/rewrites.rst | 4 ++++ src/config/http.rst | 8 ++++++++ src/ddocs/ddocs.rst | 8 ++++++++ src/intro/security.rst | 3 +-- src/query-server/index.rst | 5 ++--- src/query-server/protocol.rst | 8 ++++++++ src/whatsnew/3.0.rst | 13 +++++++++++++ 10 files changed, 63 insertions(+), 12 deletions(-) diff --git a/src/api/basics.rst b/src/api/basics.rst index 4d752dae..60c76a5a 100644 --- a/src/api/basics.rst +++ b/src/api/basics.rst @@ -92,10 +92,6 @@ listing the supported HTTP methods. For example: "reason":"Only GET,HEAD allowed" } -The CouchDB design document API and the functions when returning HTML (for -example as part of a show or list) enables you to include custom HTTP headers -through the ``headers`` block of the return object. - HTTP Headers ============ diff --git a/src/api/ddoc/common.rst b/src/api/ddoc/common.rst index 31673d75..7fae1586 100644 --- a/src/api/ddoc/common.rst +++ b/src/api/ddoc/common.rst @@ -50,9 +50,9 @@ to process design document functions * **options** (*object*): View's default options * **filters** (*object*): :ref:`Filter functions ` definition - * **lists** (*object*): :ref:`List functions ` definition - * **rewrites** (*array* or *string*): Rewrite rules definition - * **shows** (*object*): :ref:`Show functions ` definition + * **lists** (*object*): :ref:`List functions ` definition. *Deprecated.* + * **rewrites** (*array* or *string*): Rewrite rules definition. *Deprecated.* + * **shows** (*object*): :ref:`Show functions ` definition. *Deprecated.* * **updates** (*object*): :ref:`Update functions ` definition * **validate_doc_update** (*string*): :ref:`Validate document update ` function source diff --git a/src/api/ddoc/render.rst b/src/api/ddoc/render.rst index a0d75331..262a7bb4 100644 --- a/src/api/ddoc/render.rst +++ b/src/api/ddoc/render.rst @@ -16,6 +16,10 @@ ``/db/_design/design-doc/_show/show-name`` ========================================== +.. warning:: + + Show functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. http:get:: /{db}/_design/{ddoc}/_show/{func} :synopsis: Executes a show function against null document @@ -76,6 +80,10 @@ ``/db/_design/design-doc/_show/show-name/doc-id`` ================================================= +.. warning:: + + Show functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. http:get:: /{db}/_design/{ddoc}/_show/{func}/{docid} :synopsis: Executes a show function against the specified document @@ -137,6 +145,10 @@ ``/db/_design/design-doc/_list/list-name/view-name`` ==================================================== +.. warning:: + + List functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. http:get:: /{db}/_design/{ddoc}/_list/{func}/{view} :synopsis: Executes a list function against the view from the same design document @@ -204,6 +216,10 @@ ``/db/_design/design-doc/_list/list-name/other-ddoc/view-name`` =============================================================== +.. warning:: + + List functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. http:get:: /{db}/_design/{ddoc}/_list/{func}/{other-ddoc}/{view} :synopsis: Executes a list function against the view from other design document diff --git a/src/api/ddoc/rewrites.rst b/src/api/ddoc/rewrites.rst index 6ff8badd..5eb0f496 100644 --- a/src/api/ddoc/rewrites.rst +++ b/src/api/ddoc/rewrites.rst @@ -16,6 +16,10 @@ ``/db/_design/design-doc/_rewrite/path`` ======================================== +.. warning:: + + Rewrites are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. http:any:: /{db}/_design/{ddoc}/_rewrite/{path} :synopsis: Rewrites HTTP request for the specified path by using stored array of routing rules or JavaScript function diff --git a/src/config/http.rst b/src/config/http.rst index fd947579..e0f518af 100644 --- a/src/config/http.rst +++ b/src/config/http.rst @@ -527,6 +527,10 @@ Cross-Origin Resource Sharing Per Virtual Host Configuration ------------------------------ +.. warning:: + + Virtual Hosts are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + To set the options for a :section:`vhosts`, you will need to create a section with the vhost name prefixed by ``cors:``. Example case for the vhost `example.com`:: @@ -549,6 +553,10 @@ or behaviour. Virtual Hosts ============= +.. warning:: + + Virtual Hosts are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. config:section:: vhosts :: Virtual Hosts CouchDB can map requests to different locations based on the ``Host`` diff --git a/src/ddocs/ddocs.rst b/src/ddocs/ddocs.rst index 1b3c9bde..08290a11 100644 --- a/src/ddocs/ddocs.rst +++ b/src/ddocs/ddocs.rst @@ -328,6 +328,10 @@ objects. Show Functions ============== +.. warning:: + + Show functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. function:: showfun(doc, req) :param doc: The document that is being processed; may be omitted. @@ -450,6 +454,10 @@ correctly, and keys with invalid characters, but you've got the idea! List Functions ============== +.. warning:: + + List functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + .. function:: listfun(head, req) :param head: :ref:`view_head_info_object` diff --git a/src/intro/security.rst b/src/intro/security.rst index ec30b0ec..d896c5cf 100644 --- a/src/intro/security.rst +++ b/src/intro/security.rst @@ -270,8 +270,7 @@ special security-related constraints applied. Below is a list of how the (:get:`GET /_users/_all_docs `) - Only administrators may listen to :ref:`changes feed ` (:get:`GET /_users/_changes `) -- Only administrators may execute design functions like :ref:`views `, - :ref:`shows ` and :ref:`others ` +- Only administrators may execute design functions like :ref:`views `. - There is a special design document ``_auth`` that cannot be modified - Every document except the `design documents` represent registered CouchDB users and belong to them diff --git a/src/query-server/index.rst b/src/query-server/index.rst index 4ce231c4..02be469e 100644 --- a/src/query-server/index.rst +++ b/src/query-server/index.rst @@ -17,9 +17,8 @@ Query Server ============ The `Query server` is an external process that communicates with CouchDB by JSON -protocol through stdio interface and processed all -:ref:`design functions ` calls: -:ref:`views `, :ref:`shows `, :ref:`lists ` and more. +protocol through stdio interface and processes all +:ref:`design functions ` calls, such as JavaScript :ref:`views `. The default query server is written in :ref:`JavaScript `, running via `Mozilla SpiderMonkey`_. diff --git a/src/query-server/protocol.rst b/src/query-server/protocol.rst index 9bb0012e..4420e9c5 100644 --- a/src/query-server/protocol.rst +++ b/src/query-server/protocol.rst @@ -325,6 +325,10 @@ second phase. ``shows`` --------- +.. warning:: + + Show functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + :Command: ``ddoc`` :SubCommand: ``shows`` :Arguments: @@ -421,6 +425,10 @@ The Query Server sends:: ``lists`` --------- +.. warning:: + + List functions are deprecated in CouchDB 3.0, and will be removed in CouchDB 4.0. + :Command: ``ddoc`` :SubCommand: ``lists`` :Arguments: diff --git a/src/whatsnew/3.0.rst b/src/whatsnew/3.0.rst index 55d1bc7c..537874b0 100644 --- a/src/whatsnew/3.0.rst +++ b/src/whatsnew/3.0.rst @@ -139,6 +139,19 @@ CouchDB 3.0: default. A setting exists in the configuration file to revert this behaviour. The ability to override the disable setting is expected to be removed in CouchDB 4.0. +Deprecated feature warnings +--------------------------- + +The following features are deprecated in CouchDB 3.0 and will be removed in CouchDB 4.0: + +* Show functions (``/{db}/{ddoc}/_show``) + +* List functions (``/{db}/{ddoc}/_list``) + +* Virtual hosts and ini-file rewrites + +* Rewrite functions (``/{db}/{ddoc}/_rewrite``) + .. _release/3.0.0: Version 3.0.0