From 89968d1cd153c5a3029a8300c188be75b7d6bbd1 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 4 Sep 2023 11:55:58 +0100 Subject: [PATCH 1/4] Switch to std-uritemplate --- kiota_abstractions/request_information.py | 5 ++--- pyproject.toml | 2 +- requirements-dev.txt | 5 +++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kiota_abstractions/request_information.py b/kiota_abstractions/request_information.py index f1df03e..f3d1ba3 100644 --- a/kiota_abstractions/request_information.py +++ b/kiota_abstractions/request_information.py @@ -6,7 +6,7 @@ from uuid import UUID from opentelemetry import trace -from uritemplate import URITemplate +from stduritemplate import StdUriTemplate from ._version import VERSION from .method import Method @@ -74,14 +74,13 @@ def url(self) -> Url: if not self.url_template: raise Exception("Url Template cannot be null") - template = URITemplate(self.url_template) data: Dict[str, Any] = {} for key, val in self.query_parameters.items(): data[key] = val for key, val in self.path_parameters.items(): data[key] = val - result = template.expand(data) + result = StdURITemplate.expand(self.url_template, data) return result @url.setter diff --git a/pyproject.toml b/pyproject.toml index 86d21d0..267f272 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" name = "microsoft-kiota-abstractions" authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] dependencies = [ - "uritemplate >=4.1.1", + "std-uritemplate >=0.0.31", "opentelemetry-api >=1.19.0", "opentelemetry-sdk >=1.19.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 3e4d399..1a5198b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -60,8 +60,9 @@ wrapt==1.15.0 ; python_version < '3.11' yapf==0.40.1 -uritemplate==4.1.1 +std-uritemplate==0.0.31 opentelemetry-api==1.19.0 -opentelemetry-sdk==1.19.0 \ No newline at end of file +opentelemetry-sdk==1.19.0 + From 26592a0ca46722795dc898eb0e18185d389369be Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 4 Sep 2023 13:14:53 +0100 Subject: [PATCH 2/4] minor fixes --- kiota_abstractions/request_information.py | 2 +- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kiota_abstractions/request_information.py b/kiota_abstractions/request_information.py index f3d1ba3..49dbdd8 100644 --- a/kiota_abstractions/request_information.py +++ b/kiota_abstractions/request_information.py @@ -80,7 +80,7 @@ def url(self) -> Url: for key, val in self.path_parameters.items(): data[key] = val - result = StdURITemplate.expand(self.url_template, data) + result = StdUriTemplate.expand(self.url_template, data) return result @url.setter diff --git a/pyproject.toml b/pyproject.toml index 267f272..615f039 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" name = "microsoft-kiota-abstractions" authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] dependencies = [ - "std-uritemplate >=0.0.31", + "std-uritemplate >=0.0.35", "opentelemetry-api >=1.19.0", "opentelemetry-sdk >=1.19.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 1a5198b..72265f4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -60,7 +60,7 @@ wrapt==1.15.0 ; python_version < '3.11' yapf==0.40.1 -std-uritemplate==0.0.31 +std-uritemplate==0.0.35 opentelemetry-api==1.19.0 From 7d26998ed56bcfc2c724f26c3842aa226508f8ea Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 4 Sep 2023 13:24:40 +0100 Subject: [PATCH 3/4] bump std-uritemplate --- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 615f039..ba6b448 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" name = "microsoft-kiota-abstractions" authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] dependencies = [ - "std-uritemplate >=0.0.35", + "std-uritemplate >=0.0.36", "opentelemetry-api >=1.19.0", "opentelemetry-sdk >=1.19.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index 72265f4..df573b4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -60,7 +60,7 @@ wrapt==1.15.0 ; python_version < '3.11' yapf==0.40.1 -std-uritemplate==0.0.35 +std-uritemplate==0.0.36 opentelemetry-api==1.19.0 From 7fae319c106d93403e64f10fa9f70055b5e5b399 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 4 Sep 2023 15:26:09 +0100 Subject: [PATCH 4/4] bump version to include all the fixes --- pyproject.toml | 2 +- requirements-dev.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ba6b448..ae39933 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi" name = "microsoft-kiota-abstractions" authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] dependencies = [ - "std-uritemplate >=0.0.36", + "std-uritemplate >=0.0.38", "opentelemetry-api >=1.19.0", "opentelemetry-sdk >=1.19.0", ] diff --git a/requirements-dev.txt b/requirements-dev.txt index df573b4..792f91e 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -60,7 +60,7 @@ wrapt==1.15.0 ; python_version < '3.11' yapf==0.40.1 -std-uritemplate==0.0.36 +std-uritemplate==0.0.38 opentelemetry-api==1.19.0