Title: Add support for python 3.12 by zephyrj · Pull Request #2 · parallel-ssh/ssh-python · GitHub
Open Graph Title: Add support for python 3.12 by zephyrj · Pull Request #2 · parallel-ssh/ssh-python
X Title: Add support for python 3.12 by zephyrj · Pull Request #2 · parallel-ssh/ssh-python
Description: Background I primarily use parallel-ssh rather than this library directly and wanted to update my environment to python 3.12. I had to go through a few steps to get it working so thought I'd try to contribute some effort in an attempt to hopefully help others. I've noticed that the main repo under the ParallelSSH org only has wheels built on PyPi for up to python 3.10 and the main maintainer of the project has not been keeping it up-to-date; as such I've been following on from the work done here that has been tracked through ParallelSSH/parallel-ssh#386 and initially added through #1 When trying to install ssh-python directly from the next branch I encounter the following error (note: without cython installed in my python environment) pip install git+https://github.com/parallel-ssh/ssh-python@next ... Building wheels for collected packages: ssh-python Building wheel for ssh-python (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. ... ssh/callbacks.c: In function ‘__Pyx_PyInt_As_int’: ssh/callbacks.c:3931:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’ const digit* digits = ((PyLongObject*)x)->ob_digit; ^~ ssh/callbacks.c:3986:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’ const digit* digits = ((PyLongObject*)x)->ob_digit; ^~ ssh/callbacks.c: In function ‘__Pyx_PyInt_As_long’: ssh/callbacks.c:4203:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’ const digit* digits = ((PyLongObject*)x)->ob_digit; ^~ ssh/callbacks.c:4258:53: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’ const digit* digits = ((PyLongObject*)x)->ob_digit; ^~ ssh/callbacks.c: In function ‘__Pyx_PyIndex_AsSsize_t’: ssh/callbacks.c:4763:45: error: ‘PyLongObject’ {aka ‘struct _longobject’} has no member named ‘ob_digit’ const digit* digits = ((PyLongObject*)b)->ob_digit; ^~ error: command '/usr/bin/gcc' failed with exit code 1 If I install cython into my python environment then the above command works as, from my limited understanding, that results in it rebuilding the .c files which will subsequently be compatible with python 3.12 Changes made I've updated the libssh version to latest stable version of 0.10.6 + a patch with a fix for some IPv6 regressions see here. This includes updating the source in the libssh folder of the repo and including a tar.gz package that is used in the manylinux docker files. I've updated the manylinux docker files to use the latest openssl version of 3.3.0 and krb5 version of 1.21.2 alongside the new libssh version I've updated the setup.py file to match the work done in the sibling ssh2-python project for python 3.12 support and then regenerated the .c files with cython 3.0.10 so that they are compatible with python 3.12. You can now install ssh-python from the repos setup.py file without cython needing to be installed in your environment I've also updated some CI config to reference 3.12 but this is beyond my knowledge so some additional work may be required here by those more familiar Initial cibuidwheel support I also played around with cibuildwheel as I wanted to build wheels locally to test them; I've added some basic support for building manylinux wheels with it in the ci/cibuildwheel directory. It's only setup for CPython on x86_64 and aarch64 at present but could be expanded upon if desired
Open Graph Description: Background I primarily use parallel-ssh rather than this library directly and wanted to update my environment to python 3.12. I had to go through a few steps to get it working so thought I'd tr...
X Description: Background I primarily use parallel-ssh rather than this library directly and wanted to update my environment to python 3.12. I had to go through a few steps to get it working so thought I'...
Opengraph URL: https://github.com/parallel-ssh/ssh-python/pull/2
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:2f81cb35-1a86-c447-a1fc-8db7d544df5b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D862:2A0D62:14598B7:1C0C5FD:696AA207 |
| html-safe-nonce | b586b31d1af5977cdae45a1a3f08e6fdda9748c56fb6dce715be90f494f8e884 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODYyOjJBMEQ2MjoxNDU5OEI3OjFDMEM1RkQ6Njk2QUEyMDciLCJ2aXNpdG9yX2lkIjoiMTk1OTk5MDE2ODE3NjQ2ODQ4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 83cfcd2ea640100b268ecb99ac0b75d436d4942dbe95e37ffc0fceb08b8a7d0c |
| hovercard-subject-tag | pull_request:1886381878 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/parallel-ssh/ssh-python/pull/2/files |
| twitter:image | https://avatars.githubusercontent.com/u/6891272?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6891272?s=400&v=4 |
| og:image:alt | Background I primarily use parallel-ssh rather than this library directly and wanted to update my environment to python 3.12. I had to go through a few steps to get it working so thought I'd tr... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a51f97dbb9326f71c08ecb61577457d543c602124d1a2672871258ef37ac5261 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/parallel-ssh/ssh-python git https://github.com/parallel-ssh/ssh-python.git |
| octolytics-dimension-user_id | 150726312 |
| octolytics-dimension-user_login | parallel-ssh |
| octolytics-dimension-repository_id | 773351365 |
| octolytics-dimension-repository_nwo | parallel-ssh/ssh-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | true |
| octolytics-dimension-repository_parent_id | 135702111 |
| octolytics-dimension-repository_parent_nwo | ParallelSSH/ssh-python |
| octolytics-dimension-repository_network_root_id | 135702111 |
| octolytics-dimension-repository_network_root_nwo | ParallelSSH/ssh-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4bd0eac606c70914085176ef312ebdcd97a8cdf1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width