You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@incubator.apache.org by jm...@apache.org on 2022/11/18 04:54:00 UTC
svn commit: r1905370 - in /incubator/public/trunk: report_email.py report_reminders.py report_who.py
Author: jmclean
Date: Fri Nov 18 04:54:00 2022
New Revision: 1905370
URL: http://svn.apache.org/viewvc?rev=1905370&view=rev
Log:
converted to use Python3
Modified:
incubator/public/trunk/report_email.py
incubator/public/trunk/report_reminders.py
incubator/public/trunk/report_who.py
Modified: incubator/public/trunk/report_email.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/report_email.py?rev=1905370&r1=1905369&r2=1905370&view=diff
==============================================================================
--- incubator/public/trunk/report_email.py (original)
+++ incubator/public/trunk/report_email.py Fri Nov 18 04:54:00 2022
@@ -33,15 +33,15 @@ def findWednesday(d, weeks):
days_ahead += (weeks - 1) * 7 #we're on or after wednesday, give less time
return d + datetime.timedelta(days_ahead)
-fp = open('email_monthly_template.txt', 'rb')
+fp = open('email_monthly_template.txt', 'r')
messageBody = fp.read()
fp.close()
with open('content/shepherd_assignments.json') as data_file:
data = json.load(data_file)
-month = raw_input('Enter month, in the format of YYYY-MM: ')
-username = raw_input('Enter your ASF Username: ')
+month = input('Enter month, in the format of YYYY-MM: ')
+username = input('Enter your ASF Username: ')
password = getpass.getpass('Enter your ASF pw: ')
podlingsToReport = data[month].keys()
@@ -62,8 +62,8 @@ wikiPage = thisMonth.strftime("%B%Y")
dueDateFormat = podlingReportsDue.strftime("%a, %B %d")
boardMeetingFormat = boardMeeting.strftime("%a, %d %B %Y")
-print dueDateFormat
-print boardMeetingFormat
+print(dueDateFormat)
+print(boardMeetingFormat)
dates = (
podlingReportsDue.strftime("%a %B %d") + " - Podling reports due by end of day\n" +
@@ -82,7 +82,7 @@ emailBodyString = messageBody.format(dat
s = SMTP('mail-relay.apache.org')
s.login(username, password)
-print "connected"
+print("connected")
mailTo = "general@incubator.apache.org"
msgId = email.utils.make_msgid()
msg = MIMEText(emailBodyString)
Modified: incubator/public/trunk/report_reminders.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/report_reminders.py?rev=1905370&r1=1905369&r2=1905370&view=diff
==============================================================================
--- incubator/public/trunk/report_reminders.py (original)
+++ incubator/public/trunk/report_reminders.py Fri Nov 18 04:54:00 2022
@@ -32,7 +32,7 @@ def findWednesday(d, weeks):
days_ahead += (weeks - 1) * 7 #we're on or after wednesday, give less time
return d + datetime.timedelta(days_ahead)
-fp = open('email_reminder_template.txt', 'rb')
+fp = open('email_reminder_template.txt', 'r')
messageBody = fp.read()
fp.close()
@@ -40,8 +40,8 @@ with open('content/shepherd_assignments.
data = json.load(data_file)
-month = raw_input('Enter month, in the format of YYYY-MM: ')
-username = raw_input('Enter your ASF Username: ')
+month = input('Enter month, in the format of YYYY-MM: ')
+username = input('Enter your ASF Username: ')
password = getpass.getpass('Enter your ASF pw: ')
podlingsToReport = data[month].keys()
@@ -72,14 +72,14 @@ wikiPage = thisMonth.strftime("%B%Y")
dueDateFormat = podlingReportsDue.strftime("%a, %B %d")
boardMeetingFormat = boardMeeting.strftime("%a, %d %B %Y")
-print dueDateFormat
-print boardMeetingFormat
+print(dueDateFormat)
+print(boardMeetingFormat)
emailBodyString = messageBody.format(boardMeetingFormat, dueDateFormat, wikiPage)
s = SMTP('mail-relay.apache.org')
s.login(username, password)
-print "connected"
+print("connected")
for podling in podlingsToReport:
if podling in overrides:
emailTo = overrides[podling]
Modified: incubator/public/trunk/report_who.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/report_who.py?rev=1905370&r1=1905369&r2=1905370&view=diff
==============================================================================
--- incubator/public/trunk/report_who.py (original)
+++ incubator/public/trunk/report_who.py Fri Nov 18 04:54:00 2022
@@ -31,7 +31,7 @@ def findWednesday(d, weeks):
with open('content/shepherd_assignments.json') as data_file:
data = json.load(data_file)
-month = raw_input('Enter month, in the format of YYYY-MM: ')
+month = input('Enter month, in the format of YYYY-MM: ')
podlingsToReport = data[month].keys()
@@ -42,8 +42,8 @@ boardMeeting = findWednesday(thisMonth,
dueDateFormat = podlingReportsDue.strftime("%a, %B %d")
boardMeetingFormat = boardMeeting.strftime("%a, %d %B %Y")
-print dueDateFormat
-print boardMeetingFormat
+print(dueDateFormat)
+print(boardMeetingFormat)
for podling in podlingsToReport:
- print podling
+ print(podling)
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org