Jennifer Richards
ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now ( #4211 )
...
* 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
2022-08-25 13:45:16 -03:00
Robert Sparks
3697180cc1
Reverted merge of timezone-aware migration efforts.
...
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz
774e752a54
Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
...
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz
bc05e7a8d0
Refactored many instances of msg.get_payload(decode=True).decode('utf-8') and similar to get_payload_text(msg), which uses msg.get_charset() to get the actual charset to do the decoding, in a consistent manner. Also removed some instances of force_str, but more remain.
...
- Legacy-Id: 17807
2020-05-16 20:20:05 +00:00
Henrik Levkowetz
726fcbf27d
Removed all __future__ imports.
...
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz
3227e42543
Slight refactoring of infer_message() and send_scheduled_message_from_send_queue(), and added setting of Message.sent when sent.
...
- Legacy-Id: 17347
2020-02-26 18:03:12 +00:00
Henrik Levkowetz
99a7f9c263
Python2/3 compatibility: Added force_str or force_bytes in some places, to ensure the argument right type
...
- Legacy-Id: 16453
2019-07-15 17:13:46 +00:00
Henrik Levkowetz
36cac48063
Fixed a bunch of str/bytes issues.
...
- Legacy-Id: 16341
2019-06-30 20:54:09 +00:00
Henrik Levkowetz
70c00950b6
Fixed several email handling str/bytes issues.
...
- Legacy-Id: 16334
2019-06-29 13:30:36 +00:00
Henrik Levkowetz
682ddee8e4
Reverted earlier application of on_behalf_of() at mail sending call points, and instead did all on_behalf_of processing in condition_message(). Added insertion of Reply-To header fields in this case. Changed all use of the mail-sending 'extra' parameters to use value lists. Updated a bunch of tests accordingly.
...
- Legacy-Id: 16020
2019-03-11 17:01:33 +00:00
Henrik Levkowetz
435a0da12d
Added on_behalf_of() calls for from addresses needing it throughout the code.
...
- Legacy-Id: 15992
2019-03-04 20:14:19 +00:00
Henrik Levkowetz
e87442f33a
Merged in [15282] from housley@vigilsec.com:
...
Set reply-to for I-D Announcements that include a CC to a mail list. Fixes #2530 .
- Legacy-Id: 15289
Note: SVN reference [15282] has been migrated to Git commit 733c304e3d
2018-07-10 17:16:47 +00:00
Henrik Levkowetz
5183042d58
Merged in branch/amsl/iprtool/5.7.4@8734 from rcross@amsl.com, providing new IPR models, refactored code, and improved list, search, and management interfaces.
...
- Legacy-Id: 8808
2014-12-21 19:26:33 +00:00
Henrik Levkowetz
8f224af90c
Made ietf/message pyflakes-clean.
...
- Legacy-Id: 7474
2014-03-15 19:02:23 +00:00
Ole Laursen
78d9bfff24
Move send_scheduled_announcement functionality to messages/utils.py
...
- Legacy-Id: 6768
2013-11-28 13:05:51 +00:00
Ole Laursen
480cb04cd6
Save announcements generated by the system as Messages, adding an
...
extra relation to be able to associate a draft with the message
- Legacy-Id: 3917
2012-02-08 21:05:28 +00:00