11from __future__ import annotations
22
3+ import sys
34from functools import partial
45from typing import TYPE_CHECKING
6+ from typing import Any
57from typing import Iterator
68
79from narwhals ._pandas_like .dataframe import PandasLikeDataFrame
@@ -47,7 +49,7 @@ def _selector(
4749 function_name = "selector" ,
4850 evaluate_output_names = evaluate_output_names ,
4951 alias_output_names = None ,
50- implementation = self ._implementation ,
52+ implementation = self ._implementation , # AttributeError: 'PandasSelector' object has no attribute '_implementation'
5153 backend_version = self ._backend_version ,
5254 version = self ._version ,
5355 )
@@ -58,17 +60,24 @@ def __init__(self: Self, context: _FullContext, /) -> None:
5860 self ._version = context ._version
5961
6062
63+ # BUG: `3.8` Protocol?
64+ # https://github.com/narwhals-dev/narwhals/pull/2064#discussion_r1965980715
6165class PandasSelector ( # type: ignore[misc]
6266 CompliantSelector ["PandasLikeDataFrame" , "PandasLikeSeries" ], PandasLikeExpr
6367):
68+ if sys .version_info < (3 , 9 ):
69+
70+ def __init__ (self , * args : Any , ** kwds : Any ) -> None :
71+ super (PandasLikeExpr ).__init__ (* args , ** kwds )
72+
6473 def _to_expr (self : Self ) -> PandasLikeExpr :
6574 return PandasLikeExpr (
66- self ._call ,
75+ self ._call , # AttributeError: 'PandasSelector' object has no attribute '_call'
6776 depth = self ._depth ,
6877 function_name = self ._function_name ,
69- evaluate_output_names = self ._evaluate_output_names ,
78+ evaluate_output_names = self ._evaluate_output_names , # AttributeError: 'PandasSelector' object has no attribute '_evaluate_output_names'
7079 alias_output_names = self ._alias_output_names ,
71- implementation = self ._implementation ,
80+ implementation = self ._implementation , # AttributeError: 'PandasSelector' object has no attribute '_implementation'
7281 backend_version = self ._backend_version ,
7382 version = self ._version ,
7483 )
0 commit comments