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

aiohttp cannot be used in python 3.14. #8476

Closed
1 task done
AraHaan opened this issue Jul 1, 2024 · 4 comments
Closed
1 task done

aiohttp cannot be used in python 3.14. #8476

AraHaan opened this issue Jul 1, 2024 · 4 comments
Labels

Comments

@AraHaan
Copy link
Contributor

AraHaan commented Jul 1, 2024

Describe the bug

This is because they have already removed typing.ByteString that is used inside of payload.py.

They suggest either replacing it with bytes | bytearray or collections.abc.Buffer. For use as an ABC, prefer Sequence or collections.abc.Buffer.

To Reproduce

Clone the CPython main branch and build, then install pip and aiohttp.

Next try to run some code that depends on the latest version of aiohttp.

Expected behavior

Everything to work as aiohttp would be prepared for the removal of typing.ByteString. Preparing it now before it becomes stable is a good idea as then it requires less work later.

Logs/tracebacks

Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 148, in _get_module_details
  File "<frozen runpy>", line 112, in _get_module_details
  File "__init__.py", line 8, in <module>
  File "__init__.py", line 23, in <module>
  File "client.py", line 49, in <module>
  File "__init__.py", line 6, in <module>
  File "client.py", line 38, in <module>
  File "payload.py", line 10, in <module>
ImportError: cannot import name 'ByteString' from 'typing' (C:\Users\User\OneDrive\Desktop\DiscordBot\pcbuild\bin\lib.zip\typing.pyc)


### Python Version

```console
$ python --version
3.14.0a0

aiohttp Version

$ python -m pip show aiohttp
3.9.5

multidict Version

$ python -m pip show multidict
6.0.5

yarl Version

$ python -m pip show yarl
1.9.4

OS

Windows

Related component

Server, Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@AraHaan AraHaan added the bug label Jul 1, 2024
@AraHaan
Copy link
Contributor Author

AraHaan commented Jul 1, 2024

Seems the change already happened, but waiting for a new release so I can get those changes.

#8408

Would be cool if aiohttp could do github only wheels on every non-stable commit until an official next release is made on pypi.

@webknjaz
Copy link
Member

webknjaz commented Jul 2, 2024

Alright, so we don't need to track it, then.

@webknjaz webknjaz closed this as completed Jul 2, 2024
@Dreamsorcerer
Copy link
Member

More to the point, if you are running CPython from source, you can do the same with aiohttp, just checkout the 3.10 branch.

@AraHaan
Copy link
Contributor Author

AraHaan commented Jul 2, 2024

I tried the 3.10 branch however the build fails, even when I manually invoke cython prior to setup.py bdist_wheel with the 3.14 self-built interpreter (it fails to copy the vendor include files and then properly allow them to be included..

And yes I am trying to build it on Windows with no clear building.md file that gives step by step instructions on how to properly build successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants