Skip to content

Commit d2d1747

Browse files
committed
Update based on feedback
1 parent adec6da commit d2d1747

File tree

5 files changed

+3
-96
lines changed

5 files changed

+3
-96
lines changed

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export(get_env)
1111
export(get_var)
1212
export(get_warnings)
1313
export(join)
14-
export(new_qenv)
1514
export(qenv)
1615
exportClasses(qenv)
1716
exportMethods(show)

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
### Breaking Change
1111

12-
* `qenv` objects should now be created with `qenv()` rather than `new_qenv()`. The new constructor always creates an empty object. `new_qenv` is now deprecated.
12+
* `qenv` objects should now be created with `qenv()` rather than `new_qenv()` (which has been removed). The new constructor always creates an empty object.
1313

1414
### Miscellaneous
1515

R/qenv-constructor.R

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#'
1313
#' @name qenv
1414
#'
15-
#' @return `qenv` returns a `qenv` object.
15+
#' @return Returns a `qenv` object.
1616
#'
1717
#' @seealso [`base::within()`], [`get_var()`], [`get_env()`], [`get_warnings()`], [`join()`], [`concat()`]
1818
#' @examples
@@ -25,66 +25,3 @@ qenv <- function() {
2525
lockEnvironment(q_env, bindings = TRUE)
2626
methods::new("qenv", env = q_env)
2727
}
28-
29-
30-
#' Deprecated function
31-
#'
32-
#' The `new_qenv()` function is deprecated use [`qenv()`].
33-
#' @param code `r badge("deprecated")`
34-
#' (`character(1)` or `language`) code to evaluate. Accepts and stores comments also.
35-
#' @param env `r badge("deprecated")` (`environment`)
36-
#' Environment being a result of the `code` evaluation.
37-
#' @aliases new_qenv,environment,expression-method
38-
#' @aliases new_qenv,environment,character-method
39-
#' @aliases new_qenv,environment,language-method
40-
#' @aliases new_qenv,environment,missing-method
41-
#' @aliases new_qenv,missing,missing-method
42-
#' @return Errors.
43-
#' @seealso [`qenv()`]
44-
#'
45-
#' @export
46-
setGeneric("new_qenv", function(env = new.env(parent = parent.env(.GlobalEnv)), code = character()) {
47-
lifecycle::deprecate_stop(when = " 0.5.0",
48-
what = "new_qenv()",
49-
with = "qenv()")
50-
standardGeneric("new_qenv")
51-
})
52-
53-
setMethod(
54-
"new_qenv",
55-
signature = c(env = "environment", code = "expression"),
56-
function(env, code) {
57-
new_qenv(env, paste(lang2calls(code), collapse = "\n"))
58-
}
59-
)
60-
61-
setMethod(
62-
"new_qenv",
63-
signature = c(env = "environment", code = "character"),
64-
function(env, code) {
65-
new_env <- rlang::env_clone(env, parent = parent.env(.GlobalEnv))
66-
lockEnvironment(new_env, bindings = TRUE)
67-
if (length(code) > 0) code <- paste(code, collapse = "\n")
68-
id <- sample.int(.Machine$integer.max, size = length(code))
69-
methods::new(
70-
"qenv",
71-
env = new_env, code = code, warnings = rep("", length(code)), messages = rep("", length(code)), id = id
72-
)
73-
}
74-
)
75-
76-
setMethod(
77-
"new_qenv",
78-
signature = c(env = "environment", code = "language"),
79-
function(env, code) {
80-
new_qenv(env = env, code = paste(lang2calls(code), collapse = "\n"))
81-
}
82-
)
83-
84-
setMethod(
85-
"new_qenv",
86-
signature = c(code = "missing", env = "missing"),
87-
function(env, code) {
88-
new_qenv(env = env, code = code)
89-
}
90-
)

man/new_qenv.Rd

Lines changed: 0 additions & 29 deletions
This file was deleted.

man/qenv.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)