Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some deprecated methods and functions #965

Merged
merged 3 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
- `$unique()` for `DataFrame` and `LazyFrame` have several changes (#953):
- New default value `"any"` for argument `keep`.
- Arguments `keep` and `maintain_order` must be named.
- The following deprecated methods are now removed: `pl$threadpool_size()`,
etiennebacher marked this conversation as resolved.
Show resolved Hide resolved
`<DataFrame>$with_row_count()`, `<LazyFrame>$with_row_count()` (#965).

### New features

Expand Down
13 changes: 4 additions & 9 deletions R/dataframe__frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -447,13 +447,6 @@ DataFrame_with_row_index = function(name, offset = NULL) {
unwrap("in $with_row_index():")
}

DataFrame_with_row_count = function(name, offset = NULL) {
warning("`$with_row_count()` is deprecated and will be removed in 0.15.0. Use `with_row_index()` instead.")
.pr$DataFrame$with_row_index(self, name, offset) |>
unwrap("in $with_row_count():")
}


# define setter function
DataFrame.property_setters$columns = function(self, names) {
unwrap(.pr$DataFrame$set_column_names_mut(self, names))
Expand Down Expand Up @@ -1010,8 +1003,10 @@ DataFrame_to_list = function(unnest_structs = TRUE, ..., int64_conversion = pola
DataFrame_join = function(
other,
on = NULL,
how = c("inner", "left", "outer", "semi", "anti", "cross",
"outer_coalesce"),
how = c(
"inner", "left", "outer", "semi", "anti", "cross",
"outer_coalesce"
),
...,
left_on = NULL,
right_on = NULL,
Expand Down
1 change: 0 additions & 1 deletion R/expr__string.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# expr_str_make_sub_ns = macro_new_subnamespace("^ExprStr_", "RPolarsExprStrNameSpace")


# TODO for 0.16.0: rename arguments, should not allow positional arguments except for the first two
#' Convert a String column into a Date/Datetime/Time column.
#'
#' Similar to the [strptime()] function.
Expand Down
5 changes: 0 additions & 5 deletions R/lazyframe__lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,6 @@ LazyFrame_with_row_index = function(name, offset = NULL) {
unwrap("in $with_row_index():")
}

LazyFrame_with_row_count = function(name, offset = NULL) {
warning("`$with_row_count()` is deprecated and will be removed in 0.15.0. Use `with_row_index()` instead.")
.pr$LazyFrame$with_row_index(self, name, offset) |>
unwrap("in $with_row_count():")
}

#' Apply filter to LazyFrame
#'
Expand Down
6 changes: 0 additions & 6 deletions R/polars_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,3 @@ check_feature = function(feature_name, context = NULL, call = sys.call(1L)) {
#' @examples
#' pl$thread_pool_size()
pl_thread_pool_size = function() thread_pool_size()

#' @rdname pl_thread_pool_size
pl_threadpool_size = function() {
warning("`pl$threadpool_size()` is deprecated and will be removed in 0.15.0. Use `pl$thread_pool_size()` instead.")
thread_pool_size()
}
2 changes: 1 addition & 1 deletion man/pl_pl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/pl_thread_pool_size.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions tests/testthat/_snaps/after-wrappers.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
[93] "std" "struct"
[95] "sum" "sum_horizontal"
[97] "tail" "thread_pool_size"
[99] "threadpool_size" "time"
[101] "using_string_cache" "var"
[103] "when" "with_string_cache"
[99] "time" "using_string_cache"
[101] "var" "when"
[103] "with_string_cache"

---

Expand Down Expand Up @@ -91,8 +91,8 @@
[53] "sum" "tail" "to_data_frame" "to_list"
[57] "to_series" "to_struct" "transpose" "unique"
[61] "unnest" "var" "width" "with_columns"
[65] "with_row_count" "with_row_index" "write_csv" "write_json"
[69] "write_ndjson" "write_parquet"
[65] "with_row_index" "write_csv" "write_json" "write_ndjson"
[69] "write_parquet"

---

Expand Down Expand Up @@ -164,8 +164,7 @@
[49] "to_dot" "unique"
[51] "unnest" "var"
[53] "width" "with_columns"
[55] "with_context" "with_row_count"
[57] "with_row_index"
[55] "with_context" "with_row_index"

---

Expand Down
Loading