Skip to content

Fix #1872#1878

Open
JBGruber wants to merge 3 commits intorstudio:mainfrom
JBGruber:main
Open

Fix #1872#1878
JBGruber wants to merge 3 commits intorstudio:mainfrom
JBGruber:main

Conversation

@JBGruber
Copy link

@JBGruber JBGruber commented Feb 3, 2026

Fix #1872

@t-kalinowski
Copy link
Member

Thank you for the PR! This looks like the right fix to my eyes.

Would you be able to add a snapshot/regression test that tests the happy path (no error), and also, captures the new error? Something like:

expect_snapshot2(r_session({

test_that("....", {
  local_edition(3)

  expect_snapshot2(r_session({
    library(reticulate)
    py_require(....)
    import("sys") # force python initialize
    py_require(....) # happy path
    py_require(....) # new error 
  })
 )
})

@JBGruber
Copy link
Author

JBGruber commented Feb 5, 2026

Thanks @t-kalinowski. Please take a look if this is what you had in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: can't add requirements after Python is initialized

2 participants