You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.2 KiB

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