Skip to content

Commit

Permalink
Merge branch 'main' into update-label-needs-author-feedback-to-curren…
Browse files Browse the repository at this point in the history
…t-label-in-use
  • Loading branch information
baywet authored Jun 19, 2024
2 parents 0621003 + 41ed13c commit cb5a51d
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@microsoftgraph/msgraph-devx-python-write
* @microsoftgraph/msgraph-devx-python-write
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.

name: msgraph-sdk-python-core-branch-protection
description: Branch protection policy for the msgraph-sdk-python-core repository
resource: repository
Expand Down Expand Up @@ -37,6 +35,7 @@ configuration:
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- CodeQL
- check-build-matrix
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
Expand Down Expand Up @@ -72,6 +71,7 @@ configuration:
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
requiredStatusChecks:
- CodeQL
- check-build-matrix
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
requiresStrictStatusChecks: true
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-merge-dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,17 @@ jobs:
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}

# The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
check-build-matrix:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: All build matrix options are successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: One or more build matrix options failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
10 changes: 5 additions & 5 deletions .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ on:
types:
- opened
branches:
- 'main'
- "main"

jobs:
track_issue:
if: github.actor != 'dependabot[bot]'
if: github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.fork == false
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
uses: actions/create-github-app-token@v1
with:
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
app-id: ${{ secrets.GRAPHBOT_APP_ID }}
private-key: ${{ secrets.GRAPHBOT_APP_PEM }}

- name: Get project data
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
Expand Down
26 changes: 13 additions & 13 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ asyncmock==0.4.2

attrs==23.2.0 ; python_version >= '3.7'

azure-core==1.30.1 ; python_version >= '3.7'
azure-core==1.30.2 ; python_version >= '3.7'

azure-identity==1.16.0
azure-identity==1.17.0

build==1.2.1

Expand All @@ -26,15 +26,15 @@ colorama==0.4.6 ; os_name == 'nt'

coverage[toml]==7.5.3 ; python_version >= '3.7'

cryptography==42.0.7 ; python_version >= '3.7'
cryptography==42.0.8 ; python_version >= '3.7'

dill==0.3.6 ; python_version < '3.11'

exceptiongroup==1.1.1 ; python_version < '3.11'

idna==3.7 ; python_version >= '3.5'

importlib-metadata==6.8.0 ; python_version >= '3.7'
importlib-metadata==7.1.0 ; python_version >= '3.7'

iniconfig==2.0.0 ; python_version >= '3.7'

Expand All @@ -50,7 +50,7 @@ mccabe==0.7.0 ; python_version >= '3.6'

mock==5.1.0 ; python_version >= '3.6'

msal==1.28.0
msal==1.28.1

msal-extensions==1.1.0

Expand All @@ -60,7 +60,7 @@ mypy-extensions==1.0.0 ; python_version >= '3.5'

outcome==1.3.0.post0 ; python_version >= '3.7'

packaging==24.0 ; python_version >= '3.7'
packaging==24.1 ; python_version >= '3.7'

pathlib2==2.3.7.post1

Expand All @@ -74,13 +74,13 @@ pycparser==2.22

pyjwt[crypto]==2.8.0 ; python_version >= '3.7'

pylint==3.2.2
pylint==3.2.3

pyproject-hooks==1.1.0 ; python_version >= '3.7'

pytest==8.2.1
pytest==8.2.2

pytest-cov==4.1.0
pytest-cov==5.0.0

pytest-mock==3.14.0

Expand All @@ -92,7 +92,7 @@ pywin32==306 ; platform_system == 'Windows'

requests==2.32.3 ; python_version >= '3.7'

setuptools==69.5.1
setuptools==70.0.0

six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'

Expand All @@ -111,15 +111,15 @@ trio==0.25.1
types-python-dateutil==2.9.0.20240316

types-requests==2.32.0.20240602; python_version >= '3.7'
urllib3==2.2.1 ; python_version >= '3.7'
typing-extensions==4.12.1 ; python_version >= '3.7'
urllib3==2.2.2 ; python_version >= '3.7'
typing-extensions==4.12.2 ; python_version >= '3.7'


wrapt==1.15.0 ; python_version < '3.11'

yapf==0.40.2

zipp==3.19.1 ; python_version >= '3.7'
zipp==3.19.2 ; python_version >= '3.7'

aiohttp==3.9.5 ; python_version >= '3.6'

Expand Down
5 changes: 4 additions & 1 deletion src/msgraph_core/tasks/page_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ def __init__(
parsable_factory = type(response)
elif constructor_callable is None:
parsable_factory = PageResult
else:
raise ValueError(
'One of the constructor_callable or the PageResult type parameter is required.'
)
self.parsable_factory = parsable_factory
self.pause_index = 0
self.headers: HeadersCollection = HeadersCollection()
Expand Down Expand Up @@ -141,7 +145,6 @@ async def next(self) -> Optional[PageResult]:
if self.current_page is not None and not self.current_page.odata_next_link:
return None
response = await self.fetch_next_page()
print(f"Response - {type(response)}")
page: PageResult = PageResult(response.odata_next_link, response.value) # type: ignore
return page

Expand Down

0 comments on commit cb5a51d

Please sign in to comment.