Backport of pathlib aiming to support the full stdlib Python API. (LADI project)
Go to file
Matthias C. M. Troffaes e9b1985b14 Update changelog. 2022-02-10 17:54:00 +00:00
.github/workflows Fix branch name. 2022-02-09 19:46:35 +00:00
docs Add initial sphinx docs. (#69) 2022-02-03 07:19:27 +00:00
pathlib2 Fix Sequence import in a way that does not rely on six 1.13.0 2022-02-09 19:45:12 +00:00
tests Fix mypy warning. 2021-07-07 16:02:30 +01:00
.gitignore Update gitignore for pycharm. 2021-07-07 09:03:01 +01:00
.pre-commit-config.yaml Migrate to codecov v2. (#77) 2021-10-21 10:26:48 +01:00
CHANGELOG.rst Update changelog. 2022-02-10 17:54:00 +00:00
CONTRIBUTING.rst Create CONTRIBUTING.rst 2021-09-14 22:45:40 +01:00
LICENSE.rst Update license dates. 2017-01-09 08:51:25 +00:00
MANIFEST.in Add initial sphinx docs. (#69) 2022-02-03 07:19:27 +00:00
README.rst Add initial sphinx docs. (#69) 2022-02-03 07:19:27 +00:00
VERSION Version bump. 2022-02-09 19:49:06 +00:00
codecov.yml Disable comments from codecov. 2017-01-09 09:50:45 +00:00
mypy.ini Ignore mypy setuptools warning. 2021-07-07 15:57:29 +01:00
pytest.ini Add unicode test for with_name. 2021-07-05 09:53:01 +01:00
requirements.txt Fix Sequence import in a way that does not rely on six 1.13.0 2022-02-09 19:45:12 +00:00
setup.cfg
setup.py Fix Sequence import in a way that does not rely on six 1.13.0 2022-02-09 19:45:12 +00:00

README.rst

pathlib2
========

|jazzband| |github| |codecov|

Fork of pathlib aiming to support the full stdlib Python API.

The `old pathlib <https://web.archive.org/web/20181106215056/https://bitbucket.org/pitrou/pathlib/>`_
module on bitbucket is no longer maintained.
The goal of pathlib2 is to provide a backport of
`standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
module which tracks the standard library module,
so all the newest features of the standard pathlib can be
used also on older Python versions.

Download
--------

Standalone releases are available on PyPI:
http://pypi.python.org/pypi/pathlib2/

Development
-----------

The main development takes place in the Python standard library: see
the `Python developer's guide <http://docs.python.org/devguide/>`_.
In particular, new features should be submitted to the
`Python bug tracker <http://bugs.python.org/>`_.

Issues that occur in this backport, but that do not occur not in the
standard Python pathlib module can be submitted on
the `pathlib2 bug tracker <https://github.com/jazzband/pathlib2/issues>`_.

Documentation
-------------

Refer to the
`standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
documentation.

Known Issues
------------

For historic reasons, pathlib2 still uses bytes to represent file paths internally.
Unfortunately, on Windows with Python 2.7, the file system encoder (``mcbs``)
has only poor support for non-ascii characters,
and can silently replace non-ascii characters without warning.
For example, ``u'тест'.encode(sys.getfilesystemencoding())`` results in ``????``
which is obviously completely useless.

Therefore, on Windows with Python 2.7, until this problem is fixed upstream,
unfortunately you cannot rely on pathlib2 to support the full unicode range for filenames.
See `issue #56 <https://github.com/jazzband/pathlib2/issues/56>`_ for more details.

.. |github| image:: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml/badge.svg
   :target: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml
   :alt: github

.. |codecov| image:: https://codecov.io/gh/jazzband/pathlib2/branch/develop/graph/badge.svg
    :target: https://codecov.io/gh/jazzband/pathlib2
    :alt: codecov

.. |jazzband| image:: https://jazzband.co/static/img/badge.svg
   :alt: Jazzband
   :target: https://jazzband.co/