Skip to content

Commit

Permalink
docs: update news
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Dec 28, 2021
1 parent 002c6f0 commit 0c574a9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 30 deletions.
4 changes: 4 additions & 0 deletions docs/_news.rst
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 1 addition & 3 deletions docs/colorlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
4 changes: 1 addition & 3 deletions docs/colors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://github.com/tomerfiliba/plumbum/actions>`_. Any Unix-like machine
should work fine out of the box, but on Windows, you'll probably want to
Expand Down
3 changes: 1 addition & 2 deletions docs/local_commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<https://docs.python.org/reference/expressions.html#comparisons>`_ and result in ``False``
(Python 2) or raise an exception (Python 3).
<https://docs.python.org/reference/expressions.html#comparisons>`_ 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).
Expand Down
37 changes: 16 additions & 21 deletions tests/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 0c574a9

Please sign in to comment.