Skip to content

Commit 58729eb

Browse files
committed
v0.4.0 — Unify classes
- **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
1 parent fcfb7cc commit 58729eb

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
v0.4.0 (in development)
2-
-----------------------
1+
v0.4.0 (2018-10-05)
2+
-------------------
33
- **Breaking**: Combined all classes' functionality into a single `InPlace`
44
class that uses a `mode` argument to determine whether to operate in text or
55
binary mode.

TODO.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@
2929
- When the filename is `-`, read stdin and write to stdout?
3030
- Only support this when an `allow_dash=True` argument is given?
3131
- Copy ACLs etc.
32-
- Make `InPlaceABC` inherit one of the ABCs in `io`?
32+
- Make `InPlace` inherit one of the ABCs in `io`?
3333
- How should exceptions raised by `_close` be handled?
3434
- Should calling `rollback` while closed be a no-op?
3535
- Use `shutil.move` instead of `os.rename` in order to handle cross-filesystem
3636
moves? (But then strange things will happen when moving to a directory)
3737
- Add a `commit` method that overwrites the input file with the output file's
3838
current contents but leaves the instance open afterwards?
39-
- Give the classes decent `__repr__`s
39+
- Give `InPlace` a decent `__repr__`s
4040
- Make the context manager reusable
4141
- Add a `seekable()` method that returns `False`?
42-
- Should `io.open()` be used when `mode` is unset but `kwargs` is nonempty?

in_place.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Visit <https://github.com/jwodder/inplace> for more information.
1010
"""
1111

12-
__version__ = '0.4.0.dev1'
12+
__version__ = '0.4.0'
1313
__author__ = 'John Thorvald Wodder II'
1414
__author_email__ = 'inplace@varonathe.org'
1515
__license__ = 'MIT'

0 commit comments

Comments
 (0)