Conversation

jbrockmendel

Needs whatsnew and targeted tests, opening to see if there are opinions about doing this as a bugfix or waiting to do it as an API change in 3.0

@github-actions

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions-actions bot added the Stale label May 4, 2023
@jbrockmendel

@MarcoGorelli thoughts on if/how this is worth pursuing?

@MarcoGorelli

sorry, missed this. I'd have thought this was fine as a bug fix - I'm at jupytercon next week though so may be a bit slow to review, but will take a look when I get a chance

@MarcoGorelliMarcoGorelli self-requested a review May 11, 2023 10:24

Choose a reason for hiding this comment

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

nice! just got some minor comments

Comment on lines +1358 to +1361
mark = pytest.mark.xfail(
reason="Construction from dict goes through "
"maybe_convert_objects which casts to nano"
)
Copy link
Member

Choose a reason for hiding this comment

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

this risks staying here forever, could you add strict=True please, so that when it's fixed we remember to remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

is strict=True no longer the default? if so, will update. (also if so: yikes)

Copy link
Member

Choose a reason for hiding this comment

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

nvm, ignore me, it's configured to be the default

xfail_strict = true

Choose a reason for hiding this comment

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

Changes look good to me, I think it'd be OK to get this into 2.1 as it'd be a bug fix

do you want to add a whatsnew note?

@MarcoGorelli

🤔 not sure if this might be related

FAILED pandas/tests/frame/methods/test_reindex.py::TestDataFrameSelectReindex::test_reindex_tzaware_fill_value - ValueError: Unexpected value for 'dtype': 'int32'. Must be 'datetime64[s]', 'datetime64[ms]', 'datetime64[us]', 'datetime64[ns]' or DatetimeTZDtype'.

Choose a reason for hiding this comment

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

Looks good to me

@mroeschke any comments, or good to go?

@mroeschkemroeschke added this to the 2.1 milestone May 18, 2023
@mroeschkemroeschke added Non-Nanodatetime64/timedelta64 with non-nanosecond resolutionand removed Stale labels May 18, 2023
@mroeschkemroeschke merged commit a2bb939 into pandas-dev:main May 18, 2023
@mroeschke

Thanks @jbrockmendel

@jbrockmendeljbrockmendel deleted the bugs-nano branch May 18, 2023 17:16
topper-123 pushed a commit to topper-123/pandas that referenced this pull request May 22, 2023
* API/BUG: infer_dtype_from_scalar with non-nano

* update test

* xfail on 32bit

* fix xfail condition

* whatsnew

* xfail on windows
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* API/BUG: infer_dtype_from_scalar with non-nano

* update test

* xfail on 32bit

* fix xfail condition

* whatsnew

* xfail on windows
Sign up for free to join this conversation on . Already have an account? Sign in to comment
Non-Nanodatetime64/timedelta64 with non-nanosecond resolution
None yet

Successfully merging this pull request may close these issues.

BUG: infer_dtype_from_scalar infers nanosecond dtype for second input