Skip to content

Conversation

@dangotbanned
Copy link
Member

@dangotbanned dangotbanned commented Aug 5, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

Note

Expecting this to cause issues in downstream ci (at least initially)

Everything here (and it is a biggy) stems from this small addition:

class NativeDataFrame(Sized, NativeFrame, Protocol): ...

The presence of __len__ is enough to avoid overlapping @overloads 🀯

- 76 errors in `tests/frame/join_test.py`
- stable errors are expected, as they aren't using updated typing yet
Still same issues on `join`, `v1`, `v2`
May these can be typed *some day*, but they were never safe to begin with
@dangotbanned
Copy link
Member Author

These altair failures are a sign that things are working now πŸ™‚

EagerSeriesT, EagerExprT, NativeDataFrameT, "DataFrame[NativeDataFrameT]"
],
CompliantLazyFrame[EagerExprT, NativeDataFrameT, "DataFrame[NativeDataFrameT]"],
CompliantLazyFrame[EagerExprT, "Incomplete", "DataFrame[NativeDataFrameT]"],
Copy link
Member Author

@dangotbanned dangotbanned Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this Incomplete is unavoidable, just like the [type-var] warnings on v1.DataFrameLike

# NOTE legit
class DataFrame(NwDataFrame[IntoDataFrameT]): # type: ignore[type-var]
_version = Version.V1

I'm much happier to eat those two, when it fixes sooooooooo much else πŸ₯³

@dangotbanned
Copy link
Member Author

dangotbanned commented Aug 6, 2025

@MarcoGorelli I just wanna loop you into this one early, since it may be a challenge to keep conflict-free πŸ™‚

There is There was some more tidying up to do, but wanted to check if the general idea seems a net-positive to you?

Mainly in terms of where we no longer need/now require type ignore(s)

@MarcoGorelli
Copy link
Member

i think this is fine, yes, thanks!

@dangotbanned dangotbanned marked this pull request as ready for review August 14, 2025 20:34
@dangotbanned dangotbanned marked this pull request as draft August 19, 2025 10:34
@dangotbanned dangotbanned marked this pull request as ready for review August 19, 2025 10:57
Copy link
Member

@FBruzzesi FBruzzesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dangotbanned this seems pretty safe to me but I am still not confident enough to approve a PR solely aiming at improving the typing experience!

So let me play devil's advocate: do you see any risk or anything that can be problematic?

Also I left one question in a test file

@dangotbanned dangotbanned marked this pull request as draft August 20, 2025 10:35
@dangotbanned dangotbanned marked this pull request as ready for review August 20, 2025 11:09
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dangotbanned dangotbanned marked this pull request as draft August 21, 2025 08:30
@dangotbanned dangotbanned marked this pull request as ready for review August 21, 2025 09:14
@dangotbanned dangotbanned merged commit b0e10af into main Aug 21, 2025
32 of 33 checks passed
@dangotbanned dangotbanned deleted the native-dataframe-sized branch August 21, 2025 09:14
dangotbanned added a commit that referenced this pull request Aug 21, 2025
dangotbanned added a commit that referenced this pull request Aug 24, 2025
Fixed during the series of PRs that ended at #2944
dangotbanned added a commit that referenced this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix high priority Your PR will be reviewed very quickly if you address this typing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants