* refactor: accept tz name strings in ietf.utils.timezone methods
* refactor: use explicitly tz-aware math for iana-changes-updates script
* chore: remove unused "local_timezone_to_utc()" method helper
* refactor: replace datetime.now with timezone.now
* refactor: migrate model fields to use timezone.now as default
* refactor: replace datetime.today with timezone.now
datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.
* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)
This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.
* refactor: revert datetime.today() change to old migrations
* refactor: change a missed datetime.now to timezone.now
* chore: renumber timezone_now migration
* chore: renumber migrations
The new API requires at least one event and will automatically save a
snapshot of the document and related state. Document.save() will now
throw an exception if called directly, as the new API is intended to
ensure that documents are saved with both an appropriate snapsnot and
relevant history log, both of which are easily defeated by just
calling .save() directly.
To simplify things, the snapshot is generated after the changes to a
document have been made (in anticipation of coming changes), instead
of before as was usual.
While revising the existing code to work with this API, a couple of
missing events was discovered:
- In draft expiry, a "Document has expired" event was only generated
in case an IESG process had started on the document - now it's
always generated, as the document changes its state in any case
- Synchronization updates like title and abstract amendmends from the
RFC Editor were silently (except for RFC publication) applied and
not accompanied by a descriptive event - they now are
- do_replace in the Secretariat tools now adds an event
- Proceedings post_process in the Secretariat tools now adds an event
- do_withdraw in the Secretariat tools now adds an event
A migration is needed for snapshotting all documents, takes a while to
run. It turns out that a single document had a bad foreign key so the
migration fixes that too.
- Legacy-Id: 10101
Allow IANA to switch to (BEGIN IANA COMMENTS) at their leisure. Make sure the captured events are obviously from IANA.
- Legacy-Id: 9568
Note: SVN reference [9548] has been migrated to Git commit 6ded3411c2
Used multipart mime when including the original message in an error message to the secretariat.
Modified the way IANA review email is parsed.
Added non-ascii UTF-8 tests to the IANA review email parser and to the SMTP Exception handling code.
Commit ready for merge.
- Legacy-Id: 7673
doc/utils_charter.py) in favour of add_state_change_event which has
slightly better API but otherwise does basically the same except it
sets an event type we can later search for. Also expand tests slightly
to exercise three more templates.
- Legacy-Id: 7129
from IANA as it turns out that the Datatracker is the authoritative
source on these states. Also improve logging so that the raw JSON from
IANA is dumped, the parsed JSON on imported changes is dumped and we
write to syslog before starting a sync script in the notification view.
- Legacy-Id: 5800
protocols page (to see when references to newly published RFCs have
been updated) and parsing IANA review emails to be included as
comments
- Legacy-Id: 4850