Skip to content

Commit 4b0c490

Browse files
authored
Updated dependencies and fixed breaking change in SDK (#57)
* Updated dependencies and fixed breaking change in SDK * Update Python versions * Fix python versions * Fix import statements
1 parent ea255d3 commit 4b0c490

File tree

7 files changed

+54
-47
lines changed

7 files changed

+54
-47
lines changed

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.9", "3.10", "3.11"]
15+
python-version: ["3.10", "3.11", "3.12"]
1616

1717
steps:
1818
- uses: actions/checkout@v4

requirements.txt

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
#
55
# pip-compile --output-file=requirements.txt --resolver=backtracking
66
#
7-
aiohappyeyeballs==2.3.5
7+
aiohappyeyeballs==2.4.0
88
# via aiohttp
9-
aiohttp==3.10.2
9+
aiohttp==3.10.5
1010
# via microsoft-kiota-authentication-azure
1111
aiosignal==1.3.1
1212
# via aiohttp
13-
anyio==4.3.0
13+
anyio==4.6.0
1414
# via httpx
1515
async-timeout==4.0.3
1616
# via aiohttp
17-
attrs==23.2.0
17+
attrs==24.2.0
1818
# via aiohttp
1919
azure-core==1.31.0
2020
# via
@@ -24,12 +24,12 @@ azure-identity==1.18.0
2424
# via
2525
# -r requirements.in
2626
# msgraph-sdk
27-
certifi==2024.7.4
27+
certifi==2024.8.30
2828
# via
2929
# httpcore
3030
# httpx
3131
# requests
32-
cffi==1.16.0
32+
cffi==1.17.1
3333
# via cryptography
3434
charset-normalizer==3.3.2
3535
# via requests
@@ -39,8 +39,10 @@ cryptography==43.0.1
3939
# msal
4040
# pyjwt
4141
deprecated==1.2.14
42-
# via opentelemetry-api
43-
exceptiongroup==1.2.0
42+
# via
43+
# opentelemetry-api
44+
# opentelemetry-semantic-conventions
45+
exceptiongroup==1.2.2
4446
# via anyio
4547
frozenlist==1.4.1
4648
# via
@@ -52,21 +54,22 @@ h2==4.1.0
5254
# via httpx
5355
hpack==4.0.0
5456
# via h2
55-
httpcore==1.0.4
57+
httpcore==1.0.5
5658
# via httpx
57-
httpx[http2]==0.27.0
59+
httpx[http2]==0.27.2
5860
# via
61+
# httpx
5962
# microsoft-kiota-http
6063
# msgraph-core
6164
hyperframe==6.0.1
6265
# via h2
63-
idna==3.7
66+
idna==3.10
6467
# via
6568
# anyio
6669
# httpx
6770
# requests
6871
# yarl
69-
importlib-metadata==6.11.0
72+
importlib-metadata==8.4.0
7073
# via opentelemetry-api
7174
microsoft-kiota-abstractions==1.3.3
7275
# via
@@ -78,17 +81,17 @@ microsoft-kiota-abstractions==1.3.3
7881
# microsoft-kiota-serialization-text
7982
# msgraph-core
8083
# msgraph-sdk
81-
microsoft-kiota-authentication-azure==1.0.0
84+
microsoft-kiota-authentication-azure==1.1.0
8285
# via
8386
# msgraph-core
8487
# msgraph-sdk
85-
microsoft-kiota-http==1.3.0
88+
microsoft-kiota-http==1.3.3
8689
# via
8790
# msgraph-core
8891
# msgraph-sdk
89-
microsoft-kiota-serialization-form==0.1.0
92+
microsoft-kiota-serialization-form==0.1.1
9093
# via msgraph-sdk
91-
microsoft-kiota-serialization-json==1.3.0
94+
microsoft-kiota-serialization-json==1.3.2
9295
# via msgraph-sdk
9396
microsoft-kiota-serialization-multipart==0.1.0
9497
# via msgraph-sdk
@@ -100,73 +103,75 @@ msal==1.31.0
100103
# msal-extensions
101104
msal-extensions==1.2.0
102105
# via azure-identity
103-
msgraph-core==1.0.0
106+
msgraph-core==1.1.3
104107
# via msgraph-sdk
105-
msgraph-sdk==1.5.4
108+
msgraph-sdk==1.8.0
106109
# via -r requirements.in
107-
multidict==6.0.5
110+
multidict==6.1.0
108111
# via
109112
# aiohttp
110113
# yarl
111-
opentelemetry-api==1.22.0
114+
opentelemetry-api==1.27.0
112115
# via
113116
# microsoft-kiota-abstractions
114117
# microsoft-kiota-authentication-azure
115118
# microsoft-kiota-http
116119
# opentelemetry-sdk
117-
opentelemetry-sdk==1.22.0
120+
# opentelemetry-semantic-conventions
121+
opentelemetry-sdk==1.27.0
118122
# via
119123
# microsoft-kiota-abstractions
120124
# microsoft-kiota-authentication-azure
121125
# microsoft-kiota-http
122-
opentelemetry-semantic-conventions==0.43b0
126+
opentelemetry-semantic-conventions==0.48b0
123127
# via opentelemetry-sdk
124128
pendulum==3.0.0
125129
# via
126130
# microsoft-kiota-serialization-form
127131
# microsoft-kiota-serialization-json
128-
portalocker==2.8.2
132+
portalocker==2.10.1
129133
# via msal-extensions
130-
pycparser==2.21
134+
pycparser==2.22
131135
# via cffi
132-
pyjwt[crypto]==2.8.0
136+
pyjwt[crypto]==2.9.0
133137
# via
134138
# msal
135139
# pyjwt
136-
python-dateutil==2.8.2
140+
python-dateutil==2.9.0.post0
137141
# via
138142
# microsoft-kiota-serialization-text
139143
# pendulum
140144
# time-machine
141-
requests==2.32.0
145+
requests==2.32.3
142146
# via
143147
# azure-core
144148
# msal
145149
six==1.16.0
146150
# via
147151
# azure-core
148152
# python-dateutil
149-
sniffio==1.3.0
153+
sniffio==1.3.1
150154
# via
151155
# anyio
152156
# httpx
153-
std-uritemplate==0.0.53
157+
std-uritemplate==1.0.6
154158
# via microsoft-kiota-abstractions
155-
time-machine==2.13.0
159+
time-machine==2.15.0
156160
# via pendulum
157-
typing-extensions==4.9.0
161+
typing-extensions==4.12.2
158162
# via
159163
# anyio
160164
# azure-core
161165
# azure-identity
166+
# multidict
162167
# opentelemetry-sdk
163168
tzdata==2024.1
164169
# via pendulum
165-
urllib3==2.2.2
170+
urllib3==2.2.3
166171
# via requests
167172
wrapt==1.16.0
168173
# via deprecated
169-
yarl==1.9.4
174+
yarl==1.11.1
170175
# via aiohttp
171-
zipp==3.19.1
176+
zipp==3.20.2
172177
# via importlib-metadata

src/graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from configparser import SectionProxy
55
from azure.identity import DeviceCodeCredential
6-
from msgraph import GraphServiceClient
6+
from msgraph.graph_service_client import GraphServiceClient
77

88
# pylint: disable=too-few-public-methods
99
class Graph:

src/snippets/create_clients.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ClientSecretCredential,
1111
CertificateCredential,
1212
OnBehalfOfCredential)
13-
from msgraph import GraphServiceClient
13+
from msgraph.graph_service_client import GraphServiceClient
1414

