Skip to content
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

[Python APIView] optional dependencies in public API #9612

Open
swathipil opened this issue Jan 9, 2025 · 1 comment
Open

[Python APIView] optional dependencies in public API #9612

swathipil opened this issue Jan 9, 2025 · 1 comment
Assignees

Comments

@swathipil
Copy link
Member

We want to make sure that we can load and parse libraries that use optional dependencies in the API. Currently, the parser fails because we haven't imported necessary dependencies.

Example: azure-quantum.

Best fix currently: Read and install dependencies from extras using the pkg_resources module before parsing.

@lmazuel
Copy link
Member

lmazuel commented Jan 9, 2025

Note that some extra can be OS requirements like

    extras_require={
        ':sys_platform == "win32"': [
            'windows-specific-package1',
            'windows-specific-package2',
        ],
    },

That means to install only on Windows. so we likely wouldn't want to install that blindly. I'm sure pkg_resources provides some form of helper to recognize who's is what (maybe the starting : is a sign, that we should ignore that key? Just thinking out loud)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants