Skip to content

pathlib.PurePath.stem has a unlisted Python 3.14 change #140490

@kesara

Description

@kesara

Documentation

Python 3.14 has a change that "A single dot (”.”) is considered a valid suffix."

This is not listed in pathlib.PurePath.stem documentation.
But Python 3.14 changes what stem returns because single dot is considered a valid suffix.

Python 3.14:

>>> PurePosixPath('my/library.').stem
'library'

Python 3.13:

>>> PurePosixPath('my/library.').stem
'library.'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions