You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
our tests using datetime.utcnow() instead of datetime.datetime.now(datetime.UTC)
warnings in vendored packages that probably will disappear when they are upgraded
=============================== warnings summary ===============================
tests/conftest.py:10
/home/runner/work/opensafely-cli/opensafely-cli/tests/conftest.py:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
opensafely/_vendor/certifi/core.py:36
/home/runner/work/opensafely-cli/opensafely-cli/opensafely/_vendor/certifi/core.py:36: DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
_CACERT_CTX = get_path("opensafely._vendor.certifi", "cacert.pem")
opensafely/_vendor/google/protobuf/internal/well_known_types.py:91
/home/runner/work/opensafely-cli/opensafely-cli/opensafely/_vendor/google/protobuf/internal/well_known_types.py:91: 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).
_EPOCH_DATETIME_NAIVE = datetime.datetime.utcfromtimestamp(0)
tests/test_codelists.py::test_codelists_update
tests/test_codelists.py::test_codelists_update
/home/runner/work/opensafely-cli/opensafely-cli/opensafely/codelists.py:89: 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).
"downloaded_at": f"{datetime.datetime.utcnow()}Z",
tests/test_init.py::test_should_version_check
tests/test_init.py::test_should_version_check
/home/runner/work/opensafely-cli/opensafely-cli/opensafely/__init__.py:45: 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).
four_hours_ago = datetime.utcnow() - timedelta(hours=4)
tests/test_init.py::test_should_version_check
/home/runner/work/opensafely-cli/opensafely-cli/tests/test_init.py:15: 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 = (datetime.utcnow() - timedelta(hours=5)).timestamp()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================== 233 passed, 8 warnings in 63.59s (0:01:03) ==================
The text was updated successfully, but these errors were encountered:
When testing with Python 3.12, there are several warnings. These are a mixture of:
pkg_resources
; see also Incompatible with Python 3.12 because ofpkg_resources
use #233datetime.utcnow()
instead ofdatetime.datetime.now(datetime.UTC)
The text was updated successfully, but these errors were encountered: