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

SNOW-986951: Python 3.12 - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. #1824

Closed
jlucas91 opened this issue Dec 7, 2023 · 4 comments
Assignees

Comments

@jlucas91
Copy link

jlucas91 commented Dec 7, 2023

Python version

3.12.0

Operating system and processor architecture

Linux-5.10.47-linuxkit-x86_64-with-glibc2.36

Installed packages

N/A

What did you do?

Running the python Snowflake connector on python 3.12 produces multiple deprecation warnings.

  /usr/local/lib/python3.12/site-packages/snowflake/connector/converter.py:44: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    ZERO_EPOCH = datetime.utcfromtimestamp(0)

  /usr/local/lib/python3.12/site-packages/snowflake/connector/arrow_context.py:36: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    ZERO_EPOCH = datetime.utcfromtimestamp(0)

What did you expect to see?

No deprecation warnings on python 3.12

Can you set logging to DEBUG and collect the logs?

N/A
@github-actions github-actions bot changed the title Python 3.12 - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. SNOW-986951: Python 3.12 - DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Dec 7, 2023
@sfc-gh-aling
Copy link
Collaborator

thanks for reaching out @jlucas91
we will be working on Python 3.12 support and will make sure deprecations are handled properly.

@Koen-Vannisselroij
Copy link

Koen-Vannisselroij commented Dec 14, 2023

What version of snoflake-python-connector are you using?
We had some trouble installing 3.6.0 on Python 3.12 and had to use Python 3.11 to get it to work.
Got an error related to 'C++ build tools' for 3.6.0
When trying 3.2.0 (this worked with another colleague) we got an error related to 'cmake'

The install for 3.6.0 worked with python 3.11 without issues.

Asking this, because I'm curious how you got the python connector to work in python 3.12

@jlucas91
Copy link
Author

Thanks @sfc-gh-aling! Do you have a rough sense of timeline? Timely 3.12 support from large providers in the ecosystem goes a long way to helping everyone move forward with a timely upgrade.

We're on 3.5.0 @Koen-Vannisselroij . The build time dependencies snowflake requires seems to have changed (at least for us) over the months/years. You may need libc6-dev and g++ installed.

@sfc-gh-aling
Copy link
Collaborator

sfc-gh-aling commented Feb 6, 2024

hi folks, we have released v3.7.0 with python 3.12 support on Jan 25th, cleaning up all the deprecation warnings.
I'm closing the issue now. please feel free to reach out if you still have questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants