Skip to main content

FS Next

PyFilesystem2's filesystem API, maintained for modern Python.

PyPI Compatibility License: MIT

Install · Feature coverage · Test coverage · Roadmap · Original repository

Built on PyFilesystem2 by Will McGugan and the PyFilesystem2 contributors. FS Next preserves their code, history and MIT license, and adds focused maintenance changes. This independent fork is not an official PyFilesystem release or a from-scratch reimplementation.

Work with local directories, memory, archives and FTP through the same fs API:

from fs import open_fs

with open_fs("mem://") as storage:
    storage.writetext("hello.txt", "Hello, FS Next")
    print(storage.readtext("hello.txt"))

At a glance

Release: 0.1.1, with the complete published upstream regression suite. Audit and local measurements: 2026-10-04. See the release audit for the comparison with the actual PyPI fs==2.4.16 package.

Measure Current status What it means
Upstream source retained 57 / 57 Python modules All upstream fs/**/*.py paths remain; no original public definitions were removed
Full suite 2,760 passed · 30 skipped macOS / Python 3.14 snapshot; platform-specific counts can differ
Test coverage 92.78% statements · 86.02% branches Measured execution coverage; scope and reproduction below
Compatibility matrix 15 required jobs Linux, macOS, Windows × Python 3.10–3.14; 3.15 preview also gates publishing
External plugin probe 2 plugins pyfatfs API probe; migrated S3 plugin with normal pip resolution and emulator integration
Roadmap checklist 13 / 15 done (87%) Current development checklist below, not effort or production readiness
Release Stable 0.1.1 PyPI · Release notes

Install

Use a fresh Python 3.10+ virtual environment:

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
python -m pip install fs-next==0.1.1

Do not install fs and fs-next together. Both distributions provide the fs package and can overwrite each other's files. Existing imports stay from fs import ..., but a package declaring Requires-Dist: fs will still ask pip to install upstream fs. Downstream dependency metadata must be migrated. See the migration guide before changing existing environments.

Support and migration

Python 3.10 remains the minimum; every later CPython minor is a support target. Required CI covers 3.10–3.14 on Linux/macOS/Windows, with a separate 3.15 preview workflow that also gates publishing. See the support policy for the difference between configured checks, verified results and future support.

The migration guide includes a locally adapted S3 plugin installed with normal dependency resolution and checked with pip check. Its integration probe uses an S3 emulator. The test review documents new FTP date/ZIP regressions, Python 3.15 doctest compatibility, remaining skips and third-party warnings. The release audit adds the original PyPI regression suite and resolves the 3.15 FTPS/hash failure.

Feature coverage

What comes from upstream?

FS Next starts from the complete PyFilesystem2 source at 77a8562, whose package version is 2.4.16. 57/57 retained modules means source retention, not a claim of 100% behavioral compatibility. Most functionality and tests below were built by the upstream contributors and are inherited here.

Upstream capability Implementation in FS Next Current evidence / limits
Local, temporary and application directories OSFS, TempFS, AppFS retained Full inherited suites in the 15-job CI matrix
In-memory storage MemoryFS retained Full inherited suite
ZIP and TAR archives ZipFS, TarFS retained Archive suites; separate installed-wheel ZIP round trip
FTP and FTPS FTPFS retained; cleanup and TLS shutdown fixes added Loopback FTP and encrypted FTPS contract suites, including parallel transfers; hosted servers remain outside this audit
Mounting and combining filesystems MountFS, MultiFS, SubFS retained Inherited mount, multi and subfilesystem suites
Wrappers and read-only views WrapFS and wrapper helpers retained Inherited wrapper suites
Copy, move, mirror, walk, glob and paths Upstream utilities retained Inherited utility suites
URL openers and namespace extensions Same fs.opener group and fs namespace Modern metadata discovery, invalid-opener and split-namespace regressions
External backends Plugin mechanism retained pyfatfs FAT12 and S3 emulator round trips; SSH and hosted S3 remain unverified
Legacy Python support Deliberately narrowed to Python 3.10+ Python 2 and Python <3.10 are outside this fork's support target

What FS Next changes

Area Upstream baseline FS Next 0.1.1
Runtime packaging pkg_resources and setuptools required Standard-library pkgutil and importlib.metadata; no runtime setuptools
Absolute FS URLs Uses pathname2url Preserves FS URL paths across the Python 3.14 behavior change
FTP cleanup Finalization can wait for a server response; unused close can connect Nonblocking socket cleanup during finalization, explicit close handling, failed-opener cleanup
FTPS transfers TLS data shutdown could time out in worker uploads Complete TLS shutdown before the transfer response; close sockets on failure
Hash errors on Python 3.15 Unsupported algorithms can leave OpenSSL error state on the calling thread Isolate hash construction; preserve valid aliases and TLS connections
Test compatibility Older unittest aliases and pyftpdlib test internals Modern assertions and public pyftpdlib server API
Distribution fs / import fs fs-next / import fs; package dependency names still differ

Test coverage

92.78% statement coverage (4,985 / 5,373) · 86.02% branch coverage (1,237 / 1,438).

Combined coverage.py score: 91.35%.

