Repository navigation
v1.5.0a3
Pre-release📝 Release notes
📦 PyPI page: https://pypi.org/project/ansible-pylibssh/1.5.0a3
🚧 v1.5.0a3 is marked as a pre-release.
🔗 This release has been produced by the following workflow run: https://github.com/ansible/pylibssh/actions/runs/39343739334
v1.5.0a3
(2026-10-19)
Bug fixes
-
Removed non-mandatory EOF check after the SCP download procedure,
which was causing race conditions with some Cisco devices -- by
@timway. -
The version detection fallback, used when the build-time generated
version module is missing, now relies onimportlib.metadatainstead
ofpkg_resourcesthat is unavailable with recentsetuptools
releases -- by @webknjaz.Related issues and pull requests on GitHub: #900.
Features
-
Formalized the
SFTP.get()andSFTP.put()API to accept
os.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_STRINGand that would
implement~object.__len__()interface, which could result in
unexpected behavior even for UTF8 strings. Anything else thanbytes
now raisesTypeError-- by @Jakuje.Related issues and pull requests on GitHub: #875.
-
Changed the
SFTP.get()andSFTP.put()API to accept onlystr
type 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.
Improved documentation
-
Added docstrings for
SFTP.get()andSFTP.put()methods -- by
@Jakuje.Related issues and pull requests on GitHub: #870.
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 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 read621metadata --
by @webknjaz.Related issues and pull requests on GitHub: #812.
-
The RPM spec now relaxes the
setuptoolsrequirement and the639
license metadata on RHEL 10 and older, whosesetuptoolsreleases
predate their support -- by @webknjaz.Related issues and pull requests on GitHub: #812.
-
The core packaging metadata is now declared in the
621[project]
table ofpyproject.tomlinstead ofsetup.cfg, with the license
expressed per639, which requiressetuptools77.0.1 or newer -- by
@webknjaz.Related issues and pull requests on GitHub: #812.
-
Removed the
expandvarsbuild 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 bundled
libsshheaders, 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 through
CPPFLAGS, 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.
Contributor-facing changes
-
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:
122a1f1f. -
The in-tree guidance for AI agents now asks for commit messages that
passgitlint-- 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:
083858a9. -
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:
a55c74ff. -
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:
9b135663. -
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:
2b149b58. -
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:
bbad5215. -
The in-tree guidance for AI agents now covers the commit message
shape, the use of longtoxsubcommands 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:
9be75f22. -
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 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 viaCo-Authored-Bytrailers and
leaves the change note byline off fully agentic work -- by @webknjaz.Related commits on GitHub:
1227e231. -
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:
5105e647. -
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 emulated Linux wheel builds stopped rebuilding the
aarch64and
x86_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:
5f974f89. -
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:
9faac80a. -
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 thatdarglintchecks test docstrings -- steered by @webknjaz,
typed by a robot that errs.Related commits on GitHub:
f97d68ec. -
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
sharedlibsshlibrary with a statically linked OpenSSL for macOS
x86_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_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.
-
The test suite gained a home for test doubles of the components that
end-to-end tests intercept, undertests/_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 coverage measurement now includes code running in processes
started viamultiprocessing, whichpytest-cov7 stopped measuring
on its own -- by @webknjaz.Related issues and pull requests on GitHub: #898.
-
The
linttox <tox:index>environment has been renamed to
pre-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 thepre-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
517build 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
sshd
to 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 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 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 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 themanylinux1
images -- by @webknjaz.Related issues and pull requests on GitHub: #920.
-
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.