Skip to content

Commit d2e8f02

Browse files
committed
Drop and remove V1 API
This change drops all the support for the V1 version of the API, that was marked as deprecated in version 1.0.0. Sem-Ver: api-break
1 parent 6193398 commit d2e8f02

18 files changed

+26
-968
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Deprecated
1313
### Removed
14+
- Drop support for V1 API.
15+
1416
### Fixed
1517
- Updated documentation.
1618

deepaas/api/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,6 @@ async def get_app(swagger=True, doc="/ui", prefix="",
6767

6868
APP.middlewares.append(web.normalize_path_middleware())
6969

70-
if CONF.enable_v1:
71-
LOG.warning("Using V1 version of the API is not anymore supported "
72-
"and marked as deprecated, please switch to V2 as soon "
73-
"as possible.")
74-
75-
from deepaas.api import v1 # noqa
76-
77-
model.register_v1_models()
78-
79-
v1app = v1.get_app()
80-
APP.add_subapp("/v1", v1app)
81-
versions.register_version("deprecated", v1.get_version)
82-
83-
LOG.info("Serving loaded V1 models: %s", list(model.V1_MODELS.keys()))
84-
8570
model.register_v2_models(APP)
8671

8772
v2app = v2.get_app(

deepaas/api/v1.py

Lines changed: 0 additions & 257 deletions
This file was deleted.

deepaas/config.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@
2626
warnings.simplefilter("default", DeprecationWarning)
2727

2828
opts = [
29-
cfg.BoolOpt('enable-v1',
30-
default="False",
31-
help="""
32-
Whether to enable V1 version of the API or not.
33-
34-
If this option is set to True, DEEPaaS API will offer a /v1/ endpoing with
35-
the DEPRECATED version of the API.
36-
"""),
3729
cfg.BoolOpt('debug-endpoint',
3830
default="false",
3931
help="""

deepaas/model/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,11 @@
1414
# License for the specific language governing permissions and limitations
1515
# under the License.
1616

17-
from deepaas.model import v1
1817
from deepaas.model import v2
1918

20-
V1_MODELS = v1.MODELS
2119
V2_MODELS = v2.MODELS
2220

2321

24-
def register_v1_models():
25-
"""Register V1 models.
26-
27-
This method has to be called before the API is spawned, so that we
28-
can look up the correct entry points and load the defined models.
29-
"""
30-
31-
return v1.register_models()
32-
33-
3422
def register_v2_models(app):
3523
"""Register V2 models.
3624

deepaas/model/loading.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import stevedore
1818

1919
NAMESPACES = {
20-
"v1": "deepaas.model",
2120
"v2": "deepaas.v2.model",
2221
}
2322

0 commit comments

Comments
 (0)