File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -124,15 +124,10 @@ def load_data(
124
124
try :
125
125
import rdata
126
126
127
- # Can be removed once support for Python 3.8 is dropped.
128
- # The issue is that the last `rdata` available on Python 3.8 was v0.9,
129
- # which doesn'thave the same `rdata.read_rds()` function.
127
+ # Equivalent to `rdata.read_rds(f)` but compatible with Python 3.8.
130
128
# See https://github.com/rstudio/pins-python/pull/265
131
- if not hasattr (rdata , "read_rds" ):
132
- parsed = rdata .parser .parse_file (f )
133
- rdata .conversion .convert (parsed )
134
-
135
- return rdata .read_rds (f )
129
+ parsed = rdata .parser .parse_file (f )
130
+ return rdata .conversion .convert (parsed )
136
131
except ModuleNotFoundError :
137
132
raise ModuleNotFoundError (
138
133
"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