Skip to content

Update littlefs-python requirement from >=0.9.0 to >=0.18.0 - #403

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/littlefs-python-gte-0.18.0
Open

Update littlefs-python requirement from >=0.9.0 to >=0.18.0#403
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/pip/littlefs-python-gte-0.18.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 1, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on littlefs-python to permit the latest version.

Release notes

Sourced from littlefs-python's releases.

v0.18.0

UTF-8 filenames by default

The default filename encoding has changed from ASCII to UTF-8 (littlefs.lfs.FILENAME_ENCODING).

littlefs stores names as opaque byte strings, so the API-level encoding is a free choice. Previously the ASCII default rejected any non-ASCII filename with a UnicodeEncodeError (and decoded directory entries as ASCII as well). Now non-ASCII names — Latin-1, CJK, emoji, etc. — round-trip cleanly through open, stat, listdir/scandir, mkdir, rename, and remove.

This change is backward compatible: ASCII is a strict subset of UTF-8, so all existing filenames encode and decode identically. New regression tests cover Latin-1, CJK, and astral-plane (emoji) filenames.

Thanks to @​slash-proc for their first contribution! (PR #168)

Configurable per-instance filename encoding

Building on the UTF-8 default, the filename encoding is now selectable per filesystem instead of relying solely on the process-wide lfs.FILENAME_ENCODING global:

# Read an image whose names were written with a non-UTF-8 codec
fs = LittleFS(..., filename_encoding="shift-jis")
  • LittleFS(filename_encoding=...) threads the chosen encoding through every path-handling call (open, stat, listdir/scandir, mkdir, remove, rename, and the *attr methods).
  • The low-level lfs.* functions accept an optional filename_encoding argument that falls back to the module global, so existing callers are unaffected.
  • Useful for images whose names were written with a non-UTF-8 encoding (e.g. latin-1, shift-jis) that would otherwise mis-decode or raise.

New CLI options

The littlefs-python CLI gained several options on the shared parser, available to the create, extract, list, and repl commands:

  • --attr-max — maximum custom attribute size per file.
  • --file-max — maximum file size.
  • --inline-max — maximum inline file size (limiting this can improve flash usage); 0 uses the library default.
  • --filename-encoding — encode/decode image filenames with a non-UTF-8 codec (e.g. latin-1, shift-jis); defaults to UTF-8.

Note the distinction surfaced in the help text and docs:

  • --name-max, --attr-max, and --file-max are stored in the image superblock and must match when mounting an existing image.
  • --inline-max is a format-time option.
  • --filename-encoding is a host-side encode/decode choice that is never stored in the image. You must extract an image with the same --filename-encoding that was used to create it, otherwise filenames will fail to decode or come out as mojibake.

Thanks to @​amgross for the additional CLI options! (PR #160)

Bug Fixes

  • scandir directory-handle leak: directory iteration is now wrapped in try/finally so the underlying handle is always closed via dir_close, even if a read raises mid-iteration (e.g. a UnicodeDecodeError from a mismatched filename encoding).
  • lfs.file_sync return value: now returns the error code, matching its -> int type stub and the behavior of every other file_* function (it was the lone outlier returning None).
  • Type stubs: lfs.dir_read is now annotated as returning Optional[LFSStat] (it returns None at end-of-directory).

CI / Dependencies

... (truncated)

Commits
  • fcd02ba Merge pull request #168 from slash-proc/utf8-filename-encoding
  • d1957b9 Address Copilot review: stub/return fixes and scandir handle leak
  • 0c98531 Document that name_max is a byte limit in filename_encoding docstring
  • 50c4a36 Expose --filename-encoding on the CLI
  • a100817 Add per-instance filename_encoding option
  • ce3a789 Use UTF-8 for filename encoding instead of ASCII
  • d386238 Bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0
  • 19350e5 Bump pypa/cibuildwheel from 3.3.1 to 3.4.1
  • 7fa189d Merge pull request #160 from amgross/add_cli_options
  • e98a2f2 Add more needed options to CLI
  • Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [littlefs-python](https://github.com/jrast/littlefs-python) to permit the latest version.
- [Release notes](https://github.com/jrast/littlefs-python/releases)
- [Commits](jrast/littlefs-python@v0.9.0...v0.18.0)

---
updated-dependencies:
- dependency-name: littlefs-python
  dependency-version: 0.18.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update python code labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants