Jennifer Richards
a653582cf7
fix: timezone fixes from last few comparisons with tzaware-obe
2022-09-28 13:21:50 -03:00
Jennifer Richards
32054111df
fix: fix failing tests and eliminate naive datetime warnings ( #4402 )
...
* test: fix timestamp construction in several doc tests
* refactor: rename date2datetime to datetime_from_date and clarify code
* chore: helper to get tzinfo for PRODUCTION_TIMEZONE
* fix: fix timezone handling in make_last_call()
* test: fix datetime generation in doc.tests_charter
* refactor: remove PRODUCTION_TIMEZONE setting
Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.
* test: be more careful about timezone in tests_charter.py
* test: be more careful about timezone in doc/tests.py
* fix: fix timezone handling affecting doc.tests_draft
* fix: fix timezone handling affecting tests_irsg_ballot.py
* fix: fix timezone handling affecting tests_review.py
* fix: fix timezone handling affecting last ietf.doc tests
* fix: fix timezone handling affecting last ietf.group tests
* fix: fix timezone handling affecting ietf.iesg tests
* fix: handle timezones in get_8989_eligibility_querysets
* fix: handle timezones affecting ietfauth tests
* fix: return tz-aware datetime from utc_from_string
* fix: specify timezone for constants in ipr_rfc_number()
* fix: specify tz for ipr deadlines
* fix: handle timezones affecting liaisons tests
* fix: treat leap day in get_8989_eligibility_querysets()
Manual cherry-pick of 248d6474
* test: treat leap day properly in nomcom tests
* fix: fix timezone handling affecting nomcom tests
* test: fix timezone handling in review tests
* fix: fix timezone handling affecting secr.meetings tests
* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone
* fix: fix timezone handling affecting secr.proceedings tests
* refactor: use make_aware() helper in secr.meetings tests
* test: fix timezone handling in secr.telechat tests
* fix: fix timezone handling affecting stats tests
* fix: eliminate tz-naive helpers affecting sync email parsing
* fix: include timezone data when serializing DeletedEvent data
* fix: fix timezone handling affecting sync tests
* style: remove unused import
2022-09-01 13:07:28 -03:00
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
Ryan Cross
d216a18734
Fix Telechat app bug, draft with no ballot. Commit ready for merge
...
- Legacy-Id: 19180
2021-07-01 17:16:09 +00:00
Ryan Cross
511006fe8e
Fix error on Telechat doc detail page when conflict review doc has no ballot. Fixes #3245 . Commit ready for merge.
...
- Legacy-Id: 19054
2021-06-01 22:32:45 +00:00
Jennifer Richards
e11583a87f
Allow assignment of Person as "action holder" for a Doc, plus rudimentary automation of assignment. Fixes #3146 . Commit ready for merge.
...
- Legacy-Id: 18829
2021-02-12 20:31:00 +00: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
Robert Sparks
fa492c3947
Remove "point raised - writup needed" from the set of substates the IESG can use with a document. Fixes #2968 . Commit ready for merge.
...
- Legacy-Id: 17708
2020-04-29 20:32:31 +00:00
Henrik Levkowetz
726fcbf27d
Removed all __future__ imports.
...
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz
6482254a03
Merged in ^/branch/akayla/irsg/6.113.1.dev0 from peter@akayla.com.
...
This provides support for IRSG ballots, similar to the IESG ballots support which has been in use for quite some time. The IRSG ballots differ from IESG ballots in a number of ways, described in detail in the RFP and SoW for this work and implemented here.
- Legacy-Id: 17164
2019-12-20 15:00:55 +00:00
Peter E. Yee
bb7e504d14
12/13 merged into 6.113.1.dev0 with migration ordering failure
...
- Legacy-Id: 17149
2019-12-13 19:53:45 +00:00
Henrik Levkowetz
a5e31c3f40
Py2/3 compatibility: Added __future__ import.
...
- Legacy-Id: 16452
2019-07-15 15:52:18 +00:00
Henrik Levkowetz
2d7c9629aa
Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
...
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz
f5ae2541ad
Replaced multiple asserts with assertContains().
...
- Legacy-Id: 16353
2019-07-01 14:09:12 +00:00
Henrik Levkowetz
d7f5c84182
Initial 2to3 patch with added copyright statement updates.
...
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz
426870b766
Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
...
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz
a2cafded25
Changed DocAlias to be many-to-many, in order to be able to handle STD aliases referring to multiple RFCs.
...
- Legacy-Id: 16249
2019-06-14 20:38:14 +00:00
Russ Housley
746ed7a524
Tests for IESG Telechat moderator package changes related to downrefs
...
- Legacy-Id: 16125
2019-04-01 19:22:08 +00:00
Russ Housley
268b99bd56
Add downward references to telechat moderator package and Secretariat telechat pages. Commit ready for merge.
...
- Legacy-Id: 16087
2019-03-23 15:36:07 +00:00
Henrik Levkowetz
ccb9074bc7
Temporary fix for a potential server 500. Expecting a better fix from Ryan.
...
- Legacy-Id: 15959
2019-02-21 15:26:40 +00:00
Robert Sparks
87bda66740
Converted several secr apps to use factories for tests. Commit ready for merge.
...
- Legacy-Id: 15568
2018-10-12 22:08:31 +00:00
Robert Sparks
1386a90de8
Test coverage improvements for ietf/secr/telechat/views. Commit ready for merge.
...
- Legacy-Id: 14902
2018-03-22 18:44:38 +00:00
Robert Sparks
dfc1d2aa9a
Warn when putting a draft on a telechat that is so close that directorates will probably not have time to complete a review. Fixes #2381 . Commit ready for merge.
...
- Legacy-Id: 14539
2018-01-18 22:14:30 +00:00
Henrik Levkowetz
1f976da5c1
Third part of document read refactoring, after [14406] and [14410]. This replaces all usage of the non-unicode-aware get_document_content() function with unicode-aware Document.text() or Document.text_or_error() methods. This was triggered by yet another report of unicode content not being shown properly, and should fix all instances of document (drafts, agendas, minutes, etc.) display in the datatracker not handling unicode characters properly.
...
- Legacy-Id: 14411
Note: SVN reference [14406] has been migrated to Git commit 967ece7e7d
Note: SVN reference [14410] has been migrated to Git commit 660c81c272
2017-12-11 16:23:51 +00:00
Henrik Levkowetz
660c81c272
Tweaked the file content read refactoring in [14406] to try latin-1 conversion if unicode doesn't work.
...
- Legacy-Id: 14410
Note: SVN reference [14406] has been migrated to Git commit 967ece7e7d
2017-12-10 17:48:09 +00:00
Henrik Levkowetz
967ece7e7d
Started refactoring of reading text from document files (drafts, charters, etc.) in order to normalise on one way of doing this, and making that return unicode rather than undecoded bytes. This is the first step of two, in order to gauge the possible issues and report on discrepancies.
...
- Legacy-Id: 14406
2017-12-08 21:51:11 +00:00
Henrik Levkowetz
98d234cd86
Refactored the handling of BallotDocEvent in tests, only creating them as needed, in preparation for stricter checks on state transitions to avoid mismatches between state and ballot.
...
- Legacy-Id: 14380
2017-11-30 16:02:31 +00:00
Ryan Cross
7542e8daa3
Fix issue where deferring a ballot causes 500 error in Telechat app. Fixes #1342 . Commit ready for merge.
...
- Legacy-Id: 13336
2017-05-12 19:30:06 +00:00
Henrik Levkowetz
1f2044bd83
Merged in [13212] from rcross@amsl.com:
...
Fix issue in telechat app where ballot positions for WG actions are incorrect. Fixes #1336 .
- Legacy-Id: 13213
Note: SVN reference [13212] has been migrated to Git commit 70ccb0b769
2017-04-13 15:03:18 +00:00
Ryan Cross
70ccb0b769
Fix issue in telechat app where ballot positions for WG actions are incorrect. Fixes #1336 . Commit ready for merge
...
- Legacy-Id: 13212
2017-04-13 00:59:36 +00:00
Henrik Levkowetz
4ef318b039
Merged in [13183] from rcross@amsl.com:
...
Fix error when selecting a document on the Telechat agenda that does not have a writeup. Fixes #2262 .
- Legacy-Id: 13191
Note: SVN reference [13183] has been migrated to Git commit 8a725c6e1e
2017-04-11 00:21:29 +00:00
Ryan Cross
8a725c6e1e
Fix error when selecting a document on the Telechat agenda that does not have a writeup. Fixes #2262 . Commit ready for merge.
...
- Legacy-Id: 13183
2017-04-04 20:05:56 +00:00
Lars Eggert
8a70e9773d
Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
...
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz
4daf66d11c
Added DocEvent rev= parameter througout the code.
...
- Legacy-Id: 12978
2017-03-06 15:08:21 +00:00
Henrik Levkowetz
5f053ad21a
Cleaned up the remaining explicit url names, using dotted-paths to view
...
functions instead. In all almost 700 changes.
- Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz
74af0f5658
Replaced another bunch of explicit url names with dotted-path to the view function.
...
- Legacy-Id: 12849
2017-02-15 22:11:20 +00:00
Henrik Levkowetz
aa5e61d958
Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
...
in order to autogenerate dotted path url pattern names. Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.
Changed some imports to prevent import of ietf.urls before django
initialization was complete.
Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.
Started converting old-style middleware classes to new-style middleware
functions (incomplete).
Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.
Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.
Rewrote the filename argument handling in a management command which had
broken with the upgrade.
- Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz
19d585255a
Django 1.10 does not permit the view argument to url() to be a string any more. Changed all cases view arguments to url() which were strings to instead reference the actual imported function.
...
- Legacy-Id: 12815
2017-02-10 14:49:16 +00:00
Henrik Levkowetz
7b95411f58
The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
...
- Legacy-Id: 12637
2017-01-09 21:26:30 +00:00
Henrik Levkowetz
c2541ec04b
Django 1.9: Removed deprecated use of django.conf.urls.patterns() from all urls*.py files.
...
- Legacy-Id: 12618
2016-12-22 17:21:57 +00:00
Henrik Levkowetz
4b0a9360f0
Merged in ^/branch/iola/event-saving-refactor-r10291, which refactors document saving to always use doc.save_with_history(events), and requires accompanying events. This branch also provides refactoring of recurring regexes in url patterns into a dictionary. As part of the merge, also refactored new code which didn't use the save_with_history() method.
...
- Legacy-Id: 11840
2016-08-23 10:52:08 +00:00
Henrik Levkowetz
4cac784522
Renamed a bunch of identically named MainTestCase classes.
...
- Legacy-Id: 10913
2016-03-06 18:18:38 +00:00
Robert Sparks
a07b318900
Fix a minor typo in the new rfc_editor_note code. Commit ready for merge. Will apply as patch to production.
...
- Legacy-Id: 10806
2016-02-08 22:43:25 +00:00
Russ Housley
4b5ac9e09e
Indicate on the IESG Telechat Agenda if a document has an RFC Editor Note. To accomplish this, the RFC Editor Note needed to be separated from the rest of the ballot write up. Fixes #1230 .
...
- Legacy-Id: 10770
2016-02-04 13:32:24 +00:00
Ole Laursen
86c3a430d1
Merge in ^/branch/iola/event-saving-refactor-r10076, fixing a few problems
...
- Legacy-Id: 10298
2015-10-27 10:37:06 +00:00
Ole Laursen
e1f0917659
Summary: Add new document saving API, Document.save_with_history(events).
...
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
2015-09-28 14:01:03 +00:00
Robert Sparks
f30f5c39f1
checkpoint
...
- Legacy-Id: 10017
2015-08-13 21:16:21 +00:00
Robert Sparks
839d0f89ad
checkpoint
...
- Legacy-Id: 10016
2015-08-13 19:41:02 +00:00
Henrik Levkowetz
86997e1e95
Turned the api.py file into a module. Moved the makeresources management command to the api module. Added some api tests. Added crawling of api files to the test-crawler. Adjusted some resource files discovered by the test suite and test-crawler. Removed a bunch of empty model files.
...
- Legacy-Id: 9144
2015-03-03 20:23:36 +00:00