[Launchpad-reviewers] [Merge] lp:~cjwatson/lpbuildbot/py3-only into lp:lpbuildbot

2021-08-02 Thread noreply
The proposal to merge lp:~cjwatson/lpbuildbot/py3-only into lp:lpbuildbot has 
been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~cjwatson/lpbuildbot/py3-only/+merge/406469
-- 
Your team Launchpad code reviewers is subscribed to branch lp:lpbuildbot.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Launchpad-reviewers] [Merge] lp:~cjwatson/lpbuildbot/py3-only into lp:lpbuildbot

2021-08-02 Thread Cristian Gonzalez
Review: Approve

Looks good!
-- 
https://code.launchpad.net/~cjwatson/lpbuildbot/py3-only/+merge/406469
Your team Launchpad code reviewers is subscribed to branch lp:lpbuildbot.


___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp


[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:dmarc-for-merges-and-code into launchpad:master

2021-08-02 Thread Colin Watson
Colin Watson has proposed merging ~cjwatson/launchpad:dmarc-for-merges-and-code 
into launchpad:master.

Commit message:
Use DMARC-compliant From addresses in code review emails

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1879740 in Launchpad itself: "Make Launchpad Code Review / Merge Review 
/ Code Notices DMARC Compliant"
  https://bugs.launchpad.net/launchpad/+bug/1879740

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406528

Most of this work is by Thomas Ward; I just tidied a few things up and fixed 
the tests.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:dmarc-for-merges-and-code into launchpad:master.
diff --git a/lib/lp/code/doc/branch-merge-proposal-notifications.txt b/lib/lp/code/doc/branch-merge-proposal-notifications.txt
index 70d15f0..e7134c2 100644
--- a/lib/lp/code/doc/branch-merge-proposal-notifications.txt
+++ b/lib/lp/code/doc/branch-merge-proposal-notifications.txt
@@ -129,7 +129,7 @@ An email is sent to subscribers of either branch and the default reviewer.
 
 >>> notification = notifications[0]
 >>> print(notification['From'])
-Eric 
+Eric 
 >>> print(notification['Subject'])
 [Merge] lp://dev/~person-name... into lp://dev/~person-name...
 >>> print(notification['X-Launchpad-Project'])
diff --git a/lib/lp/code/doc/codereviewcomment.txt b/lib/lp/code/doc/codereviewcomment.txt
index 8023afd..263f73e 100644
--- a/lib/lp/code/doc/codereviewcomment.txt
+++ b/lib/lp/code/doc/codereviewcomment.txt
@@ -86,7 +86,7 @@ Now run the pending job to send the email.
 >>> notifications = [email for email in notifications if
 ...  email['X-Launchpad-Message-Rationale'] == 'Owner']
 >>> print_emails(include_reply_to=True, notifications=notifications)
-From: Sender Person 
+From: Sender Person 
 To: ...
 Reply-To: mp+...@code.launchpad.test
 Subject: Please merge
diff --git a/lib/lp/code/mail/branchmergeproposal.py b/lib/lp/code/mail/branchmergeproposal.py
index 9566ae8..d876ad5 100644
--- a/lib/lp/code/mail/branchmergeproposal.py
+++ b/lib/lp/code/mail/branchmergeproposal.py
@@ -8,9 +8,9 @@ __metaclass__ = type
 
 from lp.code.enums import CodeReviewNotificationLevel
 from lp.code.mail.branch import BranchMailer
-from lp.services.config import config
 from lp.services.mail.basemailer import BaseMailer
 from lp.services.mail.sendmail import (
+format_address,
 format_address_for_person,
 get_msgid,
 )
@@ -52,9 +52,8 @@ class BMPMailer(BranchMailer):
 recipients = merge_proposal.getNotificationRecipients(
 CodeReviewNotificationLevel.STATUS)
 
-assert from_user.preferredemail is not None, (
-'The sender must have an email address.')
-from_address = format_address_for_person(from_user)
+from_address = format_address(
+from_user.display_name, merge_proposal.address)
 
 return cls(
 '%(proposal_title)s',
@@ -74,11 +73,10 @@ class BMPMailer(BranchMailer):
 recipients = merge_proposal.getNotificationRecipients(
 CodeReviewNotificationLevel.STATUS)
 if from_user is not None:
-assert from_user.preferredemail is not None, (
-'The sender must have an email address.')
-from_address = format_address_for_person(from_user)
+from_address = format_address(
+from_user.display_name, merge_proposal.address)
 else:
-from_address = config.canonical.noreply_from_address
+from_address = merge_proposal.address
 return cls(
 '%(proposal_title)s',
 'branch-merge-proposal-updated.txt', recipients,
@@ -88,7 +86,8 @@ class BMPMailer(BranchMailer):
 @classmethod
 def forReviewRequest(cls, reason, merge_proposal, from_user):
 """Return a mailer for a request to review a BranchMergeProposal."""
-from_address = format_address_for_person(from_user)
+from_address = format_address(
+from_user.display_name, merge_proposal.address)
 recipients = {reason.subscriber: reason}
 return cls(
 '%(proposal_title)s',
diff --git a/lib/lp/code/mail/codereviewcomment.py b/lib/lp/code/mail/codereviewcomment.py
index 0a885d2..f9e882f 100644
--- a/lib/lp/code/mail/codereviewcomment.py
+++ b/lib/lp/code/mail/codereviewcomment.py
@@ -44,7 +44,8 @@ class CodeReviewCommentMailer(BMPMailer):
 self.message = code_review_comment.message
 from_person = self.message.owner
 from_address = format_address(
-from_person.displayname, from_person.preferredemail.email)
+from_person.display_name,
+code_review_comment.branch_merge_proposal.address)
 merge_proposal = code_review_comment.branch_merge_proposal
 BMPMailer.__init__(
 

[Launchpad-reviewers] [Merge] ~cjwatson/launchpad:setup-no-pip-build-env into launchpad:master

2021-08-02 Thread Colin Watson
Colin Watson has proposed merging ~cjwatson/launchpad:setup-no-pip-build-env 
into launchpad:master.

Commit message:
setup.py: Filter out pip-build-env-* directories from system paths

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/406527

I've occasionally seen pip-build-env-* directories leaking into `sys.path` at 
the point when Launchpad's setup.py is run, which results in picking up 
fragments of `sitecustomize.py` which then refer to directories that no longer 
exist after `pip` exits, resulting in a broken installation.  It's not 
completely clear to me why this happens, but it's very confusing when it does, 
so filter those out.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of 
~cjwatson/launchpad:setup-no-pip-build-env into launchpad:master.
diff --git a/setup.py b/setup.py
index 874a893..aee5410 100644
--- a/setup.py
+++ b/setup.py
@@ -66,7 +66,8 @@ class lp_develop(develop):
 def _get_orig_sitecustomize(self):
 env_top = os.path.join(os.path.dirname(__file__), "env")
 system_paths = [
-path for path in sys.path if not path.startswith(env_top)]
+path for path in sys.path
+if not path.startswith(env_top) and "pip-build-env-" not in path]
 try:
 fp, orig_sitecustomize_path, _ = (
 imp.find_module("sitecustomize", system_paths))
___
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : launchpad-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp