Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919435 - dev-python/google-api-core: missing dev-python/grpcio dependency
Summary: dev-python/google-api-core: missing dev-python/grpcio dependency
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-08 08:39 UTC by Anton Bolshakov
Modified: 2024-05-01 13:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,7.36 KB, text/plain)
2023-12-08 08:40 UTC, Anton Bolshakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2023-12-08 08:39:34 UTC
The missing package is: dev-python/grpcio
See: https://github.com/googleapis/python-api-core/blob/main/setup.py#L37

Example of failure:
bash$ ./generativeai_official.py
  File "./generativeai_official.py", line 21, in <module>
    import google.generativeai as palm
  File "/usr/lib/python3.11/site-packages/google/generativeai/__init__.py", line 71, in <module>
    from google.generativeai import types
  File "/usr/lib/python3.11/site-packages/google/generativeai/types/__init__.py", line 17, in <module>
    from google.generativeai.types.discuss_types import *
  File "/usr/lib/python3.11/site-packages/google/generativeai/types/discuss_types.py", line 21, in <module>
    import google.ai.generativelanguage as glm
  File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage/__init__.py", line 21, in <module>
    from google.ai.generativelanguage_v1beta3.services.discuss_service.async_client import (
  File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/__init__.py", line 21, in <module>
    from .services.discuss_service import DiscussServiceAsyncClient, DiscussServiceClient
  File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/services/discuss_service/__init__.py", line 16, in <module>
    from .async_client import DiscussServiceAsyncClient
  File "/usr/lib/python3.11/site-packages/google/ai/generativelanguage_v1beta3/services/discuss_service/async_client.py", line 32, in <module>
    from google.api_core import gapic_v1
  File "/usr/lib/python3.11/site-packages/google/api_core/gapic_v1/__init__.py", line 16, in <module>
    from google.api_core.gapic_v1 import config
  File "/usr/lib/python3.11/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
    import grpc
ModuleNotFoundError: No module named 'grpc'
Comment 1 Anton Bolshakov 2023-12-08 08:40:18 UTC
Created attachment 878189 [details]
emerge --info
Comment 2 Anton Bolshakov 2024-03-05 01:19:30 UTC
it should be available via "grpc" use flag probably, see:
https://github.com/googleapis/python-api-core/blob/main/setup.py#L38


Note: grpcio-status is optional, see:

python-api-core-2.17.1/google/api_core/exceptions.py
try:
    import grpc

    try:
        from grpc_status import rpc_status
    except ImportError:  # pragma: NO COVER
        warnings.warn(
            "Please install grpcio-status to obtain helpful grpc error messages.",
            ImportWarning,
        )
        rpc_status = None
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-03-05 04:04:10 UTC
For the record, I'm opposed to adding an explicit dependency on dev-python/grpcio because grpcio packages in Gentoo are unmaintained and don't have working tests.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-05-01 13:09:27 UTC
grpcio has been last rited now.