README.rst 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. pathlib2
  2. ========
  3. |jazzband| |github| |codecov|
  4. Fork of pathlib aiming to support the full stdlib Python API.
  5. The `old pathlib <https://web.archive.org/web/20181106215056/https://bitbucket.org/pitrou/pathlib/>`_
  6. module on bitbucket is no longer maintained.
  7. The goal of pathlib2 is to provide a backport of
  8. `standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
  9. module which tracks the standard library module,
  10. so all the newest features of the standard pathlib can be
  11. used also on older Python versions.
  12. Download
  13. --------
  14. Standalone releases are available on PyPI:
  15. http://pypi.python.org/pypi/pathlib2/
  16. Development
  17. -----------
  18. The main development takes place in the Python standard library: see
  19. the `Python developer's guide <http://docs.python.org/devguide/>`_.
  20. In particular, new features should be submitted to the
  21. `Python bug tracker <http://bugs.python.org/>`_.
  22. Issues that occur in this backport, but that do not occur not in the
  23. standard Python pathlib module can be submitted on
  24. the `pathlib2 bug tracker <https://github.com/jazzband/pathlib2/issues>`_.
  25. Documentation
  26. -------------
  27. Refer to the
  28. `standard pathlib <http://docs.python.org/dev/library/pathlib.html>`_
  29. documentation.
  30. Known Issues
  31. ------------
  32. For historic reasons, pathlib2 still uses bytes to represent file paths internally.
  33. Unfortunately, on Windows with Python 2.7, the file system encoder (``mcbs``)
  34. has only poor support for non-ascii characters,
  35. and can silently replace non-ascii characters without warning.
  36. For example, ``u'тест'.encode(sys.getfilesystemencoding())`` results in ``????``
  37. which is obviously completely useless.
  38. Therefore, on Windows with Python 2.7, until this problem is fixed upstream,
  39. unfortunately you cannot rely on pathlib2 to support the full unicode range for filenames.
  40. See `issue #56 <https://github.com/jazzband/pathlib2/issues/56>`_ for more details.
  41. .. |github| image:: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml/badge.svg
  42. :target: https://github.com/jazzband/pathlib2/actions/workflows/python-package.yml
  43. :alt: github
  44. .. |codecov| image:: https://codecov.io/gh/jazzband/pathlib2/branch/develop/graph/badge.svg
  45. :target: https://codecov.io/gh/jazzband/pathlib2
  46. :alt: codecov
  47. .. |jazzband| image:: https://jazzband.co/static/img/badge.svg
  48. :alt: Jazzband
  49. :target: https://jazzband.co/