From 892e4011fc7a5a32f2961d1b4f5c66a65de742a9 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 16 Jun 2025 08:50:13 -0500 Subject: [PATCH 1/6] Use curl to modify/construct urls Note that `req_url_path_append()` now only actually affects the path, not other components of the URL like the query params. Fixes #732 --- NEWS.md | 1 + R/resp-url.R | 3 ++- R/url.R | 49 +++++++++------------------------- man/resp_url.Rd | 3 ++- tests/testthat/_snaps/url.md | 10 +------ tests/testthat/test-req-body.R | 3 ++- tests/testthat/test-resp-url.R | 3 ++- tests/testthat/test-url.R | 21 +++++++-------- 8 files changed, 32 insertions(+), 61 deletions(-) diff --git a/NEWS.md b/NEWS.md index 36646dd5e..deee6d3f0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # httr2 (development version) +* URL construction is now powered by `curl::curl_modify_url()`, and hence now (correctly) escapes the `path` component (#732). This also means that `req_url_path()` now can only affect the path component of the URL, not the query params or fragment. * `req_url_query()` now re-calculates n lengths when using `.multi = "explode"` to avoid select/recycling issues (@Kevanness, #719). # httr2 1.1.2 diff --git a/R/resp-url.R b/R/resp-url.R index 42c67850b..e486153a2 100644 --- a/R/resp-url.R +++ b/R/resp-url.R @@ -9,7 +9,8 @@ #' @export #' @examples #' resp <- request(example_url()) |> -#' req_url_path("/get?hello=world") |> +#' req_url_path("/get") |> +#' req_url_query(hello = "world") |> #' req_perform() #' #' resp |> resp_url() diff --git a/R/url.R b/R/url.R index 94bf3a752..56e6c0d86 100644 --- a/R/url.R +++ b/R/url.R @@ -24,7 +24,7 @@ url_parse <- function(url, base_url = NULL) { check_string(url) check_string(base_url, allow_null = TRUE) - curl <- curl::curl_parse_url(url, baseurl = base_url, decode = FALSE) + curl <- curl::curl_parse_url(url, baseurl = base_url) parsed <- list( scheme = curl$scheme, @@ -267,44 +267,21 @@ url_build <- function(url) { stop_input_type(url, "a parsed URL") } - if (!is.null(url$query)) { - query <- url_query_build(url$query) + if (length(url$query) == 0) { + query <- "" } else { - query <- NULL + query <- I(url_query_build(url$query)) } - if (is.null(url$username) && is.null(url$password)) { - user_pass <- NULL - } else if (is.null(url$username) && !is.null(url$password)) { - cli::cli_abort("Cannot set url {.arg password} without {.arg username}.") - } else if (!is.null(url$username) && is.null(url$password)) { - user_pass <- paste0(url$username, "@") - } else { - user_pass <- paste0(url$username, ":", url$password, "@") - } - - if (!is.null(user_pass) || !is.null(url$hostname) || !is.null(url$port)) { - authority <- paste0(user_pass, url$hostname) - if (!is.null(url$port)) { - authority <- paste0(authority, ":", url$port) - } - } else { - authority <- NULL - } - - if (is.null(url$path) || !startsWith(url$path, "/")) { - url$path <- paste0("/", url$path) - } - - prefix <- function(prefix, x) if (!is.null(x)) paste0(prefix, x) - paste0( - url$scheme, - if (!is.null(url$scheme)) ":", - if (!is.null(url$scheme) || !is.null(authority)) "//", - authority, - url$path, - prefix("?", query), - prefix("#", url$fragment) + curl::curl_modify_url( + scheme = url$scheme, + host = url$hostname, + user = url$username, + password = url$password, + port = url$port, + path = url$path, + query = query, + fragment = url$fragment ) } diff --git a/man/resp_url.Rd b/man/resp_url.Rd index 8ad65fc65..4d248f4c3 100644 --- a/man/resp_url.Rd +++ b/man/resp_url.Rd @@ -32,7 +32,8 @@ resp_url_queries(resp) } \examples{ resp <- request(example_url()) |> - req_url_path("/get?hello=world") |> + req_url_path("/get") |> + req_url_query(hello = "world") |> req_perform() resp |> resp_url() diff --git a/tests/testthat/_snaps/url.md b/tests/testthat/_snaps/url.md index 5b8575060..a6ce32250 100644 --- a/tests/testthat/_snaps/url.md +++ b/tests/testthat/_snaps/url.md @@ -3,7 +3,7 @@ Code url_parse("http://user:pass@example.com:80/path?a=1&b=2&c={1{2}3}#frag") Message - http://user:pass@example.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag + http://user:pass@example.com:80/path?a=1&b=2&c=%7b1%7b2%7d3%7d#frag * scheme: http * hostname: example.com * username: user @@ -16,14 +16,6 @@ * c: {1{2}3} * fragment: frag -# password also requires username - - Code - url_build(url) - Condition - Error in `url_build()`: - ! Cannot set url `password` without `username`. - # url_build validates its input Code diff --git a/tests/testthat/test-req-body.R b/tests/testthat/test-req-body.R index d1d754a0d..9c303529a 100644 --- a/tests/testthat/test-req-body.R +++ b/tests/testthat/test-req-body.R @@ -19,7 +19,8 @@ test_that("can send file with redirect", { path <- tempfile() writeChar(str, path) - resp <- request_test("/redirect-to?url=/post&status_code=307") %>% + resp <- request_test("/redirect-to") %>% + req_url_query(url = "/post", status_code = "307") %>% req_body_file(path, type = "text/plain") %>% req_perform() diff --git a/tests/testthat/test-resp-url.R b/tests/testthat/test-resp-url.R index 1d1a5e2ac..bc1003bb8 100644 --- a/tests/testthat/test-resp-url.R +++ b/tests/testthat/test-resp-url.R @@ -1,5 +1,6 @@ test_that("can extract url components from a response", { - resp <- req_perform(request_test("/get?a=1&b=2")) + req <- request_test("/get") %>% req_url_query(a = "1", b = "2") + resp <- req_perform(req) expect_equal(resp_url(resp), example_url("/get?a=1&b=2")) expect_equal(resp_url_path(resp), "/get") diff --git a/tests/testthat/test-url.R b/tests/testthat/test-url.R index dea7a0ec5..3ca7cd1dd 100644 --- a/tests/testthat/test-url.R +++ b/tests/testthat/test-url.R @@ -11,10 +11,9 @@ test_that("can round trip urls", { "http://google.com/path?a=1&b=2", "http://google.com:80/path?a=1&b=2", "http://google.com:80/path?a=1&b=2#frag", - "http://google.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag", + "http://google.com:80/path?a=1&b=2&c=%7b1%7b2%7d3%7d#frag", "http://user@google.com:80/path?a=1&b=2", - "http://user:pass@google.com:80/path?a=1&b=2", - "svn+ssh://my.svn.server/repo/trunk" + "http://user:pass@google.com:80/path?a=1&b=2" ) expect_equal(map(urls, ~ url_build(url_parse(.x))), urls) @@ -34,19 +33,13 @@ test_that("can print all url details", { ) }) -test_that("password also requires username", { - url <- url_parse("http://username:pwd@example.com") - url$username <- NULL - expect_snapshot(url_build(url), error = TRUE) -}) - test_that("url_build validates its input", { expect_snapshot(url_build("abc"), error = TRUE) }) -test_that("decodes query params but not paths", { +test_that("decodes params and paths", { url <- url_parse("http://example.com/a%20b?q=a%20b") - expect_equal(url$path, "/a%20b") + expect_equal(url$path, "/a b") expect_equal(url$query$q, "a b") }) @@ -97,11 +90,15 @@ test_that("can accept query as a string or list", { expect_equal(url_modify(url, query = list()), "http://test/") }) -test_that("automatically escapes query components", { +test_that("encodes params and paths", { expect_equal( url_modify("https://example.com", query = list(q = "a b")), "https://example.com/?q=a%20b" ) + expect_equal( + url_modify("https://example.com", path = "a b"), + "https://example.com/a%20b" + ) }) test_that("checks various query formats", { From 3ddb2ab0003922c98e11c9b32800f4a9d1b7f5df Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Wed, 18 Jun 2025 11:02:44 -0500 Subject: [PATCH 2/6] check revdeps --- revdep/README.md | 28 ++- revdep/cran.md | 52 +++- revdep/failures.md | 215 +++++------------ revdep/problems.md | 577 ++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 698 insertions(+), 174 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index 2685ff18d..dfca05d11 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -1,10 +1,26 @@ # Revdeps -## Failed to check (3) +## Failed to check (1) -|package |version |error |warning |note | -|:----------|:-------|:-----|:-------|:----| -|GeoTox |? | | | | -|insight |? | | | | -|parameters |? | | | | +|package |version |error |warning |note | +|:------------|:-------|:-----|:-------|:----| +|arcgisplaces |0.1.2 |1 | | | + +## New problems (13) + +|package |version |error |warning |note | +|:---------|:-------|:------|:-------|:----| +|[atrrr](problems.md#atrrr)|0.1.0 |__+1__ | | | +|[bskyr](problems.md#bskyr)|0.3.0 |__+1__ | | | +|[comtradr](problems.md#comtradr)|1.0.3 |__+1__ | |1 | +|[forcis](problems.md#forcis)|1.0.1 |__+1__ | |1 | +|[gtexr](problems.md#gtexr)|0.2.0 |__+1__ | | | +|[httptest2](problems.md#httptest2)|1.1.0 |__+1__ | | | +|[locateip](problems.md#locateip)|0.1.2 |__+1__ | | | +|[osmapiR](problems.md#osmapir)|0.2.3 |__+2__ | | | +|[riem](problems.md#riem)|1.0.0 |__+1__ | | | +|[rirods](problems.md#rirods)|0.2.0 |__+1__ | | | +|[rlandfire](problems.md#rlandfire)|2.0.0 |__+1__ | | | +|[tidyllm](problems.md#tidyllm)|0.3.4 |__+1__ | | | +|[wbwdi](problems.md#wbwdi)|1.0.1 |__+1__ | | | diff --git a/revdep/cran.md b/revdep/cran.md index 6a7754e14..ece4e13fe 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -1,13 +1,55 @@ ## revdepcheck results -We checked 201 reverse dependencies (200 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package. +We checked 221 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - * We saw 0 new problems - * We failed to check 2 packages + * We saw 13 new problems + * We failed to check 1 packages Issues with CRAN packages are summarised below. +### New problems +(This reports the first line of each new failure) + +* atrrr + checking tests ... ERROR + +* bskyr + checking tests ... ERROR + +* comtradr + checking tests ... ERROR + +* forcis + checking tests ... ERROR + +* gtexr + checking tests ... ERROR + +* httptest2 + checking tests ... ERROR + +* locateip + checking tests ... ERROR + +* osmapiR + checking examples ... ERROR + checking tests ... ERROR + +* riem + checking tests ... ERROR + +* rirods + checking tests ... ERROR + +* rlandfire + checking tests ... ERROR + +* tidyllm + checking tests ... ERROR + +* wbwdi + checking tests ... ERROR + ### Failed to check -* insight (NA) -* parameters (NA) +* arcgisplaces (NA) diff --git a/revdep/failures.md b/revdep/failures.md index 7448c0baf..338c39e75 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -1,187 +1,78 @@ -# GeoTox +# arcgisplaces
-* Version: NA +* Version: 0.1.2 * GitHub: NA -* Source code: https://github.com/cran/GeoTox -* Number of recursive dependencies: 143 +* Source code: https://github.com/cran/arcgisplaces +* Date/Publication: 2025-04-10 16:20:02 UTC +* Number of recursive dependencies: 42 -Run `revdepcheck::cloud_details(, "GeoTox")` for more info +Run `revdepcheck::cloud_details(, "arcgisplaces")` for more info
-## Error before installation - -### Devel - -``` - - - - - - -``` -### CRAN - -``` - - - - - - -``` -# insight - -
- -* Version: 1.1.0 -* GitHub: https://github.com/easystats/insight -* Source code: https://github.com/cran/insight -* Date/Publication: 2025-03-01 23:10:06 UTC -* Number of recursive dependencies: 425 - -Run `revdepcheck::cloud_details(, "insight")` for more info - -
- -## Error before installation - -### Devel - -``` -* using log directory ‘/tmp/workdir/insight/new/insight.Rcheck’ -* using R version 4.3.1 (2023-06-16) -* using platform: x86_64-pc-linux-gnu (64-bit) -* R was compiled by - gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 - GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0 -* running under: Ubuntu 24.04.1 LTS -* using session charset: UTF-8 -* using option ‘--no-manual’ -* checking for file ‘insight/DESCRIPTION’ ... OK -... - When sourcing ‘insight.R’: -Error: function 'cholmod_factor_ldetA' not provided by package 'Matrix' -Execution halted - - ‘display.Rmd’ using ‘UTF-8’... OK - ‘export.Rmd’ using ‘UTF-8’... OK - ‘insight.Rmd’ using ‘UTF-8’... failed -* checking re-building of vignette outputs ... OK -* DONE -Status: 3 ERRORs, 1 NOTE - - - - - -``` -### CRAN - -``` -* using log directory ‘/tmp/workdir/insight/old/insight.Rcheck’ -* using R version 4.3.1 (2023-06-16) -* using platform: x86_64-pc-linux-gnu (64-bit) -* R was compiled by - gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 - GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0 -* running under: Ubuntu 24.04.1 LTS -* using session charset: UTF-8 -* using option ‘--no-manual’ -* checking for file ‘insight/DESCRIPTION’ ... OK -... - When sourcing ‘insight.R’: -Error: function 'cholmod_factor_ldetA' not provided by package 'Matrix' -Execution halted - - ‘display.Rmd’ using ‘UTF-8’... OK - ‘export.Rmd’ using ‘UTF-8’... OK - ‘insight.Rmd’ using ‘UTF-8’... failed -* checking re-building of vignette outputs ... OK -* DONE -Status: 3 ERRORs, 1 NOTE - - +## In both +* checking whether package ‘arcgisplaces’ can be installed ... ERROR + ``` + Installation failed. + See ‘/tmp/workdir/arcgisplaces/new/arcgisplaces.Rcheck/00install.out’ for details. + ``` - -``` -# parameters - -
- -* Version: 0.24.2 -* GitHub: https://github.com/easystats/parameters -* Source code: https://github.com/cran/parameters -* Date/Publication: 2025-03-04 14:50:06 UTC -* Number of recursive dependencies: 474 - -Run `revdepcheck::cloud_details(, "parameters")` for more info - -
- -## Error before installation +## Installation ### Devel ``` -* using log directory ‘/tmp/workdir/parameters/new/parameters.Rcheck’ -* using R version 4.3.1 (2023-06-16) -* using platform: x86_64-pc-linux-gnu (64-bit) -* R was compiled by - gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 - GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0 -* running under: Ubuntu 24.04.1 LTS -* using session charset: UTF-8 -* using option ‘--no-manual’ -* checking for file ‘parameters/DESCRIPTION’ ... OK +* installing *source* package ‘arcgisplaces’ ... +** package ‘arcgisplaces’ successfully unpacked and MD5 sums checked +** using staged installation +Using cargo 1.75.0 +Using rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball) +Building for CRAN. +Writing `src/Makevars`. +`tools/config.R` has finished. +** libs +using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ ... - • equivalence_test/equivalence-test-5.svg - Error: Test failures - Execution halted -* checking for unstated dependencies in vignettes ... OK -* checking package vignettes in ‘inst/doc’ ... OK -* checking running R code from vignettes ... OK - ‘overview_of_vignettes.Rmd’ using ‘UTF-8’... OK -* checking re-building of vignette outputs ... OK -* DONE -Status: 2 ERRORs, 2 NOTEs - - - +export CARGO_HOME=/tmp/workdir/arcgisplaces/new/arcgisplaces.Rcheck/00_pkg_src/arcgisplaces/src/.cargo && \ +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \ +RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target +error: package `litemap v0.7.5` cannot be built because it requires rustc 1.81 or newer, while the currently active rustc version is 1.75.0 +Either upgrade to rustc 1.81 or newer, or use +cargo update litemap@0.7.5 --precise ver +where `ver` is the latest version of `litemap` supporting rustc 1.75.0 +make: *** [Makevars:28: rust/target/release/libarcgisplaces.a] Error 101 +ERROR: compilation failed for package ‘arcgisplaces’ +* removing ‘/tmp/workdir/arcgisplaces/new/arcgisplaces.Rcheck/arcgisplaces’ ``` ### CRAN ``` -* using log directory ‘/tmp/workdir/parameters/old/parameters.Rcheck’ -* using R version 4.3.1 (2023-06-16) -* using platform: x86_64-pc-linux-gnu (64-bit) -* R was compiled by - gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0 - GNU Fortran (Ubuntu 13.2.0-23ubuntu4) 13.2.0 -* running under: Ubuntu 24.04.1 LTS -* using session charset: UTF-8 -* using option ‘--no-manual’ -* checking for file ‘parameters/DESCRIPTION’ ... OK +* installing *source* package ‘arcgisplaces’ ... +** package ‘arcgisplaces’ successfully unpacked and MD5 sums checked +** using staged installation +Using cargo 1.75.0 +Using rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball) +Building for CRAN. +Writing `src/Makevars`. +`tools/config.R` has finished. +** libs +using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ ... - • equivalence_test/equivalence-test-5.svg - Error: Test failures - Execution halted -* checking for unstated dependencies in vignettes ... OK -* checking package vignettes in ‘inst/doc’ ... OK -* checking running R code from vignettes ... OK - ‘overview_of_vignettes.Rmd’ using ‘UTF-8’... OK -* checking re-building of vignette outputs ... OK -* DONE -Status: 2 ERRORs, 2 NOTEs - - - +export CARGO_HOME=/tmp/workdir/arcgisplaces/old/arcgisplaces.Rcheck/00_pkg_src/arcgisplaces/src/.cargo && \ +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \ +RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target +error: package `native-tls v0.2.14` cannot be built because it requires rustc 1.80.0 or newer, while the currently active rustc version is 1.75.0 +Either upgrade to rustc 1.80.0 or newer, or use +cargo update native-tls@0.2.14 --precise ver +where `ver` is the latest version of `native-tls` supporting rustc 1.75.0 +make: *** [Makevars:28: rust/target/release/libarcgisplaces.a] Error 101 +ERROR: compilation failed for package ‘arcgisplaces’ +* removing ‘/tmp/workdir/arcgisplaces/old/arcgisplaces.Rcheck/arcgisplaces’ ``` diff --git a/revdep/problems.md b/revdep/problems.md index 9a2073633..b5f55c85c 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -1 +1,576 @@ -*Wow, no problems at all. :)* \ No newline at end of file +# atrrr + +
+ +* Version: 0.1.0 +* GitHub: https://github.com/JBGruber/atrrr +* Source code: https://github.com/cran/atrrr +* Date/Publication: 2025-01-20 11:30:42 UTC +* Number of recursive dependencies: 96 + +Run `revdepcheck::cloud_details(, "atrrr")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + > # * https://testthat.r-lib.org/articles/special-files.html + ... + 33. │ └─httr2::url_build(...) + 34. │ └─curl::curl_modify_url(...) + 35. └─base::.handleSimpleError(...) + 36. └─purrr (local) h(simpleError(msg, call)) + 37. └─cli::cli_abort(...) + 38. └─rlang::abort(...) + + [ FAIL 101 | WARN 0 | SKIP 2 | PASS 68 ] + Error: Test failures + Execution halted + ``` + +# bskyr + +
+ +* Version: 0.3.0 +* GitHub: https://github.com/christopherkenny/bskyr +* Source code: https://github.com/cran/bskyr +* Date/Publication: 2025-05-02 23:10:02 UTC +* Number of recursive dependencies: 73 + +Run `revdepcheck::cloud_details(, "bskyr")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + ... + 4. │ └─httr2:::check_response(resp) + 5. │ └─httr2:::is_response(resp) + 6. └─httr2::req_perform(...) + 7. └─httptest2 (local) mock(req) + 8. └─httptest2:::stop_request(req) + 9. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 15 | WARN 0 | SKIP 0 | PASS 102 ] + Error: Test failures + Execution halted + ``` + +# comtradr + +
+ +* Version: 1.0.3 +* GitHub: https://github.com/ropensci/comtradr +* Source code: https://github.com/cran/comtradr +* Date/Publication: 2024-11-15 17:40:08 UTC +* Number of recursive dependencies: 93 + +Run `revdepcheck::cloud_details(, "comtradr")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/tests.html + ... + 3. └─comtradr::ct_get_data(...) at test-ct_get_data.R:73:7 + 4. └─comtradr:::ct_perform_request(...) + 5. └─httr2::req_perform(...) + 6. └─httptest2 (local) mock(req) + 7. └─httptest2:::stop_request(req) + 8. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 7 | WARN 0 | SKIP 2 | PASS 107 ] + Error: Test failures + Execution halted + ``` + +## In both + +* checking data for non-ASCII characters ... NOTE + ``` + Note: found 11 marked UTF-8 strings + ``` + +# forcis + +
+ +* Version: 1.0.1 +* GitHub: https://github.com/ropensci/forcis +* Source code: https://github.com/cran/forcis +* Date/Publication: 2025-05-23 12:02:02 UTC +* Number of recursive dependencies: 93 + +Run `revdepcheck::cloud_details(, "forcis")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + > # * https://testthat.r-lib.org/articles/special-files.html + ... + 17. │ │ └─base::eval(expr, p) + 18. │ └─httptest2::with_mock_api(expr) + 19. │ └─base::eval.parent(expr) + 20. │ └─base::eval(expr, p) + 21. └─forcis:::get_metadata() at tests/testthat/setup.R:31:5 + 22. └─httr2::req_perform(http_request) + 23. └─httptest2 (local) mock(req) + 24. └─httptest2:::stop_request(req) + 25. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + Execution halted + ``` + +## In both + +* checking installed package size ... NOTE + ``` + installed size is 5.6Mb + sub-directories of 1Mb or more: + R 2.1Mb + doc 1.3Mb + help 1.0Mb + ``` + +# gtexr + +
+ +* Version: 0.2.0 +* GitHub: https://github.com/ropensci/gtexr +* Source code: https://github.com/cran/gtexr +* Date/Publication: 2025-04-23 21:30:02 UTC +* Number of recursive dependencies: 65 + +Run `revdepcheck::cloud_details(, "gtexr")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + ... + 15. │ └─httr2:::is_response(resp) + 16. └─gtexr:::perform_gtex_request(gtex_request, call = call) + 17. └─httr2::req_perform(...) + 18. └─httptest2 (local) mock(req) + 19. └─httptest2:::stop_request(req) + 20. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 4 | WARN 0 | SKIP 54 | PASS 46 ] + Error: Test failures + Execution halted + ``` + +# httptest2 + +
+ +* Version: 1.1.0 +* GitHub: https://github.com/nealrichardson/httptest2 +* Source code: https://github.com/cran/httptest2 +* Date/Publication: 2024-04-26 13:40:02 UTC +* Number of recursive dependencies: 53 + +Run `revdepcheck::cloud_details(, "httptest2")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > library(testthat) + > test_check("httptest2") + Loading required package: httptest2 + [ FAIL 2 | WARN 0 | SKIP 1 | PASS 233 ] + + ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ + ... + 3. │ └─base::eval(expr, p) + 4. ├─... %>% req_perform() at test-redact.R:147:3 + 5. └─httr2::req_perform(.) + 6. └─httptest2 (local) mock(req) + 7. └─httptest2:::stop_request(req) + 8. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 2 | WARN 0 | SKIP 1 | PASS 233 ] + Error: Test failures + Execution halted + ``` + +# locateip + +
+ +* Version: 0.1.2 +* GitHub: NA +* Source code: https://github.com/cran/locateip +* Date/Publication: 2023-06-06 07:40:05 UTC +* Number of recursive dependencies: 54 + +Run `revdepcheck::cloud_details(, "locateip")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/tests.html + > # * https://testthat.r-lib.org/reference/test_package.html#special-files + ... + ── Failure ('test-locate.R:70:3'): create request works ──────────────────────── + req[["url"]] (`actual`) not equal to "http://ip-api.com/csv/132.203.167.188?fields=status%2Cmessage%2Ccountry%2Ccity&header=true" (`expected`). + + actual vs expected + - "http://ip-api.com/csv/132.203.167.188?fields=status%2cmessage%2ccountry%2ccity&header=true" + + "http://ip-api.com/csv/132.203.167.188?fields=status%2Cmessage%2Ccountry%2Ccity&header=true" + + [ FAIL 5 | WARN 0 | SKIP 0 | PASS 5 ] + Error: Test failures + Execution halted + ``` + +# osmapiR + +
+ +* Version: 0.2.3 +* GitHub: https://github.com/ropensci/osmapiR +* Source code: https://github.com/cran/osmapiR +* Date/Publication: 2025-04-15 08:50:02 UTC +* Number of recursive dependencies: 64 + +Run `revdepcheck::cloud_details(, "osmapiR")` for more info + +
+ +## Newly broken + +* checking examples ... ERROR + ``` + Running examples in ‘osmapiR-Ex.R’ failed + The error most likely occurred in: + + > ### Name: osm_get_changesets + > ### Title: Get changesets + > ### Aliases: osm_get_changesets + > + > ### ** Examples + > + > chaset <- osm_get_changesets(changeset_id = 137595351, include_discussion = TRUE) + ... + 5. └─httr2:::resp_failure_cnd(req, resp, error_call = error_call) + 6. ├─rlang::catch_cnd(...) + 7. │ ├─rlang::eval_bare(...) + 8. │ ├─base::tryCatch(...) + 9. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) + 10. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) + 11. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) + 12. │ └─base::force(expr) + 13. └─rlang::abort(...) + Execution halted + ``` + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/tests.html + > # * https://testthat.r-lib.org/reference/test_package.html#special-files + ... + 8. └─osmapiR::osm_get_user_details(...) at test-user_data.R:78:5 + 9. └─osmapiR:::osm_details_users(user_ids = user_id, format = format) + 10. └─httr2::req_perform(req) + 11. └─httptest2 (local) mock(req) + 12. └─httptest2:::stop_request(req) + 13. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 18 | WARN 0 | SKIP 8 | PASS 887 ] + Error: Test failures + Execution halted + ``` + +# riem + +
+ +* Version: 1.0.0 +* GitHub: https://github.com/ropensci/riem +* Source code: https://github.com/cran/riem +* Date/Publication: 2025-01-31 09:10:02 UTC +* Number of recursive dependencies: 88 + +Run `revdepcheck::cloud_details(, "riem")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > library(testthat) + > library(riem) + > + > test_check("riem") + [ FAIL 4 | WARN 0 | SKIP 9 | PASS 31 ] + + ══ Skipped tests (9) ═══════════════════════════════════════════════════════════ + ... + 15. │ └─riem:::perform_riem_request(...) + 16. │ └─... %>% httr2::req_perform() + 17. └─httr2::req_perform(.) + 18. └─httptest2 (local) mock(req) + 19. └─httptest2:::stop_request(req) + 20. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 4 | WARN 0 | SKIP 9 | PASS 31 ] + Error: Test failures + Execution halted + ``` + +# rirods + +
+ +* Version: 0.2.0 +* GitHub: https://github.com/irods/irods_client_library_rirods +* Source code: https://github.com/cran/rirods +* Date/Publication: 2024-03-15 18:30:02 UTC +* Number of recursive dependencies: 81 + +Run `revdepcheck::cloud_details(, "rirods")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘spelling.R’ + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/tests.html + ... + ▆ + 1. └─rirods::ils(metadata = TRUE) at test-navigation.R:173:5 + 2. └─httr2::req_perform(...) + 3. └─httptest2 (local) mock(req) + 4. └─httptest2:::stop_request(req) + 5. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + + [ FAIL 28 | WARN 0 | SKIP 8 | PASS 50 ] + Error: Test failures + Execution halted + ``` + +# rlandfire + +
+ +* Version: 2.0.0 +* GitHub: https://github.com/bcknr/rlandfire +* Source code: https://github.com/cran/rlandfire +* Date/Publication: 2025-04-28 22:30:02 UTC +* Number of recursive dependencies: 68 + +Run `revdepcheck::cloud_details(, "rlandfire")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/tests.html + > # * https://testthat.r-lib.org/reference/test_package.html#special-files + ... + ── Failure ('test-landfireAPI.R:120:5'): `landfireAPIv2()` formats priority requests correctly ── + output$request$url (`actual`) not identical to "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3BSLPD2020%3BASP2020%3B230FBFM40%3B230CC%3B230CH%3B230CBH%3B230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" (`expected`). + + actual vs expected + - "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3bSLPD2020%3bASP2020%3b230FBFM40%3b230CC%3b230CH%3b230CBH%3b230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" + + "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3BSLPD2020%3BASP2020%3B230FBFM40%3B230CC%3B230CH%3B230CBH%3B230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" + + [ FAIL 1 | WARN 0 | SKIP 2 | PASS 78 ] + Error: Test failures + Execution halted + ``` + +# tidyllm + +
+ +* Version: 0.3.4 +* GitHub: https://github.com/edubruell/tidyllm +* Source code: https://github.com/cran/tidyllm +* Date/Publication: 2025-03-27 11:40:01 UTC +* Number of recursive dependencies: 124 + +Run `revdepcheck::cloud_details(, "tidyllm")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + > # * https://testthat.r-lib.org/articles/special-files.html + ... + ══ Failed tests ════════════════════════════════════════════════════════════════ + ── Failure ('test_api_gemini.R:24:3'): gemini_chat function constructs a correct request and dry runs it ── + grepl("/v1beta/models/gemini-2.0-flash:generateContent", dry_run$path) is not TRUE + + `actual`: FALSE + `expected`: TRUE + + [ FAIL 1 | WARN 0 | SKIP 0 | PASS 279 ] + Error: Test failures + Execution halted + ``` + +# wbwdi + +
+ +* Version: 1.0.1 +* GitHub: https://github.com/tidy-intelligence/r-wbwdi +* Source code: https://github.com/cran/wbwdi +* Date/Publication: 2025-03-25 21:00:01 UTC +* Number of recursive dependencies: 59 + +Run `revdepcheck::cloud_details(, "wbwdi")` for more info + +
+ +## Newly broken + +* checking tests ... ERROR + ``` + Running ‘testthat.R’ + Running the tests in ‘tests/testthat.R’ failed. + Complete output: + > # This file is part of the standard setup for testthat. + > # It is recommended that you do not modify it. + > # + > # Where should you do additional test configuration? + > # Learn more about the roles of various files in: + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + > # * https://testthat.r-lib.org/articles/special-files.html + ... + ── Failure ('tests-perform_request.R:80:3'): create_request constructs a request with parameters ── + req$url (`actual`) not equal to paste0("https://api.worldbank.org/v2/en/lendingTypes", "?format=json&per_page=500&date=2000%3A2020&source=2") (`expected`). + + actual vs expected + - "https://api.worldbank.org/v2/en/lendingTypes?format=json&per_page=500&date=2000%3a2020&source=2" + + "https://api.worldbank.org/v2/en/lendingTypes?format=json&per_page=500&date=2000%3A2020&source=2" + + [ FAIL 1 | WARN 0 | SKIP 25 | PASS 123 ] + Error: Test failures + Execution halted + ``` + From 79430632cff6b659585927b6910f73bb46595b9b Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Fri, 20 Jun 2025 09:35:58 -0500 Subject: [PATCH 3/6] Hack in uppercase for now --- R/url.R | 3 ++- tests/testthat/_snaps/url.md | 2 +- tests/testthat/test-url.R | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/url.R b/R/url.R index 56e6c0d86..36bf6f9a2 100644 --- a/R/url.R +++ b/R/url.R @@ -273,7 +273,7 @@ url_build <- function(url) { query <- I(url_query_build(url$query)) } - curl::curl_modify_url( + url <- curl::curl_modify_url( scheme = url$scheme, host = url$hostname, user = url$username, @@ -283,6 +283,7 @@ url_build <- function(url) { query = query, fragment = url$fragment ) + gsub('(%..)', perl = TRUE, replacement = '\\U\\1', url) } #' Parse query parameters and/or build a string diff --git a/tests/testthat/_snaps/url.md b/tests/testthat/_snaps/url.md index a6ce32250..9cc104d8e 100644 --- a/tests/testthat/_snaps/url.md +++ b/tests/testthat/_snaps/url.md @@ -3,7 +3,7 @@ Code url_parse("http://user:pass@example.com:80/path?a=1&b=2&c={1{2}3}#frag") Message - http://user:pass@example.com:80/path?a=1&b=2&c=%7b1%7b2%7d3%7d#frag + http://user:pass@example.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag * scheme: http * hostname: example.com * username: user diff --git a/tests/testthat/test-url.R b/tests/testthat/test-url.R index 9036b083e..ee1b0ef6b 100644 --- a/tests/testthat/test-url.R +++ b/tests/testthat/test-url.R @@ -11,7 +11,7 @@ test_that("can round trip urls", { "http://google.com/path?a=1&b=2", "http://google.com:80/path?a=1&b=2", "http://google.com:80/path?a=1&b=2#frag", - "http://google.com:80/path?a=1&b=2&c=%7b1%7b2%7d3%7d#frag", + "http://google.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag", "http://user@google.com:80/path?a=1&b=2", "http://user:pass@google.com:80/path?a=1&b=2" ) From 19515018e8c43dfe6a845b72585c119e1f5add60 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Fri, 20 Jun 2025 09:38:12 -0500 Subject: [PATCH 4/6] Re-check revdeps --- revdep/README.md | 17 +- revdep/cran.md | 27 +-- revdep/failures.md | 8 +- revdep/problems.md | 411 ++++++--------------------------------------- 4 files changed, 65 insertions(+), 398 deletions(-) diff --git a/revdep/README.md b/revdep/README.md index dfca05d11..057d28255 100644 --- a/revdep/README.md +++ b/revdep/README.md @@ -6,21 +6,14 @@ |:------------|:-------|:-----|:-------|:----| |arcgisplaces |0.1.2 |1 | | | -## New problems (13) +## New problems (6) -|package |version |error |warning |note | -|:---------|:-------|:------|:-------|:----| +|package |version |error |warning |note | +|:-------------|:-------|:------|:-------|:----| |[atrrr](problems.md#atrrr)|0.1.0 |__+1__ | | | -|[bskyr](problems.md#bskyr)|0.3.0 |__+1__ | | | -|[comtradr](problems.md#comtradr)|1.0.3 |__+1__ | |1 | -|[forcis](problems.md#forcis)|1.0.1 |__+1__ | |1 | -|[gtexr](problems.md#gtexr)|0.2.0 |__+1__ | | | |[httptest2](problems.md#httptest2)|1.1.0 |__+1__ | | | -|[locateip](problems.md#locateip)|0.1.2 |__+1__ | | | |[osmapiR](problems.md#osmapir)|0.2.3 |__+2__ | | | -|[riem](problems.md#riem)|1.0.0 |__+1__ | | | -|[rirods](problems.md#rirods)|0.2.0 |__+1__ | | | -|[rlandfire](problems.md#rlandfire)|2.0.0 |__+1__ | | | +|[planscorer](problems.md#planscorer)|0.0.2 |__+1__ | | | +|[spanishoddata](problems.md#spanishoddata)|0.2.0 |__+1__ | | | |[tidyllm](problems.md#tidyllm)|0.3.4 |__+1__ | | | -|[wbwdi](problems.md#wbwdi)|1.0.1 |__+1__ | | | diff --git a/revdep/cran.md b/revdep/cran.md index ece4e13fe..5040b19ba 100644 --- a/revdep/cran.md +++ b/revdep/cran.md @@ -2,7 +2,7 @@ We checked 221 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package. - * We saw 13 new problems + * We saw 6 new problems * We failed to check 1 packages Issues with CRAN packages are summarised below. @@ -13,43 +13,22 @@ Issues with CRAN packages are summarised below. * atrrr checking tests ... ERROR -* bskyr - checking tests ... ERROR - -* comtradr - checking tests ... ERROR - -* forcis - checking tests ... ERROR - -* gtexr - checking tests ... ERROR - * httptest2 checking tests ... ERROR -* locateip - checking tests ... ERROR - * osmapiR checking examples ... ERROR checking tests ... ERROR -* riem +* planscorer checking tests ... ERROR -* rirods - checking tests ... ERROR - -* rlandfire +* spanishoddata checking tests ... ERROR * tidyllm checking tests ... ERROR -* wbwdi - checking tests ... ERROR - ### Failed to check * arcgisplaces (NA) diff --git a/revdep/failures.md b/revdep/failures.md index 338c39e75..31cc80a6c 100644 --- a/revdep/failures.md +++ b/revdep/failures.md @@ -39,10 +39,10 @@ using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’ export CARGO_HOME=/tmp/workdir/arcgisplaces/new/arcgisplaces.Rcheck/00_pkg_src/arcgisplaces/src/.cargo && \ export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin" && \ RUSTFLAGS=" --print=native-static-libs" cargo build -j 2 --offline --lib --release --manifest-path=./rust/Cargo.toml --target-dir ./rust/target -error: package `litemap v0.7.5` cannot be built because it requires rustc 1.81 or newer, while the currently active rustc version is 1.75.0 -Either upgrade to rustc 1.81 or newer, or use -cargo update litemap@0.7.5 --precise ver -where `ver` is the latest version of `litemap` supporting rustc 1.75.0 +error: package `native-tls v0.2.14` cannot be built because it requires rustc 1.80.0 or newer, while the currently active rustc version is 1.75.0 +Either upgrade to rustc 1.80.0 or newer, or use +cargo update native-tls@0.2.14 --precise ver +where `ver` is the latest version of `native-tls` supporting rustc 1.75.0 make: *** [Makevars:28: rust/target/release/libarcgisplaces.a] Error 101 ERROR: compilation failed for package ‘arcgisplaces’ * removing ‘/tmp/workdir/arcgisplaces/new/arcgisplaces.Rcheck/arcgisplaces’ diff --git a/revdep/problems.md b/revdep/problems.md index b5f55c85c..0cfbc1224 100644 --- a/revdep/problems.md +++ b/revdep/problems.md @@ -39,188 +39,6 @@ Run `revdepcheck::cloud_details(, "atrrr")` for more info Execution halted ``` -# bskyr - -
- -* Version: 0.3.0 -* GitHub: https://github.com/christopherkenny/bskyr -* Source code: https://github.com/cran/bskyr -* Date/Publication: 2025-05-02 23:10:02 UTC -* Number of recursive dependencies: 73 - -Run `revdepcheck::cloud_details(, "bskyr")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘spelling.R’ - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview - ... - 4. │ └─httr2:::check_response(resp) - 5. │ └─httr2:::is_response(resp) - 6. └─httr2::req_perform(...) - 7. └─httptest2 (local) mock(req) - 8. └─httptest2:::stop_request(req) - 9. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - - [ FAIL 15 | WARN 0 | SKIP 0 | PASS 102 ] - Error: Test failures - Execution halted - ``` - -# comtradr - -
- -* Version: 1.0.3 -* GitHub: https://github.com/ropensci/comtradr -* Source code: https://github.com/cran/comtradr -* Date/Publication: 2024-11-15 17:40:08 UTC -* Number of recursive dependencies: 93 - -Run `revdepcheck::cloud_details(, "comtradr")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘spelling.R’ - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/tests.html - ... - 3. └─comtradr::ct_get_data(...) at test-ct_get_data.R:73:7 - 4. └─comtradr:::ct_perform_request(...) - 5. └─httr2::req_perform(...) - 6. └─httptest2 (local) mock(req) - 7. └─httptest2:::stop_request(req) - 8. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - - [ FAIL 7 | WARN 0 | SKIP 2 | PASS 107 ] - Error: Test failures - Execution halted - ``` - -## In both - -* checking data for non-ASCII characters ... NOTE - ``` - Note: found 11 marked UTF-8 strings - ``` - -# forcis - -
- -* Version: 1.0.1 -* GitHub: https://github.com/ropensci/forcis -* Source code: https://github.com/cran/forcis -* Date/Publication: 2025-05-23 12:02:02 UTC -* Number of recursive dependencies: 93 - -Run `revdepcheck::cloud_details(, "forcis")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview - > # * https://testthat.r-lib.org/articles/special-files.html - ... - 17. │ │ └─base::eval(expr, p) - 18. │ └─httptest2::with_mock_api(expr) - 19. │ └─base::eval.parent(expr) - 20. │ └─base::eval(expr, p) - 21. └─forcis:::get_metadata() at tests/testthat/setup.R:31:5 - 22. └─httr2::req_perform(http_request) - 23. └─httptest2 (local) mock(req) - 24. └─httptest2:::stop_request(req) - 25. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - Execution halted - ``` - -## In both - -* checking installed package size ... NOTE - ``` - installed size is 5.6Mb - sub-directories of 1Mb or more: - R 2.1Mb - doc 1.3Mb - help 1.0Mb - ``` - -# gtexr - -
- -* Version: 0.2.0 -* GitHub: https://github.com/ropensci/gtexr -* Source code: https://github.com/cran/gtexr -* Date/Publication: 2025-04-23 21:30:02 UTC -* Number of recursive dependencies: 65 - -Run `revdepcheck::cloud_details(, "gtexr")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘spelling.R’ - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview - ... - 15. │ └─httr2:::is_response(resp) - 16. └─gtexr:::perform_gtex_request(gtex_request, call = call) - 17. └─httr2::req_perform(...) - 18. └─httptest2 (local) mock(req) - 19. └─httptest2:::stop_request(req) - 20. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - - [ FAIL 4 | WARN 0 | SKIP 54 | PASS 46 ] - Error: Test failures - Execution halted - ``` - # httptest2
@@ -246,59 +64,18 @@ Run `revdepcheck::cloud_details(, "httptest2")` for more info > library(testthat) > test_check("httptest2") Loading required package: httptest2 - [ FAIL 2 | WARN 0 | SKIP 1 | PASS 233 ] + [ FAIL 2 | WARN 0 | SKIP 2 | PASS 237 ] - ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ + ══ Skipped tests (2) ═══════════════════════════════════════════════════════════ ... - 3. │ └─base::eval(expr, p) - 4. ├─... %>% req_perform() at test-redact.R:147:3 - 5. └─httr2::req_perform(.) - 6. └─httptest2 (local) mock(req) - 7. └─httptest2:::stop_request(req) - 8. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + 9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) + 10. ├─r %>% req_body_file(file_to_upload) %>% req_perform() + 11. └─httr2::req_perform(.) + 12. └─httptest2 (local) mock(req) + 13. └─httptest2:::stop_request(req) + 14. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - [ FAIL 2 | WARN 0 | SKIP 1 | PASS 233 ] - Error: Test failures - Execution halted - ``` - -# locateip - -
- -* Version: 0.1.2 -* GitHub: NA -* Source code: https://github.com/cran/locateip -* Date/Publication: 2023-06-06 07:40:05 UTC -* Number of recursive dependencies: 54 - -Run `revdepcheck::cloud_details(, "locateip")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/tests.html - > # * https://testthat.r-lib.org/reference/test_package.html#special-files - ... - ── Failure ('test-locate.R:70:3'): create request works ──────────────────────── - req[["url"]] (`actual`) not equal to "http://ip-api.com/csv/132.203.167.188?fields=status%2Cmessage%2Ccountry%2Ccity&header=true" (`expected`). - - actual vs expected - - "http://ip-api.com/csv/132.203.167.188?fields=status%2cmessage%2ccountry%2ccity&header=true" - + "http://ip-api.com/csv/132.203.167.188?fields=status%2Cmessage%2Ccountry%2Ccity&header=true" - - [ FAIL 5 | WARN 0 | SKIP 0 | PASS 5 ] + [ FAIL 2 | WARN 0 | SKIP 2 | PASS 237 ] Error: Test failures Execution halted ``` @@ -357,70 +134,29 @@ Run `revdepcheck::cloud_details(, "osmapiR")` for more info > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files ... - 8. └─osmapiR::osm_get_user_details(...) at test-user_data.R:78:5 - 9. └─osmapiR:::osm_details_users(user_ids = user_id, format = format) - 10. └─httr2::req_perform(req) - 11. └─httptest2 (local) mock(req) - 12. └─httptest2:::stop_request(req) - 13. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + 10. │ └─rlang::eval_bare(expr, quo_get_env(quo)) + 11. └─osmapiR::osm_set_preferences_user(all_prefs = preferences) + 12. └─httr2::req_perform(req) + 13. └─httptest2 (local) mock(req) + 14. └─httptest2:::stop_request(req) + 15. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - [ FAIL 18 | WARN 0 | SKIP 8 | PASS 887 ] + [ FAIL 8 | WARN 0 | SKIP 13 | PASS 1760 ] Error: Test failures Execution halted ``` -# riem +# planscorer
-* Version: 1.0.0 -* GitHub: https://github.com/ropensci/riem -* Source code: https://github.com/cran/riem -* Date/Publication: 2025-01-31 09:10:02 UTC -* Number of recursive dependencies: 88 - -Run `revdepcheck::cloud_details(, "riem")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > library(testthat) - > library(riem) - > - > test_check("riem") - [ FAIL 4 | WARN 0 | SKIP 9 | PASS 31 ] - - ══ Skipped tests (9) ═══════════════════════════════════════════════════════════ - ... - 15. │ └─riem:::perform_riem_request(...) - 16. │ └─... %>% httr2::req_perform() - 17. └─httr2::req_perform(.) - 18. └─httptest2 (local) mock(req) - 19. └─httptest2:::stop_request(req) - 20. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - - [ FAIL 4 | WARN 0 | SKIP 9 | PASS 31 ] - Error: Test failures - Execution halted - ``` - -# rirods - -
- -* Version: 0.2.0 -* GitHub: https://github.com/irods/irods_client_library_rirods -* Source code: https://github.com/cran/rirods -* Date/Publication: 2024-03-15 18:30:02 UTC +* Version: 0.0.2 +* GitHub: https://github.com/christopherkenny/planscorer +* Source code: https://github.com/cran/planscorer +* Date/Publication: 2024-09-24 14:50:02 UTC * Number of recursive dependencies: 81 -Run `revdepcheck::cloud_details(, "rirods")` for more info +Run `revdepcheck::cloud_details(, "planscorer")` for more info
@@ -437,31 +173,31 @@ Run `revdepcheck::cloud_details(, "rirods")` for more info > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/tests.html + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview ... - ▆ - 1. └─rirods::ils(metadata = TRUE) at test-navigation.R:173:5 - 2. └─httr2::req_perform(...) - 3. └─httptest2 (local) mock(req) - 4. └─httptest2:::stop_request(req) - 5. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") + 3. │ └─httr2:::check_response(resp) + 4. │ └─httr2:::is_response(resp) + 5. └─httr2::req_perform(req) + 6. └─httptest2 (local) mock(req) + 7. └─httptest2:::stop_request(req) + 8. └─rlang::abort(out, mockfile = req$mockfile, class = "httptest2_request") - [ FAIL 28 | WARN 0 | SKIP 8 | PASS 50 ] + [ FAIL 1 | WARN 0 | SKIP 0 | PASS 4 ] Error: Test failures Execution halted ``` -# rlandfire +# spanishoddata
-* Version: 2.0.0 -* GitHub: https://github.com/bcknr/rlandfire -* Source code: https://github.com/cran/rlandfire -* Date/Publication: 2025-04-28 22:30:02 UTC -* Number of recursive dependencies: 68 +* Version: 0.2.0 +* GitHub: https://github.com/rOpenSpain/spanishoddata +* Source code: https://github.com/cran/spanishoddata +* Date/Publication: 2025-06-15 23:20:02 UTC +* Number of recursive dependencies: 162 -Run `revdepcheck::cloud_details(, "rlandfire")` for more info +Run `revdepcheck::cloud_details(, "spanishoddata")` for more info
@@ -477,17 +213,17 @@ Run `revdepcheck::cloud_details(, "rlandfire")` for more info > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/tests.html - > # * https://testthat.r-lib.org/reference/test_package.html#special-files + > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview + > # * https://testthat.r-lib.org/articles/special-files.html ... - ── Failure ('test-landfireAPI.R:120:5'): `landfireAPIv2()` formats priority requests correctly ── - output$request$url (`actual`) not identical to "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3BSLPD2020%3BASP2020%3B230FBFM40%3B230CC%3B230CH%3B230CBH%3B230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" (`expected`). - - actual vs expected - - "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3bSLPD2020%3bASP2020%3b230FBFM40%3b230CC%3b230CH%3b230CBH%3b230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" - + "https://lfps.usgs.gov/api/job/submit?Email=example%40domain.com&Layer_List=ELEV2020%3BSLPD2020%3BASP2020%3B230FBFM40%3B230CC%3B230CH%3B230CBH%3B230CBD&Area_of_Interest=-113.79%2042.148%20-113.56%2042.29&Priority_Code=K3LS9F" + Error in ``$<-`(`*tmp*`, "remote_file_size_mb", value = numeric(0))`: Assigned data `round(files_table$file_size_bytes/1024^2, 2)` must be compatible with existing data. + x Existing data has 1872 rows. + x Assigned data has 0 rows. + i Only vectors of size 1 are recycled. + Caused by error in `vectbl_recycle_rhs_rows()`: + ! Can't recycle input of size 0 to size 1872. - [ FAIL 1 | WARN 0 | SKIP 2 | PASS 78 ] + [ FAIL 10 | WARN 10 | SKIP 1 | PASS 7 ] Error: Test failures Execution halted ``` @@ -521,55 +257,14 @@ Run `revdepcheck::cloud_details(, "tidyllm")` for more info > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html ... - ══ Failed tests ════════════════════════════════════════════════════════════════ - ── Failure ('test_api_gemini.R:24:3'): gemini_chat function constructs a correct request and dry runs it ── - grepl("/v1beta/models/gemini-2.0-flash:generateContent", dry_run$path) is not TRUE - - `actual`: FALSE - `expected`: TRUE - - [ FAIL 1 | WARN 0 | SKIP 0 | PASS 279 ] - Error: Test failures - Execution halted - ``` - -# wbwdi - -
- -* Version: 1.0.1 -* GitHub: https://github.com/tidy-intelligence/r-wbwdi -* Source code: https://github.com/cran/wbwdi -* Date/Publication: 2025-03-25 21:00:01 UTC -* Number of recursive dependencies: 59 - -Run `revdepcheck::cloud_details(, "wbwdi")` for more info - -
- -## Newly broken - -* checking tests ... ERROR - ``` - Running ‘testthat.R’ - Running the tests in ‘tests/testthat.R’ failed. - Complete output: - > # This file is part of the standard setup for testthat. - > # It is recommended that you do not modify it. - > # - > # Where should you do additional test configuration? - > # Learn more about the roles of various files in: - > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview - > # * https://testthat.r-lib.org/articles/special-files.html - ... - ── Failure ('tests-perform_request.R:80:3'): create_request constructs a request with parameters ── - req$url (`actual`) not equal to paste0("https://api.worldbank.org/v2/en/lendingTypes", "?format=json&per_page=500&date=2000%3A2020&source=2") (`expected`). - - actual vs expected - - "https://api.worldbank.org/v2/en/lendingTypes?format=json&per_page=500&date=2000%3a2020&source=2" - + "https://api.worldbank.org/v2/en/lendingTypes?format=json&per_page=500&date=2000%3A2020&source=2" + ── Failure ('test_api_ollama.R:59:3'): ollama_embedding function constructs a correct request and dry runs it ── + Names of `dry_run` ('method', 'path', 'body', 'headers') don't match 'method', 'path', 'headers' + ── Failure ('test_api_openai.R:17:3'): openai function constructs a correct request and dry runs it ── + Names of `dry_run` ('method', 'path', 'body', 'headers') don't match 'method', 'path', 'headers' + ── Failure ('test_api_perplexity.R:15:3'): perplexity function constructs a correct request and dry runs it ── + Names of `dry_run` ('method', 'path', 'body', 'headers') don't match 'method', 'path', 'headers' - [ FAIL 1 | WARN 0 | SKIP 25 | PASS 123 ] + [ FAIL 11 | WARN 0 | SKIP 0 | PASS 269 ] Error: Test failures Execution halted ``` From 93dbf62e8978e3945969b7168486490b1672d6eb Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 23 Jun 2025 07:37:04 -0500 Subject: [PATCH 5/6] Bump curl; update tests --- DESCRIPTION | 2 +- R/url.R | 3 +-- tests/testthat/_snaps/url.md | 6 +++--- tests/testthat/test-url.R | 12 ++++++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 359386744..ce69d9016 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Depends: R (>= 4.1) Imports: cli (>= 3.0.0), - curl (>= 6.2.1), + curl (>= 6.4.0), glue, lifecycle, magrittr, diff --git a/R/url.R b/R/url.R index 36bf6f9a2..56e6c0d86 100644 --- a/R/url.R +++ b/R/url.R @@ -273,7 +273,7 @@ url_build <- function(url) { query <- I(url_query_build(url$query)) } - url <- curl::curl_modify_url( + curl::curl_modify_url( scheme = url$scheme, host = url$hostname, user = url$username, @@ -283,7 +283,6 @@ url_build <- function(url) { query = query, fragment = url$fragment ) - gsub('(%..)', perl = TRUE, replacement = '\\U\\1', url) } #' Parse query parameters and/or build a string diff --git a/tests/testthat/_snaps/url.md b/tests/testthat/_snaps/url.md index 9cc104d8e..27aac4e7c 100644 --- a/tests/testthat/_snaps/url.md +++ b/tests/testthat/_snaps/url.md @@ -1,14 +1,14 @@ # can print all url details Code - url_parse("http://user:pass@example.com:80/path?a=1&b=2&c={1{2}3}#frag") + url_parse("http://user:pass@example.com:81/path?a=1&b=2&c={1{2}3}#frag") Message - http://user:pass@example.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag + http://user:pass@example.com:81/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag * scheme: http * hostname: example.com * username: user * password: pass - * port: 80 + * port: 81 * path: /path * query: * a: 1 diff --git a/tests/testthat/test-url.R b/tests/testthat/test-url.R index ee1b0ef6b..cecc931a3 100644 --- a/tests/testthat/test-url.R +++ b/tests/testthat/test-url.R @@ -9,11 +9,11 @@ test_that("can round trip urls", { "http://google.com/", "http://google.com/path", "http://google.com/path?a=1&b=2", - "http://google.com:80/path?a=1&b=2", - "http://google.com:80/path?a=1&b=2#frag", - "http://google.com:80/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag", - "http://user@google.com:80/path?a=1&b=2", - "http://user:pass@google.com:80/path?a=1&b=2" + "http://google.com:81/path?a=1&b=2", + "http://google.com:81/path?a=1&b=2#frag", + "http://google.com:81/path?a=1&b=2&c=%7B1%7B2%7D3%7D#frag", + "http://user@google.com:81/path?a=1&b=2", + "http://user:pass@google.com:81/path?a=1&b=2" ) expect_equal(map(urls, \(url) url_build(url_parse(url))), urls) @@ -29,7 +29,7 @@ test_that("can parse relative urls", { test_that("can print all url details", { expect_snapshot( - url_parse("http://user:pass@example.com:80/path?a=1&b=2&c={1{2}3}#frag") + url_parse("http://user:pass@example.com:81/path?a=1&b=2&c={1{2}3}#frag") ) }) From cdbd56c3d4a8d0a9546ccf43cf55fa926ca4e5e7 Mon Sep 17 00:00:00 2001 From: Hadley Wickham Date: Mon, 23 Jun 2025 07:40:51 -0500 Subject: [PATCH 6/6] Tweak news --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ac868e29d..0f60b03f1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ # httr2 (development version) -* URL construction is now powered by `curl::curl_modify_url()`, and hence now (correctly) escapes the `path` component (#732). This also means that `req_url_path()` now can only affect the path component of the URL, not the query params or fragment. +* URL construction is now powered by `curl::curl_modify_url()`, and hence now (correctly) escapes the `path` component (#732). This means that `req_url_path()` now can only affect the path component of the URL, not the query params or fragment. * Functions that capture interrutps (like `req_perform_parallel()` and friends) are now easier to escape if they're called inside a loop: you can press Ctrl + C twice to guarantee an exit (#1810). * New `last_request_json()` and `last_response_json()` to conveniently see JSON bodies (#734). * `req_body_json_modify()` can now be used on a request with an empty body.