Skip to content

lazy import breaks google-auth library #28

@racinmat

Description

@racinmat

Using https://pypi.org/project/google-auth/ and

import google.auth.transport._http_client
google.auth.transport._http_client.Request()

works, but when I lazy-load the google-auth, like this

import lazy_import
lazy_import.lazy_module("google.auth")
import google.auth.transport._http_client
google.auth.transport._http_client.Request()

I get AttributeError: module 'google.auth.transport' has no attribute '_http_client'. Did you mean: 'http_client'?

The same issue happens on the https://github.com/gdb/lazy_import fork, which is registered as https://pypi.org/project/lazy-import-plus/, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions