#1450 python: show obsolete warning on all APIv1 and APIv2 pages
Merged 3 years ago by praiskup. Opened 3 years ago by frostyx.
copr/ frostyx/copr python-doc-obsolete-api  into  master

file modified
+3 -3
@@ -1,10 +1,10 @@ 

- Legacy client

- =============

- 

  .. warning::

      Legacy client is obsolete, please use Client version 3 instead. :ref:`This document <migration>` describes the migration process.

  

  

+ Legacy client

+ =============

+ 

  All interaction are done through copr.CoprClient.

  It can be created directly or using config file :file:`/etc/copr.conf`

  

file modified
+3 -3
@@ -1,10 +1,10 @@ 

- Client version 2

- ================

- 

  .. warning::

      Client version 2 is obsolete, please use Client version 3 instead.

  

  

+ Client version 2

+ ================

+ 

  New package copr.ClientV2 supports APIv2 and should  eventually replace older one.

  New API and Client_v2 provides more simple and uniform approach for communication with the Copr service.

  

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Legacy client is obsolete, please use Client version 3 instead. :ref:`This document <migration>` describes the migration process.

+ 

+ 

  CoprClient

  ==========

  
@@ -8,4 +12,3 @@ 

          create_new_build, get_build_details, cancel_build,

          get_project_chroot_details, modify_project_chroot_details,

          search_projects

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Legacy client is obsolete, please use Client version 3 instead. :ref:`This document <migration>` describes the migration process.

+ 

+ 

  Create client

  -------------

  ::

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Legacy client is obsolete, please use Client version 3 instead. :ref:`This document <migration>` describes the migration process.

+ 

+ 

  Responses

  =========

  

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Entities

  ========

  

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Error handling

  ==============

  

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  General

  =======

  
@@ -12,6 +16,3 @@ 

  .. autoclass:: copr.client_v2.client.CoprClient

     :members: projects, builds, build_tasks, project_chroots,

        mock_chroots, create_from_file_config, create_from_params, post_init

- 

- 

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Handlers

  ========

  
@@ -28,7 +32,3 @@ 

  -----------

  .. autoclass:: copr.client_v2.handlers.MockChrootHandle

     :members:

- 

- 

- 

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Client initialization

  =====================

  

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  .. _build-info:

  

  Build

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  .. _build-task-info:

  

  Build task
@@ -90,4 +94,3 @@ 

      >>> bt = cl.build_tasks.get_one(106897, "epel-6-i386")

      >>> print(bt.state, bt.result_dir_url)

      (u'succeeded', u'http://copr-be-dev.cloud.fedoraproject.org/results/rineau/libQGLViewer-qt5/epel-6-i386/libQGLViewer-2.5.1-5.fc21')

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  .. _`mock-chroot-info`:

  

  Mock chroot

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  .. _project-info:

  

  Project

@@ -1,3 +1,6 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

  

  .. _project-chroot-info:

  
@@ -82,5 +85,3 @@ 

  

  

  .. _comps.xml: https://fedorahosted.org/comps/

- 

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Resources

  =========

  
@@ -55,6 +59,3 @@ 

  ----------------

  .. autoclass:: copr.client_v2.resources.OperationResult

     :members:

- 

- 

- 

@@ -1,3 +1,7 @@ 

+ .. warning::

+     Client version 2 is obsolete, please use Client version 3 instead.

+ 

+ 

  Resources

  ~~~~~~~~~

  
@@ -51,4 +55,3 @@ 

          >>> p.description = u"Hello world!"

          >>> p.update()

          # instead of cl.projects.update(p._entity)

- 

We are already showing a warning about APIv1 and APIv2 being obsolete
but only on their main pages. When somebody goes to the documentation
through google or bookmarks, they might not even notice, that they
are obsolete and that we already use APIv3. Let's just show the
warning on all subpages.

Also some removed whitespace ...

Pull-Request has been merged by praiskup

3 years ago