- Support Python 3.14
- Drop support for Python 3.8 and 3.9
- Migrated from setuptools to hatch
- Support Python 3.13
- Support Python 3.10, 3.11, and 3.12
- Drop support for Python 3.6 and 3.7
- Breaking: The
move_firstargument has been removed. Only themove_first=Falsesemantics are retained. - Removed the
readall()method. I don't think it ever worked. - Breaking: The
delay_openargument andopen()method have been removed. Filehandles will now always be created at the moment an in-place instance is constructed, just like when calling the standard library'sopen(). - Breaking: When the input path points to a symlink and
backup_extis given, the backup extension will now be appended to the resolved path rather than to the pre-resolved path. - Added type annotations
InPlaceTextandInPlaceBytes(deprecated in v0.4.0) have been removed- Added
read1()andreadinto1()methods for binary mode - The
InPlaceconstructor now immediately raises aValueErrorifbackupis the empty string
- Support Python 3.8 and 3.9
- Drop support for Python 2.7, 3.4, and 3.5
- Support
move_firston Windows - Get tests to pass on Windows
- Use
jaraco.windowsto handle symlinks on Windows on versions of Python prior to 3.8
- Breaking: Combined all classes' functionality into a single
InPlaceclass that uses amodeargument to determine whether to operate in text or binary mode. InPlaceBytesandInPlaceTextare now deprecated and will be removed in a future version; please useInPlacewithmode='b'ormode='t'instead.- Support fsencoded-bytes as file paths under Python 3
- Handling of symbolic links is changed: Now, if
in_placeis asked to operate on a symlinklink.txtthat points torealfile.txt, it will act as though it was asked to operate onrealfile.txtinstead, and the pathlink.txtwill only be used when combining withbackup_extto construct a backup file path - Drop support for Python 2.6 and 3.3
- Renamed
InPlacetoInPlaceTextand added a newInPlaceclass for reading & writingstrobjects (whatever those happen to be in the current Python) - Bugfix: If the given file does not exist and
move_firstisTrue, an empty file will no longer be left behind in the nonexistent file's place. - Specifying both
backupandbackup_extwill now produce aValueError - Specifying an empty
backup_extwill now produce aValueError
Rename package & module from "inplace" to "in_place" (I could have sworn I
had already checked PyPI for name conflicts....)
Initial release