Path.py

Latest version: v12.5.0

Safety actively analyzes 630217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 9 of 11

7.0

---

- The ``open`` method now uses ``io.open`` and supports all of the
parameters to that function. ``open`` will always raise an ``OSError``
on failure, even on Python 2.
- Updated ``write_text`` to support additional newline patterns.
- The ``text`` method now always returns text (never bytes), and thus
requires an encoding parameter be supplied if the default encoding is not
sufficient to decode the content of the file.

6.2

---

- ``path`` class renamed to ``Path``. The ``path`` name remains as an alias
for compatibility.

6.1

---

- ``chown`` now accepts names in addition to numeric IDs.

6.0

---

- Drop support for Python 2.5. Python 2.6 or later required.
- Installation now requires setuptools.

5.3

---

- Allow arbitrary callables to be passed to path.walk ``errors`` parameter.
Enables workaround for issues such as 73 and 56.

5.2

---

- 61: path.listdir now decodes filenames from os.listdir when loading
characters from a file. On Python 3, the behavior is unchanged. On Python
2, the behavior will now mimick that of Python 3, attempting to decode
all filenames and paths using the encoding indicated by
``sys.getfilesystemencoding()``, and escaping any undecodable characters
using the 'surrogateescape' handler.

Page 9 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.