Skip to content
Open
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
3 changes: 3 additions & 0 deletions stubs/auth0-python/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ auth0\..*_async

# Inconsistently implemented, ommitted
auth0\.management\.Auth0\..*

# See https://github.com/auth0/auth0-python/issues/732
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# See https://github.com/auth0/auth0-python/issues/732
# Runtime __all__ lists "NetworkAclsOrganizations" instead of "NetworkAcls"
# and "Organizations" due to a missing comma in the definition
# See https://github.com/auth0/auth0-python/issues/732

auth0.management.__all__
2 changes: 1 addition & 1 deletion stubs/auth0-python/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "4.10.*"
version = "4.11.*"
upstream_repository = "https://github.com/auth0/auth0-python"
requires = ["cryptography", "types-requests"]
2 changes: 2 additions & 0 deletions stubs/auth0-python/auth0/management/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ from .hooks import Hooks
from .jobs import Jobs
from .log_streams import LogStreams
from .logs import Logs
from .network_acls import NetworkAcls
from .organizations import Organizations
from .resource_servers import ResourceServers
from .roles import Roles
Expand Down Expand Up @@ -50,6 +51,7 @@ __all__ = (
"Jobs",
"LogStreams",
"Logs",
"NetworkAcls",
"Organizations",
Comment on lines +54 to 55
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally sure what what's best to include here given auth0/auth0-python#732.

I guess one alternative would be to hold off updating the stubs until auth0-python fixes the __all__ issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind waiting for the library to be updated if they don't change semantic version.
For now we can leave it as is

"ResourceServers",
"Roles",
Expand Down
2 changes: 2 additions & 0 deletions stubs/auth0-python/auth0/management/auth0.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ from .hooks import Hooks
from .jobs import Jobs
from .log_streams import LogStreams
from .logs import Logs
from .network_acls import NetworkAcls
from .organizations import Organizations
from .prompts import Prompts
from .resource_servers import ResourceServers
Expand Down Expand Up @@ -51,6 +52,7 @@ class Auth0:
jobs: Jobs
log_streams: LogStreams
logs: Logs
network_acls: NetworkAcls
organizations: Organizations
prompts: Prompts
resource_servers: ResourceServers
Expand Down
24 changes: 24 additions & 0 deletions stubs/auth0-python/auth0/management/network_acls.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from _typeshed import Incomplete

from ..rest import RestClient, RestClientOptions
from ..types import TimeoutType

class NetworkAcls:
domain: str
protocol: str
client: RestClient
def __init__(
self,
domain: str,
token: str,
telemetry: bool = True,
timeout: TimeoutType = 5.0,
protocol: str = "https",
rest_options: RestClientOptions | None = None,
) -> None: ...
def all(self, page: int = 0, per_page: int = 25, include_totals: bool = True) -> list[dict[str, Incomplete]]: ...
Copy link
Contributor Author

@donBarbos donBarbos Sep 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR: I used dict[str, Incomplete] even though the source code uses dict[str, Any] because this approach is also used in other types for these stubs

def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ...
def get(self, id: str) -> dict[str, Incomplete]: ...
def delete(self, id: str) -> None: ...
def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ...
def update_partial(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ...
Loading