From 0c574a99ef0a2419c2490db86bc8180e249c91a6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 23 Dec 2021 17:22:33 -0500 Subject: [PATCH] docs: update news --- docs/_news.rst | 4 ++++ docs/colorlib.rst | 4 +--- docs/colors.rst | 4 +--- docs/index.rst | 2 +- docs/local_commands.rst | 3 +-- tests/test_remote.py | 37 ++++++++++++++++--------------------- 6 files changed, 24 insertions(+), 30 deletions(-) diff --git a/docs/_news.rst b/docs/_news.rst index 75d858c8a..44cda6bb0 100644 --- a/docs/_news.rst +++ b/docs/_news.rst @@ -1,3 +1,7 @@ +* **2021.12.23**: Version 1.7.2 released with very minor fixes, final version to support Python 2.7 and 3.5. + +* **2021.11.23**: Version 1.7.1 released with a few features like reverse tunnels, color group titles, and a glob path fix. Better Python 3.10 support. + * **2021.02.08**: Version 1.7.0 released with a few new features like ``.with_cwd``, some useful bugfixes, and lots of cleanup. * **2020.03.23**: Version 1.6.9 released with several Path fixes, final version to support Python 2.6. diff --git a/docs/colorlib.rst b/docs/colorlib.rst index eca17da50..e880b4ba3 100644 --- a/docs/colorlib.rst +++ b/docs/colorlib.rst @@ -149,9 +149,7 @@ These produce strings that can be further manipulated or printed. Finally, you can also print a color to stdout directly using ``color.print("string")``. This -has the same syntax as the Python 3 print function. In Python 2, if you do not have -``from __future__ import print_function`` enabled, ``color.print_("string")`` is provided as -an alternative, following the PyQT convention for method names that match reserved Python syntax. +has the same syntax as the print function. An example of safe manipulations:: diff --git a/docs/colors.rst b/docs/colors.rst index c7d7240d6..f8bd1eac2 100644 --- a/docs/colors.rst +++ b/docs/colors.rst @@ -232,9 +232,7 @@ These produce strings that can be further manipulated or printed. Finally, you can also print a color to stdout directly using ``color.print("string")``. This -has the same syntax as the Python 3 print function. In Python 2, if you do not have -``from __future__ import print_function`` enabled, ``color.print_("string")`` is provided as -an alternative, following the PyQT convention for method names that match reserved Python syntax. +has the same syntax as the print function. An example of safe manipulations:: diff --git a/docs/index.rst b/docs/index.rst index 54875b394..b0294c2e5 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -83,7 +83,7 @@ you encounter or to request features. The library is released under the permissi Requirements ------------ -Plumbum supports **Python 2.7-3.9** and **PyPy** and is continually tested on +Plumbum supports **Python 3.6-3.10** and **PyPy** and is continually tested on **Linux**, **Mac**, and **Windows** machines through `GitHub Actions `_. Any Unix-like machine should work fine out of the box, but on Windows, you'll probably want to diff --git a/docs/local_commands.rst b/docs/local_commands.rst index 24b479b51..aea58c3af 100644 --- a/docs/local_commands.rst +++ b/docs/local_commands.rst @@ -119,8 +119,7 @@ the output to a file named ``tmp.txt``:: .. note:: Parentheses are required here! ``grep["world"] < sys.stdin > "tmp.txt"`` would be evaluated according to the `rules for chained comparison operators - `_ and result in ``False`` - (Python 2) or raise an exception (Python 3). + `_ and result an exception. Right after ``foo``, Ctrl+D was pressed, which caused ``grep`` to finish. The empty string at the end is the command's ``stdout`` (and it's empty because it actually went to a file). diff --git a/tests/test_remote.py b/tests/test_remote.py index daafb46f8..568fe5597 100644 --- a/tests/test_remote.py +++ b/tests/test_remote.py @@ -621,33 +621,28 @@ def test_encoding(self): def test_path_open_remote_write_local_read(self): with self._connect() as rem: - # TODO: once Python 2.6 support is dropped, the nested - # with-statements below can be combined using "with x as a, y as b" - with rem.tempdir() as remote_tmpdir: - with local.tempdir() as tmpdir: - assert remote_tmpdir.is_dir() - assert tmpdir.is_dir() - data = b"hello world" - with (remote_tmpdir / "bar.txt").open("wb") as f: - f.write(data) - rem.download((remote_tmpdir / "bar.txt"), (tmpdir / "bar.txt")) - assert (tmpdir / "bar.txt").open("rb").read() == data + with rem.tempdir() as remote_tmpdir, local.tempdir() as tmpdir: + assert remote_tmpdir.is_dir() + assert tmpdir.is_dir() + data = b"hello world" + with (remote_tmpdir / "bar.txt").open("wb") as f: + f.write(data) + rem.download((remote_tmpdir / "bar.txt"), (tmpdir / "bar.txt")) + assert (tmpdir / "bar.txt").open("rb").read() == data assert not remote_tmpdir.exists() assert not tmpdir.exists() def test_path_open_local_write_remote_read(self): with self._connect() as rem: - # TODO: cf. note on Python 2.6 support above - with rem.tempdir() as remote_tmpdir: - with local.tempdir() as tmpdir: - assert remote_tmpdir.is_dir() - assert tmpdir.is_dir() - data = b"hello world" - with (tmpdir / "bar.txt").open("wb") as f: - f.write(data) - rem.upload((tmpdir / "bar.txt"), (remote_tmpdir / "bar.txt")) - assert (remote_tmpdir / "bar.txt").open("rb").read() == data + with rem.tempdir() as remote_tmpdir, local.tempdir() as tmpdir: + assert remote_tmpdir.is_dir() + assert tmpdir.is_dir() + data = b"hello world" + with (tmpdir / "bar.txt").open("wb") as f: + f.write(data) + rem.upload((tmpdir / "bar.txt"), (remote_tmpdir / "bar.txt")) + assert (remote_tmpdir / "bar.txt").open("rb").read() == data assert not remote_tmpdir.exists() assert not tmpdir.exists()