Skip to content

Commit 3eb06e8

Browse files
authored
Advance deprecations (#574)
* Remove vroom_altrep_opts() and vroom(altrep_opts =) Have been deprecated since v1.2.0 (2020-01-13). * Remove vroom_write(path =) * Upgrade literal data without `I()` to a deprecate_warn() * revdepcheck::cloud_check() * Actually the deprecation really does date back for 1.5.0 1.7.0 is just when we advanced it
1 parent cf32697 commit 3eb06e8

19 files changed

+103
-88
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export(spec)
7575
export(starts_with)
7676
export(vroom)
7777
export(vroom_altrep)
78-
export(vroom_altrep_opts)
7978
export(vroom_example)
8079
export(vroom_examples)
8180
export(vroom_format)

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# vroom (development version)
22

3+
* The `path` parameter has been removed from `vroom_write()`. This parameter was
4+
deprecated in vroom 1.5.0 (2021-06-14) in favor of the `file` parameter (#575).
5+
6+
* The function `vroom_altrep_opts()` and the argument `vroom(altrep_opts =)`
7+
have been removed. They were deprecated in favor of `vroom_altrep()` and
8+
`altrep =`, respectively, in v1.2.0 (2020-01-13). Also applies to
9+
`vroom_fwf(altrep_opts =)` and `vroom_lines(altrep_opts =)` (#575).
10+
311
* Columns specified as having type "number" (requested via `col_number()` or `"number"` or `'n'`) or "skip" (requested via `col_skip()` or `"skip"` or `_` or `-`) now work in the case where 0 rows of data are parsed (#427, #540, #548).
412

513
# vroom 1.6.7

R/path.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ standardise_path <- function(
8383
}
8484

8585
if (any(grepl("\n", path))) {
86-
lifecycle::deprecate_soft(
86+
lifecycle::deprecate_warn(
8787
"1.5.0",
8888
"vroom(file = 'must use `I()` for literal data')",
8989
details = c(

R/vroom.R

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
#' @param altrep Control which column types use Altrep representations,
9292
#' either a character vector of types, `TRUE` or `FALSE`. See
9393
#' [vroom_altrep()] for for full details.
94-
#' @param altrep_opts \Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}
9594
#' @param col_select Columns to include in the results. You can use the same
9695
#' mini-language as `dplyr::select()` to refer to the columns by name. Use
9796
#' `c()` to use more than one selection expression. Although this
@@ -204,7 +203,6 @@ vroom <- function(
204203
locale = default_locale(),
205204
guess_max = 100,
206205
altrep = TRUE,
207-
altrep_opts = deprecated(),
208206
num_threads = vroom_threads(),
209207
progress = vroom_progress(),
210208
show_col_types = NULL,
@@ -217,11 +215,6 @@ vroom <- function(
217215
delim <- "\x01"
218216
}
219217

220-
if (!is_missing(altrep_opts)) {
221-
deprecate_warn("1.1.0", "vroom(altrep_opts = )", "vroom(altrep = )")
222-
altrep <- altrep_opts
223-
}
224-
225218
file <- standardise_path(file)
226219

227220
if (!is_ascii_compatible(locale$encoding)) {
@@ -553,19 +546,6 @@ vroom_altrep <- function(which = NULL) {
553546
structure(out, class = "vroom_altrep")
554547
}
555548

556-
#' Show which column types are using Altrep
557-
#'
558-
#' @description
559-
#' \Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}
560-
#' This function is deprecated in favor of `vroom_altrep()`.
561-
#'
562-
#' @inheritParams vroom_altrep
563-
#' @export
564-
vroom_altrep_opts <- function(which = NULL) {
565-
deprecate_warn("1.1.0", "vroom_altrep_opts()", "vroom_altrep()")
566-
vroom_altrep(which)
567-
}
568-
569549
altrep_vals <- function() {
570550
c(
571551
"none" = 0L,

R/vroom_fwf.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,13 @@ vroom_fwf <- function(
3737
n_max = Inf,
3838
guess_max = 100,
3939
altrep = TRUE,
40-
altrep_opts = deprecated(),
4140
num_threads = vroom_threads(),
4241
progress = vroom_progress(),
4342
show_col_types = NULL,
4443
.name_repair = "unique"
4544
) {
4645
verify_fwf_positions(col_positions)
4746

48-
if (!is_missing(altrep_opts)) {
49-
deprecate_warn("1.1.0", "vroom_fwf(altrep_opts = )", "vroom_fwf(altrep = )")
50-
altrep <- altrep_opts
51-
}
52-
5347
file <- standardise_path(file)
5448

5549
if (!is_ascii_compatible(locale$encoding)) {

R/vroom_lines.R

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,9 @@ vroom_lines <- function(
2020
skip_empty_rows = FALSE,
2121
locale = default_locale(),
2222
altrep = TRUE,
23-
altrep_opts = deprecated(),
2423
num_threads = vroom_threads(),
2524
progress = vroom_progress()
2625
) {
27-
if (!is_missing(altrep_opts)) {
28-
deprecate_warn(
29-
"1.1.0",
30-
"vroom_lines(altrep_opts = )",
31-
"vroom_lines(altrep = )"
32-
)
33-
altrep <- altrep_opts
34-
}
35-
3626
file <- standardise_path(file)
3727

3828
if (!is_ascii_compatible(locale$encoding)) {

R/vroom_write.R

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#' @param delim Delimiter used to separate values. Defaults to `\t` to write
1919
#' tab separated value (TSV) files.
2020
#' @param na String used for missing values. Defaults to 'NA'.
21-
#' @param path `r lifecycle::badge("deprecated")` is no longer supported, use
22-
#' `file` instead.
2321
#' @export
2422
#' @examples
2523
#' # If you only specify a file name, vroom_write() will write
@@ -47,17 +45,8 @@ vroom_write <- function(
4745
escape = c("double", "backslash", "none"),
4846
bom = FALSE,
4947
num_threads = vroom_threads(),
50-
progress = vroom_progress(),
51-
path = deprecated()
48+
progress = vroom_progress()
5249
) {
53-
if (lifecycle::is_present(path)) {
54-
file <- path
55-
lifecycle::deprecate_soft(
56-
when = "1.5.0",
57-
what = "vroom_write(file)"
58-
)
59-
}
60-
6150
input <- x
6251

6352
quote <- match.arg(quote)

_pkgdown.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ reference:
7575
These functions are used as helpers for other functions, or to inspect objects.
7676
contents:
7777
- vroom_lines
78-
- vroom_altrep_opts
7978
- vroom_altrep
8079
- vroom_example
8180
- vroom_progress

inst/bench/fwf/vroom_no_altrep-dplyr.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
library(vroom)
33
library(dplyr)
44
})
5-
x <- vroom_fwf(file, fields, col_types = types, altrep_opts = FALSE)
5+
x <- vroom_fwf(file, fields, col_types = types, altrep = FALSE)
66
print(x)
77
a <- head(x)
88
b <- tail(x)

inst/bench/fwf/vroom_no_altrep-dplyr.tsv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
exprs process real size rows cols max_memory
22
({ library(vroom) library(dplyr) }) 0.08015654499999991 0.08015990257263184 709936880 2342339 37 6397005824
3-
x <- vroom_fwf(file, fields, col_types = types, altrep_opts = FALSE) 34.306891702 14.682522296905518 709936880 2342339 37 6397005824
3+
x <- vroom_fwf(file, fields, col_types = types, altrep = FALSE) 34.306891702 14.682522296905518 709936880 2342339 37 6397005824
44
print(x) 0.04313145500000104 0.04313325881958008 709936880 2342339 37 6397005824
55
a <- head(x) 8.676749999949607e-4 8.692741394042969e-4 709936880 2342339 37 6397005824
66
b <- tail(x) 5.269520000013017e-4 5.283355712890625e-4 709936880 2342339 37 6397005824

0 commit comments

Comments
 (0)