Browse Source

Merge branch 'main' into formalize-deprecation

pull/1107/head
Ross McFarland 2 years ago
committed by GitHub
parent
commit
4b73ea6bb4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions
  1. +9
    -1
      octodns/processor/meta.py
  2. +2
    -1
      pyproject.toml

+ 9
- 1
octodns/processor/meta.py View File

@ -10,6 +10,14 @@ from .. import __version__
from ..record import Record
from .base import BaseProcessor
# TODO: remove once we require python >= 3.11
try: # pragma: no cover
from datetime import UTC
except ImportError: # pragma: no cover
from datetime import timedelta, timezone
UTC = timezone(timedelta())
def _keys(values):
return set(v.split('=', 1)[0] for v in values)
@ -55,7 +63,7 @@ class MetaProcessor(BaseProcessor):
@classmethod
def now(cls):
return datetime.utcnow().isoformat()
return datetime.now(UTC).isoformat()
@classmethod
def uuid(cls):


+ 2
- 1
pyproject.toml View File

@ -10,6 +10,7 @@ line_length=80
[tool.pytest.ini_options]
filterwarnings = [
'error',
'ignore:.*DEPRECATED.*2.0',
]
pythonpath = "."
pythonpath = "."

Loading…
Cancel
Save