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

DeprecationWarning: datetime.utcfromtimestamp() is deprecated #1284

Closed
hugovk opened this issue May 16, 2023 · 7 comments · Fixed by #1285
Closed

DeprecationWarning: datetime.utcfromtimestamp() is deprecated #1284

hugovk opened this issue May 16, 2023 · 7 comments · Fixed by #1285

Comments

@hugovk
Copy link
Contributor

hugovk commented May 16, 2023

With a self-built version of Python 3.12 that includes python/cpython#103857:

Python 3.12.0a7+ (heads/main-dirty:c527eb1c2a, May 15 2023, 10:39:28) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import dateutil.tz
/private/tmp/dateutil/src/dateutil/tz/tz.py:37: DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).
  EPOCH = datetime.datetime.utcfromtimestamp(0)
>>>

That warning again:

DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).

This is from:

EPOCH = datetime.datetime.utcfromtimestamp(0)

@jaraco
Copy link

jaraco commented Aug 9, 2023

I'm still seeing this warning. Are there plans to cut a release with it (and save me the trouble of suppressing the warning)?

@mhsmith
Copy link

mhsmith commented Aug 31, 2023

FYI: Python 3.12 will be released one month from now. If python-dateutil hasn't made a release by then, people who are running it in "warnings as errors" mode will start to experience crashes.

@EwoutH
Copy link

EwoutH commented Sep 26, 2023

@mariocj89 @pganssle @graingert Could a stable release be tagged and uploaded to PyPI as soon as possible? Python 3.12 releases in a week, and there is a whole chain of dependencies causing errors because of the deprecated utcfromtimestamp().

@graingert
Copy link
Contributor

@EwoutH sorry I don't have permissions to cut a release

@mariocj89
Copy link
Member

@pganssle is indeed the only person able to upload to pypi.org.

@haukex
Copy link

haukex commented Oct 8, 2023

Bump, Python 3.12 is now out

@pydsigner
Copy link

@pganssle is indeed the only person able to upload to pypi.org.

So none of the other members of the dateutil project can create releases on GitHub? That should be all that's necessary for PyPI uploads, right?

@dateutil dateutil locked as resolved and limited conversation to collaborators Nov 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants