Skip to content

Commit 561db00

Browse files
committed
fixes(v3) put back 'get_routes' un AppManager
1 parent d28211a commit 561db00

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

cloudfoundry_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
This module provides a client library for cloudfoundry_client v2/v3.
33
"""
44

5-
__version__ = "1.40.1"
5+
__version__ = "1.40.2"

cloudfoundry_client/v3/apps.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
from typing import TYPE_CHECKING
2+
import sys
3+
4+
if sys.version_info < (3, 13):
5+
from typing_extensions import deprecated
6+
else:
7+
from warnings import deprecated
28

39
from cloudfoundry_client.common_objects import JsonObject, Pagination
410
from cloudfoundry_client.v3.entities import EntityManager, Entity
@@ -20,6 +26,11 @@ def remove(self, application_guid: str, asynchronous: bool = True) -> str | None
2026
def get_env(self, application_guid: str) -> JsonObject:
2127
return super()._get("%s%s/%s/env" % (self.target_endpoint, self.entity_uri, application_guid))
2228

29+
@deprecated("use list_routes instead")
30+
def get_routes(self, application_guid: str) -> JsonObject:
31+
return super()._get(
32+
"%s%s/%s/routes" % (self.target_endpoint, self.entity_uri, application_guid))
33+
2334
def list_routes(self, application_guid: str, **kwargs) -> Pagination[Entity]:
2435
uri: str = "%s/%s/routes" % (self.entity_uri, application_guid)
2536
return super()._list(requested_path=uri, **kwargs)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ exclude = '''
88

99
[tool.poetry]
1010
name = "cloudfoundry_client"
11-
version = "1.40.1"
11+
version = "1.40.2"
1212
description = "A client library for CloudFoundry"
1313
authors = ["Benjamin Einaudi <antechrestos@gmail.com>"]
1414
readme = "README.rst"

0 commit comments

Comments
 (0)