Skip to content

Conversation

cmp0xff
Copy link
Contributor

@cmp0xff cmp0xff commented Oct 16, 2025

@cmp0xff cmp0xff changed the title feat(arithmetic): #1347 ➗ truediv feat(arithmetic): #1347 #1378 ➗ truediv Oct 16, 2025
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Biggest issue here is the use of Index[Timedelta], which I would prefer if we could avoid in the stubs, even though it can be created via some non-standard usage.

@cmp0xff
Copy link
Contributor Author

cmp0xff commented Oct 20, 2025

Biggest issue here is the use of Index[Timedelta], which I would prefer if we could avoid in the stubs, even though it can be created via some non-standard usage.

I would say that a community decision can clarify the situation, if you would help 🙂

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Oct 20, 2025

Biggest issue here is the use of Index[Timedelta], which I would prefer if we could avoid in the stubs, even though it can be created via some non-standard usage.

I would say that a community decision can clarify the situation, if you would help 🙂

That might take a while. But in pandas-stubs, I think we can just not have overloads that create Index[Timedelta] nor overloads that assume self: Index[Timedelta] or other is Index[Timedelta] in the stubs. So we don't support it, which would cause code such as pd.Index([1]) * [pd.Timedelta(seconds=5)] to not pass the type checker (and we can put that in our tests).

If people complain that the stubs don't work because they are creating code that is essentially a Index[Timedelta], (really seen as an Index with object dtype), then we tell them to do pd.TimedeltaIndex(foo) if foo is an Index with timedelta objects in it.

@cmp0xff cmp0xff marked this pull request as draft October 21, 2025 07:40
@cmp0xff cmp0xff marked this pull request as ready for review October 21, 2025 09:24
@cmp0xff cmp0xff requested a review from Dr-Irv October 21, 2025 09:24
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Everything looks fine. The only thing I'm not sure about - and this might just be a Github issue - is that the directory tests/indexes/arithmetic/timedelta is not showing as being removed from the repo. I see that it is not present in your branch in your repo.

Can you tell if you did an explicit commit that has git rm tests/indexes/arithmetic/timedelta ?

If you can't tell, I can approve and merge, and if it is still there, then do a separate PR to fix that.

@cmp0xff
Copy link
Contributor Author

cmp0xff commented Oct 21, 2025

I cannot delete it any further.

> git rm .\tests\indexes\arithmetic\timedelta
fatal: pathspec '.\tests\indexes\arithmetic\timedelta' did not match any files

I think git does not keep empty folders.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

thanks @cmp0xff

@Dr-Irv Dr-Irv merged commit 01d597f into pandas-dev:main Oct 21, 2025
13 checks passed
@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Oct 21, 2025

I cannot delete it any further.

> git rm .\tests\indexes\arithmetic\timedelta
fatal: pathspec '.\tests\indexes\arithmetic\timedelta' did not match any files

I think git does not keep empty folders.

OK. I approved and merged and the folder is gone. But the review process indicated it was still there. Hence the confusion

@cmp0xff cmp0xff deleted the feature/cmp0xff/truediv branch October 21, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants