- fix
- support ali oss response
- strip auth headers on redirect
- fix
- fix bugs of alias paths in
megfile ls
command - support
InvalidRange
error in tos oss
- fix bugs of alias paths in
- feat
- add new env
AWS_S3_VERIFY
for setting s3 verify, default istrue
- add new env
AWS_S3_REDIRECT
for turning on supporting http redirect, default isfalse
- add new env
- feat
- support
AWS_SESSION_TOKEN
env
- support
- feat
- add
megfile config alias
command for adding custom protocol alias - glob path support using glob syntax within curly braces but does not support nesting.
- add
- feat
- support retrying S3 request with error codes of
Timeout
andRequestTimeout
.
- support retrying S3 request with error codes of
- perf
- add retry logic for S3 error
429
- add retry logic for S3 error
- fix
- fix the deadlock issue of prefetch reader after fork
- perf
smart_cache
inw
mode can generate cache path when paramcache_path
is None- reader and writer support more types like
numpy.uint64
for some params, e.g.offset
param inseek
supportnumpy.uint64
type
- fix
- fix
block_size
overwritten by defaultmin_block_size
ins3_open
- fix
- fix
- fix wrong name of cli
- breaking change
- remove
megfile.utils.cachedproperty
- modify the parameter order of
s3_download
ands3_upload
- change param
cookie
tooffset
in someseek
functions
- remove
- perf
- optimize the type annotations
FileLike
is subclass ofio.IOBase
andtyping.IO
- chore
- use
pyproject.toml
instead ofsetup.py
- use
- fix
- add cli extras require, run
pip install 'megfile[cli]'
to install cli requirements
- add cli extras require, run
- feat
- support more parameters of
requests
likeheaders
inHttpPath
. - support
overwrite
parameter incopy
,sync
andmove
functions, default isTrue
. - cli command
mv
,cp
,sync
support--skip
option, can skip existed files.
- support more parameters of
- perf
- http request will check body size and retry when body is incomplete.
- feat
- auto decode http content when response with
Content-Encoding
header
- auto decode http content when response with
- perf
- add s3 retry code, retry request when catch response code
499
- add environments for setup retry times:
MEGFILE_MAX_RETRY_TIMES
,MEGFILE_S3_MAX_RETRY_TIMES
,MEGFILE_HTTP_MAX_RETRY_TIMES
,MEGFILE_HDFS_MAX_RETRY_TIMES
,MEGFILE_SFTP_MAX_RETRY_TIMES
. default is10
- add s3 retry code, retry request when catch response code
- feat
- Support more official S3 configurations. New env:
AWS_ENDPOINT_URL_S3
,AWS_ENDPOINT_URL
.
- Support more official S3 configurations. New env:
- perf
- optimize read and write performance for s3, http and hdfs
- fix
- fix
smart_glob
bug of s3 path with profile name
- fix
- feat
- support
-f
/--follow
intail
command
- support
- fix
- fix
smart_copy
bug in the function registered byatexit
- fix
- feat
- command
ll
show file count
- command
- perf
- support new err for sftp to retry
- fix
- fix symlink paths in command
ls
andll
- fix symlink paths in command
- breaking change
- python3.6 and python3.7 is no longer supported
- chore
- support python3.12
- perf
- command
ls
andll
support symlink files
- command
- fix
- fix callback in smart_copy
- sync command show error log correctly
- feat
- support some new environments for config
- fix
- add connect errors to retry list
- fix
- The file object returned by
sftp_open
supports thename
property.
- The file object returned by
- fix
- Reduce unnecessary requests in the s3 scan.
- fix
- fix the issue where
s3_upload
ands3_download
are not retrying correctly.
- fix the issue where
- fix
- fix
is_symlink
inStatResult
from scan funcs
- fix
- feat
- cli support
ll
command
- cli support
- perf
- optimize error message of scan funcs
- when dst in cli
mv
andcp
is endswith/
, will put file into the dst dir even if it doesn't exist
- fix
- fix sync when empty dir
- fix the return value of the callback for smart_copy when the path is sftp
- fix
- fix sync when empty dir
- fix
- fix sftp custom port not working error
- fix http retry error when upload file
- feat
- support hdfs protocol
- fix
- fix
megfile config
command when config file's parent dir not exists
- fix
- fix
- exit 1 when cli had error
- feat
- cli add
config
command - cli support
--debug
parameter
- cli add
- fix
- fix s3 client cache with profile name
- fix s3 error info of endpoint url in s3 open
- perf
- optimize concurrent SFTP connections
- optimize ls command with glob path
- optimize sync command
- add retry error
- fix
- fix s3 error info of endpoint url
- fix
s3_open
when s3 path with custom profile name - fix
SmartPath
extract protocol when path is inherited fromPurePath
- perf
- Increase
connect_timeout
config in s3 - perf http open when web api support
Accept-Range
but not bigger than block size. - add retry for more errors
- Increase
- fix
- fix
SftpPath.parts
- fix s3
ProfileNotFound
error when profile_name not in the config file
- fix
- fix
- fix sftp readlink
- perf
- perf prefetch reader
- setup s3 connect timeout
- fix
- prevent http Range header out-of-range in http prefetch reader
- feat
- add
force
param in sync methods for copy file forcible - add
-f
/--force
inrefile sync
- check same file in copy, and raise
SameFileError
- add
- perf
- Set the timeout for SSH connections.
- fix
- fix
s3_access
write permission's check
- fix
- feat
- support
AWS_S3_ADDRESSING_STYLE
env for setting s3 addressing style
- support
- perf
- perf some s3 api
- fix
- remove unuseful print
- fix smart copy from http to local
- support all s3 other config for s3 profile mode
- fix
- fix tqdm unit divisor to
1024
- fix tqdm unit divisor to
- feat
- all open func support
encoding
anderrors
parameters - add
HttpPrefetchReader
for perf http open
- all open func support
- fix
- change retry log leval to info
- fix
megfile head
command error from http path - fix retry not work in prefetch_reader
- fix upload and download when local file path with protocol, like
file:///data/test.txt
- breaking change
- sftp path protocol change for supporting relative path
- new protocol: ‒ sftp://[username[:password]@]hostname[:port]//absolute_file_path ‒ sftp://[username[:password]@]hostname[:port]/relative_file_path
- sftp path protocol change for supporting relative path
- feat
- cli
- Add
megfile to
command, can write content from stdin to a file - Add
megfile head
andmegfile tail
command
- Add
- Add http and stdio methods in
__init__.py
, now you can from megfile import them
- cli
- feat
- add
SmartCache
, andsmart_cache
support more protocol
- add
- fix
- fix the cleanup behavior of ThreadLocal after forking
- feat
- add
http_exists
- add
- feat
sync
command with-g
support sync files concurrentlysync
command add-w
/--worker
for concurrent worker's count, default 8
- fix
- fix sftp error when mkdir concurrently
- fix
sftp_download
andsftp_upload
'scallback
parameter
- fix
- fix sftp client error when multi threads
- fix
HttpPath
method's parameter
- fix
- fix dst_path check in SftpPath's methods
- fix
- fix
ls -r
not display directories - fix
SftpPath.cwd
- fix sftp exec command method's return data
- fix
- feat
smart_sync
will raiseIsADirectoryError
when src_path is a file and dst_path is a directory
- fix
- fix
sftp_upload
,sftp_download
,sftp_copy
path check, when path is not sftp or is dir, will raise error sftp_copy
makedir ifdst_path
's dir not exist
- fix
- perf
- retry ConnectionError in sftp retry
- fix
- fix sftp retry bug when catch EOFError
- fix the bug from new
urlsplit
in py3.11.4 - fix the path list's order returned by fs glob, now return path list in ascending alphabetical order
- fix
- fix sftp connect timeout after long time
- perf
smart_sync
and other sync methods will ignore same filessmart_sync
will raiseFileNotFound
error when src_path is not exist
- fix
- fix
SftpPath.rename
error log
- fix
- feat
- support python 3.11
- perf
- cli support s3 log
- fix
- fix
is_dir
andis_file
ofSftpPath
when file not found
- fix
- feat
- s3 path support custom profile name, like
s3[+profile_name]://bucket/key
- remove
smart-open
from requirements smart_sync
supportmap_func
parameter for concurrent- add
smart_concat
- s3 path support custom profile name, like
- perf
- reduce the number of
s3_open
's requests
- reduce the number of
- feat
- add smart_lstat
- smart_scandir support ‘with’ operate
- fix
- fix smart_sync error when file name in dir is empty str
- fix stat properties default value
- fix smart_load_content when path is not fs or s3
- support s3 endpoint env: AWS_ENDPOINT
- cli
megfile ls
support glob pathmegfile cp
,megfile mv
andmegfile sync
support-g
,--progress-bar
- perf err output
megfile sync
support glob path
- close ssh connection before process exit
- path classes align with
pathlib.Path
- methods(
glob
,iglob
,glob_stat
,resolve
,home
,cwd
,readlink
) in all path classes return path object - methods(
glob
,iglob
,glob_stat
) in all path classes addpattern
parameter. Functions(likesmart_glob
,s3_glob
) not change. relative_to
's parameterother
in all path classes change to*other
FSPath.parts
align withpathlib.Path.parts
, return valueparts[0]
will not befile://
any more.mkdir
in all path classes add parameters(mode=0o777
,parents=False
), Functions(likesmart_makedirs
) not change.
- methods(
- change
s3_symlink
,S3Path.symlink
,s3_rename
,S3Path.rename
parameter name, changesrc_url
,dst_url
tosrc_path
,dst_path
- change
fs_stat
,FSPath.stat
,s3_stat
,S3Path.stat
parameter name, changefollowlinks
tofollow_symlinks
FileEntry
add methodinode
StatResult
add properties(st_mode
,st_ino
,st_dev
,st_nlink
,st_uid
,st_gid
,st_size
,st_atime
,st_mtime
,st_ctime
,st_atime_ns
,st_mtime_ns
,st_ctime_ns
)- support sftp protocol
- remove
smart_getmd5_by_paths
method - retry when catch
botocore.exceptions.ResponseStreamingError
- remove
followlinks
parameter in rename, move, remove; make behavior same as standard library - fix
smart_rename
bug, when rename file cross platform or device
- fix open mode with + in different order
- sort
smart_getmd5_by_paths
parameter paths
- refactor code
- add
smart_getmd5_by_paths
- change of symlink's parameters position
- handle s3 remove file errors
- support s3 symlink
- fix smart api bug
- update get_md5, s3 use etag and support dir
- fix py35 test about moto
- add fs symlink support
- support python 3.10
smart_open
support read and write pipe
- add info log about environ OSS_ENDPOINT and oss config file
smart_getsize
andsmart_getmtime
support http- update cli cp and mv, make them like cp and mv in linux
- fix sed warning in macOS
- add some test code
- add error code callback to _patch_make_request
- Generate cache_path automatically
megfile.s3
retries when server returns 500 - 503- remove
megfile.lib.fakefs
megfile.s3.s3_memory_open
support ab / rb+ / wb+ / ab+ modemegfile.s3.s3_open
support ab / rb+ / wb+ / ab+ mode (by using s3_memory_open)- Speed up
s3_glob
- Accept
s3.endpoint_url
in aws config file
- [Breaking] Rename
megfile.interfaces.MegfilePathLike
tomegfile.interfaces.PathLike
- Fix ungloblize
- [Breaking] Rename
megfile.s3.MEGFILE_MD5_HEADER
tomegfile.s3.content_md5_header
- [Breaking] Remove
megfile.lib.get_image_size
,megfile.smart.smart_load_image_metadata
andmegfile.smart.IMAGE_EXTNAMES
- Refactor
process_local
/thread_local
, remove dependency onmultiprocessing.utils.register_after_fork
- Speed up
s3_glob
- First release of
megfile