Ticket #13: spelling.patch

File spelling.patch, 5.4 kB (added by fs, 1 year ago)
  • turbomail/pool.py

     
    1515 
    1616 
    1717class Pool(Thread): 
    18         """A threadpool which checks regularily for new jobs and spawns processes 
     18        """A thread pool which checks regularly for new jobs and spawns processes 
    1919        as needed. 
    2020         
    2121        Do not use this class directly.  Always subclass and override the worker 
     
    2323        """ 
    2424         
    2525        def __init__(self, interval=10, threads=4, jobs=10, timeout=60, polling=False, **kw): 
    26                 """Initialize the threadpool. 
     26                """Initialize the thread pool. 
    2727                 
    2828                @param interval: A delay, in seconds, between spawn runs. 
    2929                @type interval: int 
     
    7171                 
    7272                @param block: Block code execution until there is a free slot in 
    7373                              the queue.  If I{block} is True and I{timeout} is 
    74                               None, block indefinately. 
     74                              None, block indefinitely. 
    7575                @type block: bool 
    7676                 
    7777                @param timeout: How long to block execution (in seconds).  If 
     
    146146 
    147147        def worker(self): 
    148148                """This method must be overridden in a subclass and is used to 
    149                 perform the work of the threadpool. 
     149                perform the work of the thread pool. 
    150150                 
    151151                Will raise a NotImplementedError exception if not subclassed.""" 
    152152                 
     
    154154 
    155155 
    156156class MailPool(Pool): 
    157         """Mail delivery threadpool. 
     157        """Mail delivery thread pool. 
    158158         
    159159        This class delivers messages from a queue using the Dispatch class. 
    160160 
  • turbomail/__init__.py

     
    2222         
    2323                Throughput using the default options is sufficient for most use: 
    2424                100 messages in 45 seconds; just over 2 messages a second. Using 
    25                 a greater number of threads, 10 vs. 4, 100 messags take 30 
     25                a greater number of threads, 10 vs. 4, 100 messages take 30 
    2626                seconds; just over 3 messages a second.  YMMV.  Note that if a 
    2727                thread is idle, it will immediately deliver requests added to 
    2828                the queue, thus increasing the idle time will increase sparse 
     
    8181                   thread. 
    8282                 - I{mail.timeout} (Default: B{60}) Maximum time a worker thread 
    8383                   will wait for additional jobs, in seconds. 
    84                  - I{mail.tls} (Defalut: None) Enable or disable TLS, None will 
     84                 - I{mail.tls} (Default: None) Enable or disable TLS, None will 
    8585                   attempt to auto-detect TLS.  This will not always work. 
    8686                 - I{mail.encoding} (Default: B{'us-ascii'}) Set the character 
    8787                   set and encoding on the MIMEText parts of the message. 
     
    9494                   by TurboMail, and will override the global defaults: 
    9595                    - utf-8-qp - I{Sets utf-8 to use quoted-printable encoding.} 
    9696                   Headers are not encoded.  DIY. 
    97                  - I{mail.polling} (Defaut: B{False}) If enabled, configures the 
     97                 - I{mail.polling} (Default: B{False}) If enabled, configures the 
    9898                   thread pool to poll every I{mail.interval} seconds for new 
    9999                   jobs.  This may give performance benefits to the running 
    100100                   application.  The default behaviour is to create new threads 
     
    137137======================== 
    138138 
    139139        Additionally, you can configure your application to log TurboMail 
    140         events differently, in a more loggable and machine parsable way. 
     140        events differently, in a more loggable and machine parseable way. 
    141141        You do so by adding the following lines to the formatters section 
    142142        of your log.cfg:: 
    143143         
  • turbomail/dispatch.py

     
    4545                                 I{Optional.} 
    4646                @type username: string 
    4747                 
    48                 @param password: The password to use during authentaction. 
     48                @param password: The password to use during authentication. 
    4949                         I{Optional.} 
    5050                @type password: string 
    5151                 
     
    7777                """Connect to the SMTP server if not already connected. 
    7878                 
    7979                This process also automatically enables TLS, if available, and 
    80                 authenticates against the username and password previousally 
     80                authenticates against the username and password previously 
    8181                provided. 
    8282                """ 
    8383                 
     
    118118                connect, if needed, and will also automatically disconnect if 
    119119                debug mode has been enabled. 
    120120                 
    121                 @param message: This paramater must be a callable which returns 
     121                @param message: This parameter must be a callable which returns 
    122122                                a tuple of (from, to, message), where all three 
    123123                                are strings, and message is valid content for an 
    124124                                e-mail message. 
  • turbomail/message.py

     
    221221        def _process(self): 
    222222                """Produce the final MIME message. 
    223223                 
    224                 Additinoally, if only a rich text part exits, strip the HTML to 
     224                Additionally, if only a rich text part exits, strip the HTML to 
    225225                produce the plain text part.  (This produces identical output as 
    226226                KID, although lacks reverse entity conversion -- &, etc.) 
    227227                """ 
     
    388388        """ 
    389389         
    390390        def __init__(self, sender, recipient, subject, template, variables={}, **kw): 
    391                 """Store the additonal template and variable information. 
     391                """Store the additional template and variable information. 
    392392                 
    393393                @param template: A dot-path to a valid KID template. 
    394394                @type template: string