-
Notifications
You must be signed in to change notification settings - Fork 750
Open
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- Programming language:
Python - OS:
Ubuntu 24.04.3 LTS - Language runtime version:
3.13.11 - Package version:
1.60.0
Steps to reproduce
- Have
warnings.filterwarnings("error")so that they get raised - Execute the following code
warnings.filterwarnings("error")
gemini = Client(api_key=config_lookup("RANDOM_KEY"))
response = asyncio.run(
gemini.aio.models.generate_content(
model="gemini-2.5-flash",
contents="What is the capital of France?",
config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(thinking_budget=0), # Disables thinking
),
)
)
print(response)- The following will get raised
DeprecationWarning: Inheritance class AiohttpClientSession from ClientSession is discouraged
In our development environment, we also make sure to raise warnings as errors since we want to be aware of possible issues, like the one mentioned above.
As far as I can see, this particular Deprecation seems to have been in effect from 2018, issue here
For now our fix was to ignore the error, but it would probably be best to take care of it.
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.