Releases: rstudio/reticulate
reticulate 1.44.1
reticulate 1.44.0
-
Reticulate now clears its cache automatically every 120 days. Configure the interval
in.Rprofilewith: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()andpy_read_requirements()(#1846). -
Adds support for requesting Python versions with a wildcard pattern
x.x.*such as==3.12.*invirtualenv_starter(),py_require(), and related functions (#1825) -
Restored compatability with
uvversions >= 0.8.0 (#1818). -
virtualenv_starter()now discovers Python installations managed by
externaluvinstallations (#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%systemmagic in
repl_python(). Added support for assigning%systemcommand output to multiple
variables via unpacking (#1844).
reticulate 1.43.0
-
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(), andt()S3 methods for NumPy Arrays. -
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 throughconda-meta/history
andNULLis passed tonormalizePath(#1184) -
Hotfix to pin
uvversion resolved by reticulate to<0.8.0. (#1812) -
Python discovery by
uvis much faster now. The internal utilityuv_python_list()
searches only for managed python environments by default. Users can request discovery of
system pythons by settingUV_PYTHON_PREFERENCE. Also,uv_python_list()will now discover
pyenv pythons and python binaries installed byinstall_python()if a system python is requested. (#1810)
reticulate 1.42.0
-
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]whenstartorendwere 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
uvcan 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 anexclude_newerargument (#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
uvfrom writing outside
reticulates cache directory (#1745). -
Fixed an issue with pointing reticulate at a pyenv shim python (#1758)
reticulate 1.41.0
-
New
py_require()function for declaring Python requirements for
the current R session. For details, see updated vignettes and help:- Installing Python Packages: https://rstudio.github.io/reticulate/dev/articles/python_packages.html
- Using reticulate in an R Package: https://rstudio.github.io/reticulate/dev/articles/package.html
py_require()help: https://rstudio.github.io/reticulate/dev/reference/py_require.html
-
New
uv_run_tool()function for running command line tools distributed via Python packages. -
Raw R arrays and NumPy arrays with dtype "V1" ("void8") now convert between each other.
User_to_py(as.array(x))to efficiently convert raw vectors to NumPy arrays, and
py_to_r(array$view("V1"))to efficiently convert NumPy arrays to raw vectors. (#1734) -
Fixed an issue with using Python 3.12 on Linux (#1712, #1714).
-
Fixed an issue where
virtualenv_starter()would not discover a
custom built Python (#1704).
reticulate 1.40.0
-
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
forclassmethoddescriptors, 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 bothpy_discover_config()andvirtualenv_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
-
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 ofut.width.pxandut.height.px. Usealtair.fig.height,
altair.fig.width, or Altair'swidthandheightparameters to adjust
chart dimensions (contributed by @joelostblom, #1646). -
New
as.character()method forpython.builtin.strwith support for handling
embedded NULs in strings (#1653). -
New
as.raw()method forpython.builtin.bytes(#1649, #1652). -
as.character()method forpython.builtin.bytesgains anulargument,
allowing for convenient handling of embedded NULs in the string (#1652). -
Reticulate now uses the
RETICULATE_VIRTUALENV_ROOTenvironment 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
-
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
-
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 executablemambainstead ofcondawas ignored.
(#1608, contributed by @AlexandreGuinaudeau)
reticulate 1.36.1
-
Fix issue where
py_to_r()method for Pandas DataFrames would error
ifpy_to_r()S3 methods were defined for Pandas subtypes,
(as done by {anndata}) (#1591). -
Added an option for extra command-line arguments in
conda_create()andconda_install()(#1585). -
Fixed issue where
conda_install()would ignore user-specified
channels during Python installation (#1594).