From 4ed735413c8e2a44293182ff0579061f560f71ac Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Tue, 30 Nov 2021 19:36:00 +0100 Subject: [PATCH 1/3] unpin 3.9 --- R/install.R | 2 +- tests/testthat/test-conda.R | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/R/install.R b/R/install.R index 1c83f8952..bdb622eab 100644 --- a/R/install.R +++ b/R/install.R @@ -55,7 +55,7 @@ install_precommit <- function(force = FALSE) { #' @keywords internal install_impl <- function() { if (!"r-precommit" %in% reticulate::conda_list()$name) { - reticulate::conda_create("r-precommit", python_version = "3.9") + reticulate::conda_create("r-precommit") } reticulate::conda_install("r-precommit", packages = "pre-commit") } diff --git a/tests/testthat/test-conda.R b/tests/testthat/test-conda.R index 8844b635c..916a66eef 100644 --- a/tests/testthat/test-conda.R +++ b/tests/testthat/test-conda.R @@ -5,10 +5,6 @@ if (!on_cran()) { expect_error(install_precommit(force = TRUE), NA) }) - test_that("conda 3.10 should now work", { - expect_true(Sys.Date() < as.Date("2021-11-30")) - }) - test_that("can use pre-commit", { tempdir <- local_test_setup(quiet = FALSE, install_hooks = FALSE) expect_message( From 7322e16faacb021343d44216823eb41543462700 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Tue, 30 Nov 2021 20:15:46 +0100 Subject: [PATCH 2/3] Revert "unpin 3.9" This reverts commit 4ed735413c8e2a44293182ff0579061f560f71ac. --- R/install.R | 2 +- tests/testthat/test-conda.R | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/R/install.R b/R/install.R index bdb622eab..1c83f8952 100644 --- a/R/install.R +++ b/R/install.R @@ -55,7 +55,7 @@ install_precommit <- function(force = FALSE) { #' @keywords internal install_impl <- function() { if (!"r-precommit" %in% reticulate::conda_list()$name) { - reticulate::conda_create("r-precommit") + reticulate::conda_create("r-precommit", python_version = "3.9") } reticulate::conda_install("r-precommit", packages = "pre-commit") } diff --git a/tests/testthat/test-conda.R b/tests/testthat/test-conda.R index 916a66eef..8844b635c 100644 --- a/tests/testthat/test-conda.R +++ b/tests/testthat/test-conda.R @@ -5,6 +5,10 @@ if (!on_cran()) { expect_error(install_precommit(force = TRUE), NA) }) + test_that("conda 3.10 should now work", { + expect_true(Sys.Date() < as.Date("2021-11-30")) + }) + test_that("can use pre-commit", { tempdir <- local_test_setup(quiet = FALSE, install_hooks = FALSE) expect_message( From 98e5a90e12ad4d51ec6723aec3d0a8e4e397be26 Mon Sep 17 00:00:00 2001 From: Lorenz Walthert Date: Tue, 30 Nov 2021 20:16:27 +0100 Subject: [PATCH 3/3] postpone error --- tests/testthat/test-conda.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-conda.R b/tests/testthat/test-conda.R index 8844b635c..6509bd032 100644 --- a/tests/testthat/test-conda.R +++ b/tests/testthat/test-conda.R @@ -6,7 +6,7 @@ if (!on_cran()) { }) test_that("conda 3.10 should now work", { - expect_true(Sys.Date() < as.Date("2021-11-30")) + expect_true(Sys.Date() < as.Date("2022-03-30")) }) test_that("can use pre-commit", {