saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
162 stars 74 forks source link

feat: Add support for Python 3.10 #159

Closed Hanaasagi closed 3 years ago

Hanaasagi commented 3 years ago

Fix the issue: https://github.com/saghul/pycares/issues/134

Hanaasagi commented 3 years ago

First-time contributors need a maintainer to approve running workflows. Learn more.

Please approve running workflows, I need to runt the test in 3.10. Thanks!

saghul commented 3 years ago

Workflows approved

Hanaasagi commented 3 years ago

Emm, The CI failed because Python 3.10 is not found on ubuntu 20.04 when we used actions/setup-python@v1. I upgrade to actions/setup-python@v2. Test passed in my fork repo, https://github.com/Hanaasagi/pycares/runs/3230116789?check_suite_focus=true.

Could you approve the newest workflows again? Thanks.

saghul commented 3 years ago

Sorry for the delay, running now.

saghul commented 3 years ago

Note that there are other relevant workflows: https://github.com/saghul/pycares/tree/master/.github/workflows

It's fine to have 3.10 tested now, but once it hits stable I guess we'll want to release wheels.

Hanaasagi commented 3 years ago

Thanks for reminding. It looks like I need to add an cp310-* in the CIBW_BUILD.

https://github.com/saghul/pycares/blob/63dd17e94a33ce17213adda545204d04e912fb05/.github/workflows/release-wheels.yml#L27-L29

saghul commented 3 years ago

Thanks for reminding. It looks like I need to add an cp310-* in the CIBW_BUILD.

Yeah. Would you like to add that in this PR? Otherwise looks like we are good to go!

Hanaasagi commented 3 years ago

Yeah. Would you like to add that in this PR? Otherwise looks like we are good to go!

Yes. But I have encountered some problems, libffi-dev is missing only in the 3.10 when building wheels. I am trying to find a solution.

CI log: https://github.com/Hanaasagi/pycares/runs/3230989395?check_suite_focus=true

Hanaasagi commented 3 years ago

I change to the offical action pypa/cibuildwheel@v2.0.1. And cibuildwheel supports CPython 3.10 since v2.0.0, it needs to set CIBW_PRERELEASE_PYTHONS to enable building with pre-release versions of Python.

About CIBW_PRERELEASE_PYTHONS: https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons.

saghul commented 3 years ago

Excellent work, cheers!