[ANN] pathlib 1.0


A

Antoine Pitrou

Hello,

I am announcing the release of pathlib 1.0. This version brings pathlib
up to date with the official Python 3.4 release, and also fixes a couple of
2.7-specific issues. Detailed changelog can be found further below.

In the future, I expect the standalone (PyPI) version of pathlib to receive
little to no updates, except if severe issues are found. New developments
and regular bug fixes will happen mostly in the Python standard library,
and be publicly available in official Python releases.

Overview
--------

pathlib offers a set of classes to handle filesystem paths. It offers the
following advantages over using string objects:

* No more cumbersome use of os and os.path functions. Everything can be
done easily through operators, attribute accesses, and method calls.

* Embodies the semantics of different path types. For example, comparing
Windows paths ignores casing.

* Well-defined semantics, eliminating any warts or ambiguities (forward vs.
backward slashes, etc.).

Requirements
------------

Python 3.2 or later is recommended, but pathlib is also usable with Python 2.7.

Install
-------

In Python 3.4, pathlib is now part of the standard library. For Python 3.3
and earlier, ``easy_install pathlib`` or ``pip install pathlib`` should do
the trick.

Changelog for version 1.0
-------------------------

- Python issue #20765: Add missing documentation for PurePath.with_name()
and PurePath.with_suffix().
- Fix test_mkdir_parents when the working directory has additional bits
set (such as the setgid or sticky bits).
- Python issue #20111: pathlib.Path.with_suffix() now sanity checks the
given suffix.
- Python issue #19918: Fix PurePath.relative_to() under Windows.
- Python issue #19921: When Path.mkdir() is called with parents=True, any
missing parent is created with the default permissions, ignoring the mode
argument (mimicking the POSIX "mkdir -p" command).
- Python issue #19887: Improve the Path.resolve() algorithm to support
certain symlink chains.
- Make pathlib usable under Python 2.7 with unicode pathnames (only pure
ASCII, though).
- Issue #21: fix TypeError under Python 2.7 when using new division.
- Add tox support for easier testing.


Regards

Antoine.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top