8000 Consolidated Community PRs and Dependency Upgrades by kishore7snehil · Pull Request #660 · auth0/auth0-python · GitHub
[go: up one dir, main page]

Skip to content

Consolidated Community PRs and Dependency Upgrades #660

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

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@ jobs:
- if: ${{ matrix.python-version == '3.10' }}
name: Upload coverage
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # pin@5.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ The following is a list of unsupported Python versions, and the last SDK version

| Python Version | Last SDK Version Supporting |
|----------------|-----------------------------|
| <= 3.7 | 4.6.1 |
| >= 3.7 | 4.6.1 |
| >= 2.0, <= 3.6 | 3.x |

You can determine what version of Python you have installed by running:
Expand Down
2 changes: 1 addition & 1 deletion auth0/authentication/async_token_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def verify(
token (str): The JWT to verify.
nonce (str, optional): The nonce value sent during authentication.
max_age (int, optional): The max_age value sent during authentication.
organization (str, optional): The expected organization ID (org_id) or orgnization name (org_name) claim value. This should be specified
organization (str, optional): The expected organization ID (org_id) or organization name (org_name) claim value. This should be specified
when logging in to an organization.

Returns:
Expand Down
2 changes: 1 addition & 1 deletion auth0/authentication/token_verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def verify(
token (str): The JWT to verify.
nonce (str, optional): The nonce value sent during authentication.
max_age (int, optional): The max_age value sent during authentication.
organization (str, optional): The expected organization ID (org_id) or orgnization name (org_name) claim value. This should be specified
organization (str, optional): The expected organization ID (org_id) or organization name (org_name) claim value. This should be specified
when logging in to an organization.

Returns:
Expand Down
10 changes: 9 additions & 1 deletion auth0/management/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ def all_organization_member_roles(
user_id: str,
page: int | None = None,
per_page: int | None = None,
include_totals: bool = False,
) -> list[dict[str, Any]]:
"""Retrieves a list of all the roles from the given organization member.

Expand All @@ -343,9 +344,16 @@ def all_organization_member_roles(
per_page (int, optional): The amount of entries per page. When not set,
the default value is up to the server.

include_totals (bool, optional): True if the query summary is
to be included in the result, False otherwise. Defaults to False.

See: https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles
"""
params = {"page": page, "per_page": per_page}
params = {
"page": page,
"per_page": per_page,
"include_totals": str(include_totals).lower()
}
return self.client.get(
self._url(id, "members", user_id, "roles"), params=params
)
Expand Down
20 changes: 17 additions & 3 deletions auth0/test/management/test_organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,18 +342,32 @@ def test_all_organization_member_roles(self, mock_rc):
"https://domain/api/v2/organizations/test-org/members/test-user/roles",
args[0],
)
self.assertEqual(kwargs["params"], {"page": None, "per_page": None})
self.assertEqual(
kwargs["params"],
{
"page": None,
"per_page": None,
"include_totals": "false",
}
)

# Specific pagination
c.all_organization_member_roles("test-org", "test-user", page=7, per_page=25)
c.all_organization_member_roles("test-org", "test-user", page=7, per_page=25, include_totals=True)

args, kwargs = mock_instance.get.call_args

self.assertEqual(
"https://domain/api/v2/organizations/test-org/members/test-user/roles",
args[0],
)
self.assertEqual(kwargs["params"], {"page": 7, "per_page": 25})
self.assertEqual(
kwargs["params"],
{
"page": 7,
"per_page": 25,
"include_totals": "true",
}
)

@mock.patch("auth0.management.organizations.RestClient")
def test_create_organization_member_roles(self, mock_rc):
629A Expand Down
525 changes: 288 additions & 237 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ folders = [{ path = "auth0" }]

[tool.poetry.dependencies]
python = ">=3.8"
aiohttp = "^3.10.11"
cryptography = "^43.0.1" # pyjwt has a weak dependency on cryptography
pyjwt = "^2.8.0"
requests = "^2.32.3"
urllib3 = "^2.2.3" # requests has a weak dependency on urllib3
aiohttp = ">=3.10.11"
cryptography = ">=43.0.1" # pyjwt has a weak dependency on cryptography
pyjwt = ">=2.8.0"
requests = ">=2.32.3"
urllib3 = ">=2.2.3" # requests has a weak dependency on urllib3

[tool.poetry.group.dev.dependencies]
aioresponses = "^0.7.4"
Expand Down
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
aiohttp==3.8.6 ; python_version >= "3.7" and python_version < "4.0"
aioresponses==0.7.4 ; python_version >= "3.7" and python_version < "4.0"
aiosignal==1.3.1 ; python_version >= "3.7" and python_version < "4.0"
argcomplete==3.1.1 ; python_version >= "3.7" and python_version < "4.0"
argcomplete==3.5.3 ; python_version >= "3.7" and python_version < "4.0"
async-timeout==4.0.3 ; python_version >= "3.7" and python_version < "4.0"
asynctest==0.13.0 ; python_version >= "3.7" and python_version < "3.8"
attrs==23.1.0 ; python_version >= "3.7" and python_version < "4.0"
certifi==2023.11.17 ; python_version >= "3.7" and python_version < "4.0"
cffi==1.15.1 ; python_version >= "3.7" and python_version < "4.0"
cffi==1.17.1 ; python_version >= "3.7" and python_version < "4.0"
charset-normalizer==3.2.0 ; python_version >= "3.7" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.7" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.7" and python_version < "4.0" and sys_platform == "win32" or python_version >= "3.7" and python_version < "4.0" and platform_system == "Windows"
coverage[toml]==7.2.7 ; python_version >= "3.7" and python_version < "4.0"
cryptography==43.0.1 ; python_version >= "3.7" and python_version < "4.0"
exceptiongroup==1.1.3 ; python_version >= "3.7" and python_version < "3.11"
frozenlist==1.3.3 ; python_version >= "3.7" and python_version < "4.0"
frozenlist==1.5.0 ; python_version >= "3.7" and python_version < "4.0"
idna==3.10 ; python_version >= "3.7" and python_version < "4.0"
importlib-metadata==6.7.0 ; python_version >= "3.7" and python_version < "3.8"
iniconfig==2.0.0 ; python_version >= "3.7" and python_version < "4.0"
Expand All @@ -24,12 +24,12 @@ pipx==1.2.0 ; python_version >= "3.7" and python_version < "4.0"
pluggy==1.2.0 ; python_version >= "3.7" and python_version < "4.0"
pycparser==2.21 ; python_version >= "3.7" and python_version < "4.0"
pyjwt==2.8.0 ; python_version >= "3.7" and python_version < "4.0"
pyopenssl==23.2.0 ; python_version >= "3.7" and python_version < "4.0"
pyopenssl==23.3.0 ; python_version >= "3.7" and python_version < "4.0"
pytest-aiohttp==1.0.4 ; python_version >= "3.7" and python_version < "4.0"
pytest-asyncio==0.23.8 ; python_version >= "3.7" and python_version < "4.0"
pytest-cov==4.1.0 ; python_version >= "3.7" and python_version < "4.0"
pytest==7.4.0 ; python_version >= "3.7" and python_version < "4.0"
pyyaml==6.0.1 ; python_version >= "3.7" and python_version < "4.0"
pyyaml==6.0.2 ; python_version >= "3.7" and python_version < "4.0"
requests==2.31.0 ; python_version >= "3.7" and python_version < "4.0"
responses==0.23.3 ; python_version >= "3.7" and python_version < "4.0"
tomli==2.0.1 ; python_version >= "3.7" and python_full_version <= "3.11.0a6"
Expand Down
0