Measured on macOS arm64, CPython 3.14.7 with coverage.py 7.16.2 against the 0.1.1 release candidate. The full tests/ suite includes loopback FTP and FTPS. Measurement covers fs/, excluding the reusable fs/test.py test helper, using the existing coverage exclusions in setup.cfg. Subprocess-only execution is not collected. This is a single-platform snapshot, not merged coverage across CI.

Validation Result Evidence
Full cross-platform suite 15 required jobs Compatibility workflow
Upstream parity Original PyPI regression suite, API inventory and installed behavior Audit
Finalizer/thread errors Treated as test failures CI configuration
Third-party entry point pyfatfs 1.1.0 passed on 3.10 / 3.14 Probe; installed with --no-deps, not a resolver compatibility claim
Published wheel Fresh PyPI installation passed without setuptools Smoke check: memory, disk, ZIP, Unicode paths
Coverage detail Per-module results and totals Coverage snapshot

Reproduce coverage from a checkout:

python -m pip install -e '.[test]' coverage==7.16.2
python -m coverage erase
python -m coverage run -m pytest tests -q \
  -W error::pytest.PytestUnraisableExceptionWarning \
  -W error::pytest.PytestUnhandledThreadExceptionWarning
python -m coverage combine
python -m coverage report

Remaining gaps: 30 tests are skipped in the macOS snapshot, deprecated API warnings remain, and remote services, arbitrary plugins and production workloads need further validation. See the release audit.

Roadmap

█████████████░░ 13 / 15 tasks complete · 87%

This is the initial maintenance roadmap, with future work proposed below and no promised dates. Each checkbox counts once; tasks differ in size. The percentage tracks this checklist, independently of inherited features and test coverage.

Milestone Progress Status
1. Modern Python alpha 6/6 · 100% ✅ Shipped in 0.1.0a1
2. Compatibility evidence 3/5 · 60% 🟡 Remote backend validation remains
3. Stable release preparation 4/4 · 100% ✅ 0.1.0 release audit

1. Modern Python alpha — 6/6

  • Preserve upstream source, history, MIT notices and fs imports.
  • Remove runtime setuptools/pkg_resources and retain opener discovery.
  • Fix Python 3.14 URL behavior and modernize test dependencies.
  • Fix FTP cleanup stalls and failed-opener connection cleanup.
  • Pass the full suite on 3 operating systems × 3 Python versions.
  • Publish an alpha via Trusted Publishing and verify a fresh PyPI install.

2. Compatibility evidence — 3/5

  • Exercise a real external plugin and document its dependency-name conflict.
  • Publish a reproducible coverage baseline and capability matrix.
  • Add Python 3.11 and 3.13 to CI and publish the support policy.
  • Validate representative S3/SSH plugins and document clean dependency migration. S3 emulator and local metadata migration completed; SSH remains.
  • Validate FTPS and representative external FTP servers beyond loopback tests. Loopback FTPS contract suite completed; hosted FTP remains.

3. Stable release preparation — 4/4

  • Review skipped tests and uncovered branches; add regressions for identified gaps.
  • Resolve remaining deprecated API use and review runtime dependencies. Review and third-party warnings.
  • Adapt upstream API documentation and publish a migration guide with tested examples. Sphinx documentation builds with warnings treated as errors.
  • Complete release-candidate validation, changelog and support policy before a stable release. 0.1.0 audit.

Develop and contribute

git clone https://github.com/kmsk99/fs-next.git
cd fs-next
python -m pip install -e '.[test]'
python -m pytest tests -q

Use an activated virtual environment. Contributions that close a documented gap, add a reproducible compatibility case or fix an upstream regression are welcome. See CONTRIBUTING.md and open an issue.

Build and release
python -m pip install build twine
python -m build
python -m twine check dist/*

A matching GitHub release tag triggers tests, artifact builds, a clean-wheel check and PyPI Trusted Publishing. See release instructions.

Upstream and acknowledgements

The filesystem abstractions, implementations, documentation and much of the regression suite come from PyFilesystem2. Credit belongs to Will McGugan, Martin Larralde, Giampaolo Cimino, Geoff Jukes, and the many upstream contributors. FS Next builds on that work with a narrower modern-Python maintenance focus.

Upstream documentation describes the original project and may contain its package name and historical support policy. Use this README for FS Next's installation, tested scope and roadmap. Neither the original maintainers' endorsement nor official succession is implied.

Metadata

Release files for fs-next 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fs-next 0.1.1
File Size Uploaded
fs_next-0.1.1.tar.gz 226.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fs-next 0.1.1
File Interpreter ABI Platform
fs_next-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 368.5 kB

Release files / fs_next-0.1.1.tar.gz

Download URL fs_next-0.1.1.tar.gz
Size 226.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7fc0e9afb6a7e776fad6f953e37d19aac37523a608392517f215097e52aac372
BLAKE2b-256 checksum
How to use checksums
ef0392e4f7058a6a835da44093b8f797bc25a3119ff63db2e5d775b91ae54e45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release files / fs_next-0.1.1-py3-none-any.whl

Download URL fs_next-0.1.1-py3-none-any.whl
Size 142.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3dee8553095ffe43028999716e6ca94405d5610cd876bfc045bddd8cc3a2899
BLAKE2b-256 checksum
How to use checksums
13e0d1eeb81adabaf059f7f4132d482409e3a7d47230db50e4c08794ce7dc03a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page