python -m venv reprovenv
source reprovenv/bin/activate.fish
pip install github
./test.py
#!/usr/bin/env python
import asyncio
import github
GITHUB_TOKEN = "gho_...................................."
GITHUB_USER = 'ulidtko'
async def main():
gh = github.Client(username=GITHUB_USER, token=GITHUB_TOKEN)
user = await gh.get_self()
print(user)
asyncio.run(main())
Traceback (most recent call last):
File "/private/tmp/test.py", line 14, in <module>
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "/opt/homebrew/Cellar/python@3.14/3.14.0/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 204, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "/opt/homebrew/Cellar/python@3.14/3.14.0/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/runners.py", line 127, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/opt/homebrew/Cellar/python@3.14/3.14.0/Frameworks/Python.framework/Versions/3.14/lib/python3.14/asyncio/base_events.py", line 719, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "/private/tmp/test.py", line 11, in main
user = await gh.get_self()
^^^^^^^^^^^^^^^^^^^
File "/Users/maksym.ivanov/Library/Python/3.14/lib/python/site-packages/github/client.py", line 215, in get_self
return User(await self.http.get_self(), self.http)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/maksym.ivanov/Library/Python/3.14/lib/python/site-packages/github/http.py", line 188, in get_self
result = await self.session.get(SELF_URL)
^^^^^^^^^^^^
AttributeError: 'http' object has no attribute 'session'
Summary
Probably uses obsolete version of
aiohttpReproduction Steps
Minimal Reproducible Code
Expected Results
A user record printed
Actual Results
Checklist
Additional Context
No response