Skip to content

Commit

Permalink
Merge 0f82454 into bdf50a2
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeTux committed Aug 5, 2020
2 parents bdf50a2 + 0f82454 commit 1db15b1
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 27 deletions.
6 changes: 3 additions & 3 deletions HISTORY.rst
Expand Up @@ -131,7 +131,7 @@ Version: 1.4.0 - Date: 2014-06-03
- #293: project was migrated from Google Code to Github. Code was migrated from
SVN to GIT.
- #294: use tox to automate testing on multiple python versions.
- #295: use travis-ci for continuos test integration.
- #295: use travis-ci for continuous test integration.
- #298: pysendfile and PyOpenSSL are now listed as extra deps in setup.py.

**Bug fixes**
Expand Down Expand Up @@ -422,7 +422,7 @@ Version: 0.7.0 - Date: 2012-01-25
often). Some benchmarks:
schedule: +0.5x,
reschedule: +1.7x,
cancel: +477x (with 1 milion scheduled functions),
cancel: +477x (with 1 million scheduled functions),
run: +8x
Also, a single scheduled function now consumes 1/3 of the memory thanks
to ``__slots__`` usage.
Expand Down Expand Up @@ -802,7 +802,7 @@ Version: 0.2.0 - Date: 2007-09-17

**Major enhancements**

- #5: it is now possible to set a maximum number of connecions and a maximum
- #5: it is now possible to set a maximum number of connections and a maximum
number of connections from the same IP address.
- #36: added support for FXP site-to-site transfer.
- #39: added NAT/Firewall support with PASV (passive) mode connections.
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -84,7 +84,7 @@ Features
Performances
============

