Skip to content

Commit

Permalink
Merge pull request #1554 from rstudio/r-devel-fixes
Browse files Browse the repository at this point in the history
R-devel fixes
  • Loading branch information
t-kalinowski committed Mar 20, 2024
2 parents a01f8c3 + db3b9be commit 394d220
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- { os: ubuntu-latest, r: 'release', python: '3.11' }
- { os: ubuntu-latest, r: 'release', python: '3.12' }

# - { os: ubuntu-latest, r: 'devel', python: '3.12', http-user-agent: 'release' }
- { os: ubuntu-latest, r: 'devel', python: '3.12', http-user-agent: 'release' }

# test with one debug build of python
# disabled; failing presently
Expand Down Expand Up @@ -74,11 +74,10 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: rcmdcheck local::.
cache-version: 3
extra-packages: any::rcmdcheck local::.
cache-version: 4
upgrade: 'TRUE'


- name: setup r-reticulate venv
shell: Rscript {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion R/conversion.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ r_to_py.POSIXt <- function(x, convert = FALSE) {

#' @export
py_to_r.datetime.datetime <- function(x) {
if (py_version() >= 3L) {
if (py_version() >= "3") {
tz <- NULL
if (!is.null(x$tzinfo)) {

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-python-classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test_that("Python class members can be called via $", {
test_that("py_has_method()", {
# in python2, unbound methods are still methods
# in python3, only bound, user-defined, functions are methods
skip_if(py_version() < 3)
skip_if(py_version() < "3")
Fraction <- import("fractions")$Fraction

expect_false(py_has_method(Fraction, "conjugate"))
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-python-datetime.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test_that("R datetimes can be passed to Python functions", {
test_that("timezone information is not lost during conversion", {

skip_if_no_python()
skip_if(py_version() < 3)
skip_if(py_version() < "3")

datetime <- import("datetime", convert = FALSE)
if (!py_has_attr(datetime, "timezone"))
Expand Down

0 comments on commit 394d220

Please sign in to comment.