Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/kiota core dependency #141

Merged
merged 41 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a87b64a
Add kiota core dependencies
samwelkanda Oct 17, 2022
1f7dcab
Update auth handler to new middleware format
samwelkanda Oct 17, 2022
0ce79a2
Update telemetry handler
samwelkanda Oct 17, 2022
71baca9
Code formatting changes
samwelkanda Oct 17, 2022
6a28617
Update middleware pipeline to take dependency on kiota core
samwelkanda Oct 17, 2022
a8efe82
Refactor graph client and factory
samwelkanda Oct 17, 2022
6b34cf0
Update existing middleware
samwelkanda Oct 19, 2022
b1e8dfb
Add redirect handler
samwelkanda Oct 19, 2022
e1e5bfa
Add a retry handler
samwelkanda Oct 19, 2022
50430fa
Update request context with types
samwelkanda Oct 19, 2022
dbd531b
Remove unnecessary files
samwelkanda Oct 19, 2022
8701a8f
Harmonize client and factory factory to
samwelkanda Oct 19, 2022
5bb4754
Update graph client tests
samwelkanda Oct 21, 2022
2dc0bb2
Add more graph client tests
samwelkanda Oct 21, 2022
df0936c
Update graph client factory tests
samwelkanda Oct 21, 2022
cb989de
Code formatting
samwelkanda Oct 21, 2022
339abe9
Add trio async test runner environment
samwelkanda Oct 26, 2022
b27c07d
Set intuitive graph client and factory kwargs
samwelkanda Oct 26, 2022
6548c14
Correct argument names
samwelkanda Oct 26, 2022
41e028a
Add request property to response
samwelkanda Oct 26, 2022
78f7228
Fix redirect handler
samwelkanda Oct 26, 2022
d2c1187
Update argument names
samwelkanda Oct 26, 2022
55159f6
Convert url objects to string
samwelkanda Oct 26, 2022
a8c2205
Update http test suite
samwelkanda Oct 26, 2022
c5819d4
Remove python 3.5 support
samwelkanda Oct 27, 2022
7fb90ad
Ensure request context property is set when redirecting
samwelkanda Oct 27, 2022
ce0f541
Update client docstrings
samwelkanda Oct 27, 2022
abccacb
Update kiota http package
samwelkanda Oct 27, 2022
d690941
Refactor graph client factory
samwelkanda Oct 28, 2022
3c7f84a
Update graph client
samwelkanda Oct 28, 2022
13147d3
Add graph request adapter
samwelkanda Oct 28, 2022
9c1b19e
Update tests
samwelkanda Oct 28, 2022
7cd67e4
Pip kiota dependencies to specific versions
samwelkanda Oct 31, 2022
ffb0495
Update graph client factory and adapter
samwelkanda Nov 1, 2022
8cd221f
Remove duplicate files already in http core
samwelkanda Nov 1, 2022
240205f
Update telemetry handler to set context and feature flags
samwelkanda Nov 1, 2022
7743c4a
Update tests
samwelkanda Nov 1, 2022
159efdc
Update to latest changes from kiota http
samwelkanda Nov 2, 2022
b25f4ac
Bump kiota http to version 0.2.0
samwelkanda Nov 2, 2022
6c3ab57
Merge pull request #142 from microsoftgraph/task/kiota-core-migration
samwelkanda Nov 3, 2022
b576910
Rename adapter to BaseGraphRequestAdapter
samwelkanda Nov 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

7 changes: 5 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ verify_ssl = true
name = "pypi"

[packages] # Packages required to run the application
microsoft-kiota-http = "*"
microsoft-kiota-abstractions = "==0.1.0"
microsoft-kiota-http = "==0.2.0"
microsoft-kiota-authentication-azure = "==0.1.0"
httpx = {version = "==0.23.0", extras = ["http2"]}

[dev-packages] # Packages required to develop the application
Expand All @@ -17,7 +19,8 @@ pytest = "==7.1.3"
pytest-cov = "==4.0.0"
types-python-dateutil = "*"
toml = "==0.10.2"
pytest-asyncio = "==0.19.0"
pytest-trio = "==0.7.0"
pytest-mock = "==3.10.0"
asyncmock = "==0.4.2"
azure-identity = "*"
trio = "==0.22.0"
605 changes: 494 additions & 111 deletions Pipfile.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions msgraph/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from ._client_factory import HTTPClientFactory
from ._constants import SDK_VERSION
from ._enums import APIVersion, NationalClouds
from ._graph_client import GraphClient
from .base_graph_request_adapter import BaseGraphRequestAdapter
from .graph_client_factory import GraphClientFactory

__version__ = SDK_VERSION
94 changes: 0 additions & 94 deletions msgraph/core/_client_factory.py

This file was deleted.

176 changes: 0 additions & 176 deletions msgraph/core/_graph_client.py

This file was deleted.

29 changes: 29 additions & 0 deletions msgraph/core/base_graph_request_adapter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import httpx
from kiota_abstractions.authentication import AuthenticationProvider
from kiota_abstractions.serialization import (
ParseNodeFactory,
ParseNodeFactoryRegistry,
SerializationWriterFactory,
SerializationWriterFactoryRegistry,
)
from kiota_http.httpx_request_adapter import HttpxRequestAdapter

from .graph_client_factory import GraphClientFactory


class BaseGraphRequestAdapter(HttpxRequestAdapter):

def __init__(
self,
authentication_provider: AuthenticationProvider,
parse_node_factory: ParseNodeFactory = ParseNodeFactoryRegistry(),
serialization_writer_factory:
SerializationWriterFactory = SerializationWriterFactoryRegistry(),
http_client: httpx.AsyncClient = GraphClientFactory.create_with_default_middleware()
) -> None:
super().__init__(
authentication_provider=authentication_provider,
parse_node_factory=parse_node_factory,
serialization_writer_factory=serialization_writer_factory,
http_client=http_client
)
Loading