unstale

pypi / gdown

gdown

What changed in gdown 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-13.

19 breaking3 security11 new APIs and options7 behavior and defaults1 tooling24 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.0 on npm

gdown 655 changes

Breaking changes 15

  • importlib is no longer exported from the gdown package because it was listed in __all__ by accident.

    6.4.0release notes

  • Incomplete response bodies are rejected instead of being saved as completed downloads.

    6.1.1release notes

  • Removes assert_md5sum(); use hashlib for checksum verification.

    6.0.0release notes

  • Removes the md5 parameter; use the hash parameter instead, such as hash="md5:abc123".

    6.0.0release notes

  • download() raises DownloadError or its subclass FileURLRetrievalError on failure instead of returning None.

    6.0.0release notes

  • download_folder() raises DownloadError or its subclass FileURLRetrievalError on failure instead of returning None.

    6.0.0release notes

  • Removes the fuzzy parameter; gdown now extracts the file ID from any Google Drive URL format without it.

    6.0.0release notes

  • Validates archive members stay within the target directory, preventing path traversal writes outside the extraction path.

    5.2.2, 6.0.0release notesrelease notessecurity advisory

  • Removes FolderContentsMaximumLimitError because folder downloads now use an endpoint with no file count limit.

    6.0.0release notes

  • Removes the --fuzzy CLI flag; pass Google Drive URLs directly.

    6.0.0release notes

  • Removes the --id CLI flag; use gdown.parse_url() for URL parsing.

    6.0.0release notes

  • Removes the --remaining-ok flag; folder downloads no longer need to proceed with a partial download due to the 50-file limit.

    6.0.0release notes

  • Removes md5sum(); use hashlib for checksum verification.

    6.0.0release notes

  • Returns None instead of False for non-Google-Drive URLs.

    6.0.0release notes

  • gdown now requires Python 3.10 or later; Python 3.8 and 3.9 are no longer supported.

    6.0.0release notes

Security 1

  • The cookies file is written owner-only and keeps session cookies.

    6.2.0release notes

New APIs and options 11

  • Optional cancellation events for download() and cached_download() interrupt stalled response reads and download waits without shortening network timeouts, raising DownloadCancelled while preserving partial-file cleanup.

    6.4.0release notes

  • Adds opt-in automatic recovery of interrupted file and folder downloads, with bounded backoff and validated byte-range resume; --continue still controls reuse of earlier downloads.

    6.3.0release notes

  • Adds an installation extra for importing Chromium cookies from GNOME Keyring.

    6.3.0release notes

  • Adds --timeout SECONDS to prevent a stalled server from blocking forever.

    6.3.0release notes

  • Adds opt-in automatic recovery of interrupted file and folder downloads, with bounded backoff and validated byte-range resume.

    6.3.0release notes

  • Adds a requests-style timeout parameter to download(), download_folder(), and cached_download() so a stalled server no longer blocks forever.

    6.3.0release notes

  • Selects a cookies file other than ~/.cache/gdown/cookies.txt.

    6.2.0release notes

  • Downloads using the signed-in Google account by reading cookies directly from a local browser.

    6.2.0release notes

  • Adds a parameter that resolves the target filename and ID without fetching the file, returning a GoogleDriveFileToDownload.

    6.1.0release notes

  • Lists file or folder contents as a JSON array of url and path entries on stdout instead of downloading; paths use POSIX separators, and the flag cannot be combined with -O/--output.

    6.1.0release notes

  • Adds a progress parameter to download() for hooking into download progress.

    6.0.0release notes

Behavior and default changes 6

  • Staging directories are named after their file and hidden, making leftovers from killed downloads recognizable.

    6.5.0release notes

  • Verifies hash while streaming instead of reading the finished file back from disk.

    6.3.0release notes

  • Downloads continue after individual files fail, and all failures are reported together.

    6.2.0release notes

  • Folder URLs are detected automatically; --folder is needed only for ambiguous bare IDs.

    6.2.0release notes

  • Prints a one-time beta warning to stderr when --json is used; --quiet suppresses the warning.

    6.1.0release notes

  • Folder downloads support more than 50 files using the embeddedfolderview endpoint.

    6.0.0release notes

Tooling 1

Fixes and other changes 21

  • Progress totals are reported as unknown for compressed or chunked HTTP responses instead of comparing decoded bytes against Content-Length.

    6.5.1release notes

  • Cached downloads are published atomically when the cache and destination are on different filesystems.

    6.5.0release notes

  • A download resumes only from its own partial file, avoiding reuse of a partial file for a longer filename with the same prefix.

    6.5.0release notes

  • Sanitizes Windows-invalid file and folder names when downloading from Google Drive.

    6.4.2release notes

  • Supports Google Drive file URLs ending in /preview or without a /view or /edit suffix.

    6.4.1release notes

  • An invalid --speed value now reports accepted units instead of an internal function name.

    6.4.0release notes

  • Reports a hit --timeout as a timeout instead of asking to file an issue.

    6.3.0release notes

  • Propagates progress callback exceptions unchanged instead of misreporting chunked-encoding errors as incomplete downloads.

    6.3.0release notes

  • Staging directories are removed after success or interruption, and the cache is created on demand instead of during import.

    6.2.0release notes

  • Sessions and streamed responses are closed on early exits, failures, and response replacement, including single-file Listing and resumed downloads.

    6.2.0release notes

  • Export extensions are preserved for dotted Google-native filenames.

    6.2.0release notes

  • Folder JSON export paths are fixed.

    6.2.0release notes

  • A browser cookie extraction error no longer replaces working session cookies with invalid decrypted values.

    6.2.0release notes

  • An explicitly supplied user agent is honored for file downloads within folders, while existing default user agents are retained.

    6.2.0release notes

  • Exceptions during file or folder downloads no longer leave HTTP sessions, progress bars, or output files behind.

    6.1.1release notes

  • Archive member paths returned by extractall use native path separators consistently for ZIP and tar results.

    6.1.1release notes

  • Handles a corrupted cookies file instead of crashing.

    6.0.0release notes

  • Sanitizes path separators in filenames on all platforms.

    6.0.0release notes

  • Detects Google Docs, Sheets, and Slides via URL patterns instead of page title, fixing downloads on non-English Google accounts.

    6.0.0release notes

  • Appends the correct extension for Google exports in folder downloads.

    6.0.0release notes

  • Fixes output directory detection and filename handling on Windows.

    6.0.0release notes

gdown 510 changes

Breaking changes 4

  • Rejects symlinks, hardlinks, and special files in tar archives.

    5.2.2release notes

  • Cookies are saved using MozillaCookieJar instead of JSON.

    5.0.0release notes

  • Python 2 support is dropped.

    5.0.0release notes

  • Log messages are printed to stderr instead of stdout.

    5.0.0release notes

Security 2

  • Sanitizes filenames from HTTP responses and URLs to prevent path traversal through /, \, .., and null bytes.

    5.2.2release notes

  • Uses Python 3.12+ filter="data" for tar extraction when available.

    5.2.2release notes

Behavior and default changes 1

  • The message printed by assert_md5sum is simplified.

    5.0.0release notes

Fixes and other changes 3

  • Sanitizes the root folder name before building directory paths.

    5.2.2release notes

  • Verifies the file hash before moving it to the final location, preventing corrupted files from being left there if verification fails.

    5.2.1release notes

  • Tracks downloaded bytes independently from the progress bar for speed limiting, avoiding unnecessary sleep when resuming downloads.

    5.2.1release notes