Skip to content

Comments

chore: make aiohttp an optional dependency for REST #919

Open
AayushSaini101 wants to merge 1 commit intoatlanhq:mainfrom
AayushSaini101:771
Open

chore: make aiohttp an optional dependency for REST #919
AayushSaini101 wants to merge 1 commit intoatlanhq:mainfrom
AayushSaini101:771

Conversation

@AayushSaini101
Copy link

Related: #771

Changelog

  • Move aiohttp from main dependencies to optional 'rest' extra group
  • Add lazy import with helpful error message in AtlanAuthClient
  • Update documentation to indicate 'rest' extra requirement

Additional context (e.g. screenshots, logs, links)

  • to be added

Checklist

  • Additional tests added
  • All CI checks passed
  • Relevant documentation updated

Copyleft License Compliance

  • Have you used any code that is subject to a Copyleft license (e.g., GPL, AGPL, LGPL)?
  • If yes, have you modified the code in the context of this project? please share additional details.

Comment on lines +8 to +22
if TYPE_CHECKING:
import aiohttp


def _get_aiohttp() -> "aiohttp":
"""Lazy import aiohttp with helpful error message."""
try:
import aiohttp

return aiohttp
except ImportError:
raise ImportError(
"aiohttp is required for REST authentication. "
"Install it with: pip install 'atlan-application-sdk[rest]'"
) from None
Copy link
Member

Choose a reason for hiding this comment

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

(nit) this block shouldn't be between two imports - ref

Copy link
Member

@inishchith inishchith left a comment

Choose a reason for hiding this comment

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

I think #771 is stale since the introduction of httpx into the codebase. we might need to review the outcomes we want from the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants