Releases: Cadair/parfive
Releases · Cadair/parfive
v2.2.0
Changes
Python Versions
- Python 3.9 support has been dropped and 3.13 is now tested.
New Features
- Checksums can now be verified when deciding to overwrite a file and when downloads are completed based on user or server provided checksums. (This is opt-in for now) - Add checksums support @Cadair (#165)
- The first request to download a file will now attempt to use the HEAD method to read the checksum and content-disposition headers. If the HEAD request returns any status code other than 200 the old GET behaviour will be tried - Fix a 302 issue @Cadair (#170), Add a test for the head or get helper @Cadair (#169), Use a HEAD for the first request @Cadair (#168)
- The URL associated with every downloaded file is now propagated through to the
Resultsobject - Add urls to results @samaloney (#146), Fix a bug where result urls were not updated in retry @samaloney (#153)
Maintenance Changes
v2.2.0rc2
v2.2.0rc1
v2.1.0
Enhancements
- Add a customizable callback function for when download completed @dreamflasher (#127)
- Add callbacks for ftp downloads @samaloney (#150)
- Drop Python 3.7 as it's EOL @Cadair (#149)
- Only log
get_ftp_sizeerrors at INFO @Cadair (#148)
Bug Fixes
- Fixes signal that only works in main thread of the main interpreter @AthKouloumvakos (#133)
- fix aiohttp redirect @dreamflasher (#126)
Misc/Internal Changes
v2.0.2
v2.0.1
v2.0.0
This new major version of parfive tackles the usability of the API.
The API of parfive grew organically as support for more use cases were added.
To enable both a highly flexible downloader that can be used for any HTTP/FTP downloads while maintaining an accessible and simple API with the 2.0 release there is now a parfive.SessionConfig object where advanced settings are located.
The other major change in this release is that any files where the download failed before it is completed will be removed from disk. This means that you shouldn't end up with incomplete and corrupt files on disk if the download is interrupted for any reason.
Breaking Changes
- The
file_progress,notebook,use_aiofiles, andheaderkeyword arguments toparfive.Downloaderhave been removed and moved into theparfive.SessionConfigobject. - The
timeoutskeyword argument has been removed from therun_download()anddownload()methods and replaced by an option inSessionConfig.
Enhancements
- Improve repr of Results, remove files from disk if download errors before completing and add max_splits as a keyword argument to Downloader by @nabobalis in #76
- Add a new
SessionConfigobject to allow advanced configuration of theDownloaderby @Cadair in #92- A new
PARFIVE_HIDE_PROGRESSenvironment variable will disable all progress bars. - All environment variables are now evaluated at the time the
Downloaderclass is instantiated (by the new config classes). - It is now possible to customise the instantiation of the
aiohttp.ClientSessionby passing a function to theaiohttp_session_generator=keyword argument toSessionConfig. - It is now possible to configure debug or other levels of logging with
SessionConifgwhere previously it could only be configured with an environment variable. - It is now possible to configure the HTTP chunksize with
SessionConfigand the default when not using aiofiles has been increased from 100 bytes to 1024 bytes. - It is now possible to configure the HTTP(S) proxy URLs with
SessionConfigas well as theHTTP[S]_PROXYenvironment variables. - It is now possible to customise all the timeouts supported by aiohttp by passing an
aiohttp.ClientTimeoutobject toSessionConfig.
- A new
- Improve the CLI with more options by @Cadair in #103
- Cleanup after Keyboard interrupt correctly by @Cadair in #104
- This means that the download will be killed correctly when the download is interrupted.
- Note that is does not work on Windows due to the lack of support for signal handling in
asyncioon Windows.
- Remove deprecated loop keyword argument by @Cadair in #88
- Use tqdm's auto notebook detection by @Cadair in #90
Bug Fixes
- Do not split download if no "Content-length" by @rlaker in #87
- Do not overwrite custom headers if user agent isn't specified by @Cadair in #89
- Fix a bug where only HTTP 200 response codes were accepted as success by @SolarDrew in #95
Misc/Internal Changes
- Add a Python 3.10 build and configure pre-commit.ci by @Cadair in #83
- Improve docs for 2.0 release by @Cadair in #102
- Use black by @Cadair in #91
New Contributors
- @rlaker made their first contribution in #87
- @SolarDrew made their first contribution in #95
Full Changelog: v1.5.1...v2.0.0
v2.0.0rc4
v2.0.0rc3
v2.0.0rc2
Changes
- Fix a bug where only HTTP 200 response codes were accepted as success @SolarDrew (#95)
- [pre-commit.ci] pre-commit autoupdate @pre-commit-ci (#93)