Skip to content

Commit

Permalink
v0.4.0 — Unify classes
Browse files Browse the repository at this point in the history
- **Breaking**: Combined all classes' functionality into a single `InPlace` class that uses a `mode` argument to determine whether to operate in text or binary mode.
- `InPlaceBytes` and `InPlaceText` are now deprecated and will be removed in a future version; please use `InPlace` with `mode='b'` or `mode='t'` instead.
- Support fsencoded-bytes as file paths under Python 3
  • Loading branch information
jwodder committed Oct 5, 2018
1 parent fcfb7cc commit 58729eb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
v0.4.0 (in development)
-----------------------
v0.4.0 (2018-10-05)
-------------------
- **Breaking**: Combined all classes' functionality into a single `InPlace`
class that uses a `mode` argument to determine whether to operate in text or
binary mode.
Expand Down
5 changes: 2 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@
- When the filename is `-`, read stdin and write to stdout?
- Only support this when an `allow_dash=True` argument is given?
- Copy ACLs etc.
- Make `InPlaceABC` inherit one of the ABCs in `io`?
- Make `InPlace` inherit one of the ABCs in `io`?
- How should exceptions raised by `_close` be handled?
- Should calling `rollback` while closed be a no-op?
- Use `shutil.move` instead of `os.rename` in order to handle cross-filesystem
moves? (But then strange things will happen when moving to a directory)
- Add a `commit` method that overwrites the input file with the output file's
current contents but leaves the instance open afterwards?
- Give the classes decent `__repr__`s
- Give `InPlace` a decent `__repr__`s
- Make the context manager reusable
- Add a `seekable()` method that returns `False`?
- Should `io.open()` be used when `mode` is unset but `kwargs` is nonempty?
2 changes: 1 addition & 1 deletion in_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Visit <https://github.com/jwodder/inplace> for more information.
"""

__version__ = '0.4.0.dev1'
__version__ = '0.4.0'
__author__ = 'John Thorvald Wodder II'
__author_email__ = '[email protected]'
__license__ = 'MIT'
Expand Down

0 comments on commit 58729eb

Please sign in to comment.