Repository navigation
RF: switch from unmaintained fusepy to mfusepy - #139
Merged
Merged
Conversation
fusepy has had no release since 3.0.1 (2018) and still has the FUSE._wrapper bugs (fusepy/fusepy#124, #146; worked around in #136): a BaseException, or an OSError without errno such as TimeoutError, raised by a callback makes the error handler itself fail with NameError, so the error is lost and garbage is returned to libfuse. mfusepy (github.com/mxmlnkn/mfusepy, ISC, on PyPI and conda-forge) is the maintained fork used by ratarmount: it fixes both bugs and adds libfuse 3 support, preferring libfuse 2 when both are installed. mfusepy 3 is not a drop-in replacement: it calls the callbacks directly instead of dispatching via Operations.__call__, which DataLadFUSE overrode to map FUSE paths into the dataset and hide .git. After a bare import swap the mount would expose the host's / instead of the dataset. Do that mapping in __getattribute__ instead (as mfusepy's LoggingMixIn does) and cover it with an in-process test. - depend on mfusepy ~= 3.1 instead of fusepy; drop fsspec's "fuse" extra, which only pulled in fusepy - README: libfuse 2 or 3 will do, libfuse2t64 is no longer needed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoaVLBBnhaZqmhrk813G2Z
mfusepy works with libfuse 3 as well, so installing fuse3 is enough and the per-release instructions for adding libfuse 2 are no longer needed. Mention FUSE_LIBRARY_NAME=fuse3 for when both are installed, and use mfusepy in the FUSE() example and for the autodoc mock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoaVLBBnhaZqmhrk813G2Z
mfusepy supports libfuse 3, so exercise it: on that row install fuse3 and set FUSE_LIBRARY_NAME=fuse3 (now passed through tox). The py314-full row keeps testing libfuse 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoaVLBBnhaZqmhrk813G2Z
Documentation build overview
6 files changed ·
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #139 +/- ##
==========================================
- Coverage 92.84% 84.48% -8.36%
==========================================
Files 13 14 +1
Lines 1188 1502 +314
==========================================
+ Hits 1103 1269 +166
- Misses 85 233 +148 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
yarikoptic
pushed a commit
that referenced
this pull request
Oct 6, 2026
…n-br2ms9 Brings in the switch from fusepy to mfusepy (#139). Conflicts: - CONTRIBUTING.md, docs/source/installation.rst: take master's FUSE installation instructions (FUSE 3 alone suffices with mfusepy); keep this branch's other changes to the installation page - docs/source/conf.py: keep this branch's autodoc defaults, with master's mfusepy mock Also update the troubleshooting entry for failing reads in the mount: with mfusepy, programs see "Invalid argument" and `datalad fusefs` prints the actual error, instead of fusepy's "Numerical result out of range". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZnKRgtotR2MqJqkzJfvRU
yarikoptic
pushed a commit
that referenced
this pull request
Oct 7, 2026
…xception" This reverts commit 93a0bc5. No longer needed: #139 replaced fusepy with mfusepy, which has the FUSE._wrapper bugs fixed. With fusepy gone, the patch module would even break importing datalad_fuse.fuse_, as it imports fuse. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NoaVLBBnhaZqmhrk813G2Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why. fusepy has had no release since 3.0.1 (2018) and still has the
FUSE._wrapperbugs (fusepy/fusepy#124, fusepy/fusepy#146) that #136 works around with a runtime patch. mfusepy is the maintained fork:_wrapperis a regular method, andisinstance(e.errno, int)guards the errno check;FUSE_LIBRARY_NAME=fuse3forces 3).Not a drop-in swap. Since 3.0, mfusepy calls
Operationsmethods directly instead of throughOperations.__call__, whichDataLadFUSEoverrode to map FUSE paths into the dataset and hide.git. After a bareimport mfusepy as fuse, the mount would expose the host's/instead of the dataset; the new test catches exactly that.Changes
setup.cfg:mfusepy ~= 3.1replacesfusepy; thefuseextra is dropped fromfsspec, since it only pulled in fusepy.fuse_.py:__call__becomes__getattribute__, which wraps every path-takingOperationscallback (the same approach as mfusepy'sLoggingMixIn).test_callbacks_map_paths: an in-process test (no mount) of the path mapping, of.githiding, and of thecreate()signature that mfusepy inspects.fuse3alone is now enough, so the per-release instructions for adding libfuse 2 are gone. TheFUSE()example and the autodoc mock use mfusepy.py314-libfuserow runs against libfuse 3 (fuse3package plusFUSE_LIBRARY_NAME=fuse3, passed through tox).py314-fullstays on libfuse 2.Relation to #136. Once this is merged, #136's
_fusepy_patch.pycommit is no longer needed; its test stabilization stays useful. Whichever lands second needs a small conflict fix infuse_.py's imports and intest.yml.Tested locally (Ubuntu 24.04, Python 3.13,
--libfuse --no-network):test_parallel_access, which fetches archive.org files that were unreachable from the test machine. Unmodified master with fusepy fails the same test there too, with fusepy'sERANGEsymptom where mfusepy gives a cleanEINVAL.Follow-up, not in this PR:
DataLadFUSE.utimenscallsos.utime(..., ns=times), but withoutuse_ns = Trueit receives float seconds, so it has always failed. Switching touse_nswould also mean returningst_*timeas nanoseconds; mfusepy 4 will make that mandatory.🤖 Generated with Claude Code
https://claude.ai/code/session_01NoaVLBBnhaZqmhrk813G2Z
Generated by Claude Code