1515
class CreateClients:
1616
@staticmethod

src/snippets/create_requests.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
from msgraph import GraphServiceClient
4+
from kiota_abstractions.base_request_configuration import RequestConfiguration
55
from msgraph.generated.users.item.user_item_request_builder import UserItemRequestBuilder
66
from msgraph.generated.users.item.messages.messages_request_builder import MessagesRequestBuilder
77
from msgraph.generated.users.item.messages.item.message_item_request_builder import (
88
MessageItemRequestBuilder)
9-
from msgraph.generated.users.item.events.events_request_builder import EventsRequestBuilder
109
from msgraph.generated.users.item.calendar_view.calendar_view_request_builder import (
1110
CalendarViewRequestBuilder)
1211
from msgraph.generated.groups.groups_request_builder import GroupsRequestBuilder
@@ -18,6 +17,7 @@
1817
from msgraph.generated.models.giphy_rating_type import GiphyRatingType
1918
from msgraph.generated.models.message_collection_response import MessageCollectionResponse
2019
from msgraph.generated.models.event_collection_response import EventCollectionResponse
20+
from msgraph.graph_service_client import GraphServiceClient
2121

2222
class CreateRequests:
2323
@staticmethod
@@ -37,7 +37,7 @@ async def run_all_samples(graph_client: GraphServiceClient) -> None:
3737
filter='resourceProvisioningOptions/Any(x:x eq \'Team\')'
3838
)
3939

