Hello community,
here is the log from the commit of package python-django-mailman3 for
openSUSE:Factory checked in at 2020-08-04 20:23:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-mailman3 (Old)
and /work/SRC/openSUSE:Factory/.python-django-mailman3.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-django-mailman3"
Tue Aug 4 20:23:38 2020 rev:3 rq:824276 version:1.3.4
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-django-mailman3/python-django-mailman3.changes
2020-05-13 22:56:37.631072800 +0200
+++
/work/SRC/openSUSE:Factory/.python-django-mailman3.new.3592/python-django-mailman3.changes
2020-08-04 20:23:51.629012678 +0200
@@ -1,0 +2,7 @@
+Tue Aug 4 02:04:03 UTC 2020 - Stasiek Michalski <[email protected]>
+
+- Update to 1.3.4
+ * Fix a bug caused by bumping to Mailman API 3.1 in version 1.3.3 which
+ resulted in 404 errors for some users.
+
+-------------------------------------------------------------------
Old:
----
django-mailman3-1.3.3rc1.tar.gz
New:
----
django-mailman3-1.3.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-django-mailman3.spec ++++++
--- /var/tmp/diff_new_pack.da3OvS/_old 2020-08-04 20:23:53.485012915 +0200
+++ /var/tmp/diff_new_pack.da3OvS/_new 2020-08-04 20:23:53.489012915 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-django-mailman3
-Version: 1.3.3rc1
+Version: 1.3.4
Release: 0
Summary: Django library to help interaction with Mailman
License: GPL-3.0-only
++++++ django-mailman3-1.3.3rc1.tar.gz -> django-mailman3-1.3.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-mailman3-1.3.3rc1/PKG-INFO
new/django-mailman3-1.3.4/PKG-INFO
--- old/django-mailman3-1.3.3rc1/PKG-INFO 2020-05-10 02:21:24.000000000
+0200
+++ new/django-mailman3-1.3.4/PKG-INFO 2020-06-05 22:21:52.866937900 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: django-mailman3
-Version: 1.3.3rc1
+Version: 1.3.4
Summary: Django library to help interaction with Mailman
Home-page: https://gitlab.com/mailman/django-mailman3
Maintainer: Mailman Developers
@@ -20,14 +20,24 @@
NEWS
====
- 1.3.3rc1 (2020-05-09)
- ---------------------
+ 1.3.4 (2020-06-05)
+ ------------------
+ * Fix a bug caused by bumping to Mailman API 3.1 in version 1.3.3 which
+ resulted in 404 errors for some users. (Closes #35)
+
+
+ 1.3.3 (2020-06-01)
+ ------------------
- Hide "Account Connections" tab in accounts if no social account
providers are
installed. (See !54)
- Use bold font for form labels (See !82)
- Update a user's preferred_address in Mailman Core when a user
updates their
primary address in Profile. (Closes #32)
+ - Use Mailman's API version 3.1 to get Hex UUIDs instead of integer.
+ - Caught a LookupError when scrubbing an attachment with an unknown
charset.
+ (Closes #12)
+ - Properly scrub the content of message/rfc822 parts. (Closes #34)
License
=======
@@ -35,7 +45,7 @@
Django-mailman is licensed under the
`GPL v3.0 <http://www.gnu.org/licenses/gpl-3.0.html>`_
- Copyright (C) 2017-2019 by the Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 by the Free Software Foundation, Inc.
Keywords: mailman django
Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-mailman3-1.3.3rc1/README.rst
new/django-mailman3-1.3.4/README.rst
--- old/django-mailman3-1.3.3rc1/README.rst 2020-05-10 02:20:30.000000000
+0200
+++ new/django-mailman3-1.3.4/README.rst 2020-06-05 22:21:30.000000000
+0200
@@ -12,14 +12,24 @@
NEWS
====
-1.3.3rc1 (2020-05-09)
----------------------
+1.3.4 (2020-06-05)
+------------------
+* Fix a bug caused by bumping to Mailman API 3.1 in version 1.3.3 which
+ resulted in 404 errors for some users. (Closes #35)
+
+
+1.3.3 (2020-06-01)
+------------------
- Hide "Account Connections" tab in accounts if no social account providers are
installed. (See !54)
- Use bold font for form labels (See !82)
- Update a user's preferred_address in Mailman Core when a user updates their
primary address in Profile. (Closes #32)
+- Use Mailman's API version 3.1 to get Hex UUIDs instead of integer.
+- Caught a LookupError when scrubbing an attachment with an unknown charset.
+ (Closes #12)
+- Properly scrub the content of message/rfc822 parts. (Closes #34)
License
=======
@@ -27,4 +37,4 @@
Django-mailman is licensed under the
`GPL v3.0 <http://www.gnu.org/licenses/gpl-3.0.html>`_
-Copyright (C) 2017-2019 by the Free Software Foundation, Inc.
+Copyright (C) 2017-2020 by the Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/lib/mailman.py
new/django-mailman3-1.3.4/django_mailman3/lib/mailman.py
--- old/django-mailman3-1.3.3rc1/django_mailman3/lib/mailman.py 2020-05-10
01:19:33.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3/lib/mailman.py 2020-06-05
22:07:12.000000000 +0200
@@ -35,7 +35,7 @@
logger = logging.getLogger(__name__)
-def get_mailman_client(api_version='3.0'):
+def get_mailman_client(api_version='3.1'):
"""Return an instance of Mailman Client.
:param api_version: The API version for Mailman Core to use.
@@ -51,13 +51,36 @@
def get_mailman_user(user):
+ """Given a Django user, return the Mailman's user object.
+
+ If the user does not exist, we will try to create one. If neither of the
+ get or create options work, perhaps because API is un-reachable, we return
+ a None value.
+
+ :param user: Instance of a Django user.
+ :returns: Mailman user or None if Mailman API isn't available.
+ :rtype: :class:`mailmanclient.User`
+ """
# Only cache the mailman user_id, not the whole user instance, because
# mailmanclient is not pickle-safe
cache_key = "User:%s:mailman_user_id" % user.id
mm_user_id = cache.get(cache_key)
try:
mm_client = get_mailman_client()
- if mm_user_id is None:
+ mm_user = None
+ if mm_user_id is not None:
+ # Due upgrade from Mailman API 3.0 to 3.1, integer user_id can
+ # return 404 if the API version used was 3.1 (which has user_ids as
+ # UUIDs). So, we are going to lookup with email if the cached
+ # user_id returns 404.
+ try:
+ mm_user = mm_client.get_user(mm_user_id)
+ except HTTPError as e:
+ if e.code != 404:
+ raise
+ # So, either the user_id wasn't cached or the cached user_id didn't
+ # return a valid user. Now lookup with user's email.
+ if mm_user is None:
try:
mm_user = mm_client.get_user(user.email)
except HTTPError as e:
@@ -69,10 +92,9 @@
# know if the registration that was used verified it.
logger.info("Created Mailman user for %s (%s)",
user.username, user.email)
+ # Update the cache to avoid a lookup next time.
cache.set(cache_key, mm_user.user_id, None)
- return mm_user
- else:
- return mm_client.get_user(mm_user_id)
+ return mm_user
except (HTTPError, MailmanConnectionError) as e:
logger.warning(
"Error getting or creating the Mailman user of %s (%s): %s",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/lib/scrub.py
new/django-mailman3-1.3.4/django_mailman3/lib/scrub.py
--- old/django-mailman3-1.3.3rc1/django_mailman3/lib/scrub.py 2019-03-27
07:08:58.000000000 +0100
+++ new/django-mailman3-1.3.4/django_mailman3/lib/scrub.py 2020-06-05
19:02:23.000000000 +0200
@@ -92,14 +92,14 @@
if ctype == 'text/plain':
if part.is_attachment():
attachments.append(self._parse_attachment(part, part_num))
- part.set_content('')
+ part.set_content('\n')
elif (ctype == 'text/html' and self.sanitize ==
Sanitize.SANITIZE_HTML):
attachments.append(self._parse_attachment(part, part_num))
- part.set_content('')
+ part.set_content('\n')
elif ctype == 'message/rfc822':
attachments.append(self._parse_attachment(part, part_num))
- part.set_content('')
+ part.set_content('\n')
elif part.get_payload() and not part.is_multipart():
attachments.append(self._parse_attachment(part, part_num))
return attachments
@@ -150,21 +150,28 @@
:type filter_html: Bool
"""
ctype = part.get_content_type()
- # Get the charset of the message, if not set, try to guess it's value.
- # When guess is True, it will never return None.
charset = self._get_charset(part, default=None, guess=False)
- payload = part.get_content()
- # get_content can give either bytes or str, based on whether it was
- # able to decode the payload. If it is str, return it as it is,
- # otherwise, try to decode it using the guessed charset.
- if not isinstance(payload, str):
- decodedpayload = part.get_payload(decode=True)
+ try:
+ payload = part.get_content()
+ except LookupError as e:
+ payload = "Can't retrieve content: {}".format(e)
+ # get_content will raise KeyError if called on a multipart part. We
+ # never call _parse_attachment() on multipart parts, so that's OK.
+ # We have seen LookupError if the part's charset is unknown, so catch
+ # that and just return a message.
+ # XXX We could try some known charsets, but for now we just punt.
+ #
+ # get_content will return a string for text/* parts, an
+ # EmailMessage object for message/rfc822 parts and bytes for other
+ # content types. text/* parts will be CTE decoded and decoded per
+ # their declared charset. Other parts will be CTE decoded.
+ if ctype == 'message/rfc822':
+ # Return message/rfc822 parts as a string.
+ decodedpayload = str(payload)
else:
- # It is also a str, just return it as it is.
+ # It is a str or bytes, just return it as it is.
decodedpayload = payload
filename = self._get_attachment_filename(part, ctype)
- if ctype == 'message/rfc822':
- decodedpayload = str(decodedpayload)
return (part_num, filename, ctype, charset, decodedpayload)
def _guess_all_extensions(self, ctype):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/locale/pl/LC_MESSAGES/django.po
new/django-mailman3-1.3.4/django_mailman3/locale/pl/LC_MESSAGES/django.po
---
old/django-mailman3-1.3.3rc1/django_mailman3/locale/pl/LC_MESSAGES/django.po
2020-04-04 21:22:11.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3/locale/pl/LC_MESSAGES/django.po
2020-06-05 19:02:23.000000000 +0200
@@ -8,8 +8,8 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-06-22 10:59+0200\n"
-"PO-Revision-Date: 2020-01-05 15:21+0000\n"
-"Last-Translator: kakiremora <[email protected]>\n"
+"PO-Revision-Date: 2020-05-13 19:20+0000\n"
+"Last-Translator: Szylu <[email protected]>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/gnu-mailman/"
"django-mailman3/pl/>\n"
"Language: pl\n"
@@ -19,72 +19,74 @@
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<"
"12 || n%100>=14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) "
"|| (n%100>=12 && n%100<=14) ? 2 : 3);\n"
-"X-Generator: Weblate 3.10\n"
+"X-Generator: Weblate 4.1-dev\n"
#: forms.py:43
msgid "A user with that username already exists."
-msgstr ""
+msgstr "Użytkownik z tą nazwą już istnieje."
#: templates/account/email.html:6
#: templates/django_mailman3/profile/base.html:16
#: templates/django_mailman3/profile/base.html:17
msgid "Account"
-msgstr ""
+msgstr "Konto"
#: templates/account/email.html:11
msgid "The following e-mail addresses are associated with your account:"
-msgstr ""
+msgstr "Z Twoim kontem powiązane są następujące adresy e-mail:"
#: templates/account/email.html:25
msgid "Verified"
-msgstr ""
+msgstr "Zweryfikowany"
#: templates/account/email.html:27
msgid "Unverified"
-msgstr ""
+msgstr "Niezweryfikowany"
#: templates/account/email.html:29
msgid "Primary"
-msgstr ""
+msgstr "Podstawowy"
#: templates/account/email.html:35
msgid "Make Primary"
-msgstr ""
+msgstr "Uczyń podstawowym"
#: templates/account/email.html:36
msgid "Re-send Verification"
-msgstr ""
+msgstr "Prześlij ponownie weryfikację"
#: templates/account/email.html:37 templates/socialaccount/connections.html:34
msgid "Remove"
-msgstr ""
+msgstr "Usuń"
#: templates/account/email.html:44
msgid "Warning:"
-msgstr ""
+msgstr "Ostrzeżenie:"
#: templates/account/email.html:44
msgid ""
"You currently do not have any e-mail address set up. You should really add "
"an e-mail address so you can receive notifications, reset your password, etc."
msgstr ""
+"Obecnie nie masz skonfigurowanego adresu e-mail. Naprawdę powinieneś dodać "
+"adres e-mail, aby otrzymywać powiadomienia, resetować hasło itp."
#: templates/account/email.html:49
msgid "Add E-mail Address"
-msgstr ""
+msgstr "Dodaj adres email"
#: templates/account/email.html:55
msgid "Add E-mail"
-msgstr ""
+msgstr "Dodaj email"
#: templates/account/email.html:66
msgid "Do you really want to remove the selected e-mail address?"
-msgstr ""
+msgstr "Czy na pewno chcesz usunąć zaznaczone adresy email?"
#: templates/account/email_confirm.html:6
#: templates/account/email_confirm.html:10
msgid "Confirm E-mail Address"
-msgstr ""
+msgstr "Potwierdź adres email"
#: templates/account/email_confirm.html:16
#, python-format
@@ -92,6 +94,8 @@
"Please confirm that <a href=\"mailto:%(email)s\">%(email)s</a> is an e-mail "
"address for user %(user_display)s."
msgstr ""
+"Potwierdź, że <a href=\"mailto:%(email)s\">%(email)s</a> to adres e-mail "
+"użytkownika %(user_display)s."
#: templates/account/email_confirm.html:20
msgid "Confirm"
@@ -103,11 +107,13 @@
"This e-mail confirmation link expired or is invalid. Please <a href="
"\"%(email_url)s\">issue a new e-mail confirmation request</a>."
msgstr ""
+"Ten link potwierdzający e-mail wygasł lub jest nieprawidłowy. <a href=\""
+"%(email_url)s\">wystaw nową prośbę o potwierdzenie e-mailem</a>."
#: templates/account/login.html:7 templates/account/login.html:11
#: templates/account/login.html:48
msgid "Sign In"
-msgstr ""
+msgstr "Zaloguj się"
#: templates/account/login.html:18
#, python-format
@@ -117,11 +123,15 @@
"up</a>\n"
"for a %(site_name)s account and sign in below:"
msgstr ""
+"Zaloguj się za pomocą jednego\n"
+"z twoich istniejących kont stron trzecich. Lub <a href=\"%(signup_url)s\">"
+"zarejestruj się</a>\n"
+"dla konta %(site_name)s i zaloguj się poniżej:"
#: templates/account/login.html:30
#: templates/django_mailman3/profile/profile.html:67
msgid "or"
-msgstr ""
+msgstr "lub"
#: templates/account/login.html:37
#, python-format
@@ -129,19 +139,21 @@
"If you have not created an account yet, then please\n"
"<a href=\"%(signup_url)s\">sign up</a> first."
msgstr ""
+"Jeśli nie utworzyłeś jeszcze konta, \n"
+"<a href=\"%(signup_url)s\">zarejestruj się</a> najpierw."
#: templates/account/login.html:50
msgid "Forgot Password?"
-msgstr ""
+msgstr "Zapomniałeś hasła?"
#: templates/account/logout.html:5 templates/account/logout.html:8
#: templates/account/logout.html:17
msgid "Sign Out"
-msgstr ""
+msgstr "Wyloguj się"
#: templates/account/logout.html:10
msgid "Are you sure you want to sign out?"
-msgstr ""
+msgstr "Jesteś pewny, że chcesz się wylogować?"
#: templates/account/password_change.html:12
#: templates/account/password_reset_from_key.html:6
@@ -149,30 +161,33 @@
#: templates/django_mailman3/profile/base.html:20
#: templates/django_mailman3/profile/base.html:21
msgid "Change Password"
-msgstr ""
+msgstr "Zmień hasło"
#: templates/account/password_reset.html:7
#: templates/account/password_reset.html:11
msgid "Password Reset"
-msgstr ""
+msgstr "Reset hasła"
#: templates/account/password_reset.html:16
msgid ""
"Forgotten your password? Enter your e-mail address below, and we'll send you "
"an e-mail allowing you to reset it."
msgstr ""
+"Zapomniałeś hasła? Wprowadź swój adres email poniżej, a my wyślemy Ci maila "
+"umożliwiającego zresetowanie go."
#: templates/account/password_reset.html:22
msgid "Reset My Password"
-msgstr ""
+msgstr "Zresertuj moje hasło"
#: templates/account/password_reset.html:27
msgid "Please contact us if you have any trouble resetting your password."
msgstr ""
+"Skontaktuj się z nami, jeśli masz problemy ze zresetowaniem swojego hasła."
#: templates/account/password_reset_from_key.html:9
msgid "Bad Token"
-msgstr ""
+msgstr "Zły token"
#: templates/account/password_reset_from_key.html:13
#, python-format
@@ -181,132 +196,139 @@
"used. Please request a <a href=\"%(passwd_reset_url)s\">new password reset</"
"a>."
msgstr ""
+"Link do resetowania hasła był nieprawidłowy, prawdopodobnie dlatego, że "
+"został już użyty. Poproś o <a href=\"%(passwd_reset_url)s\">zresetowanie "
+"nowego hasła</a>."
#: templates/account/password_reset_from_key.html:20
msgid "change password"
-msgstr ""
+msgstr "zmień hasło"
#: templates/account/password_reset_from_key.html:25
msgid "Your password is now changed."
-msgstr ""
+msgstr "Hasło zostało zmienione."
#: templates/account/password_set.html:12
msgid "Set Password"
-msgstr ""
+msgstr "Ustaw hasło"
#: templates/account/signup.html:6 templates/socialaccount/signup.html:6
msgid "Signup"
-msgstr ""
+msgstr "Rejestracja"
#: templates/account/signup.html:9 templates/account/signup.html:20
#: templates/socialaccount/signup.html:9 templates/socialaccount/signup.html:21
msgid "Sign Up"
-msgstr ""
+msgstr "Zarejestruj się"
#: templates/account/signup.html:11
#, python-format
msgid ""
"Already have an account? Then please <a href=\"%(login_url)s\">sign in</a>."
msgstr ""
+"Posiadasz już konto? W takim razie <a href=\"%(login_url)s\">zaloguj się</a>."
#: templates/django_mailman3/paginator/pagination.html:41
msgid "Jump to page:"
-msgstr ""
+msgstr "Przeskocz do strony:"
#: templates/django_mailman3/paginator/pagination.html:59
msgid "Results per page:"
-msgstr ""
+msgstr "Wyników na stronę:"
#: templates/django_mailman3/paginator/pagination.html:75
#: templates/django_mailman3/profile/profile.html:66
msgid "Update"
-msgstr ""
+msgstr "Aktualizuj"
#: templates/django_mailman3/profile/base.html:5
msgid "User Profile"
-msgstr ""
+msgstr "Profil użytkownika"
#: templates/django_mailman3/profile/base.html:12
msgid "User profile"
-msgstr ""
+msgstr "Profil użytkownika"
#: templates/django_mailman3/profile/base.html:12
msgid "for"
-msgstr ""
+msgstr "dla"
#: templates/django_mailman3/profile/base.html:24
#: templates/django_mailman3/profile/base.html:25
msgid "E-mail Addresses"
-msgstr ""
+msgstr "Adresy email"
#: templates/django_mailman3/profile/base.html:29
#: templates/django_mailman3/profile/base.html:30
msgid "Account Connections"
-msgstr ""
+msgstr "Połączenia konta"
#: templates/django_mailman3/profile/base.html:33
#: templates/django_mailman3/profile/base.html:34
#: templates/django_mailman3/profile/delete_profile.html:18
msgid "Delete Account"
-msgstr ""
+msgstr "Usuń konto"
#: templates/django_mailman3/profile/delete_profile.html:13
msgid ""
"Are you sure you want to delete your account? This will remove your account "
"along with all your subscriptions."
msgstr ""
+"Jesteś pewny, że chcesz usunąć konto? Usuniesz konto wraz ze wszystkimi "
+"swoimi subskrypcjami."
#: templates/django_mailman3/profile/profile.html:18
#: templates/django_mailman3/profile/profile.html:53
msgid "Edit on"
-msgstr ""
+msgstr "Edytuj"
#: templates/django_mailman3/profile/profile.html:25
msgid "Primary email:"
-msgstr ""
+msgstr "Główny email:"
#: templates/django_mailman3/profile/profile.html:31
msgid "Other emails:"
-msgstr ""
+msgstr "Inne emaile:"
#: templates/django_mailman3/profile/profile.html:37
msgid "(no other email)"
-msgstr ""
+msgstr "(brak innych email)"
#: templates/django_mailman3/profile/profile.html:42
msgid "Link another address"
-msgstr ""
+msgstr "Połącz inny adres"
#: templates/django_mailman3/profile/profile.html:49
msgid "Avatar:"
-msgstr ""
+msgstr "Awatar:"
#: templates/django_mailman3/profile/profile.html:58
msgid "Joined on:"
-msgstr ""
+msgstr "Dołączono:"
#: templates/django_mailman3/profile/profile.html:67
msgid "cancel"
-msgstr ""
+msgstr "anuluj"
#: templates/openid/login.html:10
msgid "OpenID Sign In"
-msgstr ""
+msgstr "Logowanie OpenID"
#: templates/socialaccount/connections.html:9
msgid ""
"You can sign in to your account using any of the following third party "
"accounts:"
-msgstr ""
+msgstr "Możesz się zalogować do swojego konta używając następujących kont:"
#: templates/socialaccount/connections.html:42
msgid ""
"You currently have no social network accounts connected to this account."
msgstr ""
+"Obecnie nie masz żadnych kont społecznościowych połączonych z tym kontem."
#: templates/socialaccount/connections.html:45
msgid "Add a 3rd Party Account"
-msgstr ""
+msgstr "Dodaj konto dodatkowe"
#: templates/socialaccount/signup.html:11
#, python-format
@@ -314,31 +336,33 @@
"You are about to use your %(provider_name)s account to login to\n"
"%(site_name)s. As a final step, please complete the following form:"
msgstr ""
+"Za chwilę użyjesz konta %(provider_name)s, aby się zalogować do\n"
+"%(site_name)s. W ostatnim kroku wypełnij następujący formularz:"
#: templatetags/pagination.py:43
msgid "Newer"
-msgstr ""
+msgstr "Nowsze"
#: templatetags/pagination.py:44
msgid "Older"
-msgstr ""
+msgstr "Starsze"
#: templatetags/pagination.py:46
msgid "Previous"
-msgstr ""
+msgstr "Poprzedni"
#: templatetags/pagination.py:47
msgid "Next"
-msgstr ""
+msgstr "Następny"
#: views/profile.py:73
msgid "The profile was successfully updated."
-msgstr ""
+msgstr "Profil został pomyślnie zaktualizowany."
#: views/profile.py:75
msgid "No change detected."
-msgstr ""
+msgstr "Nie wykryto zmian."
#: views/profile.py:108
msgid "Successfully deleted account"
-msgstr ""
+msgstr "Pomyślnie usunięto konto"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/locale/ru/LC_MESSAGES/django.po
new/django-mailman3-1.3.4/django_mailman3/locale/ru/LC_MESSAGES/django.po
---
old/django-mailman3-1.3.3rc1/django_mailman3/locale/ru/LC_MESSAGES/django.po
2020-05-10 01:19:33.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3/locale/ru/LC_MESSAGES/django.po
2020-06-05 19:02:23.000000000 +0200
@@ -8,18 +8,18 @@
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2019-06-22 10:59+0200\n"
-"PO-Revision-Date: 2020-04-13 16:21+0000\n"
-"Last-Translator: Вероника Заглотова <[email protected]>\n"
+"PO-Revision-Date: 2020-05-31 04:16+0000\n"
+"Last-Translator: Margo Radzivilava <[email protected]>\n"
"Language-Team: Russian <https://hosted.weblate.org/projects/gnu-mailman/"
"django-mailman3/ru/>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
-"n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
-"(n%100>=11 && n%100<=14)? 2 : 3);\n"
-"X-Generator: Weblate 4.0-dev\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n"
+"%100>=11 && n%100<=14)? 2 : 3);\n"
+"X-Generator: Weblate 4.1-dev\n"
#: forms.py:43
msgid "A user with that username already exists."
@@ -291,7 +291,7 @@
#: templates/django_mailman3/profile/profile.html:67
msgid "cancel"
-msgstr "Отмена"
+msgstr "отмена"
#: templates/openid/login.html:10
msgid "OpenID Sign In"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/tests/test_mailman.py
new/django-mailman3-1.3.4/django_mailman3/tests/test_mailman.py
--- old/django-mailman3-1.3.3rc1/django_mailman3/tests/test_mailman.py
2020-05-10 01:19:33.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3/tests/test_mailman.py
2020-06-05 22:07:12.000000000 +0200
@@ -23,6 +23,7 @@
from urllib.error import HTTPError
from django.contrib.auth.models import User
+from django.core.cache import cache
from django.db import IntegrityError
from allauth.account.models import EmailAddress
@@ -80,6 +81,32 @@
mm_user_id = mailman.get_mailman_user_id(self.user)
self.assertEqual(mm_user_id, "dummy")
+ def test_bad_cached_user_id(self):
+ # Test that we lookup a user via email if the cached user_id is invalid
+ # and doesn't return a valid user.
+ new_mm_user = Mock()
+ new_mm_user.user_id = "dummy3"
+
+ def side_effect(user_id):
+ if user_id == '4':
+ raise HTTPError(
+ url='', code=404, msg='No user with id 4',
+ hdrs=None, fp=None)
+ elif user_id == '[email protected]':
+ return new_mm_user
+ return None
+
+ self.mailman_client.get_user.side_effect = side_effect
+ # Now, also set integer user_id 4 in the cache.
+ cache.set("User:{0}:mailman_user_id".format(self.user.id), '4', None)
+
+ mm_user = mailman.get_mailman_user(self.user)
+ self.assertIsNotNone(mm_user)
+ self.assertEqual(mm_user, new_mm_user)
+
+ expected = [call('4'), call('[email protected]')]
+ self.mailman_client.get_user.call_args_list == expected
+
class AddUserToMailmanTestCase(TestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/tests/test_scrub.py
new/django-mailman3-1.3.4/django_mailman3/tests/test_scrub.py
--- old/django-mailman3-1.3.3rc1/django_mailman3/tests/test_scrub.py
2019-03-27 07:08:58.000000000 +0100
+++ new/django-mailman3-1.3.4/django_mailman3/tests/test_scrub.py
2020-06-05 19:02:23.000000000 +0200
@@ -129,9 +129,9 @@
scrubber = Scrubber(msg)
contents = scrubber.scrub()[0]
self.assertTrue(isinstance(contents, str))
- self.assertEqual(contents,
- 'This message contains non-ascii characters:\n\xe9 \xe8 \xe7
\xe0 \xee \xef \xeb \u20ac\n' # noqa
- )
+ self.assertEqual(
+ contents,
+ 'This message contains non-ascii characters:\n\xe9 \xe8 \xe7
\xe0 \xee \xef \xeb \u20ac\n') # noqa: E501
def test_non_ascii_payload_utf8(self):
"""Scrubber must handle non-ascii messages"""
@@ -154,6 +154,19 @@
self.fail(e) # codec not found
self.assertTrue(isinstance(contents, str))
+ def test_bad_charset_html(self):
+ """Scrubber must handle unknown charsets in html parts too."""
+ with open(get_test_file("bad_charset.txt")) as email_file:
+ msg = message_from_file(email_file, policy=policy.SMTP)
+ scrubber = Scrubber(msg)
+ try:
+ contents = scrubber.scrub()[0]
+ except LookupError as e:
+ import traceback
+ print(traceback.format_exc())
+ self.fail(e) # codec not found
+ self.assertTrue(isinstance(contents, str))
+
def test_attachment_4(self):
with open(get_test_file("attachment-4.txt")) as email_file:
msg = message_from_file(email_file, policy=policy.SMTP)
@@ -195,6 +208,19 @@
'accented letters : \xe9 \xe8 \xe7 \xe0.\nAnd an '
'attachment with an accented filename\n\n\n\n\n\n')
+ def test_attachedMmessage_rfc822(self):
+ with open(get_test_file("attached_message.txt")) as email_file:
+ msg = message_from_file(email_file, policy=policy.SMTP)
+ scrubber = Scrubber(msg)
+ contents, attachments = scrubber.scrub()
+ self.assertEqual(len(attachments), 1)
+ self.assertEqual(
+ attachments[0][0:4],
+ (2, "Moderation.eml", "message/rfc822", None))
+ self.assertEqual(len(attachments[0][4]), 462)
+ self.assertEqual(contents, 'See the attached.\n\n\n')
+ self.assertIn('Message-ID: <1d3c4594-1268', attachments[0][4])
+
def test_attachment_name_badly_encoded(self):
with open(get_test_file("email-bad-filename.txt"), 'rb') as email_file:
msg = message_from_binary_file(email_file, policy=policy.SMTP)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/tests/testdata/attached_message.txt
new/django-mailman3-1.3.4/django_mailman3/tests/testdata/attached_message.txt
---
old/django-mailman3-1.3.3rc1/django_mailman3/tests/testdata/attached_message.txt
1970-01-01 01:00:00.000000000 +0100
+++
new/django-mailman3-1.3.4/django_mailman3/tests/testdata/attached_message.txt
2020-06-05 19:02:23.000000000 +0200
@@ -0,0 +1,38 @@
+Subject: Fwd: [MM3-users] Emergency Moderation
+To: [email protected]
+From: Mark Sapiro <[email protected]>
+Message-ID: <[email protected]>
+Date: Thu, 21 May 2020 17:20:31 -0700
+MIME-Version: 1.0
+Content-Type: multipart/mixed;
+ boundary="------------9FF0FA65F7F9D51E428470D4"
+
+This is a multi-part message in MIME format.
+--------------9FF0FA65F7F9D51E428470D4
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 7bit
+
+See the attached.
+
+--------------9FF0FA65F7F9D51E428470D4
+Content-Type: message/rfc822;
+ name="Moderation.eml"
+Content-Transfer-Encoding: 7bit
+Content-Disposition: attachment;
+ filename="Moderation.eml"
+
+Subject: Re: [MM3-users] Emergency Moderation
+To: [email protected]
+From: Mark Sapiro <[email protected]>
+Message-ID: <[email protected]>
+Date: Thu, 21 May 2020 15:30:10 -0700
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 7bit
+
+It's in core and it's just recently been exposed in REST
+https://gitlab.com/mailman/mailman/-/merge_requests/643 but it's not in
+Postorius yet.
+
+--------------9FF0FA65F7F9D51E428470D4--
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3/tests/testdata/bad_charset.txt
new/django-mailman3-1.3.4/django_mailman3/tests/testdata/bad_charset.txt
--- old/django-mailman3-1.3.3rc1/django_mailman3/tests/testdata/bad_charset.txt
1970-01-01 01:00:00.000000000 +0100
+++ new/django-mailman3-1.3.4/django_mailman3/tests/testdata/bad_charset.txt
2020-06-05 19:02:23.000000000 +0200
@@ -0,0 +1,10 @@
+MIME-Version: 1.0
+From: Web AWS Services <[email protected]>
+Subject: Resolved ID 90165632
+To: [email protected]
+Content-Transfer-Encoding: base64
+Content-Type: text/html; charset="UTF-8-Base64"
+Date: Thu, 21 May 2020 06:50:04 +0300
+Message-Id: <[email protected]>
+
+U29tZSBjb250ZW50IGZvciB0aGUgdGVzdC4K
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/PKG-INFO
new/django-mailman3-1.3.4/django_mailman3.egg-info/PKG-INFO
--- old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/PKG-INFO
2020-05-10 02:21:24.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3.egg-info/PKG-INFO 2020-06-05
22:21:52.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: django-mailman3
-Version: 1.3.3rc1
+Version: 1.3.4
Summary: Django library to help interaction with Mailman
Home-page: https://gitlab.com/mailman/django-mailman3
Maintainer: Mailman Developers
@@ -20,14 +20,24 @@
NEWS
====
- 1.3.3rc1 (2020-05-09)
- ---------------------
+ 1.3.4 (2020-06-05)
+ ------------------
+ * Fix a bug caused by bumping to Mailman API 3.1 in version 1.3.3 which
+ resulted in 404 errors for some users. (Closes #35)
+
+
+ 1.3.3 (2020-06-01)
+ ------------------
- Hide "Account Connections" tab in accounts if no social account
providers are
installed. (See !54)
- Use bold font for form labels (See !82)
- Update a user's preferred_address in Mailman Core when a user
updates their
primary address in Profile. (Closes #32)
+ - Use Mailman's API version 3.1 to get Hex UUIDs instead of integer.
+ - Caught a LookupError when scrubbing an attachment with an unknown
charset.
+ (Closes #12)
+ - Properly scrub the content of message/rfc822 parts. (Closes #34)
License
=======
@@ -35,7 +45,7 @@
Django-mailman is licensed under the
`GPL v3.0 <http://www.gnu.org/licenses/gpl-3.0.html>`_
- Copyright (C) 2017-2019 by the Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 by the Free Software Foundation, Inc.
Keywords: mailman django
Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/SOURCES.txt
new/django-mailman3-1.3.4/django_mailman3.egg-info/SOURCES.txt
--- old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/SOURCES.txt
2020-05-10 02:21:24.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3.egg-info/SOURCES.txt
2020-06-05 22:21:52.000000000 +0200
@@ -198,11 +198,13 @@
django_mailman3/tests/test_view_profile.py
django_mailman3/tests/urls_test.py
django_mailman3/tests/utils.py
+django_mailman3/tests/testdata/attached_message.txt
django_mailman3/tests/testdata/attachment-1.txt
django_mailman3/tests/testdata/attachment-2.txt
django_mailman3/tests/testdata/attachment-3.txt
django_mailman3/tests/testdata/attachment-4.txt
django_mailman3/tests/testdata/attachment-5.txt
+django_mailman3/tests/testdata/bad_charset.txt
django_mailman3/tests/testdata/email-bad-filename.txt
django_mailman3/tests/testdata/html-email-1.txt
django_mailman3/tests/testdata/html-email-2.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/requires.txt
new/django-mailman3-1.3.4/django_mailman3.egg-info/requires.txt
--- old/django-mailman3-1.3.3rc1/django_mailman3.egg-info/requires.txt
2020-05-10 02:21:24.000000000 +0200
+++ new/django-mailman3-1.3.4/django_mailman3.egg-info/requires.txt
2020-06-05 22:21:52.000000000 +0200
@@ -1,5 +1,5 @@
Django<3.1,>=1.11
-mailmanclient>=3.3.1rc1
+mailmanclient>=3.3.1
django-allauth
django-gravatar2>=1.0.6
pytz
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/django-mailman3-1.3.3rc1/setup.py
new/django-mailman3-1.3.4/setup.py
--- old/django-mailman3-1.3.3rc1/setup.py 2020-05-10 02:20:30.000000000
+0200
+++ new/django-mailman3-1.3.4/setup.py 2020-06-05 19:02:23.000000000 +0200
@@ -20,7 +20,7 @@
setup(
name="django-mailman3",
- version='1.3.3rc1',
+ version="1.3.4",
description="Django library to help interaction with Mailman",
long_description=open('README.rst').read(),
maintainer="Mailman Developers",
@@ -39,7 +39,7 @@
include_package_data=True,
install_requires=[
'Django>=1.11,<3.1',
- 'mailmanclient>=3.3.1rc1',
+ 'mailmanclient>=3.3.1',
'django-allauth',
'django-gravatar2 >= 1.0.6',
'pytz'