Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a39c90

Browse files
authoredJan 29, 2025
Consolidated Community PRs and Dependency Upgrades (#660)
### Changes #### **Community Raised PRs** This PR contains the following community raised PRs : - [fix typo in docstring](#637) - [Added support for "include_totals" to all_organization_member_roles](#635) - [Fixed Version Table](#633) - [Remove upper bounds on all python dependency versions](#628) - [Adding secrets to Codecov Action Upload](#624) #### **Dependabot PRs** List of bumped up dependancy versions : - [pyopenssl](#658) - [pyyaml](#657) - [frozenlist](#656) - [argcomplete](#655) - [cffi](#654) ### Testing - [x] **This change adds test coverage.** - [x] **This change has been tested on the latest version of the platform/language**. ### Contributor Checklist - [x] I agree to adhere to the [Auth0 General Contribution Guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md). - [x] I agree to uphold the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
1 parent 66429f1 commit 8a39c90

File tree

9 files changed

+329
-254
lines changed

9 files changed

+329
-254
lines changed
 

‎.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,5 @@ jobs:
8181
- if: ${{ matrix.python-version == '3.10' }}
8282
name: Upload coverage
8383
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # pin@5.3.1
84+
with:
85+
token: ${{ secrets.CODECOV_TOKEN }}

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The following is a list of unsupported Python versions, and the last SDK version
145145

146146
| Python Version | Last SDK Version Supporting |
147147
|----------------|-----------------------------|
148-
| <= 3.7 | 4.6.1 |
148+
| >= 3.7 | 4.6.1 |
149149
| >= 2.0, <= 3.6 | 3.x |
150150

151151
You can determine what version of Python you have installed by running:

‎auth0/authentication/async_token_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ async def verify(
176176
token (str): The JWT to verify.
177177
nonce (str, optional): The nonce value sent during authentication.
178178
max_age (int, optional): The max_age value sent during authentication.
179-
organization (str, optional): The expected organization ID (org_id) or orgnization name (org_name) claim value. This should be specified
179+
organization (str, optional): The expected organization ID (org_id) or organization name (org_name) claim value. This should be specified
180180
when logging in to an organization.
181181
182182
Returns:

‎auth0/authentication/token_verifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def verify(
299299
token (str): The JWT to verify.
300300
nonce (str, optional): The nonce value sent during authentication.
301301
max_age (int, optional): The max_age value sent during authentication.
302-
organization (str, optional): The expected organization ID (org_id) or orgnization name (org_name) claim value. This should be specified
302+
organization (str, optional): The expected organization ID (org_id) or organization name (org_name) claim value. This should be specified
303303
when logging in to an organization.
304304
305305
Returns:

‎auth0/management/organizations.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def all_organization_member_roles(
329329
user_id: str,
330330
page: int | None = None,
331331
per_page: int | None = None,
332+
include_totals: bool = False,
332333
) -> list[dict[str, Any]]:
333334
"""Retrieves a list of all the roles from the given organization member.
334335
@@ -343,9 +344,16 @@ def all_organization_member_roles(
343344
per_page (int, optional): The amount of entries per page. When not set,
344345
the default value is up to the server.
345346
347+
include_totals (bool, optional): True if the query summary is
348+
to be included in the result, False otherwise. Defaults to False.
349+
346350
See: https://auth0.com/docs/api/management/v2#!/Organizations/get_organization_member_roles
347351
"""
348-
params = {"page": page, "per_page": per_page}
352+
params = {
353+
"page": page,
354+
"per_page": per_page,
355+
"include_totals": str(include_totals).lower()
356+
}
349357
return self.client.get(
350358
self._url(id, "members", user_id, "roles"), params=params
351359
)

‎auth0/test/management/test_organizations.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,18 +342,32 @@ def test_all_organization_member_roles(self, mock_rc):
342342
"https://domain/api/v2/organizations/test-org/members/test-user/roles",
343343
args[0],
344344
)
345-
self.assertEqual(kwargs["params"], {"page": None, "per_page": None})
345+
self.assertEqual(
346+
kwargs["params"],
347+
{
348+
"page": None,
349+
"per_page": None,
350+
"include_totals": "false",
351+
}
352+
)
346353

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

350357
args, kwargs = mock_instance.get.call_args
351358

352359
self.assertEqual(
353360
"https://domain/api/v2/organizations/test-org/members/test-user/roles",
354361
args[0],
355362
)
356-
self.assertEqual(kwargs["params"], {"page": 7, "per_page": 25})
363+
self.assertEqual(
364+
kwargs["params"],
365+
{
366+
"page": 7,
367+
"per_page": 25,
368+
"include_totals": "true",
369+
}
370+
)
357371

358372
@mock.patch("auth0.management.organizations.RestClient")
359373
def test_create_organization_member_roles(self, mock_rc):

‎poetry.lock

Lines changed: 288 additions & 237 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ folders = [{ path = "auth0" }]
2727

2828
[tool.poetry.dependencies]
2929
python = ">=3.8"
30-
aiohttp = "^3.10.11"
31-
cryptography = "^43.0.1" # pyjwt has a weak dependency on cryptography
32-
pyjwt = "^2.8.0"
33-
requests = "^2.32.3"
34-
urllib3 = "^2.2.3" # requests has a weak dependency on urllib3
30+
aiohttp = ">=3.10.11"
31+
cryptography = ">=43.0.1" # pyjwt has a weak dependency on cryptography
32+
pyjwt = ">=2.8.0"
33+
requests = ">=2.32.3"
34+
urllib3 = ">=2.2.3" # requests has a weak dependency on urllib3
3535

3636
[tool.poetry.group.dev.dependencies]
3737
aioresponses = "^0.7.4"

‎requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
aiohttp==3.8.6 ; python_version >= "3.7" and python_version < "4.0"
22
aioresponses==0.7.4 ; python_version >= "3.7" and python_version < "4.0"
33
aiosignal==1.3.1 ; python_version >= "3.7" and python_version < "4.0"
4-
argcomplete==3.1.1 ; python_version >= "3.7" and python_version < "4.0"
4+
argcomplete==3.5.3 ; python_version >= "3.7" and python_version < "4.0"
55
async-timeout==4.0.3 ; python_version >= "3.7" and python_version < "4.0"
66
asynctest==0.13.0 ; python_version >= "3.7" and python_version < "3.8"
77
attrs==23.1.0 ; python_version >= "3.7" and python_version < "4.0"
88
certifi==2023.11.17 ; python_version >= "3.7" and python_version < "4.0"
9-
cffi==1.15.1 ; python_version >= "3.7" and python_version < "4.0"
9+
cffi==1.17.1 ; python_version >= "3.7" and python_version < "4.0"
1010
charset-normalizer==3.2.0 ; python_version >= "3.7" and python_version < "4.0"
1111
click==8.1.7 ; python_version >= "3.7" and python_version < "4.0"
1212
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"
1313
coverage[toml]==7.2.7 ; python_version >= "3.7" and python_version < "4.0"
1414
cryptography==43.0.1 ; python_version >= "3.7" and python_version < "4.0"
1515
exceptiongroup==1.1.3 ; python_version >= "3.7" and python_version < "3.11"
16-
frozenlist==1.3.3 ; python_version >= "3.7" and python_version < "4.0"
16+
frozenlist==1.5.0 ; python_version >= "3.7" and python_version < "4.0"
1717
idna==3.10 ; python_version >= "3.7" and python_version < "4.0"
1818
importlib-metadata==6.7.0 ; python_version >= "3.7" and python_version < "3.8"
1919
iniconfig==2.0.0 ; python_version >= "3.7" and python_version < "4.0"
@@ -24,12 +24,12 @@ pipx==1.2.0 ; python_version >= "3.7" and python_version < "4.0"
2424
pluggy==1.2.0 ; python_version >= "3.7" and python_version < "4.0"
2525
pycparser==2.21 ; python_version >= "3.7" and python_version < "4.0"
2626
pyjwt==2.8.0 ; python_version >= "3.7" and python_version < "4.0"
27-
pyopenssl==23.2.0 ; python_version >= "3.7" and python_version < "4.0"
27+
pyopenssl==23.3.0 ; python_version >= "3.7" and python_version < "4.0"
2828
pytest-aiohttp==1.0.4 ; python_version >= "3.7" and python_version < "4.0"
2929
pytest-asyncio==0.23.8 ; python_version >= "3.7" and python_version < "4.0"
3030
pytest-cov==4.1.0 ; python_version >= "3.7" and python_version < "4.0"
3131
pytest==7.4.0 ; python_version >= "3.7" and python_version < "4.0"
32-
pyyaml==6.0.1 ; python_version >= "3.7" and python_version < "4.0"
32+
pyyaml==6.0.2 ; python_version >= "3.7" and python_version < "4.0"
3333
requests==2.31.0 ; python_version >= "3.7" and python_version < "4.0"
3434
responses==0.23.3 ; python_version >= "3.7" and python_version < "4.0"
3535
tomli==2.0.1 ; python_version >= "3.7" and python_full_version <= "3.11.0a6"

0 commit comments

Comments
 (0)