Jennifer Richards
07e26dd52e
refactor: Replace deprecated force_text with force_str
2023-05-09 15:21:50 -03:00
Robert Sparks
f010766654
Merge remote-tracking branch 'ietf-tools/main' into feat/postgres
2023-02-27 12:55:47 -06:00
Robert Sparks
c38ade6e1b
feat: treat django auth username as case insensitive throughout the datatracker ( #5165 )
...
* feat: insensitive username matching at django authentication
* feat: use iexact when using the User object manager
* fix: more places to ignore username case
* fix: remove unused management command
* fix: avoid get when probing for object existance
* fix: force lowercase new usernames in secr/rolodex
* fix: use explicit arguments when creating user
2023-02-21 10:01:03 -06:00
Lars Eggert
81ffad9852
fix: add distinct()
to sync/discrepancies
( #5167 )
...
Fixes #5129
2023-02-17 09:54:07 -06:00
Lars Eggert
f8b48f4c43
fix: use Internet-Draft more consistently across the UI ( #5104 )
...
* s/Internet Draft/Internet-Draft/i
* s/draft/Internet-Draft/i or s/draft/I-D/i
* s/ID/I-D/
* Fix tests
* a -> an
* Undo case-change to ASCII
* Address code review comments
* Add migrations
* Add merged migration
* fix: straighten out migrations
* fix: finish straightening out migrations
---------
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-02-11 10:09:28 -06:00
Lars Eggert
220be21998
chore: Use codespell to fix typos in code. ( #4797 )
...
* chore: Use codespell to fix typos in code.
Second part of replacement of #4651
@rjsparks, I probably need to revert some things here, and I also
still need to add that new migration - how do I do that?
* Revert migrations
* Migrate "Whitelisted" to "Allowlisted"
* TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE
* Fix permissions
* Add suggestions from @jennifer-richards
2022-12-07 15:10:35 -06:00
Lars Eggert
6eabd4a3a1
chore: Use codespell
to fix typos in comments. ( #4794 )
...
First part of replacement of #4651
2022-11-28 10:36:36 -06:00
Jennifer Richards
0ca02aad1f
refactor: accept tz name in timezone util methods and refactor iana-changes-updates script ( #4444 )
...
* 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
2022-09-13 13:16:36 -03:00
Jennifer Richards
4084d7d557
fix: record and interpret RFC pub dates in correct timezone ( #4421 )
...
* fix: use PST8PDT for published_rfc event timestamps
* fix: find RFCs by PST8PDT year in RfcFeed
* refactor: add const RPC_TZINFO to represent RFC publication timezone
* chore: remove (rather than fix) unused template tags
* fix: always return RPC_TZINFO-local date from Document.pub_date()
* refactor: convert 'published' flag to a Boolean to reflect its usage
* fix: display doc publication dates in correct time zones
* fix: fix various small issues breaking tests
2022-09-08 14:51:19 -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
Robert Sparks
49cf639f16
fix: improve person selection when receiving IANA email ( #3993 )
2022-05-20 16:20:26 -05:00
Jennifer Richards
6c260a5b7e
Merge 7.45.1.dev0 into Bootstrap 5 update branch. Made a first pass at reconciling differences.
...
- Legacy-Id: 19945
2022-02-17 20:09:49 +00:00
Jennifer Richards
6f3fb6930f
Add timeouts to requests library calls. Fixes #3498 . Commit ready for merge.
...
- Legacy-Id: 19839
2022-01-13 15:06:28 +00:00
Lars Eggert
a5cbf5307e
More fixes
...
- Legacy-Id: 19835
2022-01-12 11:54:00 +00:00
Jennifer Richards
81d9234d54
Use temporary directories instead of "real" filesystem for tests. Fixes #3414 . Commit ready for merge.
...
- Legacy-Id: 19555
2021-11-05 19:45:57 +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
Henrik Levkowetz
57938b039d
Converted many cases of plain-text 403 messages to use a properly styled page instead, with a login link when appropriate. Also changed some API endpoint 400 responses to a more correct 403.
...
- Legacy-Id: 18339
2020-08-06 10:59:52 +00:00
Henrik Levkowetz
c9e99e3436
Refined the code in ietf.sync.rfceditor that deals with errata to distinguish between rejected errata and other errata.
...
- Legacy-Id: 18279
2020-07-26 14:11:04 +00:00
Jennifer Richards
fff927b085
Store Auth48 URL as DocumentURL and display in RFC-Editor state. Migrates old data when possible. Alternative to 17563. Fixes #2722 . Commit ready for merge.
...
- Legacy-Id: 18157
2020-07-13 15:34:01 +00:00
Henrik Levkowetz
488ff08352
Merged in ^/personal/henrik/6.129.2-django2.0 which contains an upgrade of Django from 1.11 to 2.0, with the code changes needed.
...
- Legacy-Id: 17817
2020-05-18 06:50:50 +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
6d7c5b52ee
Django 2.0 conversion. Test suite passes, except for javascript tests.
...
- Legacy-Id: 17762
2020-05-08 13:07:07 +00:00
Henrik Levkowetz
f10ddadc0e
Merged in changes from trunk up to r17584.
...
- Legacy-Id: 17593
2020-04-07 16:02:52 +00:00
Henrik Levkowetz
726fcbf27d
Removed all __future__ imports.
...
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz
ab173cb2eb
Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
...
- Legacy-Id: 17390
2020-03-05 20:46:58 +00:00
Henrik Levkowetz
e9a37d8ac8
Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
...
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz
a14e38a1a1
Replaced most cases of using of urlopen(), instead using the higher-level 'requests' module where it simplifies the code.
...
- Legacy-Id: 17380
2020-03-03 17:34:42 +00:00
Henrik Levkowetz
a2318d9f2c
Backported patches from production
...
- Legacy-Id: 17370
2020-02-28 20:46:20 +00:00
Henrik Levkowetz
07747b26c3
Fixed an issue with tests mocking urlopen() responses, and tweaked error messages on bad results in sync/rfceditor.py
...
- Legacy-Id: 17356
2020-02-27 15:05:27 +00:00
Henrik Levkowetz
ebdad3a5a5
Added charset decoding of data read from an urlopen() object in a few places, and removed some use-once functions that were now dead code.
...
- Legacy-Id: 17355
2020-02-27 13:39:45 +00:00
Henrik Levkowetz
d2ad86c5df
Python 2/3 changes pulled from the production server after the switch to python 3.
...
- Legacy-Id: 17327
2020-02-23 01:34:52 +00:00
Henrik Levkowetz
32e9692f54
Fixed a py2/py3 issue in sync.rfceditor.post_approved_draft(), and enhanced tests to execute the failing code (with Mock functions) instead of skipping the code.
...
- Legacy-Id: 17265
2020-01-28 22:37:50 +00:00
Henrik Levkowetz
cb93ba8369
Fixed a py2/py3 issue in post_approved_draft()
...
- Legacy-Id: 17258
2020-01-27 20:31:50 +00:00
Henrik Levkowetz
09b83a0ab8
Fixed a Py2/3 compatibility issue with the verified errata code.
...
- Legacy-Id: 17220
2020-01-11 00:20:37 +00:00
Henrik Levkowetz
ba3010e3b0
Added fetch and use of the RFC-Editor's errata.json file in order to set a new 'verified-errata' document tag, and use that to show the link to inline-errata documents only when there is verified errata. Fixes issue #2861 .
...
- Legacy-Id: 17212
2020-01-10 12:22:33 +00:00
Henrik Levkowetz
96f6f47758
Updated rfc-editor sync code to recognize the new Tooling Issue queue state.
...
- Legacy-Id: 16730
2019-09-11 16:20:25 +00:00
Henrik Levkowetz
3e67a395b5
Updated ietf.sync.rfceditor.parse_index() to use the new rfc-index schema (changed placement of the page-count element).
...
- Legacy-Id: 16729
2019-09-11 12:48:19 +00:00
Henrik Levkowetz
bdc73e771a
Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
...
- Legacy-Id: 16461
2019-07-16 13:20:05 +00:00
Henrik Levkowetz
8c6eb3a30a
Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
...
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz
864fc1a814
Firmed up the handling of non-ascii names for a test email templat, tweaked some asserts, and removed unused imports.
...
- Legacy-Id: 16392
2019-07-04 20:53:05 +00:00
Henrik Levkowetz
0589d0b313
Changed a bunch of regexes to use r strings; also miscellaneous smaller fixes.
...
- Legacy-Id: 16376
2019-07-04 15:51:05 +00:00
Henrik Levkowetz
d460721415
Changed regexes to use r strings. Rewrote code to extract From: name and email from iana email text. Fixed charset decode of iana email messages.
...
- Legacy-Id: 16373
2019-07-04 15:38:15 +00:00
Henrik Levkowetz
15e74e89cb
Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
...
- Legacy-Id: 16336
2019-06-29 13:43:31 +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
Henrik Levkowetz
815602351f
This is a series of 50 migrations that changes the Document and DocAlias
...
primary keys from character strings to integers, and makes corresponding code
changes.
This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.
Changing the primary keys to integers should also improve efficiency.
Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time. The total set of migrations are expected to have
a runtime on the order of 2 hours.
- Legacy-Id: 16237
2019-06-10 11:32:46 +00:00