home.social

#stdlib — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #stdlib, aggregated by home.social.

  1. Now this is an interesting #Python problem. I don't know if it's a #bug, but it's a change in behaviour that I don't see documented.

    I upgraded from #Debian 12/Bookworm to 13/Trixie, so the default Python3 changed from 3.11 to 3.13. A script of mine broke, because `pathlib.Path.is_mount()` changed behaviour when the path is a symlink (at least to a directory).

    i.e. I'm testing a path that is a symlink. The symlink points to a directory. That directory *is* a mountpoint. The `.is_mount()` test in 3.11 returned True, while in 3.13 it returns False.

    This seems wrong to me. Most path-manipulation functions transparently treat symlinks as if they were the pointed-to object unless you pass an option/flag specifically to say you want the symlink itself.

    Gonna have to dig to see what else I can find.

    #pathlib #path #is_mount #stdlib #behaviour #symlink #filesystem #mountpoint #mount

  2. Brand new PEP by @emmatyping to add Zstandard to the standard library:
    peps.python.org/pep-0784/

    Will it make it in to 3.14 before the feature freeze on 2025-05-06? It'll be close but it's possible!

    The PEP also suggests namespacing the other compression libraries lzma, bz2 and zlib, with a 10-year deprecation for the old names.

    Join the discussion to give your support, suggestions or feedback:

    discuss.python.org/t/pep-784-a

    #PEP #PEP784 #zstd #zstandard #stdlib #Python #compression

  3. Unix buffering: The clearest explanation I've ever seen about line buffering, block buffering, and tty output vs simple file / pipe
    jvns.ca/blog/2024/11/29/why-pi
    #buffering #stdlib #linux #shell #unix #cli #+