40-
config = GroupsRequestBuilder.GroupsRequestBuilderGetRequestConfiguration(
40+
config = RequestConfiguration(
4141
query_parameters=query_params
4242
)
4343

@@ -77,7 +77,7 @@ async def make_select_request(graph_client: GraphServiceClient) -> User | None:
7777
select=['displayName', 'jobTitle']
7878
)
7979

80-
config = UserItemRequestBuilder.UserItemRequestBuilderGetRequestConfiguration(
80+
config = RequestConfiguration(
8181
query_parameters=query_params
8282
)
8383

@@ -99,7 +99,7 @@ async def make_list_request(
9999
filter='subject eq \'Hello world\''
100100
)
101101

102-
config = MessagesRequestBuilder.MessagesRequestBuilderGetRequestConfiguration(
102+
config = RequestConfiguration(
103103
query_parameters=query_params
104104
)
105105

@@ -131,7 +131,7 @@ async def make_expand_request(
131131
expand=['attachments']
132132
)
133133

134-
config = MessageItemRequestBuilder.MessageItemRequestBuilderGetRequestConfiguration(
134+
config = RequestConfiguration(
135135
query_parameters=query_params
136136
)
137137

@@ -188,7 +188,7 @@ async def make_headers_request(
188188
# GET https://graph.microsoft.com/v1.0/me/events
189189

190190
# msgraph.generated.users.item.events.events_request_builder
191-
config = EventsRequestBuilder.EventsRequestBuilderGetRequestConfiguration()
191+
config = RequestConfiguration()
192192
config.headers.add('Prefer', 'outlook.timezone="Pacific Standard Time"')
193193

194194
events = await graph_client.me.events.get(config)
@@ -209,7 +209,7 @@ async def make_query_parameters_request(
209209
end_date_time='2023-06-15T00:00:00Z'
210210
)
211211

212-
config = CalendarViewRequestBuilder.CalendarViewRequestBuilderGetRequestConfiguration(
212+
config = RequestConfiguration(
213213
query_parameters=query_params
214214
)
215215

src/snippets/custom_clients.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from typing import List
55
from azure.core.credentials import TokenCredential
66
from azure.identity import DeviceCodeCredential
7-
from msgraph import GraphServiceClient, GraphRequestAdapter
7+
from msgraph.graph_service_client import GraphServiceClient
8+
from msgraph.graph_request_adapter import GraphRequestAdapter
89
from msgraph_core import GraphClientFactory
910
from kiota_authentication_azure.azure_identity_authentication_provider import (
1011
AzureIdentityAuthenticationProvider)

src/snippets/national_clouds.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
from azure.identity import InteractiveBrowserCredential
55
from kiota_authentication_azure.azure_identity_authentication_provider import (
66
AzureIdentityAuthenticationProvider)
7-
from msgraph import GraphServiceClient, GraphRequestAdapter
7+
from msgraph.graph_service_client import GraphServiceClient
8+
from msgraph.graph_request_adapter import GraphRequestAdapter
89
from msgraph_core import GraphClientFactory, NationalClouds
910

1011
# pylint: disable=too-few-public-methods

0 commit comments

Comments
 (0)