ParallelSSH/ssh2-python

Python 3.12 support

thewchan opened this issue · 6 comments

Python API in 3.12 seems to have changed particularly:

AttributeError: module 'configparser' has no attribute 'SafeConfigParser'. Did you mean: 'RawConfigParser'?

During build.

@thewchan here's the relevant section from the release notes.

https://docs.python.org/3.12/whatsnew/3.12.html#configparser

configparser
Several names deprecated in the configparser way back in 3.2 have been removed per gh-89336:

configparser.ParsingError no longer has a filename attribute or argument. Use the source attribute and argument instead.

configparser no longer has a SafeConfigParser class. Use the shorter ConfigParser name instead.

configparser.ConfigParser no longer has a readfp method. Use read_file() instead.

May I ask if this is still being worked on? Did #194 fix this or not? What is the problem? Does it need a new release? 1.0.0 still does not build on python 3.12

@besendorf since the owner is inactive, I've published a temporary package for 3.12 (terribly) named ssh2-python312.

just ran into this

ssh-python also has the same issue and a fork https://github.com/MartinNowak/ssh-python/tree/fix-82-python-312 has the needed versioneer.py fixes. I generated a patch from his branch and it works on ssh2-python versioneer.py.
versioneer-patch.txt

if you

  • git clone
  • git apply versioneer-patch.txt
  • pip install . ## (repeat for ssh-python as needed)
  • pip install parallel-ssh
    it should get things running

@erpadmin I haven't yet tried to install my forked package (ssh2-python312) on python 3.13 yet, but this repo is currently inactive. If you need it for Python 3.13, you can try that and see if it works.

However, my primary maintenance priority for 3.13 is the newer project "Hussh" (jacobcallahan/hussh) if you want to try that as well. It is a higher-level interface and should get 3.13 builds soon.

Resolved by latest changes.