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

Support Python 3.11 #1572

Open
mgorny opened this issue May 19, 2022 · 9 comments
Open

Support Python 3.11 #1572

mgorny opened this issue May 19, 2022 · 9 comments

Comments

@mgorny
Copy link
Contributor

mgorny commented May 19, 2022

pyqrcode has not received a single commit since 2016. It still uses nosetests, and after being abandoned for equally as long they no longer work on Python 3.11. This effectively means this dependency is a lot of pain for distributions that can't test these packages properly.

@oberstet
Copy link
Contributor

I've just tested pyqrcode on Python 3.11, works:

Bildschirmfoto von 2022-05-19 17-39-49

Yes, pyqrcode should probably move to pytest or similar, a "standard" Python test tool. Please report to upstream.


Apart from that, the real issues pop up with pip install autobahn[all]:

  1. A couple of Cython related issues since the CPy ABI changed: fatal error: longintrepr.h not found

aio-libs/aiohttp#6600
aio-libs/yarl#673
aio-libs/yarl#706

These can be worked around with

export AIOHTTP_NO_EXTENSIONS=1
export FROZENLIST_NO_EXTENSIONS=1
export YARL_NO_EXTENSIONS=1
  1. eth-typing limits to python 3.10

Created a PR for that ethereum/eth-typing#29

Similar for web3.

At this point, I gave up for now ... lots of projects are only just now adjusting to py 3.11, and I don't need it now

@mgorny
Copy link
Contributor Author

mgorny commented May 19, 2022

I'm sorry but I left my time machine in the other pants' pocket.

@oberstet
Copy link
Contributor

Part of the deps of autobahn[all] install web3, and of the web3 deps

pip install "aiohttp>=3.7.4.post0,<4"
pip install "eth-abi>=3.0.0,<4.0.0"
pip install "eth-account>=0.6.0,<0.7.0"
pip install "eth-hash[pycryptodome]>=0.2.0,<1.0.0"
pip install "eth-typing>=3.0.0,<4.0.0"
pip install "eth-utils>=2.0.0,<3.0.0"
pip install "hexbytes>=0.1.0,<1.0.0"
pip install "ipfshttpclient==0.8.0a2"
pip install "jsonschema>=4.0.0,<5"
pip install "lru-dict>=1.1.6,<2.0.0"
pip install "protobuf>=3.10.0,<4"
pip install "requests>=2.16.0,<3.0.0"
pip install "typing-extensions>=3.7.4.1,<5;python_version<'3.8'"
pip install "websockets>=10.0.0,<11"

this one fails

pip install "eth-account>=0.6.0,<0.7.0"

as does this

pip install git+https://github.com/ethereum/eth-account.git

with the same error

      bitarray/_bitarray.c:3276:33: error: lvalue required as left operand of assignment
       3276 |     Py_TYPE(&BitarrayIter_Type) = &PyType_Type;

@oberstet oberstet changed the title Please replace pyqrcode dependency with a maintained package Support Python 3.11 May 19, 2022
@oberstet
Copy link
Contributor

so the actual reason is bitarray<1.3.0,>=1.2.1 upper version limits in eth-account latest ..

ethereum/eth-account#160
ethereum/eth-account#161

@mgorny
Copy link
Contributor Author

mgorny commented May 19, 2022

I;m sorry but why did you hijack my bug report? pyqrcode is the real problem for us. We won't package something in Gentoo that hasn't had any activity since 2015 and doesn't have a working test suite anymore.

@oberstet
Copy link
Contributor

I;m sorry but why did you hijack my bug report?

Because Autobahn should run on Python 3.11 - and it doesn't, but not because of pyqrcode, but because of above.

We won't package something in Gentoo that hasn't had any activity since 2015 and doesn't have a working test suite anymore.

I don't use Gentoo, and from my point of view, the whole approach of distributing Python packages as OS packages is "wrong" - but sure, I am aware, this is probably non-mainstream opinion.

I agree about pyqrcode btw: it could need a maintainer, proper refresh etc. - or, indeed, replacing it with sth else - if s.o. comes up with a PR ..

We still need a bug to track autobahn[all] on Python 3.11 .. sorry for hijacking!

@mgorny
Copy link
Contributor Author

mgorny commented May 20, 2022

Made #1573 for that.

oberstet pushed a commit that referenced this issue May 20, 2022
@om26er
Copy link
Contributor

om26er commented Oct 28, 2022

I think we can close this now as 3.11 support was fixed for asyncio. Didn't test twisted though

@om26er om26er self-assigned this Oct 28, 2022
@om26er om26er removed their assignment Aug 1, 2023
@om26er
Copy link
Contributor

om26er commented Aug 1, 2023

This works now, so issue can be closed.

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

No branches or pull requests

3 participants