dnspython icon indicating copy to clipboard operation
dnspython copied to clipboard

Deprecation Warnings With Python 3.12

Open kitterma opened this issue 2 years ago • 4 comments

Describe the bug When the 2.5.0~rc1 test suite is run with python3.12, there are deprecation warnings:

tests/test_resolver.py::PollResolverTestCase::testQuicNameserver
  /usr/lib/python3/dist-packages/aioquic/tls.py:218: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    now = utcnow()
tests/test_resolver.py::PollResolverTestCase::testQuicNameserver
  /usr/lib/python3/dist-packages/aioquic/tls.py:1390: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
    timestamp = utcnow()

To Reproduce Run the test suite with Python 3.12

Context (please complete the following information):

  • dnspython version [e.g. 2.2.1] 2.5.0~rc1
  • Python version [e.g. 3.10.0] 3.12.1
  • OS: [e.g. macOS Monterey] Debian Unstable

kitterma avatar Jan 07 '24 17:01 kitterma

This is an aioquic issue which will be fixed in a future release of aioquic, probably shortly after cryptography 42.0.0 ships.

rthalley avatar Jan 07 '24 18:01 rthalley

See this aioquic PR for the latest info.

rthalley avatar Jan 07 '24 18:01 rthalley

Excellent. Thanks.

Scott K

kitterma avatar Jan 07 '24 18:01 kitterma

I'll keep this ticket open so we remember to increment the aioquic version requirement when there is a fix.

rthalley avatar Jan 08 '24 12:01 rthalley

Fixed with aioquic 1.0.0 requirement.

rthalley avatar Mar 12 '24 19:03 rthalley