diff --git a/README.rst b/README.rst index fdea155..cc7f093 100644 --- a/README.rst +++ b/README.rst @@ -85,11 +85,10 @@ has several advantages over ``pathlib``: and encouraged. - ``path`` provides superior portability using a uniform abstraction over its single Path object, - freeing the implementer to subclass it readily. One cannot - subclass a ``pathlib.Path`` to add functionality, but must - subclass ``Path``, ``PosixPath``, and ``WindowsPath``, even - to do something as simple as to add a ``__dict__`` to the subclass - instances. ``path`` instead allows the ``Path.module`` + freeing the implementer to subclass it readily. ``pathlib.Path`` supports + direct subclassing on `Python 3.12 and later + `_. + ``path`` allows the ``Path.module`` object to be overridden by subclasses, defaulting to the ``os.path``. Even advanced uses of ``path.Path`` that subclass the model do not need to be concerned with diff --git a/newsfragments/+readme-pathlib-subclassing.bugfix.rst b/newsfragments/+readme-pathlib-subclassing.bugfix.rst new file mode 100644 index 0000000..63e031e --- /dev/null +++ b/newsfragments/+readme-pathlib-subclassing.bugfix.rst @@ -0,0 +1 @@ +Clarify that direct subclassing of ``pathlib.Path`` is supported on Python 3.12 and later.