Skip to content

Commit 97e198e

Browse files
authored
Merge branch 'main' into shem/fix_add_depends_on_bug
2 parents 5711d4f + e22bff3 commit 97e198e

File tree

9 files changed

+43
-5
lines changed

9 files changed

+43
-5
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ updates:
55
schedule:
66
interval: daily
77
open-pull-requests-limit: 10
8+
groups:
9+
open-telemetry:
10+
patterns:
11+
- "*opentelemetry*"
12+
kiota:
13+
patterns:
14+
- "*kiota*"
15+
pylint:
16+
patterns:
17+
- "*pylint*"
18+
- "*astroid*"
819
- package-ecosystem: github-actions
920
directory: "/"
1021
schedule:

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.1.5"
2+
".": "1.1.6"
33
}

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [1.1.6](https://github.com/microsoftgraph/msgraph-sdk-python-core/compare/v1.1.5...v1.1.6) (2024-10-18)
6+
7+
8+
### Bug Fixes
9+
10+
* removes the tests directory from the package ([3d919a7](https://github.com/microsoftgraph/msgraph-sdk-python-core/commit/3d919a7f88c82bcebcbe093d9606906b56e0b416))
11+
* removes the tests directory from the package ([ccbed8d](https://github.com/microsoftgraph/msgraph-sdk-python-core/commit/ccbed8df3a9d9165b81f2f8af80282eeb2814907))
12+
513
## [1.1.5](https://github.com/microsoftgraph/msgraph-sdk-python-core/compare/v1.1.4...v1.1.5) (2024-10-02)
614

715

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exclude tests/*

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "msgraph-core"
77
# The SDK version
88
# x-release-please-start-version
9-
version = "1.1.5"
9+
version = "1.1.6"
1010
# x-release-please-end
1111
authors = [{name = "Microsoft", email = "[email protected]"}]
1212
description = "Core component of the Microsoft Graph Python SDK"

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ colorama==0.4.6 ; os_name == 'nt'
2626

2727
coverage[toml]==7.6.1 ; python_version >= '3.7'
2828

29-
cryptography==43.0.0 ; python_version >= '3.7'
29+
cryptography==43.0.1 ; python_version >= '3.7'
3030

3131
dill==0.3.6 ; python_version < '3.11'
3232

src/msgraph_core/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
DEFAULT_CONNECTION_TIMEOUT = 30
1111
# The SDK version
1212
# x-release-please-start-version
13-
SDK_VERSION = '1.1.5'
13+
SDK_VERSION = '1.1.6'
1414
# x-release-please-end
1515
MS_DEFAULT_SCOPE = 'https://graph.microsoft.com/.default'

src/msgraph_core/requests/batch_request_item.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
import enum
23
import json
34
from uuid import uuid4
45
from typing import List, Optional, Dict, Union, Any
@@ -39,7 +40,10 @@ def __init__(
3940
if request_information is None or not request_information.http_method:
4041
raise ValueError("HTTP method cannot be Null/Empty")
4142
self._id = id or str(uuid4())
42-
self.method = request_information.http_method
43+
if isinstance(request_information.http_method, enum.Enum):
44+
self._method = request_information.http_method.name
45+
else:
46+
self._method = request_information.http_method
4347
self._headers = request_information.request_headers
4448
self._body = request_information.content
4549
self.url = request_information.url.replace('/users/me-token-to-replace', '/me', 1)
@@ -183,7 +187,9 @@ def method(self, value: str) -> None:
183187
Sets the HTTP method of the request item.
184188
Args:
185189
value (str): The HTTP method of the request item.
190+
186191
"""
192+
187193
self._method = value
188194

189195
@property

tests/requests/test_batch_request_item.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from unittest.mock import Mock
33
from urllib.request import Request
44
from kiota_abstractions.request_information import RequestInformation
5+
from kiota_abstractions.method import Method
56
from kiota_abstractions.headers_collection import HeadersCollection as RequestHeaders
67
from msgraph_core.requests.batch_request_item import BatchRequestItem, StreamInterface
78
from kiota_abstractions.serialization import SerializationWriter
@@ -109,6 +110,17 @@ def test_method_property(batch_request_item):
109110
assert batch_request_item.method == "POST"
110111

111112

113+
def test_batch_request_item_method_enum():
114+
# Create a RequestInformation instance with an enum value for http_method
115+
request_info = RequestInformation()
116+
request_info.http_method = Method.GET
117+
request_info.url = "https://graph.microsoft.com/v1.0/me"
118+
request_info.headers = RequestHeaders()
119+
request_info.content = None
120+
batch_request_item = BatchRequestItem(request_information=request_info)
121+
assert batch_request_item.method == "GET"
122+
123+
112124
def test_depends_on_property(batch_request_item):
113125
batch_request_item.set_depends_on(["request1", "request2"])
114126
assert batch_request_item.depends_on == ["request1", "request2"]

0 commit comments

Comments
 (0)