Despite being written in an intepreted language, pyftpdlib has transfer rates
Despite being written in an interpreted language, pyftpdlib has transfer rates
superior to most common UNIX FTP servers. It also scales better since whereas
vsftpd and proftpd use multiple processes to achieve concurrency, pyftpdlib
will only use one process and handle concurrency asynchronously (see
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/__main__.py
Expand Up @@ -56,7 +56,7 @@ def main():
help="the range of TCP ports to use for passive "
"connections (e.g. -r 8000-9000)")
parser.add_option('-D', '--debug', action='store_true',
help="enable DEBUG logging evel")
help="enable DEBUG logging level")
parser.add_option('-v', '--version', action='store_true',
help="print pyftpdlib version and exit")
parser.add_option('-V', '--verbose', action='store_true',
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/filesystems.py
Expand Up @@ -387,7 +387,7 @@ def get_user_by_uid(self, uid):

if grp is not None:
def get_group_by_gid(self, gid):
"""Return the groupname associated with group id.
"""Return the group name associated with group id.
If this can't be determined return raw gid instead.
On Windows just return "group".
"""
Expand Down
22 changes: 11 additions & 11 deletions pyftpdlib/handlers.py
Expand Up @@ -294,7 +294,7 @@ def __init__(self, cmd_channel, extmode=False):
"""Initialize the passive data server.
- (instance) cmd_channel: the command channel class instance.
- (bool) extmode: wheter use extended passive mode response type.
- (bool) extmode: whether use extended passive mode response type.
"""
self.cmd_channel = cmd_channel
self.log = cmd_channel.log
Expand Down Expand Up @@ -445,7 +445,7 @@ class ActiveDTP(Connector):
timeout = 30

def __init__(self, ip, port, cmd_channel):
"""Initialize the active data channel attemping to connect
"""Initialize the active data channel attempting to connect
to remote data socket.
- (str) ip: the remote IP address.
Expand Down Expand Up @@ -822,7 +822,7 @@ def writable(self):
return not self.receive and asynchat.async_chat.writable(self)

def handle_timeout(self):
"""Called cyclically to check if data trasfer is stalling with
"""Called cyclically to check if data transfer is stalling with
no progress in which case the client is kicked off.
"""
if self.get_transmitted_bytes() > self._lastdata:
Expand Down Expand Up @@ -1660,12 +1660,12 @@ def on_logout(self, username):
"""

def on_file_sent(self, file):
"""Called every time a file has been succesfully sent.
"""Called every time a file has been successfully sent.
"file" is the absolute name of the file just being sent.
"""

def on_file_received(self, file):
"""Called every time a file has been succesfully received.
"""Called every time a file has been successfully received.
"file" is the absolute name of the file just being received.
"""

Expand Down Expand Up @@ -1837,15 +1837,15 @@ def log(self, msg, logfun=logger.info):
logfun("%s %s" % (prefix, msg))

def logline(self, msg, logfun=logger.debug):
"""Log a line including additional indentifying session data.
"""Log a line including additional identifying session data.
By default this is disabled unless logging level == DEBUG.
"""
if self._log_debug:
prefix = self.log_prefix % self.__dict__
logfun("%s %s" % (prefix, msg))

def logerror(self, msg):
"""Log an error including additional indentifying session data."""
"""Log an error including additional identifying session data."""
prefix = self.log_prefix % self.__dict__
logger.error("%s %s" % (prefix, msg))

Expand Down Expand Up @@ -1899,7 +1899,7 @@ def log_transfer(self, cmd, filename, receive, completed, elapsed, bytes):
"""Log all file transfers in a standardized format.
- (str) cmd:
the original command who caused the tranfer.
the original command who caused the transfer.
- (str) filename:
the absolutized name of the file on disk.
Expand Down Expand Up @@ -2085,7 +2085,7 @@ def ftp_EPSV(self, line):
# and choose to use IPv6 for the data channel.
# But how could we use IPv6 on the data channel without knowing
# which IPv6 address to use for binding the socket?
# Unfortunately RFC-2428 does not provide satisfing information
# Unfortunately RFC-2428 does not provide satisfying information
# on how to do that. The assumption is that we don't have any way
# to know wich address to use, hence we just use the same address
# family used on the control connection.
Expand Down Expand Up @@ -3005,7 +3005,7 @@ def ftp_OPTS(self, line):

def ftp_NOOP(self, line):
"""Do nothing."""
self.respond("200 I successfully done nothin'.")
self.respond("200 I successfully did nothing'.")

def ftp_SYST(self, line):
"""Return system type (always returns UNIX type: L8)."""
Expand Down Expand Up @@ -3501,7 +3501,7 @@ class TLS_FTPHandler(SSLConnection, FTPHandler):
specific OpenSSL options. These default to:
SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3| SSL.OP_NO_COMPRESSION
which are all considered insecure features.
Can be set to None in order to improve compatibilty with
Can be set to None in order to improve compatibility with
older (insecure) FTP clients.
- (instance) ssl_context:
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/ioloop.py
Expand Up @@ -926,7 +926,7 @@ def initiate_send(self):
asynchat.async_chat.initiate_send(self)
if not self._closed:
# if there's still data to send we want to be ready
# for writing, else we're only intereseted in reading
# for writing, else we're only interested in reading
if not self.producer_fifo:
wanted = self.ioloop.READ
else:
Expand Down
11 changes: 5 additions & 6 deletions pyftpdlib/log.py
Expand Up @@ -62,10 +62,10 @@ def __init__(self, *args, **kwargs):
if self._coloured:
curses.setupterm()
# The curses module has some str/bytes confusion in
# python3. Until version 3.2.3, most methods return
# bytes, but only accept strings. In addition, we want to
# python3. Until version 3.2.3, most methods return
# bytes, but only accept strings. In addition, we want to
# output these strings with the logging module, which
# works with unicode strings. The explicit calls to
# works with unicode strings. The explicit calls to
# unicode() below are harmless in python2 but will do the
# right conversion in python 3.
fg_color = \
Expand All @@ -80,7 +80,6 @@ def __init__(self, *args, **kwargs):
# yellow
logging.WARNING: unicode(curses.tparm(fg_color, 3), "ascii"),
# red
logging.ERROR: unicode(curses.tparm(fg_color, 1), "ascii")
}
self._normal = unicode(curses.tigetstr("sgr0"), "ascii")

Expand All @@ -99,7 +98,7 @@ def format(self, record):

# Encoding notes: The logging module prefers to work with character
# strings, but only enforces that log messages are instances of
# basestring. In python 2, non-ascii bytestrings will make
# basestring. In python 2, non-ASCII bytestrings will make
# their way through the logging framework until they blow up with
# an unhelpful decoding error (with this formatter it happens
# when we attach the prefix, but there are other opportunities for
Expand All @@ -108,7 +107,7 @@ def format(self, record):
# If a byte string makes it this far, convert it to unicode to
# ensure it will make it out to the logs. Use repr() as a fallback
# to ensure that all byte strings can be converted successfully,
# but don't do it by default so we don't add extra quotes to ascii
# but don't do it by default so we don't add extra quotes to ASCII
# bytestrings. This is a bit of a hacky place to do this, but
# it's worth it since the encoding errors that would otherwise
# result are so useless (and tornado is fond of using utf8-encoded
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/servers.py
Expand Up @@ -402,7 +402,7 @@ def _loop(self, handler):
poll(timeout=soonest_timeout)
if ioloop.sched._tasks:
soonest_timeout = sched_poll()
# Handle the case where socket_map is emty but some
# Handle the case where socket_map is empty but some
# cancelled scheduled calls are still around causing
# this while loop to hog CPU resources.
# In theory this should never happen as all the sched
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/test/__init__.py
Expand Up @@ -260,7 +260,7 @@ def setup_server(handler, server_class, addr=None):
authorizer.add_anonymous(HOME)
handler.authorizer = authorizer
handler.auth_failed_timeout = 0.001
# lower buffer sizes = more "loops" while transfering data
# lower buffer sizes = more "loops" while transferring data
# = less false positives
handler.dtp_handler.ac_in_buffer_size = 4096
handler.dtp_handler.ac_out_buffer_size = 4096
Expand Down
2 changes: 1 addition & 1 deletion pyftpdlib/test/test_functional.py
Expand Up @@ -173,7 +173,7 @@ def test_rein_during_transfer(self):
'530 Log in with USER and PASS first',
self.client.dir)

# a 226 response is expected once tranfer finishes
# a 226 response is expected once transfer finishes
self.assertEqual(self.client.voidresp()[:3], '226')
# account is still flushed, error response is still expected
self.assertRaisesRegex(ftplib.error_perm,
Expand Down

0 comments on commit 1db15b1

Please sign in to comment.