Changelog
Versions follow Semantic Versioning (<major>.<minor>.<patch>).
Backward incompatible (breaking) changes will only be introduced in major
versions with advance notice in the Deprecations section of releases.
To be included in v1.4.1.dev411+g66a52439d (if present)
v1.4.1.dev411+g66a52439d [UNRELEASED DRAFT]
(2026-11-14)
Bug fixes
Removed non-mandatory EOF check after the SCP download procedure, which was causing race conditions with some Cisco devices – by @timway.
Fixed remote file handle leaks on errors inside
get()andput()methods inSFTPby managing remote file lifecycles with a context manager – by @Jakuje.Related issues and pull requests on GitHub: #879.
The version detection fallback, used when the build-time generated version module is missing, now relies on
importlib.metadatainstead ofpkg_resourcesthat is unavailable with recentsetuptoolsreleases – by @webknjaz.Related issues and pull requests on GitHub: #900.
Channel.read_bulk_response()now reports a channel closed by the remote side by raising the newLibsshChannelEOFErroronce all buffered data has been returned, instead of returning empty bytes indefinitely, which was indistinguishable from “no data available yet” – by @Ajithkumar2000.Related issues and pull requests on GitHub: #907.
Changed the
SFTP.get()andSFTP.put()APIs to raiseValueErrorfor remote paths with embedded NULL bytes.These are impossible to encode in the C-string used by the underlying libssh C API and would result in unexpected behavior (such as a silent path truncation) – by @Jakuje.
Related issues and pull requests on GitHub: #923.
Features
Formalized the
SFTP.get()andSFTP.put()API to acceptos.PathLiketype in addition tostrtype for local paths – by @Jakuje.Related issues and pull requests on GitHub: #885.
Removals and backward incompatible breaking changes
Changed the
Channel.write()API to accept onlybytestype. Previously, this API used to accept anything that could have been converted to a pointer usingPyBytes_AS_STRING()and that would implement__len__()interface, which could result in unexpected behavior even for UTF8 strings. Anything else thanbytesnow raisesTypeError– by @Jakuje.Related issues and pull requests on GitHub: #875.
Changed the
SFTP.get()andSFTP.put()API to accept onlystrtype for remote paths.Previously, this API used to accept also raw
bytestype, which required something on the way to guess the real encoding. Anything other thanstrnow raisesTypeError– by @Jakuje.Related issues and pull requests on GitHub: #885.
Channel.read_bulk_response()now raisesLibsshChannelEOFErrorinstead of returningb''once the remote side has closed the channel and all buffered data has been read. The exception subclassesLibsshChannelReadFailure(and thereforeConnectionError) as well asEOFError, so it can be handled as either – by @Ajithkumar2000.Related issues and pull requests on GitHub: #907.
Improved documentation
Added docstrings for
SFTP.get()andSFTP.put()methods – by @Jakuje.Related issues and pull requests on GitHub: #870.
Added an API reference page documenting the new
LibsshChannelEOFErrorexception – by @Ajithkumar2000.Related issues and pull requests on GitHub: #907.
Packaging updates and notes for downstreams
The macOS wheels are now
universal2, running natively on both Intel and Apple Silicon. They bundlelibssh0.12.2 with a statically linked OpenSSL, built by the project’s own CI as in #884, instead of the Homebrew ones, which also lowers their minimum macOS version from 15.0 to 10.12, or what the Python version requires – by @webknjaz.Related issues and pull requests on GitHub: #73, #207, #917.
The core packaging metadata is now declared in the PEP 621
[project]table ofpyproject.tomlinstead ofsetup.cfg, with the license expressed per PEP 639, which requiressetuptools77.0.1 or newer – by @webknjaz.Related issues and pull requests on GitHub: #812.
The RPM spec now relaxes the
setuptoolsrequirement and the PEP 639 license metadata on RHEL 10 and older, whosesetuptoolsreleases predate their support – by @webknjaz.Related issues and pull requests on GitHub: #812.
The source distribution now ships a minimal generated
setup.cfgwith the core packaging metadata, so that downstreams can still build it withsetuptoolsolder than 61, which cannot read PEP 621 metadata – by @webknjaz.Related issues and pull requests on GitHub: #812.
Removed the expandvars build dependency while preserving existing compiler and linker flags – by @f321x.
Related issues and pull requests on GitHub: #888.
Fixed the Linux wheels being compiled without optimization. The
cibuildwheelconfiguration setCFLAGSto point at the bundledlibsshheaders, and the build backend set it to add the Cython line tracing macro for coverage builds;setuptoolsreplaces the interpreter’s own compiler flags with aCFLAGSenvironment variable instead of extending them, so-O3was dropped. Both now go throughCPPFLAGS, whichsetuptoolsappends to the interpreter’s flags – by @bdraco.Related issues and pull requests on GitHub: #890.
The test suite now optionally depends on proxy.py. The tests needing it are skipped when it is not installed, and the RPM spec does not pull it in, since it is not packaged downstream yet – by @webknjaz.
Related issues and pull requests on GitHub: #894.
The core packaging metadata now reflects that we test the project under Python 3.15 (with GIL enabled) – by @webknjaz.
Related issues and pull requests on GitHub: #911.
Compatibility with tox 3 for downstream RPM package builds on EL 9 and older was restored by dropping the unused
[testenv:pre-commit]section fromtox.iniduring the RPM build – by @Jakuje.Related issues and pull requests on GitHub: #947.
Contributor-facing changes
The Claude Code guard hook now asks the operator before tests call private methods – steered by @webknjaz, typed by a robot that errs.
Related commits on GitHub: @27561a1.
The in-tree guidance for agents on house style, silenced checks, and the house rules now keeps project-specific examples apart from the rules shared with other projects – steered by @webknjaz, typed by a robot that errs.
Related commits on GitHub: @122a1f1.
The in-tree guidance for AI agents now asks for commit messages that pass
gitlint– by @webknjaz.Related commits on GitHub: @807a23e.
Claude Code now prompts the human operator before applying edits or running commands that look like they silence linters or tests, or that change tool configuration – by @webknjaz.
Related commits on GitHub: @083858a.
The
noqacomments on thetypingandcollections.abcalias imports were dropped, now that the flake8 configuration allows those aliases – steered by @webknjaz, typed by a robot that errs.Related commits on GitHub: @94a9caa.
Claude Code now also asks the operator before an agent edits the
codespell,darglint,isort,nitpickandpylintconfigs, and the.mypy.inifile that it previously missed – by @webknjaz.Related commits on GitHub: @5ab7c57.
The in-tree guidance for AI agents now requires an explicit decision from the human operator, case by case, before any check gets silenced – whether by adding linter suppressions, relaxing tool configuration, or skipping, removing or weakening tests – and asks for tool configuration changes to be kept in standalone commits – by @webknjaz.
Related commits on GitHub: @a55c74f.
The
wemake-python-styleguidelinter got upgraded to v1.8.1, which allows importingcollections.abcasfrom collections import abc as _cwithout suppressing any checks – steered by @webknjaz, typed by a robot that errs.Related commits on GitHub: @ad3be14.
Codespell now has a dedicated settings file in the tree with a few currated dictionaries set up and preselected exclusions allowed – by @webknjaz.
Related commits on GitHub: @9b13566.
The in-tree guidance for AI agents now spells out the project’s structural constraints and its Python, YAML and Markdown style conventions, including those not enforced by any linter – by @webknjaz.
Related commits on GitHub: @2b149b5.
Restored coverage collection for the Cython modules in CI, which had reported nothing since #688 – by @rodrigobnogueira.
The in-tree guidance for agents on PRs and change notes now keeps project-specific facts apart from the rules shared with other projects – steered by @webknjaz, typed by a robot that errs.
Related commits on GitHub: @bbad521.
The in-tree guidance for AI agents now covers the commit message shape, the use of long
toxsubcommands without invented flags, and flagging generic tooling changes for reuse across the maintainer’s other projects. It also clarifies that agents are never credited as co-authors, with an optionalAssisted-bytrailer for disclosing AI assistance – by @webknjaz.Related commits on GitHub: @9be75f2.
The in-tree guidance for AI agents now mentions the Claude Code hook that asks the operator before license changes – by @webknjaz.
Related commits on GitHub: @cd8009e.
The Cython and libssh notes for agents moved out of the shared style guide into a pylibssh-only
.agents-ctx/CYTHON_AND_LIBSSH.md– steered by @webknjaz, typed by a robot that errs.Related commits on GitHub: @6d0141f.
The in-tree guidance for AI agents now states that license terms, license metadata and license headers only change with the maintainer’s explicit approval, and that code copied in from elsewhere keeps its original license – by @webknjaz.
Related commits on GitHub: @03dec85.
The in-tree guidance for AI agents now asks for the authors of incorporated patches to be credited via
Co-Authored-Bytrailers and leaves the change note byline off fully agentic work – by @webknjaz.Related commits on GitHub: @1227e23.
The in-tree guidance for AI agents now requires the human operator to agree on how to proceed before an agent acts on review comments, suggested patches or discussion input from others, and forbids agents from force-pushing mid-review – by @webknjaz.
Related commits on GitHub: @5105e64.
The linters now require importing the
typing,typesandcollections.abcmodules as_t,_tpsand_crespectively, rather than importing their members directly – steered by @webknjaz, typed by a robot that errs.Related commits on GitHub: @99e7180.
Claude Code now asks the operator before an agent edits license files, drops license notices or changes license metadata – by @webknjaz.
Related commits on GitHub: @2e985de.
The in-tree guidance for agents now tells them to take test expectations from outside the code under test, and to show that a regression test fails without its fix – steered by @webknjaz, typed by a robot that errs.
Related commits on GitHub: @414541f.
The emulated Linux wheel builds stopped rebuilding the
aarch64andx86_64wheels that native runners already produce, which had pushed the release job past its time limit.Related commits on GitHub: @364f7f9.
The Codecov statuses now display separate measurements for Cython and Python modules in the library, in addition on the overall number – by @webknjaz.
Related commits on GitHub: @5f974f8.
The in-tree guidance for AI agents now gives a reading order for getting oriented in the repository and a map of its less obvious directories – by @webknjaz.
Related commits on GitHub: @9faac80.
The in-tree guidance for agents on testing now keeps project-specific facts apart from the rules shared with other projects, and no longer claims that
darglintchecks test docstrings – steered by @webknjaz, typed by a robot that errs.Related commits on GitHub: @f97d68e.
The in-tree guidance for agents on testing now keeps the assertion-count rule apart from the linter limits enforcing it – steered by @webknjaz, typed by a robot that errs.
Related commits on GitHub: @5ff33f5.
The CI now runs testing against ARM Ubuntu VMs that GitHub Actions CI/CD provide – by @webknjaz.
The dists are now built under native runners instead of QEMU which makes the CI resources use efficient.
Traced builds of the Cython modules now define
CYTHON_USE_SYS_MONITORING=0, so that theCython.Coverageplugin receives line events on CPython 3.13 and newer – by @rodrigobnogueira.Related issues and pull requests on GitHub: #781.
Added Centos 10 Stream image to the CI/CD pipeline – by @Jakuje.
Related issues and pull requests on GitHub: #830.
Added Centos 9 Stream image to the CI/CD pipeline – by @Jakuje.
Related issues and pull requests on GitHub: #831.
Updated the version of
libsshto the latest release v0.12.1 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #846.
Updated the bundled version of libssh to 0.12.2 in platform-specific wheels published on PyPI – by @Jakuje.
Related issues and pull requests on GitHub: #847.
Fixed Packit CI caused by
setuptools_scmversion mismatch in build environment – by @Jakuje.Related issues and pull requests on GitHub: #848.
Updated the version of
libsshto the latest release v0.12.2 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #851.
Dropped the EOL Fedora 42 from CI targets – by @Jakuje.
Related issues and pull requests on GitHub: #852.
The repository now has initial infrastructure for pet agents to lurk in and understand how to interact with the project in a useful, constructive and collaborative manner while being exposed to the same quality development tools their humans are – by @webknjaz.
Related issues and pull requests on GitHub: #867.
Added the UBI 9.8 container image to the CI test matrix – by @Jakuje.
Related issues and pull requests on GitHub: #876.
Added a scheduled GitHub Actions workflow that builds a prebuilt shared
libsshlibrary with a statically linked OpenSSL for macOSx86_64,arm64anduniversal2, storing them as workflow artifacts, following the pattern established by pyca/infra. This artifact is not yet consumed by the wheel build process – by @webknjaz.The test suite gained a home for test doubles of the components that end-to-end tests intercept, under
tests/_stubs/. Each of them exposes its fixtures through afixtures.pymodule, which gets loaded as a local pytest plugin automatically – by @webknjaz.Related issues and pull requests on GitHub: #894.
The
test_open_session_small_timeouttest now withholds the sshd replies through a TCP relay instead of racing a local sshd, which made it flaky with line tracing enabled – by @webknjaz.Related issues and pull requests on GitHub: #894.
Ruff no longer asks to turn
noqacomments intoruff:ignoreones, so the suppression codes stay readable by the other linters – steered by @webknjaz, typed by a robot that errs.Related issues and pull requests on GitHub: #895.
Ruff no longer flags
autousepytest fixtures, since that preview rule turned out to be controversial (astral-sh/ruff#12491) – steered by @webknjaz, typed by a robot that errs.Related issues and pull requests on GitHub: #895.
The test coverage measurement now includes code running in processes started via
multiprocessing, whichpytest-cov7 stopped measuring on its own – by @webknjaz.Related issues and pull requests on GitHub: #898.
The
linttox environment has been renamed topre-commit– invoke it astox run -e pre-commitnow – by @webknjaz.Related issues and pull requests on GitHub: #899.
The linting jobs in CI now run through the
reusable-tox.ymlworkflow shared with other projects, and cache thepre-commitvirtualenvs between runs – by @webknjaz.Related issues and pull requests on GitHub: #899.
The Python code is now type-checked with MyPy in strict mode against every supported Python version, as a part of the
pre-commitsetup – by @webknjaz.Related issues and pull requests on GitHub: #901.
The test suite now gives up waiting for the ephemeral
sshdto become ready after a bounded number of connection attempts, instead of hanging when it never comes up – by @webknjaz.Related issues and pull requests on GitHub: #902.
Ruff now targets Python 3.9, the oldest Python version supported by the project, instead of its own default – by @webknjaz.
Related issues and pull requests on GitHub: #903.
The in-tree PEP 517 build backend has been adjusted to pass strict type checking for every supported Python version – by @webknjaz.
Related issues and pull requests on GitHub: #904.
The test suite now waits for up to 10 seconds for the ephemeral
sshdto become ready, instead of giving up after a fixed number of connection attempts that fast-failing machines could exhaust early – by @webknjaz.Related issues and pull requests on GitHub: #905.
The MyPy type coverage reports are now uploaded to Coveralls from CI, summarized on the workflow run pages and linked to after local runs – by @webknjaz.
Related issues and pull requests on GitHub: #906.
Added an expected-to-fail test documenting that
pylibsshext.channel.Channel.read_bulk_response()keeps returning empty bytes after the remote side closes the channel, instead of signaling the end of the stream – by @Ajithkumar2000.Related issues and pull requests on GitHub: #907.
The RPM builds in UBI 9 and CentOS Stream 9 containers are no longer required to pass in CI, since these only provide tox 3 that cannot parse the project’s tox 4 configuration – by @webknjaz.
Related issues and pull requests on GitHub: #909.
The CI job building the emulated
manylinuxwheels now gets up to 3 hours, since optimized builds take over twice as long under QEMU – by @webknjaz.Related issues and pull requests on GitHub: #910.
The CI now tests wheels built for Python 3.15 – by @webknjaz.
Related issues and pull requests on GitHub: #911.
The RPM smoke tests in CI now live in a reusable workflow, configured through inputs, with the container matrix kept in the main workflow – by @webknjaz.
Related issues and pull requests on GitHub: #912.
The CI job building the macOS wheels now gets up to 15 minutes, since it occasionally ran out of time right before finishing the last wheels – by @webknjaz.
Related issues and pull requests on GitHub: #913.
The Claude Code guard against silencing checks now also covers edits in other Git worktrees of the repository – steered by @webknjaz, typed by a robot that errs.
Related issues and pull requests on GitHub: #915.
The in-tree guidance for agents now asks them to re-read it as it evolves, to verify claims instead of relying on memory, to fill in the PR template, to add change notes for every affected audience, to check in on how involved the human operator feels before crediting them, and to let the operator confirm any force-push command they run – steered by @webknjaz, typed by a robot that errs.
Related issues and pull requests on GitHub: #915.
The test jobs now download only the distribution packages instead of every workflow artifact – by @webknjaz.
Related issues and pull requests on GitHub: #918.
The manylinux container images used for building the wheels no longer compile a custom Perl, which was only ever meant for the
manylinux1images – by @webknjaz.Related issues and pull requests on GitHub: #920.
Refactored SFTP tests and added new ones handling non-existing local and remote files – by @Jakuje.
Related issues and pull requests on GitHub: #928.
The macOS jobs in CI, including the ones building
libsshand the wheels, now run on themacos-26andmacos-26-intelrunners, since GitHub is sunsetting the older images that used to cause delays, flakiness and cancellations – by @webknjaz.Related issues and pull requests on GitHub: #940.
The
test_send_signaltest stopped flaking on macOS: its remote payload became a single exec’d interpreter instead of a shell trap racing a foregroundsleepin the signaled process group – steered by @webknjaz, typed by a robot that errs.Related issues and pull requests on GitHub: #941.
In the RPM smoke test CI workflow, the EPEL 9 repositories are now enabled directly on UBI 9 containers, dropping the manual installation of individual test dependency RPM packages – by @Jakuje.
Related issues and pull requests on GitHub: #947.
Added the Fedora 45 container image to the CI test matrix and dropped the soon-to-be EOL Fedora 43 – by @Jakuje.
Related issues and pull requests on GitHub: #949.
Pruned end-of-life (EOL) UBI 9 container images (9.0, 9.1, 9.3, 9.5, and 9.7) from the RPM smoke test CI matrix in accordance with the Red Hat Enterprise Linux Life Cycle policy – by @Jakuje.
Related issues and pull requests on GitHub: #950.
The in-tree guidance for agents now tells them not to game checks either, such as calling private methods from tests only to mark lines as covered – steered by @webknjaz, typed by a robot that errs.
Related issues and pull requests on GitHub: #11192726.
The in-tree guidance for agents on running the project’s tooling now keeps project-specific examples apart from the rules shared with other projects – steered by @webknjaz, typed by a robot that errs.
Related issues and pull requests on GitHub: #31154463.
Miscellaneous internal changes
Removed the needless use of CPython internal API
PyBytes_AS_STRING()throughout the code to simplify code and improve the compatibility with limited Python API – by @Jakuje.Related issues and pull requests on GitHub: #875.
Released versions
v1.4.0
(2026-03-15)
Bug fixes
Fixed the log level mapping to cover the entire
libsshrange – by @Jakuje and @webknjaz.Previously it was not possible to set the most verbose
libsshlog levelSSH_LOG_TRACEto get the most verbose log messages useful for debugging connection issues.Related issues and pull requests on GitHub: #597.
Features
Made
libsshuse the Pythonloggingsystem – by @Jakuje and @webknjaz.Previously the underlying
libsshlibrary was writing its logs directly from the C-level intostderr, which caused inconsistent behavior.The default log level is now set to
ANSIBLE_PYLIBSSH_TRACEand the downstream loggers are able to trim the verbosity down. If you need performance, it is possible to disable logging on thelibsshside at the source by setting a lower logging value, for example:ssh_session.set_log_level(ANSIBLE_PYLIBSSH_NOLOG)
Additionally, the log level can be now be set also through the session initializer:
ssh = Session(log_verbosity=ANSIBLE_PYLIBSSH_TRACE)
or the
connect()method arguments:ssh.connect(log_verbosity=ANSIBLE_PYLIBSSH_TRACE)
Setting any levels imported from
loggingis also supported.Related issues and pull requests on GitHub: #597.
Packaging updates and notes for downstreams
Started shipping binary
armv7lwheels – by @webknjaz.Related issues and pull requests on GitHub: #648.
Upgrading cibuildwheel to v2.22.0 also picked up Python 3.13 and enabled respective wheels to be built – by @webknjaz.
Related issues and pull requests on GitHub: #648.
The CI/CD/packaging infrastructure has been updated to produce source distribution file names consistent with the requirement of uploading artifacts compliant with the core packaging metadata 2.2 or newer to PyPI and TestPyPI – by @webknjaz.
Along with that, the infrastructure has been adjusted to expect PEP 625-conforming names in its guard rails checks – with some @cidrblocks help.
Upgrading cibuildwheel to v3.1.0 also picked up Python 3.14 and enabled respective wheels to be built – by @webknjaz.
Building the free-threaded wheels remains disabled, though.
While upgrading cibuildwheel to v3.1.4, its defaults changed to attempt building wheels for the RISC-V architecture. This target is now disabled explicitly due to the lack of infrastructure – by @webknjaz.
We may enable it at a later time as a separate dedicated effort.
Due to cibuildwheel to v3 bundling delocate 0.13.0 that enforces deployment-target consistency with the brew-installed copy of the
libsshin the build jobs, the macOS wheels we build now require macOS version 15.0 or newer.– by @cidrblock and @webknjaz
The core packaging metadata now reflects that we test the project under Python 3.13 and 3.14 (with GIL enabled) – by @cidrblock and @webknjaz.
The pre-cached
armv7limages we build for the packaging infrastructure are now correctly tagged with thelinux/arm/v7OCI platform tag – by @webknjaz.Related issues and pull requests on GitHub: #810.
The build backend configuration no longer sets the deprecated
bdist_wheel.universalsetting – by @webknjaz.This does not influence the packaging artifacts in any way.
Related issues and pull requests on GitHub: #811.
The build backend has been configured to exclude
.git_archival.txtfrom source distributions built from Git – by @webknjaz.This reduces the number of false positive warning the backend outputs.
Related issues and pull requests on GitHub: #811.
Contributor-facing changes
The repository is now set up to auto-format Python files with Ruff. Cython keeps being formatted by
cython-lint.– by @webknjaz
The linting configuration now uses Ruff to run additional checks on pure Python modules – by @webknjaz.
Related commits on GitHub: @8170954.
cibuildwheelstarted making use of thearmv7lcontainer image following its upgrade to v2.22.0 – by @webknjaz.Related issues and pull requests on GitHub: #648.
Increased the amount of retries in test to avoid possible timeouts on slower systems – by @Jakuje.
Related issues and pull requests on GitHub: #777.
The SSHD start probe client command is now shielded from external environmnent and will no longer attempt using an SSH agent on the machine where the tests are involved, nor will it use alternative authentication methods – by @webknjaz.
Related issues and pull requests on GitHub: #782.
Now that the
macos-13runner VM image has been decommissioned, the CI and CD jobs have been migrated to usemacos-15-intel– by @komaldesai13.This includes giving the macOS build job more time to complete as the new version is a little slower.
Related issues and pull requests on GitHub: #791.
Updated the version of
libsshto the latest release v0.12.0 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #797.
Updated the bundled version of libssh to 0.12.0 in platform-specific wheels published on PyPI – by @Jakuje.
Related issues and pull requests on GitHub: #798.
Added Fedora and ubi9 images to CI/CD pipeline that are relevant in 2026 and removed EOL Fedora versions – by @Jakuje.
Related issues and pull requests on GitHub: #801.
The
pre-commitframework configuration has been updated to be in sync withawx-pluginsand other projects. It now has a few additional linters and a workaround for the outdated ones.– by @webknjaz
Related issues and pull requests on GitHub: #803.
The standalone mentions of
pylibsshhave been replaced withansible-pylibsshin file license headers – by @Jakuje.Related issues and pull requests on GitHub: #804.
The CI/CD/packaging infrastructure has been updated to produce source distribution file names consistent with the requirement of uploading artifacts compliant with the core packaging metadata 2.2 or newer to PyPI and TestPyPI – by @webknjaz.
Along with that, the infrastructure has been adjusted to expect PEP 625-conforming names in its guard rails checks – with some @cidrblocks help.
cibuildwheel has been upgraded to v3.1.4 – by @webknjaz.
Related issues and pull requests on GitHub: #809, #820, #821, #823, #824.
The coverage measurement infrastructure now uses the
ctracemeasurement core across all the Python versions consistently – by @webknjaz.The CI now tests wheels built for Python 3.13 and 3.14 – by @cidrblock and @webknjaz.
The pre-cached
armv7limages we build for the packaging infrastructure are now correctly tagged with thelinux/arm/v7OCI platform tag – by @webknjaz.Related issues and pull requests on GitHub: #810.
The build backend configuration no longer sets the deprecated
bdist_wheel.universalsetting – by @webknjaz.This does not influence the packaging artifacts in any way.
Related issues and pull requests on GitHub: #811.
The CI/CD infrastructure has been set up to avoid parts of the template injection problem in GitHub Actions workflow definitions. The shell entry point has been set to bash for any scripts with extra strictness enabled.
– by @webknjaz
Related issues and pull requests on GitHub: #816.
The CI/CD and packaging infrastructure now sources the PyPI project name from
setup.cfgrather than hardcoding it – by @webknjaz.Related issues and pull requests on GitHub: #817.
The documentation building infrastructure now integrates GitHub-related RST roles using the sphinx-issues extension – by @webknjaz.
Related issues and pull requests on GitHub: #818.
v1.3.0
(2025-10-12)
Bug fixes
The bundled libssh 0.11.2 no longer fails, when the SFTP server announces protocol version 3, but does not provide error message and language tag in the
SSH_FXP_STATUSmessage – by @Jakuje.Related issues and pull requests on GitHub: #222.
Fixed reading files over SFTP that go over the pre-defined chunk size.
Prior to this change, the files could end up being corrupted, ending up with the last read chunk written to the file instead of the entire payload.
– by @Jakuje
Related issues and pull requests on GitHub: #638.
Repetitive calls to
exec_channel()no longer crash and return reliable output – by @Jakuje.Related issues and pull requests on GitHub: #658.
Uploading large files over SCP no longer fails – by @Jakuje.
Related issues and pull requests on GitHub: #661.
Improved performance of SFTP transfers by using larger transfer chunks – by @Jakuje.
Related issues and pull requests on GitHub: #664.
Fixed crash when more operations were called after
session.close()– by @Jakuje.Related issues and pull requests on GitHub: #709.
Features
The underlying
SSH_OPTIONS_KEY_EXCHANGEoption oflibsshis now available askey_exchange_algorithms– by @NilashishC.Related issues and pull requests on GitHub: #675.
Added a
pylibsshext.session.connect()parameteropen_session_retries– by @justin-stephenson.The
open_session_retriessessionconnect()parameter allows a configurable number of retries if libsshssh_channel_open_session()returnsSSH_AGAIN. The default option value is 0, no retries will be attempted.Related issues and pull requests on GitHub: #756.
Added a
pylibsshext.session.connect()parametertimeout_usecto setSSH_OPTIONS_TIMEOUT_USEC.This allows setting the
SSH_OPTIONS_TIMEOUT_USECssh option, thoughSSH_OPTIONS_TIMEOUTis a more practical option.– by @justin-stephenson
Related issues and pull requests on GitHub: #756.
Deprecations (removal in next major release)
Removals and backward incompatible breaking changes
Improved documentation
Added a Communication section to the main documentation page – by @Andersson007.
Related issues and pull requests on GitHub: #640.
Fixed the argument order in the
scp.put()usage example – by @kucharskim.Related issues and pull requests on GitHub: #646.
Packaging updates and notes for downstreams
PyPI now only ships PEP 600-compatible manylinux wheels – by @webknjaz.
Related issues and pull requests on GitHub: #562.
The
pytest-forkeddependency of build, development and test environments was removed – by @Jakuje.The wheels are now built in cached container images with a correctly set platform identifier.
– by @webknjaz
Related issues and pull requests on GitHub: #692.
The
manylinuxbuild scripts now limitcmakebelow version 4 – by @webknjaz.Related issues and pull requests on GitHub: #713.
Stopped skipping SCP tests in the RPM spec – by @Jakuje.
Related issues and pull requests on GitHub: #714.
Started bundling a copy of libssh 0.11.1 in platform-specific wheels published on PyPI – by @Jakuje.
Related issues and pull requests on GitHub: #735.
Updated the bundled copy of OpenSSL to the latest version 3.5.0 in
manylinuxwheels – by @Jakuje.Related issues and pull requests on GitHub: #738.
Updated the bundled version of libssh to 0.11.2 in platform-specific wheels published on PyPI – by @Jakuje.
Related issues and pull requests on GitHub: #753.
The RPM spec file no longer makes use of unpackaged dists from PyPI on RHEL. The configuration is almost identical to the one for Fedora. Only the
setuptools-scmspec is temporarily patched to allow older versions under RHEL.– by @webknjaz
Related issues and pull requests on GitHub: #759.
A workaround has been applied to the in-tree build backend that prevents Cython from hanging when
libsshheader files are missing – by @webknjaz.The patch makes
cythonize()single-threaded becausemultiprocessinggets stuck. The upstream will eventually fix this by migrating toconcurrent.futures.Related issues and pull requests on GitHub: #762, #769, #770.
Updated the bundled version of libssh to 0.11.3 in platform-specific wheels published on PyPI – by @Jakuje.
Related issues and pull requests on GitHub: #766.
Contributor-facing changes
The manylinux build scripts have been adjusted to resolve the dependency conflict between certain
packagingandsetuptoolsversions – by @webknjaz.Previously, this was making some of the CI jobs crash with a traceback when building said wheels.
Related commits on GitHub: @1dfbf70.
The Git archives are now immutable per the packaging recommendations. This allows downstreams safely use GitHub archive URLs when re-packaging – by @webknjaz.
Related commits on GitHub: @ea34887.
Manylinux wheels are no longer built using custom shell scripts. Instead, this is delegated to the
cibuildwheeltool.– by @webknjaz
Related issues and pull requests on GitHub: #562.
Updated the version of
libsshto the latest release v0.11.1 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #636.
All the uses of
actions/upload-artifact@v3andactions/download-artifact@v3have been updated to usev4. This also includes bumpingre-actors/checkout-python-sdisttorelease/v2as it usesactions/download-artifactinternally.– by @NilashishC and @webknjaz
Related issues and pull requests on GitHub: #676.
The
dumb-pypi-produced static package index now renders correct URLs to the distribution packages – by @webknjaz.Related issues and pull requests on GitHub: #678, #679, #749.
The CI is now configured to use tox run --installpkg when testing pre-built dists. This replaces the previously existing tox-level hacks in
test-binary-distsandtest-source-distsenvironments that have now been removed.– by @webknjaz
Related issues and pull requests on GitHub: #688.
The wheel building workflows have been updated to set the OCI image platform identifiers to legal values like
linux/arm64.– by @webknjaz
Related issues and pull requests on GitHub: #692.
The CI is now configured to always set job timeout values. This will ensure that the jobs that get stuck don’t consume all 6 hours just hanging, improving responsiveness and the overall CI/CD resource usage.
– by @webknjaz
Related issues and pull requests on GitHub: #706.
The linting is now configured to check schemas of the Read The Docs configuration file and the GitHub Actions CI/CD workflow files in addition to enforcing timeouts.
– by @webknjaz
Related issues and pull requests on GitHub: #707.
The
multiarch/qemu-user-staticimage got replaced withtonistiigi/binfmtbecause the latter is no longer maintained and the former includes the fixed version of QEMU.– by @webknjaz
Related issues and pull requests on GitHub: #713.
Added Fedora 41 and 42 to CI configuration – by @Jakuje.
Related issues and pull requests on GitHub: #715.
Removed needless step from CI adjusting centos8 repositories – by @Jakuje.
Related issues and pull requests on GitHub: #716.
The CI/CD infrastructure no longer pre-builds custom manylinux images for building wheel targeting
manylinux1,manylinux2010andmanylinux2014tags.– by @webknjaz
Related issues and pull requests on GitHub: #730.
The host OS is now ARM-based when building
manylinux_*_*_aarch64images for CI/CD – by @webknjaz.Related issues and pull requests on GitHub: #731.
False negative warnings reported by
coveragepywhen are now disabled. They are evident whenpytest-covruns with thepytest-xdistintegration.pytest8.4 gives them more visibility and outfilterwarnings = errorsetting was turning them into errors before this change.– by @webknjaz
Related issues and pull requests on GitHub: #732.
GitHub Actions CI/CD no longer runs jobs that install source distributions into the tox environments for testing – by @webknjaz.
This is a temporary workaround for an upstream bug in tox and said jobs are non-essential.
Related issues and pull requests on GitHub: #733.
Updated the pre-built
libffiversion to 3.4.8 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #734.
Reverted workaround keeping the old CMake version installed as the new
libsshworks with newer versions – by @Jakuje.Related issues and pull requests on GitHub: #737.
The CI infrastructure now produces
manylinux_2_31_armv7lbase images withlibsshandopensslpre-built – by @Jakuje and @webknjaz.Related issues and pull requests on GitHub: #740.
Started caching
manylinuxbuild images to be used for producing2_34tagged wheels inbuild-manylinux-container-imagesworkflow – by @KB-perByte.Related issues and pull requests on GitHub: #741.
The
reusable-cibuildwheel.ymlworkflow has been refactored to be more generic andci-cd.ymlnow holds all the configuration toggles – by @webknjaz.Related issues and pull requests on GitHub: #750.
Updated the version of
libsshto the latest release v0.11.2 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #752.
When building wheels, the source distribution is now passed directly to the
cibuildwheelinvocation – by @webknjaz.Related issues and pull requests on GitHub: #754.
Fixed link to python3-pytest for CentOS 9 Stream as it was recently moved from CRB to AppStream – by @Jakuje.
Related issues and pull requests on GitHub: #758.
The CI/CD jobs for smoke-testing RPMs have been simplified and now, they execute the same steps for all distro types. They make use of
pyproject-rpm-macroseven under RHEL. Installing external RPMs is the only conditional step that is skipped on Fedora.– by @webknjaz
Related issues and pull requests on GitHub: #759.
The
requiressetting has been removed fromtox.ini, which works around the upstream tool bug. This enabled us to re-introduce CI jobs testing against sdist under Python 3.12 and newer – by @webknjaz.Related issues and pull requests on GitHub: #764.
Updated the version of
libsshto the latest release v0.11.3 in the cachedmanylinuxbuild environment container images – by @Jakuje.Related issues and pull requests on GitHub: #765.
Changed tests to use more lightweight ECDSA keys to avoid timeouts – by @Jakuje.
Related issues and pull requests on GitHub: #768.
v1.2.2
(2024-06-27)
Bug fixes
v1.2.1
(2024-06-27)
Bug fixes
Packaging updates and notes for downstreams
The RPM specification now opts out of demanding that the compiled C-extensions have a Build ID present under EL – by @webknjaz.
The RPM specification has been updated to pre-build the vendored copy of
setuptools-scmwith the isolation disabled, addressing the build problem in EL 9 – by @webknjaz.Related commits on GitHub: @dd85dde.
The RPM definition now runs import self-checks when it is built for Fedora Linux – by @webknjaz.
Related issues and pull requests on GitHub: #615.
Contributor-facing changes
v1.2.0.post4
(2024-06-09)
Packaging updates and notes for downstreams
Substituting the
ghrole in source distribution long description has been simplify to stop attempting to make URLs to arbitrary GitHub addresses – by @webknjaz.Related commits on GitHub: @f4ad1b7.
The in-tree PEP 517 build backend’s regular expression has been hotfixed to replace the “project” substitution correctly – by @webknjaz.
Previously, it was generating a lot of noise instead of a nice description. But not anymore.
Related issues and pull requests on GitHub: #92752210.
v1.2.0.post2
(2024-06-08)
Packaging updates and notes for downstreams
The automation now replaces the “project” RST substitution in the long description and GitHub Discussions/Releases – by @webknjaz.
Related commits on GitHub: @13374a7.
The CI/CD automation has been fixed to include changelog updates into source distribution tarballs – by @webknjaz.
Related commits on GitHub: @627f718.
v1.2.0
(2024-06-07)
Bug fixes
ansible-pylibssh no longer crashes when received EOF or when channel is not explicitly closed – by @pbrezina.
Previously, ansible-pylibssh crashed if
channel.recvwas called andlibsshreturnedSSH_EOFerror. It also crashed on some special occasions where channel was not explicitly closed and the session object was garbage-collected first.Related issues and pull requests on GitHub: #576.
Features
Started exposing the
SSH_OPTIONS_PUBLICKEY_ACCEPTED_TYPESandSSH_OPTIONS_HOSTKEYSoptions publicly – by @Qalthos.Related issues and pull requests on GitHub: #527.
The
request_exec()method was added to theChannelclass. It exposes an interface for calling the respective low-level C-API of the underlyinglibsshlibrary – by @pbrezina.Additionally, the following calls to
libsshare now available in the same class:request_exec(),send_eof(),request_send_signal()andis_eofwhich is exposed as aproperty.Related issues and pull requests on GitHub: #576.
Improved documentation
Fixed spelling of “Connect” in the
Session.connect()docstring – by @donnerhacke.Related issues and pull requests on GitHub: #474.
Added a tip to the installation guide on how to set compiler flags when installing from source – @webknjaz.
Related issues and pull requests on GitHub: #499.
Fixed the example of invoking remote commands by using
Channel.exec_command()in snippets – by @pbrezina.Its previously showcased version wasn’t functional.
Related issues and pull requests on GitHub: #576.
Packaging updates and notes for downstreams
A flaw in the logic for copying the project directory into a temporary folder that led to infinite recursion when
TMPDIRwas set to a project subdirectory path. This was happening in Fedora and its downstream due to the use of pyproject-rpm-macros. It was only reproducible withpip wheeland was not affecting thepyproject-buildusers.Related commits on GitHub: @89c9b3a.
From now on, the published distribution package artifacts for the new releases are signed via Sigstore – by @webknjaz.
This is happening as a part of the GitHub Actions CI/CD workflow automation and the signatures are uploaded to the corresponding GitHub Release pages.
Related commits on GitHub: @986988a.
The platform-specific macOS wheels are now built using the Python interpreter from https://python.org. They are tagged with
macosx_10_9– by @webknjaz.Related issues and pull requests on GitHub: #333.
The
tomlbuild time dependency has been replaced withtomli– by @webknjaz.The
tomlidistribution is only pulled in under Python versions below 3.11. On 3.11 and higher, the standard library moduletomllibis now used instead.Related issues and pull requests on GitHub: #501.
Started using the built-in
setuptools-scmGit archive support under Python 3.7 and higher – @webknjaz.Related issues and pull requests on GitHub: #502.
Added support for Python 3.12 – by @Qalthos.
It is now both tested in the CI and is advertised through the Trove classifiers.
Related issues and pull requests on GitHub: #532.
The
Cythonbuild time dependency now has the minimum version of 3.0 under Python 3.12 and higher – by @webknjaz.The previous versions of
Cythonare still able to build the project under older Python versions.Related issues and pull requests on GitHub: #540.
PEP 660 is now enabled – @webknjaz.
Previously, due to restrictive PEP 517 hook reimports, our in-tree build backend was losing non-PEP 517 hooks implemented in newer versions of
setuptoolsbut not the earlier ones. This is now addressed by reexporting everything thatsetuptoolsexposes with a wildcard.Related issues and pull requests on GitHub: #541.
The
setuptools-scmbuild dependency CI pin was updated to 8.1.0 — this version fixes a date parsing incompatibility introduced by Git 2.45.0 (pypa/setuptools_scm#1038, pypa/setuptools_scm#1039) – by @webknjaz.Related issues and pull requests on GitHub: #601.
Contributor-facing changes
The Changelog page for the tagged release builds on Read The Docs does not attempt showing the draft section anymore – by @webknjaz.
Related commits on GitHub: @852d259.
Adjusted the publishing workflow automation to pre-configure Git before attempting to create a tag when building a source distribution – by @webknjaz.
Related commits on GitHub: @f07296f.
The CI configuration for building the macOS platform-specific wheels switched to using
cibuildwheel– by @webknjaz.Related issues and pull requests on GitHub: #333.
The OS-level tox package was upgraded to v3.28.0 in the UBI9 CI runtime – by @Qalthos.
Fixed spelling of “Connect” in the
Session.connect()docstring – by @donnerhacke.Related issues and pull requests on GitHub: #474.
The Packit CI access to the internet has been restored – by @Qalthos.
Related issues and pull requests on GitHub: #507.
Started building
manylinux_2_28base images for testing and packaging in the CI/CD infrastructure – by @Qalthos.Related issues and pull requests on GitHub: #533.
Switched back to using Cython’s native plugin for measuring code coverage – by @webknjaz.
Related issues and pull requests on GitHub: #538.
Added separate changelog fragment types for contributor- and downstream-facing patches – by @webknjaz.
Their corresponding identifiers are
contribandpackagingrespectively. They are meant to be used for more accurate classification, where one would resort to usingmiscotherwise.Related issues and pull requests on GitHub: #539.
PEP 660 is now enabled – @webknjaz.
This effectively means that the ecosystem-native editable install mode started working properly.
Related issues and pull requests on GitHub: #541.
The duplicated jobs matrices for building manylinux wheels now reside in a single GitHub Actions CI/CD reusable workflow definition.
Related issues and pull requests on GitHub: #559.
The duplicated jobs matrices of the text jobs now reside in a single GitHub Actions CI/CD reusable workflow definition.
Related issues and pull requests on GitHub: #560.
Fixed the location of release workflow in the Release Guide document – by @Qalthos.
Related issues and pull requests on GitHub: #565.
The
setuptools-scmbuild dependency CI pin was updated to 8.1.0 — this version fixes a date parsing incompatibility introduced by Git 2.45.0 (pypa/setuptools_scm#1038, pypa/setuptools_scm#1039) – by @webknjaz.Related issues and pull requests on GitHub: #601.
The CI/CD configuration was fixed to allow publishing to PyPI and other targets disregarding the test stage outcome. This used to be a bug in the workflow definition that has now been fixed.
Related issues and pull requests on GitHub: #602.
v1.1.0 (2022-12-05)
Features
Deprecations (removal in next major release)
Documentation
Added a Release Guide for making new releases – by @webknjaz (#413)
Miscellaneous
Started testing RPM packaging spec with Packit service – by @webknjaz and @TomasTomecek (#227, #246)
Removed the remains of Python 2 compatibility code from the in-tree PEP 517 build backend – by @webknjaz (#377)
Fixed removing
expandvarsfrompyproject.tomlin an RPM spec – by @webknjazBefore this patch, the
sedinvocation removed entirebuild-system.requiresentry from there, in rare cases but this won’t be happening anymore. (#378)Declared official support of CPython 3.11 – by @Qalthos (#396)
Started shipping sdists built with Cython v0.29.32 – by @webknjaz (#399)
Started building RPMs with Cython v0.29.32 – by @webknjaz (#402)
Added an SSH connection re-try helper to tests – by @webknjaz (#405)
v1.0.0 (2022-09-14)
Features
Added
password_promptargument toconnect()to override the default prompt of “password:” when using keyboard-interactive authentication – by @Qalthos (#331)Added support for
:fd:socket option – by @sabedevops (#343)
Miscellaneous
v0.4.0 (2022-04-26)
Bugfixes
Improved
channel.exec_commandto always use a newly createdssh_channelto avoid segfaults on repeated calls – by @Qalthos (#280)Fixed password prompt match in
pylibsshext.session.Session.authenticate_interactive()to strip whitespace, check that the prompt only ends withpassword:, and added a little extra logging – by @dalrrard (#311)
Backward incompatible changes
v0.3.0 (2021-11-03)
Bugfixes
Features
Documentation
Miscellaneous
Started building AARCH64 base images with Buildah+Podman in GitHub Actions CI/CD – @webknjaz (#181)
Restructured the in-tree PEP 517 build backend into multiple submodules moving the entry-point to
pep517_backend.hooksthat also facilitates extraction of user-definedconfig_settingspassed by the end-user (packager) via thebuildCLI command – @webknjaz (#200)Updated manylinux build script to build libssh with GSSAPI enabled – @Qalthos (#203)
Added an initial RPM spec continuously tested in the CI – @webknjaz (#205)
Added additional details when SFTP write errors are raised – by @Qalthos (#216)
Made
auditwheelonly keep one platform tag in the produced wheel names – @webknjaz (#224)Improved manylinux build scripts to expect dual-aliased manylinux tags produced for versions 1/2010/2014 along with their PEP 600 counterparts after
auditwheel repair– @webknjaz (#226)Enabled self-test checks in the RPM spec for Fedora – @webknjaz (#228)
Enabled self-test checks in the RPM spec for CentOS – @webknjaz (#235)
Enabled self-test checks in the RPM spec for RHEL – @webknjaz (#236)
Added
NAME = "VALUE"to flake8-eradicate whitelist to work around test false positive introduced in flake8-eradicate 1.1.0 – by @Qalthos (#258)Stopped testing
pylibsshbinary wheels under Ubuntu 16.04 in GitHub Actions CI/CD because it is EOL now – @webknjaz (#260)Fixed failing fast on problems with
rpmbuildin GitHub Actions CI/CD under Fedora – @webknjaz (#261)Declare
python3-pipa build dependency under Fedora fixing the RPM creation job in GitHub Actions CI/CD under Fedora – @webknjaz (#262)Replaced git protocols in pre-commit config with https now that GitHub has turned off git protocol access – @Qalthos (#266)
v0.2.0 (2021-03-01)
Bugfixes
Features
Documentation
Miscellaneous
Migrated the “draft changelog” plugin to the external sphinxcontrib-towncrier implementation – by @webknjaz (#123)
Declared official support of CPython 3.9 – by @webknjaz (#152)
v0.1.0 (2020-08-12)
Bugfixes
Enhanced sftp error handling code to match with libssh error messages – by @ganeshrn (#27)
Fixed session timeout issue, the data type of timeout is expected by
ssh_options_setis of typelong int– by @ganeshrn (#46)Fixed sftp file get issue. On py2 The file
write()method returnsNoneon py2 if bytes are written to file successfully, whereas on py3 it returns total number of bytes written to file. Added a fix to check for the number of bytes written only in the case whenwrite()does not returnNone– by @ganeshrn (#58)Fixed double close issue, added logic to free the channel allocated memory within __dealloc__() – by @ganeshrn (#113)
Features
Added cython extension for libssh client API’s initial commit – by @ganeshrn (#1)
Added proxycommand support for session and update session exception to
LibsshSessionException– by @ganeshrn (#10)Added support for host key checking with authentication – by @ganeshrn (#15)
Changed pylibssh dir to pylibsshext to avoid ns collision – by @ganeshrn (#25)
Added sftp get functionality to fetch file from remote host – by @amolkahat (#26)
Added support to receive bulk response for remote shell – by @ganeshrn (#40)
Added the support for keyboard-authentication method – by @Qalthos (#105)
Backward incompatible changes
Documentation
Miscellaneous
Updated requirements file to replace
requirements.txtwithrequirements-build.in– by @akasurde (#14)Made tox’s main env pick up the in-tree PEP 517 build backend – by @webknjaz (#72)
Refactored sphinx RST parsing in towncrier extension – by @ewjoachim (#119)
Hotfixed the directive in the in-tree sphinx extension to always trigger the changelog document rebuilds so that it’d pick up any changelog fragments from disk – by @webknjaz (#120)
Turned the Townrier fragments README doc title into subtitle – by @webknjaz
The effect is that it doesn’t show up in the side bar as an individual item anymore. (#125)
Integrated Markdown support into docs via the MyST parser – by @webknjaz (#126)
Switched the builder on Read the Docs to dirhtml so it now generates a dir-based URL layout for the website – by @webknjaz (#127)
Enabled sphinx.ext.autosectionlabel Sphinx extension to automatically generate reference targets for document sections that can be linked against using
:ref:– by @webknjaz (#128)