l.s.m.packageupload : module documentation

Part of lp.soyuz.mail

No module docstring
Class AnnouncementStubPerson Marker class for sending announcements to distroseries changes lists.
Class PackageUploadRecipientReason No class docstring; 0/5 class methods, 1/2 methods documented
Function debug Shorthand debug notation.
Function sanitize_string Make sure string does not trigger 'ascii' codec errors.
Function add_recipient Undocumented
Function fetch_information Undocumented
Function addr_to_person Return an IPerson given a name and email address.
Function is_valid_uploader Is person an uploader for distribution?
Function is_auto_sync_upload Return True if this is a (Debian) auto sync upload.
Function calculate_subject Return the email subject for the notification.
Function build_uploaded_files_list Generate a list of tuples of (filename, component, section).
Function build_summary Build a summary string based on the files present in the upload.
Class PackageUploadMailer No class docstring; 0/2 class methods, 7/8 methods documented
def debug(logger, msg, *args, **kwargs):
Shorthand debug notation.
def sanitize_string(s):

Make sure string does not trigger 'ascii' codec errors.

Convert string to unicode if needed so that characters outside the (7-bit) ASCII range do not cause errors like these:

'ascii' codec can't decode byte 0xc4 in position 21: ordinal not in range(128)
def add_recipient(recipients, person, reason_factory, logger=None):
Undocumented
def fetch_information(spr, bprs, changes, previous_version=None):
Undocumented
def addr_to_person(addr):
Return an IPerson given a name and email address.
Parametersaddr(name, email) tuple. The name is ignored.
ReturnsIPerson with the given email address. None if there isn't one, or if addr is None.
def is_valid_uploader(person, distribution):
Is person an uploader for distribution?

A None person is not an uploader.

def is_auto_sync_upload(spr, bprs, pocket, changed_by):
Return True if this is a (Debian) auto sync upload.

Sync uploads are source-only, unsigned and not targeted to the security pocket. The Changed-By field is also the Katie user (archive@ubuntu.com).

def calculate_subject(spr, bprs, customfiles, archive, distroseries, pocket, action, changesfile_object=None):
Return the email subject for the notification.
def build_uploaded_files_list(spr, builds, customfiles, logger):
Generate a list of tuples of (filename, component, section).

Component and section are only set where the file is a source upload. If an empty list is returned, it means there are no files.

def build_summary(spr, files, action):
Build a summary string based on the files present in the upload.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.