- Fix #41 - Windows does not support SIGPIPE
- Add support for memory mapping, using the
memory_map
argument toopen_
/xopen
- Add support for igzip
- Remove useless -p argument when decompressing with pigz
- Handle differences between gzip and pigz -l output
- Switch from versioneer to setup_tools_scm for version managment.
- Add
xphyle.get_compressor
- Fix Python 3.8 issue with importing from collections
- Fixed issue with opening bgzip files
- Correctly handle file modes when detecting placeholders
- Correctly handle placeholder strings ('-', '_') as arguments to xopen
- Add support for zstd
- Adjusted default compression levels based on benchmarking of compression tools.
- Handle placeholder strings ('-', '_') as arguments to xopen
- Add pathlib.PurePath as a member of the PathLike type, to work around the lack of os.PathLike as a static superclass of PurePath in python 3.6
- Don't complain when writing a bgzip file and the extension is gz
- Reformat codebase using black, and other code cleanup
- Fix setup.py and Makefile to perform pypi upload correctly
- Add readthedocs.yml and update docs config to get docs building correctly
- Official 4.0.0 release
- Support non-.gz extensions when decompressing bgzip files.
- Starting with v4, xphyle requires python 3.6+
- All path-oriented functions now use pathlib paths by default. Support for string paths is deprecated.
- Moved to pokrok for progress bar management.
- Fix bug when specifying file_type=FileType.FILELIKE.
- Added
close_fileobj
parameters toxopen()
to allow user to specify whether the file/buffer should be closed when the wrapper is closed.
- Added
xphyle.utils.uncompressed_size()
.
- Added 'overwrite' parameter to xopen (defaults to True).
- Possible breaking change: We discovered that python 3.3 support never fully worked due to some incompatibilities in the backported libraries for features we rely on that were introduced in 3.4. Thus, we are officially dropping support for python 3.3. This also reverts the change made in 3.0.7.
- Please ignore releases 3.0.8 and 3.0.9.
- Add missing pathlib backport dependency for py3.3.
- Added 'list_extensions' method to xphyle.formats.Formats.
- Fixed subtle bug that would cause failure when calling xopen on stdout that has been monkeypatched (as is done by pytest).
- Fixed #13: opening corrupt gzip file fails silently.
- Added basic performance testing.
- Fixed #12: xphyle not recognizing when system-level lzma not installed.
- Forcing use of backports.typing for python < 3.6.
- Added a paper for submission to JOSS.
- Enabled DOI generation using Zenodo.
- Lots of fixes for bugs and type errors using mypy.
- Two breakting changes that necessitate the major version bump:
- Several methods were erroneously named "uncompress_..." and have been corrected to "decompress_..."
- Default values were erroneously used for the char_mode and linesep parameters of fileinput(), fileoutput(), FileInput, FileOutput, and all their subclasses. textinput(), textoutput(), byteinput(), and byteoutput() convenience methods were added, and default values were set to None.
- Add get_compression_format_name() method to Formats.
- Validate the compression type in xopen.
- Switch to pytest for testing.
- Bugfixes in fileoutput.
- Add ability to specifiy a file header for each file opened by fileoutput.
- Add ability to pass initializing text/bytes to xopen with file_type==BUFFER to create a readable buffer.
- Add caching for FileMode and PermissionSet
- Add PatternFileOutput subclass of FileOuptut for generating output files from a pattern and tokens derived from lines in the file.
- Minor bug fixes
- Code cleanup (thanks to Codacy)
- Added support for opening buffer types.
- The major version change reflects the introduction of potentially breaking changes:
- When a file object is passed to
open_
, it is now wrapped in aFileLikeWrapper
by default. To avoid this behavior, setwrap_fileobj=False
, but note that if the file-like object is not a context manager, an error will be raised. xopen
no longer wraps files inFileLikeWrapper
by default. To revert to the old behavior, setxphyle.configure(default_xopen_context_wrapper=True)
.- For several methods in the
xphyle.paths
module, themode
argument has been renamed toaccess
to avoid ambiguity. xphyle.paths.check_writeable_file
andxphyle.paths.safe_check_writeable_file
have been changed to 'writable' to be consistent with the spelling used in core python.- In the
xphyle.paths
module:check_file_mode
is removed.get_access
is renamed toget_permissions
.- Many attribute and method names changed, mostly due to renaming of 'access' to 'permissions'.
- In the context of
FileInput
,mode
parameters have been changed tochar_mode
. - The
is_iterable
method has moved fromxphyle.utils
toxphyle.types
. - The
types
parameter ofxphyle.utils.find
is renamed to path_types. - The string name of the FIFO path type has changed from 'fifo' to '|'.
- When a file object is passed to
- Added
xphyle.popen
, which opens subprocesses (i.e.subprocess.Popen
instances) and usesxopen
to open stdin/stdout/sterr files or wrap PIPEs. This enables sending compressed data to/reading compressed data from subprocesses without knowing in advance what the compression format will be or whether native compression/decompression programs are available. xopen
now accepts two additional argument types: file objects and system commands. The later are specified as a string beginning with '|' (similar to the toolshednopen
method). PIPEs are automatically opened for stdin, stdout, and stderr. Additionally, if a compression type is specified, it is used to wrap one of the pipes as follows:- If mode is read or readwrite,
xopen
opens a PIPE to stdout. - Otherwise,
xopen
opens a PIPE to stdin.
- If mode is read or readwrite,
- Enumerated types are now provided (in
xphyle.typing
) for all argument types in which fixed sets of strings were used previously (e.g. file open mode, path type). All methods with these argument types now accept either the string or Enum value.