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 deprecated argument #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

clausmichele
Copy link

Removing the deprecated argument 'infer_datetime_format'. This is the deprecation warning by Pandas:

stackstac\stackstac\prepare.py:369: UserWarning: The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.
times = pd.to_datetime(

@gjoseph92
Copy link
Owner

Thanks for the PR @clausmichele. See some discussion here: #213 (comment).

Would you mind either adding pandas>=2.0.0 (pdm add pandas>=2) to the dependencies, or making this conditional on the pandas version, like

PANDAS_2 = importlib.metadata.version('pandas')[0] == "2"  # hacky
...
pd.to_datetime(
    ...
    **({"infer_datetime_format": True} if not PANDAS_2 else {})
)

@clausmichele
Copy link
Author

@gjoseph92 alright I will try to make it conditional as you suggested! I missed the other issue mentioning it.

@renaudjester
Copy link

Hi! Almost created an issue but I saw this pull request
@clausmichele and @gjoseph92 any idea when this will be merged?

@clausmichele
Copy link
Author

I won't have time to work on this until mid November unfortunately.

@gjoseph92
Copy link
Owner

@clausmichele I can take this over in that case then, if you'd like?

@clausmichele
Copy link
Author

clausmichele commented Oct 24, 2023

@gjoseph92 sure, thanks a lot for the effort you put in this project.

@gjoseph92
Copy link
Owner

FYI, requiring pandas 2 seems to be the best way forward: #235 (comment)

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.

None yet

3 participants