From f40ad8fd4ac9123ab247276ec68f804436069455 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Tue, 16 Jan 2024 11:17:43 +0100 Subject: [PATCH] Increment version number to 3.0.0 --- DESCRIPTION | 2 +- NEWS.md | 49 ++++++++++++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bd2116b..9c054f2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: withr Title: Run Code 'With' Temporarily Modified Global State -Version: 2.99.0.9000 +Version: 3.0.0 Authors@R: c(person(given = "Jim", family = "Hester", diff --git a/NEWS.md b/NEWS.md index d0e2620..f2f2824 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,20 +1,6 @@ -# withr (development version) +# withr 3.0.0 -* `deferred_run()` now reports the number of executed expressions with - a message. - -* `deferred_run()` can now be run at any point in a knitr file (#235). - -,* `local_tempfile()` now writes `lines` in UTF-8 (#210) and always uses - `\n` for newlines (#216). - -* `local_pdf()` and friends now correctly restore to the previously - active device (#138). - -* `local_()` now works even if withr isn't attached (#207). - -* `local_par()` and `with_par()` now work if you don't set any parameters - (#238). +## Performance of withr * `defer()` is now a thin wrapper around `base::on.exit()`. This is possible thanks to two contributions that we made to R 3.5: @@ -24,11 +10,15 @@ is needed for manual invokation with `deferred_run()`. Following this change, `defer()` is now much faster (although still - slower than `on.exit()`). This also increases the compatibility of - `defer()` with `on.exit()` (all handlers are now run in the expected - order even if they are registered with `on.exit()`) and standalone + slower than `on.exit()` which is a primitive function and about as + fast as it gets). This also increases the compatibility of `defer()` + with `on.exit()` (all handlers are now run in the expected order + even if they are registered with `on.exit()`) and standalone versions of `defer()`. + +## Breaking change + * When `source()` is used with a local environment, as opposed to `globalenv()` (the default), you now need to set `options(withr.hook_source = TRUE)` to get proper withr support @@ -36,8 +26,29 @@ THis support is disabled by default in local environments to avoid a performance penalty in normal usage of withr features. + +## Other features and bugfixes + +* `deferred_run()` now reports the number of executed expressions with + a message. + +* `deferred_run()` can now be run at any point in a knitr file (#235). + +,* `local_tempfile()` now writes `lines` in UTF-8 (#210) and always uses + `\n` for newlines (#216). + +* `local_pdf()` and friends now correctly restore to the previously + active device (#138). + +* `local_()` now works even if withr isn't attached (#207). + +* `local_par()` and `with_par()` now work if you don't set any parameters + (#238). + * `with_language()` now properly resets the translation cache (#213). +* Fixes for Debian packaging. + # withr 2.5.2