Restore HTTP.Exceptions as a deprecating compat shim + migration note#1315
Merged
Merged
Conversation
Re-add HTTP.Exceptions as a thin deprecated submodule forwarding HTTPError, StatusError, ConnectError and TimeoutError to the canonical top-level names via Base.@deprecate_binding (as the existing escape -> escapeuri), so downstream `catch ... isa HTTP.Exceptions.StatusError` keeps working with a deprecation warning. RequestError, @Try and current_exceptions_to_string are not reinstated; the migration guide documents them (RequestError has no drop-in -- the underlying exception propagates and isrecoverable classifies it). Closes JuliaWeb#1314.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1315 +/- ##
==========================================
- Coverage 87.32% 87.17% -0.16%
==========================================
Files 29 29
Lines 11326 11326
==========================================
- Hits 9890 9873 -17
- Misses 1436 1453 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The |
krynju
added a commit
to krynju/AWS.jl
that referenced
this pull request
Jun 25, 2026
`_HTTP_V2 = !isdefined(HTTP, :Exceptions)` is no longer reliable: HTTP 2.x re-adds `HTTP.Exceptions` as a deprecating compat shim (JuliaWeb/HTTP.jl#1315), so on a 2.x release carrying that shim the flag would flip to `false` and AWS.jl would silently run its 1.x code paths on HTTP 2. Switch to `pkgversion(HTTP) >= 2` (with an `HTTP.EmptyBody` feature-detection fallback for Julia < 1.9 — a genuine 2.x-only type that is not shimmed back). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
krynju
added a commit
to krynju/AWSS3.jl
that referenced
this pull request
Jun 25, 2026
The `isdir` test picked the `StatusError` constructor via `isdefined(AWS.HTTP, :Exceptions)`. HTTP 2.x re-adds `HTTP.Exceptions` as a deprecating compat shim (JuliaWeb/HTTP.jl#1315), so on such a release the test would take the 1.x branch and call the removed 4-arg `StatusError(status, method, target, response)` constructor → MethodError. Key off `HTTP.EmptyBody` (a genuine 2.x-only type that is not shimmed) instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
krynju
added a commit
to JuliaComputing/GitForge.jl
that referenced
this pull request
Jun 25, 2026
`_HTTP_V2 = !isdefined(HTTP, :Header)` keys off a removed binding's absence, which is fragile: HTTP.jl 2.x has re-added other removed bindings as deprecating shims (e.g. HTTP.Exceptions, JuliaWeb/HTTP.jl#1315), so a future Header shim would silently flip the flag. Use `pkgversion(HTTP) >= 2`, falling back to a genuine 2.x-only type (`HTTP.EmptyBody`) when pkgversion is unavailable (Julia < 1.9). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nkottary
added a commit
to JuliaWeb/GitForge.jl
that referenced
this pull request
Jun 29, 2026
* Update HTTP.jl to 2.4.0
* Fix compatibility with HTTP.jl 2.x API
- Replace HTTP.Header[] with Pair{String,String}[]; the HTTP.Header
type alias was removed from the public API in HTTP.jl 2.0.
- Replace HTTP.StatusError(status, method, url, resp) with
HTTP.StatusError(resp); the v2 StatusError struct has only
(status, response) fields and no longer takes method/url arguments.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix remaining HTTP.jl 2.x test failures
Replace HTTP.Header[] with Pair{String,String}[] since HTTP.Header was
removed in HTTP.jl 2.x. Drop the !isempty(out) verbose log assertion
since HTTP.jl 2.x prints verbose output directly to stdout rather than
through Julia's logging system, making it uncapturable by TestLogger.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Drop Julia 1.6 support
HTTP.jl 2.x requires Julia 1.7+, so Julia 1.6 can no longer resolve
the dependency. Remove 1.6 from the CI matrix and bump the julia compat
bound to 1.7 accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove docs/Manifest.toml from version control
Add it to .gitignore so it is generated fresh during CI via
Pkg.instantiate(), avoiding stale pinned dependencies (e.g. the
TimeZones build failure on current Julia).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add missing docstrings to docs
19 documented symbols were not referenced in the manual, causing
makedocs to error with :missing_docs. Add them across three areas:
- API endpoints: get_branches, delete_branch, create_repo (owner/repo
variant), subscribe/unsubscribe_from_pull_request, groups,
list_issues, list_pipeline_schedules, and all pull request comment
CRUD functions
- Bitbucket section: Bitbucket module, BitbucketAPI, RenderedPullRequestMarkup
- Internals: constructfield, write(::FieldContext, ...), @forge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Bump version 0.4.4 -> 0.5.0
Dropping Julia 1.6 support and requiring HTTP.jl 2.x are both breaking
changes for existing users, warranting a minor version bump under
Julia's pre-1.0 conventions.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add dual HTTP.jl 1.x/2.x support; bump version to 0.4.5
Widen HTTP compat from "2.4.0" to "1.10, 2" so the package resolves on
both HTTP 1.x and 2.x. The sole API incompatibility was the HTTP.StatusError
constructor (4-arg in 1.x, 1-arg in 2.x); this is guarded by a module-level
_HTTP_V2 constant derived from isdefined(HTTP, :Header) (works on Julia 1.6+).
Also fixes the pre-existing broken 2-arg HTTP.StatusError call in Bitbucket
pagination and replaces removed HTTP.status/HTTP.body accessor functions with
direct field access (compatible with both versions).
Restore Julia 1.6 to Project.toml compat and CI matrix: HTTP 1.x supports 1.6,
so users on 1.6 will resolve HTTP 1.x and the conditional paths handle the rest.
Version bump 0.5.0 → 0.4.5: dual-version support is additive, not breaking.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* detect HTTP 2.x by package version, not HTTP.Header absence
`_HTTP_V2 = !isdefined(HTTP, :Header)` keys off a removed binding's absence,
which is fragile: HTTP.jl 2.x has re-added other removed bindings as deprecating
shims (e.g. HTTP.Exceptions, JuliaWeb/HTTP.jl#1315), so a future Header shim
would silently flip the flag. Use `pkgversion(HTTP) >= 2`, falling back to a
genuine 2.x-only type (`HTTP.EmptyBody`) when pkgversion is unavailable
(Julia < 1.9).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* refactor: detect HTTP 2.x era via binding-owned VERSION
`HTTP.VERSION` only exists from HTTP.jl 2.0 on; under 1.x it resolves to the `VERSION` re-exported from `Base` (the Julia version). Guard with `Base.binding_module` before comparing, and bound to the 2.x line (`v"2" <= VERSION < v"3"`) so a future HTTP 3 isn't treated as 2.x. Replaces the prior version-detection.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Fix http compat
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: krynju <krystian.gulinski@juliahub.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the deprecating
HTTP.Exceptionsshim and migration note discussed in #1314 (context and prevalence there).src/HTTP.jlre-addsHTTP.Exceptionsas a thin deprecated submodule forwarding the four relocated types to their top-level names:So
catch … isa HTTP.Exceptions.StatusErrorresolves again, forwarding toHTTP.StatusErrorwith a--depwarn=yeswarning — same mechanism as the existing@deprecate escape escapeuri, and like it, untested.RequestError,@try, andcurrent_exceptions_to_stringare not reinstated; the migration note covers them (RequestErrorhas no drop-in — the underlying exception propagates andisrecoverableclassifies it, #1310).docs/src/guides/migration-1x.mdgains an "Exceptions" section (Before/After forStatusErrorandRequestError) and a Final-Checklist line.Closes #1314.