Skip to content

Releases: rstudio/reticulate

reticulate 1.44.1

14 Nov 23:24

Choose a tag to compare

  • The default Python version in install_python()
    and conda_create() is now 3.12 (#1862).

  • Fix error in virtualenv_create()/virtualenv_starter() (#1861).

  • Fix display of Python variables in the Positron Variables Pane (#1859).

reticulate 1.44.0

25 Oct 13:19

Choose a tag to compare

  • Reticulate now clears its cache automatically every 120 days. Configure the interval
    in .Rprofile with: options(reticulate.max_cache_age = as.difftime(30, units = "days")).

  • install_miniconda() now installs miniforge instead of miniconda (#1800, #1820).

  • New helpers for reading and writing requirements files,
    py_write_requirements() and py_read_requirements() (#1846).

  • Adds support for requesting Python versions with a wildcard pattern x.x.* such as ==3.12.* in virtualenv_starter(), py_require(), and related functions (#1825)

  • Restored compatability with uv versions >= 0.8.0 (#1818).

  • virtualenv_starter() now discovers Python installations managed by
    external uv installations (#1849).

  • py_require() now gives a better message when a user erroneously declares
    a module from the Python standard library as a required package (@lazappi, #1788)

  • Positron's reticulate integration will now be automatically enabled when
    the reticulate package is loaded in Positron (#1822).

  • with() now forwards errors to Python context manager exit handlers
    (e.g., so database transactions can roll back cleanly) (#1840, #1841)

  • Fixed !! in string literals being wrongly expanded to a %system magic in
    repl_python(). Added support for assigning %system command output to multiple
    variables via unpacking (#1844).

reticulate 1.43.0

29 Jul 12:23
731e963

Choose a tag to compare

  • Fixed usage of micromamba and mamba, next-generation conda environment management tools.
    reticulate now prefers to use micromamba, mamba, then conda when managing environments (@gdevenyi, #1771).

  • Added str(), dim(), and t() S3 methods for NumPy Arrays.

  • Fixed a segfault observed on R session exit (#1785, #1786).

  • Added check in install_miniconda() if existing files will be overwritten. (#1794, #1796)

  • Fixed error in install_python() under R 4.5 when the requested Python
    version has a ":latest" suffix, as it does by default. (#1792, #1797)

  • Fixed error in get_python_conda_info() when conda not found through conda-meta/history
    and NULL is passed to normalizePath (#1184)

  • Hotfix to pin uv version resolved by reticulate to <0.8.0. (#1812)

  • Python discovery by uv is much faster now. The internal utility uv_python_list()
    searches only for managed python environments by default. Users can request discovery of
    system pythons by setting UV_PYTHON_PREFERENCE. Also, uv_python_list() will now discover
    pyenv pythons and python binaries installed by install_python() if a system python is requested. (#1810)

reticulate 1.42.0

25 Mar 21:02

Choose a tag to compare

  • Fixed an issue in RStudio on Windows where interrupts were
    ignored while Python code was executing (#1753).

  • Updates for Positron to fix issues with repl_python() and Variables Pane (#1755).

  • Fixed an issue where [ received Python objects as slice arguments.
    e.g., x[start:end] when start or end were Python objects (#1731).

  • The [ method will now translate symbol .. to a
    Python Ellipsis .... (#1763)

  • The [ method can now accept index values greater than 2^31 (#1769)

  • Reticulate-managed uv can now resolve system-installed Pythons,
    supporting platforms where pre-built binaries are unavailable, such as
    musl-based Alpine Linux (#1751, #1752).

  • uv_run_tool() gains an exclude_newer argument (#1748).

  • py_register_load_hook() is now exported to enable usage
    described in the "Using reticulate in an R package vignette" (#1754).
    https://rstudio.github.io/reticulate/articles/package.html

  • Internal changes to support R-devel (4.5) and R API updates (#1747, #1774).

  • Internal fixes to prevent reticulate-managed uv from writing outside
    reticulates cache directory (#1745).

  • Fixed an issue with pointing reticulate at a pyenv shim python (#1758)

reticulate 1.41.0

24 Feb 19:29

Choose a tag to compare

reticulate 1.40.0

15 Nov 12:47

Choose a tag to compare

  • The S3 classes for some (rarely encountered) Python objects have changed.
    Only Python objects with non-standard __module__ values are affected.
    If a Python object’s parent class’s __module__ attribute does not resolve to a string,
    reticulate:

    • Attempts to resolve it from the class's class, if it's a metaclass.
    • If no string can be resolved, reticulate no longer implicitly prepends
      'python.builtin.' as the class prefix, instead it uses just the __name__.
      (See #1686 for more context)
  • Added support for Python 3.13. Note that Python 3.13 removed support
    for classmethod descriptors, which may affect the S3 class of
    some Python objects that use metaclass properties to resolve a class’s
    __module__ or __name__ attribute. (#1686, #1698)

  • py_is_null_xptr() and [[ now load delayed modules (#1688).

  • Fixed error when attempting to use a python venv created with uv (#1678)

  • Resolved an issue where py_discover_config() attempted to detect
    Windows App Store Python installations. These are now excluded from
    discovery by both py_discover_config() and virtualenv_starter() (#1656, #1673).

  • Fixed an error when converting an empty NumPy char array to R (#1662).

  • Fixed an error when using reticulate with radian (#1668, #1670).

  • Fixed a segfault encountered when running the Python session finalizer (#1663, #1664).

  • Resolved a segfault in RStudio when rapidly switching between
    R and Python chunks in a Quarto document (#1665).

  • Improved behavior when the conda binary used to create an environment
    cannot be resolved (contributed by @tl-hbk, #1654, #1659).

  • Added Positron support for the Variables Pane and repl_python()
    (#1692, #1641, #1648, #1658, #1681, #1687).

reticulate 1.39.0

05 Sep 11:41

Choose a tag to compare

  • Python background threads can now run in parallel with the R session (#1641).

  • py_main_thread_func() is deprecated; every R function can now safely be
    called from background Python threads (#1648).

  • Calls from Python threads into R now notify the main thread using R's native
    event loop, ensuring that these calls are handled even when the main thread
    is engaged in non-Python tasks (#1648).

  • The knitr engine now avoids overwriting Altair's default chart dimensions with
    the values of ut.width.px and ut.height.px. Use altair.fig.height,
    altair.fig.width, or Altair's width and height parameters to adjust
    chart dimensions (contributed by @joelostblom, #1646).

  • New as.character() method for python.builtin.str with support for handling
    embedded NULs in strings (#1653).

  • New as.raw() method for python.builtin.bytes (#1649, #1652).

  • as.character() method for python.builtin.bytes gains a nul argument,
    allowing for convenient handling of embedded NULs in the string (#1652).

  • Reticulate now uses the RETICULATE_VIRTUALENV_ROOT environment variable when
    determining where to resolve virtual environments (#1657).

  • conda_run2() is now exported (contributed by @dramanica, #1637).

  • The Python session is now finalized when the R session exits (#1648).

  • Internal updates for NumPy 2.1 (#1651).

  • Fixed error when importing a module named config (#1628).

  • Fixes for CRAN check failures on macOS-oldrel (#1645).

  • Fixed an error where opening a Python subprocess in Positron on Windows
    resulted in "OSError: [WinError 6] The handle is invalid."
    (#1658, posit-dev/positron#4457).

reticulate 1.38.0

19 Jun 14:56

Choose a tag to compare

  • Python Exceptions converted to R conditions are now R lists instead
    of R environments, for compatability with {rlang} and {purrr}.
    (tidyverse/purrr#1104, r-lib/rlang#1664, #1617)

  • Internal updates for NumPy 2.0 (#1621)

  • Added support for converting NumPy StringDType arrays to R character arrays. (#1623)

  • Internal updates for compliance with R's upcoming formalized C API. (#1625)

  • Fixed an issue where attempting to convert a NumPy array with a non-simple
    dtype to R would signal an error. (#1613, fixed in #1614).

reticulate 1.37.0

21 May 15:18

Choose a tag to compare

  • Interrupting Python no longer leads to segfaults.
    (#1601, fixed in #1602)

  • Print method for Python callables now includes the callable’s signature.
    (#1605, #1607)

  • Reticulate now installs successfully on Windows ARM64.
    (#1609, contributed by @andrjohns)

  • virtualenv_starter() no longer warns when encountering broken symlinks.
    (#1598)

  • Fixed issue where configuration for reticulate conda_* functions
    to use the executable mamba instead of conda was ignored.
    (#1608, contributed by @AlexandreGuinaudeau)

reticulate 1.36.1

23 Apr 11:39

Choose a tag to compare

  • Fix issue where py_to_r() method for Pandas DataFrames would error
    if py_to_r() S3 methods were defined for Pandas subtypes,
    (as done by {anndata}) (#1591).

  • "Python Dependencies" vignette edits (@salim-b, #1586)

  • Added an option for extra command-line arguments in
    conda_create() and conda_install() (#1585).

  • Fixed issue where conda_install() would ignore user-specified
    channels during Python installation (#1594).