File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -125,15 +125,10 @@ def load_data(
125125 try :
126126 import rdata
127127
128- # Can be removed once support for Python 3.8 is dropped.
129- # The issue is that the last `rdata` available on Python 3.8 was v0.9,
130- # which doesn'thave the same `rdata.read_rds()` function.
128+ # Equivalent to `rdata.read_rds(f)` but compatible with Python 3.8.
131129 # See https://github.com/rstudio/pins-python/pull/265
132- if not hasattr (rdata , "read_rds" ):
133- parsed = rdata .parser .parse_file (f )
134- rdata .conversion .convert (parsed )
135-
136- return rdata .read_rds (f )
130+ parsed = rdata .parser .parse_file (f )
131+ return rdata .conversion .convert (parsed )
137132 except ModuleNotFoundError :
138133 raise ModuleNotFoundError (
139134 "Install the 'rdata' package to attempt to convert 'rds' files into Python objects."
You can’t perform that action at this time.
0 commit comments