external/pyftpdlib.git
7 weeks agosmall refactoring master
g.rodola [Sat, 27 Apr 2013 17:21:05 +0000 (17:21 +0000)]
small refactoring

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1228 18f94993-622a-0410-868e-e94f534f3744

7 weeks agosmall refactoring
g.rodola [Sat, 27 Apr 2013 17:17:04 +0000 (17:17 +0000)]
small refactoring

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1227 18f94993-622a-0410-868e-e94f534f3744

7 weeks agoignore me
g.rodola [Wed, 24 Apr 2013 21:44:53 +0000 (21:44 +0000)]
ignore me

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1226 18f94993-622a-0410-868e-e94f534f3744

7 weeks agoFix issue 254: port bench.py script to python 3
g.rodola [Wed, 24 Apr 2013 21:43:31 +0000 (21:43 +0000)]
Fix issue 254: port bench.py script to python 3

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1225 18f94993-622a-0410-868e-e94f534f3744

7 weeks agofix issue 253: bench.py --timeout option
g.rodola [Wed, 24 Apr 2013 21:24:31 +0000 (21:24 +0000)]
fix issue 253: bench.py --timeout option

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1224 18f94993-622a-0410-868e-e94f534f3744

8 weeks agoupdate version to 1.2.0
g.rodola [Mon, 22 Apr 2013 14:47:16 +0000 (14:47 +0000)]
update version to 1.2.0

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1220 18f94993-622a-0410-868e-e94f534f3744

8 weeks agoFix issue 252: FTPServer's address parameter can also be a socket object
g.rodola [Fri, 19 Apr 2013 14:35:41 +0000 (14:35 +0000)]
Fix issue 252: FTPServer's address parameter can also be a socket object

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1219 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 250: add FTPServer's backlog kwarg controlling the queue of accepted connec...
g.rodola [Fri, 19 Apr 2013 01:48:39 +0000 (01:48 +0000)]
Fix issue 250: add FTPServer's backlog kwarg controlling the queue of accepted connections.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1218 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 251: provide a fileno() method for epoll() and kqueue() IO pollers
g.rodola [Thu, 18 Apr 2013 18:21:44 +0000 (18:21 +0000)]
Fix issue 251: provide a fileno() method for epoll() and kqueue() IO pollers

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1217 18f94993-622a-0410-868e-e94f534f3744

2 months agouse a set() while building up FEAT response so that we're sure features are not liste...
g.rodola [Thu, 18 Apr 2013 00:58:41 +0000 (00:58 +0000)]
use a set() while building up FEAT response so that we're sure features are not listed twice

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1216 18f94993-622a-0410-868e-e94f534f3744

2 months agoAttempt to fix issue #245 (again): de-localize socket_map and tasks vars: they are...
g.rodola [Wed, 17 Apr 2013 18:03:39 +0000 (18:03 +0000)]
Attempt to fix issue #245 (again): de-localize socket_map and tasks vars: they are copies and any change via setattr() is not reflected back to the original object they are referring to

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1215 18f94993-622a-0410-868e-e94f534f3744

2 months agoupdate HISTORY
g.rodola [Tue, 9 Apr 2013 15:48:31 +0000 (15:48 +0000)]
update HISTORY

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1210 18f94993-622a-0410-868e-e94f534f3744

2 months agofix AttributeError on FreeBSD
g.rodola [Tue, 9 Apr 2013 15:36:23 +0000 (15:36 +0000)]
fix AttributeError on FreeBSD

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1209 18f94993-622a-0410-868e-e94f534f3744

2 months agoupdate version
g.rodola [Tue, 9 Apr 2013 15:27:02 +0000 (15:27 +0000)]
update version

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1208 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 247: whenever available (PY >= 3.3) use time.monotonic() instead of time...
g.rodola [Mon, 8 Apr 2013 01:18:24 +0000 (01:18 +0000)]
Fix issue 247: whenever available (PY >= 3.3) use time.monotonic() instead of time.time()

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1207 18f94993-622a-0410-868e-e94f534f3744

2 months agofix issue 246: ThrottledDTPHandler was broken; also reintroduce and readapt the old...
g.rodola [Sat, 6 Apr 2013 15:26:00 +0000 (15:26 +0000)]
fix issue 246: ThrottledDTPHandler was broken; also reintroduce and readapt the old tests which were removed as of r904

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1206 18f94993-622a-0410-868e-e94f534f3744

2 months agorenew HISTORY format
g.rodola [Fri, 5 Apr 2013 12:47:43 +0000 (12:47 +0000)]
renew HISTORY format

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1205 18f94993-622a-0410-868e-e94f534f3744

2 months agorenew HISTORY format
g.rodola [Fri, 5 Apr 2013 12:26:45 +0000 (12:26 +0000)]
renew HISTORY format

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1204 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 245: ThreadedFTPServer hogs all CPU resources after a client connects.
g.rodola [Fri, 5 Apr 2013 11:54:58 +0000 (11:54 +0000)]
Fix issue 245: ThreadedFTPServer hogs all CPU resources after a client connects.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1203 18f94993-622a-0410-868e-e94f534f3744

2 months agocalculate memory consumption as (rss - shared) as opposed to just 'rss'
g.rodola [Thu, 4 Apr 2013 16:23:09 +0000 (16:23 +0000)]
calculate memory consumption as (rss - shared) as opposed to just 'rss'

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1202 18f94993-622a-0410-868e-e94f534f3744

2 months agolog PID on start
g.rodola [Thu, 4 Apr 2013 16:03:13 +0000 (16:03 +0000)]
log PID on start

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1199 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 244: on python >= 3.3 use os.sendfile() instead of pysendfile third-party...
g.rodola [Fri, 22 Mar 2013 11:07:40 +0000 (11:07 +0000)]
Fix issue 244: on python >= 3.3 use os.sendfile() instead of pysendfile third-party module

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1198 18f94993-622a-0410-868e-e94f534f3744

2 months agoFix issue 243: an erroneous error message is given in case the address passed to...
g.rodola [Thu, 21 Mar 2013 15:03:49 +0000 (15:03 +0000)]
Fix issue 243: an erroneous error message is given in case the address passed to bind() is already in use.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1197 18f94993-622a-0410-868e-e94f534f3744

3 months ago(e)poll() poller: localize variable access to minimize overhead
g.rodola [Tue, 12 Mar 2013 15:05:39 +0000 (15:05 +0000)]
(e)poll() poller: localize variable access to minimize overhead

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1196 18f94993-622a-0410-868e-e94f534f3744

3 months agofix issue 241: allow empty passwords
g.rodola [Mon, 11 Mar 2013 20:19:00 +0000 (20:19 +0000)]
fix issue 241: allow empty passwords

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1195 18f94993-622a-0410-868e-e94f534f3744

3 months agoCmdline usage: by default assume the default interface passed to getaddrifo() is...
g.rodola [Mon, 11 Mar 2013 19:00:38 +0000 (19:00 +0000)]
Cmdline usage: by default assume the default interface passed to getaddrifo() is None instead of "" (which is wrong, as that's the alias intended for bind()).

This has an important consequence in that the FTP server won't make any DNS query during the startup. As such it won't wait and eventually fail if the DNS is down.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1194 18f94993-622a-0410-868e-e94f534f3744

3 months agofix tests broken after previous commit
g.rodola [Mon, 11 Mar 2013 15:29:35 +0000 (15:29 +0000)]
fix tests broken after previous commit

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1192 18f94993-622a-0410-868e-e94f534f3744

3 months agoFix issue 238: username is not logged in case of failed authentication. (patch by...
g.rodola@gmail.com [Mon, 11 Mar 2013 12:13:11 +0000 (12:13 +0000)]
Fix issue 238: username is not logged in case of failed authentication. (patch by tlockert)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1191 18f94993-622a-0410-868e-e94f534f3744

3 months agoFix issue 240: enable 'python -m pyftpdlib' cmdline syntax
g.rodola@gmail.com [Sun, 10 Mar 2013 13:03:33 +0000 (13:03 +0000)]
Fix issue 240: enable 'python -m pyftpdlib' cmdline syntax

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1190 18f94993-622a-0410-868e-e94f534f3744

3 months agofix deprecation warnings due to assertEquals being deprecated in favor of self.assert...
g.rodola [Tue, 5 Mar 2013 23:33:41 +0000 (23:33 +0000)]
fix deprecation warnings due to assertEquals being deprecated in favor of self.assertEqual (thanks Arfrever)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1189 18f94993-622a-0410-868e-e94f534f3744

3 months agofix some ResourceWarnings found with Python's -Wa cmdline option plus fix NameError...
g.rodola [Tue, 5 Mar 2013 23:15:13 +0000 (23:15 +0000)]
fix some ResourceWarnings found with Python's -Wa cmdline option plus fix NameError exception being raised on Python 3.1 due to callable() builtin not being available.  (thanks Arfrever)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1188 18f94993-622a-0410-868e-e94f534f3744

3 months agofix issue 239: make test suite return exit status code != 0 in case of test failures...
g.rodola [Tue, 5 Mar 2013 22:57:30 +0000 (22:57 +0000)]
fix issue 239: make test suite return exit status code != 0 in case of test failures (patch by Arfrever.FTA)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1187 18f94993-622a-0410-868e-e94f534f3744

3 months agofix deprecation warnings caused by assertRaisesRegexp
g.rodola [Tue, 5 Mar 2013 22:49:28 +0000 (22:49 +0000)]
fix deprecation warnings caused by assertRaisesRegexp

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1186 18f94993-622a-0410-868e-e94f534f3744

3 months agoupdate version and date
g.rodola [Fri, 22 Feb 2013 19:40:08 +0000 (19:40 +0000)]
update version and date

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1184 18f94993-622a-0410-868e-e94f534f3744

3 months agotest suite: introduce assertRaisesRegexp in order to check responses actually sent...
g.rodola [Fri, 22 Feb 2013 19:07:12 +0000 (19:07 +0000)]
test suite: introduce assertRaisesRegexp in order to check responses actually sent by server

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1183 18f94993-622a-0410-868e-e94f534f3744

3 months agotest suite: introduce assertRaisesRegexp in order to check responses actually send...
g.rodola [Fri, 22 Feb 2013 18:43:14 +0000 (18:43 +0000)]
test suite: introduce assertRaisesRegexp in order to check responses actually send by server

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1182 18f94993-622a-0410-868e-e94f534f3744

3 months agofix issue 236: MultiprocessFTPServer and ThreadedFTPServer hanging in case of failed...
g.rodola [Fri, 22 Feb 2013 17:48:37 +0000 (17:48 +0000)]
fix issue 236: MultiprocessFTPServer and ThreadedFTPServer hanging in case of failed authentication

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1181 18f94993-622a-0410-868e-e94f534f3744

3 months agotest suite: set FTP server logging level to WARNING so that warning messages don...
g.rodola [Fri, 22 Feb 2013 16:22:14 +0000 (16:22 +0000)]
test suite: set FTP server logging level to WARNING so that warning messages don't go unnoticed. Also, provide a decorator to ignore warning messages for certain tests which legitimately cause warnings.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1180 18f94993-622a-0410-868e-e94f534f3744

3 months agomax connections test: use ftplib's quit() method instead of close() so that client...
g.rodola [Fri, 22 Feb 2013 03:47:31 +0000 (03:47 +0000)]
max connections test: use ftplib's quit() method instead of close() so that client and server are more synchronized

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1179 18f94993-622a-0410-868e-e94f534f3744

3 months agoadd a MANIFEST.in file which tells 'python setup.py sdist' what files to include...
g.rodola [Tue, 19 Feb 2013 11:40:35 +0000 (11:40 +0000)]
add a MANIFEST.in file which tells 'python setup.py sdist' what files to include in the tarball

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1175 18f94993-622a-0410-868e-e94f534f3744

3 months agoset +x flags against demo scripts
g.rodola [Tue, 19 Feb 2013 11:25:49 +0000 (11:25 +0000)]
set +x flags against demo scripts

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1174 18f94993-622a-0410-868e-e94f534f3744

3 months agoFix ThrottledDTPHandler which was broken
g.rodola [Tue, 19 Feb 2013 11:13:14 +0000 (11:13 +0000)]
Fix ThrottledDTPHandler which was broken

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1173 18f94993-622a-0410-868e-e94f534f3744

3 months agofix 'dict changed size during iteration' error on Windows plus update date in HISTORY...
g.rodola [Tue, 19 Feb 2013 10:34:22 +0000 (10:34 +0000)]
fix 'dict changed size during iteration' error on Windows plus update date in HISTORY file

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1172 18f94993-622a-0410-868e-e94f534f3744

3 months agoupdate copyright banner; update docstring; disable unicode tests which are not relieable
g.rodola [Tue, 19 Feb 2013 10:13:09 +0000 (10:13 +0000)]
update copyright banner; update docstring; disable unicode tests which are not relieable

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1171 18f94993-622a-0410-868e-e94f534f3744

4 months agowin/unix authorizers: get rid of [] as the default for 'allowed_users' and 'rejected_...
g.rodola [Thu, 14 Feb 2013 12:59:29 +0000 (12:59 +0000)]
win/unix authorizers: get rid of [] as the default for 'allowed_users' and 'rejected_users' arguments. Also add a test for __repr__.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1170 18f94993-622a-0410-868e-e94f534f3744

4 months agopycharm run
g.rodola [Thu, 14 Feb 2013 12:27:50 +0000 (12:27 +0000)]
pycharm run

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1169 18f94993-622a-0410-868e-e94f534f3744

4 months agologging: check whether using colors when configuring logs (as opposed to import...
g.rodola@gmail.com [Sun, 10 Feb 2013 19:33:26 +0000 (19:33 +0000)]
logging: check whether using colors when configuring  logs (as opposed to import time)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1168 18f94993-622a-0410-868e-e94f534f3744

4 months agounix_daemon.py script: get rid of python-daemon (http://pypi.python.org/pypi/python...
g.rodola@gmail.com [Sun, 10 Feb 2013 18:43:44 +0000 (18:43 +0000)]
unix_daemon.py script: get rid of python-daemon (pypi.python.org/pypi/python-daemon) dependancy as it no longer works (and it is apparently no longer maintained since year 2010). Instead, replace the part which does the actual damonization by taking this recipe as an example http://jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/. Also add a 'restart' cmdline option

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1167 18f94993-622a-0410-868e-e94f534f3744

4 months agofix unraised warnings during FTPS tests
g.rodola@gmail.com [Sun, 10 Feb 2013 11:02:27 +0000 (11:02 +0000)]
fix unraised warnings during FTPS tests

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1166 18f94993-622a-0410-868e-e94f534f3744

4 months agorestore compatibility with py <= 2.6
g.rodola@gmail.com [Sun, 10 Feb 2013 10:31:29 +0000 (10:31 +0000)]
restore compatibility with py <= 2.6

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1165 18f94993-622a-0410-868e-e94f534f3744

4 months agorestore compatibility with py 2.6
g.rodola [Sat, 9 Feb 2013 19:49:30 +0000 (19:49 +0000)]
restore compatibility with py 2.6

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1164 18f94993-622a-0410-868e-e94f534f3744

4 months agoformat_mlsx(): localize variables to minimize overhead
g.rodola [Sat, 9 Feb 2013 16:39:21 +0000 (16:39 +0000)]
format_mlsx(): localize variables to minimize overhead

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1163 18f94993-622a-0410-868e-e94f534f3744

4 months agoFix some Windows failures.
g.rodola [Thu, 7 Feb 2013 23:26:11 +0000 (23:26 +0000)]
Fix some Windows failures.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1162 18f94993-622a-0410-868e-e94f534f3744

4 months agorestore compatibility with python <= 2.5
g.rodola [Fri, 1 Feb 2013 17:48:37 +0000 (17:48 +0000)]
restore compatibility with python <= 2.5

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1161 18f94993-622a-0410-868e-e94f534f3744

4 months agobig logging refactoring: introduce a new 'log_prefix' attribute to FTPHandler in...
g.rodola [Fri, 1 Feb 2013 17:30:30 +0000 (17:30 +0000)]
big logging refactoring: introduce a new 'log_prefix' attribute to FTPHandler in order to allow customization of every line logged

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1160 18f94993-622a-0410-868e-e94f534f3744

4 months agologging refactoring (issue 236): move everything into a separate log.py module and...
g.rodola [Fri, 1 Feb 2013 13:42:48 +0000 (13:42 +0000)]
logging refactoring (issue 236): move everything into a separate log.py module and provide coloured logs by default

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1159 18f94993-622a-0410-868e-e94f534f3744

4 months agoBig logging refactoring (future issue 236).
g.rodola [Fri, 1 Feb 2013 02:52:24 +0000 (02:52 +0000)]
Big logging refactoring (future issue 236).
pyftpdlib logging has always been kind of messy for 2 reasons:

1) it's very verbose as it logs *all* commands and responses exchanged between client and server on the control channel; this includes commands such as TYPE, OPTS, HELP, SITE etc. which are not very interesting from the admin point of view.

2) it's repetitive as in case of filesytem related commands, (say DELE) we get *3* lines of logs instead of 1:
[D] <- DELE somefile.ext
[D] -> 200 file deleted
[I] somefile.ext was deleted

With this commit logline() logging is disabled by default and only 'useful' messages such as MKD, RMD, DELE, etc are logged in a single line (as opposed to 3):
[I] DELE /somefile.txt 250

To get back to the old behavior user will have to use:

>>> logging.basicConfig(level=logging.DEBUG)

logging.DEBUG will be an alias for 'enable line logging'.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1158 18f94993-622a-0410-868e-e94f534f3744

4 months agorestore compatibility with python 2.4
g.rodola [Thu, 31 Jan 2013 17:17:13 +0000 (17:17 +0000)]
restore compatibility with python 2.4

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1157 18f94993-622a-0410-868e-e94f534f3744

4 months agodo not rely on *exact* response string in certain tests
g.rodola [Thu, 31 Jan 2013 17:07:25 +0000 (17:07 +0000)]
do not rely on *exact* response string in certain tests

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1156 18f94993-622a-0410-868e-e94f534f3744

4 months agoupdate README
g.rodola [Sun, 27 Jan 2013 23:23:47 +0000 (23:23 +0000)]
update README

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1155 18f94993-622a-0410-868e-e94f534f3744

4 months agoremove old comment
g.rodola [Sun, 27 Jan 2013 22:45:58 +0000 (22:45 +0000)]
remove old comment

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1154 18f94993-622a-0410-868e-e94f534f3744

4 months agorename variable (ignore me)
g.rodola [Thu, 24 Jan 2013 17:01:47 +0000 (17:01 +0000)]
rename variable (ignore me)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1153 18f94993-622a-0410-868e-e94f534f3744

4 months agoupdate HISTORY
g.rodola [Thu, 24 Jan 2013 16:57:40 +0000 (16:57 +0000)]
update HISTORY

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1152 18f94993-622a-0410-868e-e94f534f3744

4 months agoFix issue 233: make sure on_logout() is not called if USER was provided but not PASSw...
g.rodola [Thu, 24 Jan 2013 16:37:49 +0000 (16:37 +0000)]
Fix issue 233: make sure on_logout() is not called if USER was provided but not PASSword (patch by Ben Timby)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1151 18f94993-622a-0410-868e-e94f534f3744

5 months agocatch the right exceptions when polling on select()/epoll()/poll()/kqueue() - also...
g.rodola [Wed, 16 Jan 2013 01:17:35 +0000 (01:17 +0000)]
catch the right exceptions when polling on select()/epoll()/poll()/kqueue() - also, for kqueue() make sure to also catch EINTR and ignore it as with all other pollers

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1150 18f94993-622a-0410-868e-e94f534f3744

5 months agofix issue 234: provide a nice __repr__ for FTPHandler and DTPHandler
g.rodola [Tue, 15 Jan 2013 02:01:41 +0000 (02:01 +0000)]
fix issue 234: provide a nice __repr__ for FTPHandler and DTPHandler

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1149 18f94993-622a-0410-868e-e94f534f3744

5 months agoOSX: fix for IPv4-mapped IPv6 addresses
g.rodola [Tue, 15 Jan 2013 01:06:46 +0000 (01:06 +0000)]
OSX: fix for IPv4-mapped IPv6 addresses

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1148 18f94993-622a-0410-868e-e94f534f3744

5 months agoMulti process FTPd: set a timeout for join() when waiting for threads/subprocesses...
g.rodola [Sat, 12 Jan 2013 18:35:32 +0000 (18:35 +0000)]
Multi process FTPd: set a timeout for join() when waiting for threads/subprocesses to terminate. Also, in case of processes, after timeout occurs use SIGKILL against all the children which are still alive.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1147 18f94993-622a-0410-868e-e94f534f3744

5 months agoFreeBSD / multi process FTPd: during server shutdown use SIGKILL instead of SIGTERM...
g.rodola [Sat, 12 Jan 2013 17:38:26 +0000 (17:38 +0000)]
FreeBSD / multi process FTPd: during server shutdown use SIGKILL instead of SIGTERM when killing process children in order to avoid hanging

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1146 18f94993-622a-0410-868e-e94f534f3744

5 months agofix issue 232: hybrid IPv4/IPv6 support is broken. (patch by Claus Klein - see ml...
g.rodola [Sat, 5 Jan 2013 17:50:55 +0000 (17:50 +0000)]
fix issue 232: hybrid IPv4/IPv6 support is broken.  (patch by Claus Klein - see ml discussion at https://groups.google.com/forum/?fromgroups#!topic/pyftpdlib/imcL4POfO6Y )

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1145 18f94993-622a-0410-868e-e94f534f3744

5 months agoserve_forever(): get rid of log_start_stop kwarg and provide a new 'handle_exit'...
g.rodola [Mon, 31 Dec 2012 01:07:32 +0000 (01:07 +0000)]
serve_forever(): get rid of log_start_stop kwarg and provide a new 'handle_exit' kwarg instead which other than controlling start/stop logging, also controls whether catching SIGINT/SIGTERM signals by default

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1144 18f94993-622a-0410-868e-e94f534f3744

5 months agoissue 225: provide a specific logger in pyftpdlib/__init__.py as per suggestion http...
g.rodola [Mon, 31 Dec 2012 00:41:37 +0000 (00:41 +0000)]
issue 225: provide a specific logger in pyftpdlib/__init__.py as per suggestion code.google.com/p/pyftpdlib/issues/detail?id=225#c4

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1143 18f94993-622a-0410-868e-e94f534f3744

5 months agoFix issue 231: make FTPHandler.ftp_* methods return a meaningful value on success...
g.rodola [Fri, 28 Dec 2012 14:36:05 +0000 (14:36 +0000)]
Fix issue 231: make FTPHandler.ftp_* methods return a meaningful value on success so that they can be overridden in order to do something useful on, say, directory created or file removed

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1142 18f94993-622a-0410-868e-e94f534f3744

5 months agofix demo/md5_ftpd.py exception typo
g.rodola@gmail.com [Fri, 21 Dec 2012 19:09:48 +0000 (19:09 +0000)]
fix demo/md5_ftpd.py exception typo

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1141 18f94993-622a-0410-868e-e94f534f3744

5 months agofix demo/md5_ftpd.py authentication mechanism
g.rodola@gmail.com [Fri, 21 Dec 2012 19:09:20 +0000 (19:09 +0000)]
fix demo/md5_ftpd.py authentication mechanism

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1140 18f94993-622a-0410-868e-e94f534f3744

5 months agodemo scripts: set default TCP port to 2121
g.rodola [Fri, 21 Dec 2012 16:03:49 +0000 (16:03 +0000)]
demo scripts: set default TCP port to 2121

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1139 18f94993-622a-0410-868e-e94f534f3744

6 months agoadded two demo scripts using multu process/server classes
g.rodola [Tue, 11 Dec 2012 17:37:43 +0000 (17:37 +0000)]
added two demo scripts using multu process/server classes

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1138 18f94993-622a-0410-868e-e94f534f3744

6 months agorefactoring
g.rodola [Tue, 11 Dec 2012 17:25:48 +0000 (17:25 +0000)]
refactoring

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1137 18f94993-622a-0410-868e-e94f534f3744

6 months agoservers.py / _loop(): wrap all the cleanup operations in a try/finally statement...
g.rodola [Tue, 11 Dec 2012 14:23:01 +0000 (14:23 +0000)]
servers.py / _loop(): wrap all the cleanup operations in a try/finally statement to make sure they are always executed

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1136 18f94993-622a-0410-868e-e94f534f3744

6 months agore-enable logging on server start/stop. Also add a new log_start_stop kwarg to serve_...
g.rodola [Mon, 10 Dec 2012 16:56:45 +0000 (16:56 +0000)]
re-enable logging on server start/stop. Also add a new log_start_stop kwarg to serve_forever() method

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1135 18f94993-622a-0410-868e-e94f534f3744

6 months agosetup.py: little refactoring
g.rodola [Sat, 8 Dec 2012 17:16:16 +0000 (17:16 +0000)]
setup.py: little refactoring

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1134 18f94993-622a-0410-868e-e94f534f3744

6 months agoremove lock acquire/release around _active_tasks.remove(). It seems if can cause...
g.rodola [Sat, 8 Dec 2012 16:13:40 +0000 (16:13 +0000)]
remove lock acquire/release around _active_tasks.remove(). It seems if can cause sporadical hangs every once in a while during multiproc tests; also avoid to print unnecessary traceback on screen while running test_error_on_callback() test

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1133 18f94993-622a-0410-868e-e94f534f3744

6 months agofix issue 229 (backslashes on UNIX are not handled properly)
g.rodola [Sat, 8 Dec 2012 16:00:06 +0000 (16:00 +0000)]
fix issue 229 (backslashes on UNIX are not handled properly)

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1132 18f94993-622a-0410-868e-e94f534f3744

6 months agoadd a comment explaining what SO_LINGER actually does
g.rodola [Thu, 29 Nov 2012 14:25:24 +0000 (14:25 +0000)]
add a comment explaining what SO_LINGER actually does

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1131 18f94993-622a-0410-868e-e94f534f3744

6 months agomulti thread/process server: in serve_forever() make sure to call close_all() only...
g.rodola [Thu, 29 Nov 2012 14:16:23 +0000 (14:16 +0000)]
multi thread/process server: in serve_forever() make sure to call close_all() only if blocking == True; it seems this fixes the occasional hang ups while executing multiprocess tests

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1130 18f94993-622a-0410-868e-e94f534f3744

6 months agoadd python 3.3 to the list of setup.py classifiers
g.rodola [Thu, 29 Nov 2012 13:48:34 +0000 (13:48 +0000)]
add python 3.3 to the list of setup.py classifiers

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1129 18f94993-622a-0410-868e-e94f534f3744

6 months agoIn order to stop the mprocess/mthreaded server use an Event object instead of a share...
g.rodola [Mon, 26 Nov 2012 12:03:24 +0000 (12:03 +0000)]
In order to stop the mprocess/mthreaded server use an Event object instead of a shared attribute

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1128 18f94993-622a-0410-868e-e94f534f3744

6 months agoget rid of contrib/servers.py
g.rodola [Wed, 21 Nov 2012 15:29:48 +0000 (15:29 +0000)]
get rid of contrib/servers.py

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1127 18f94993-622a-0410-868e-e94f534f3744

7 months agoFix the following error occurring on Windows with test_quick_connect() when run using...
g.rodola [Fri, 16 Nov 2012 20:00:28 +0000 (20:00 +0000)]
Fix the following error occurring on Windows with test_quick_connect() when run using the threaded server.

Exception in thread ('127.0.0.1', 55390):
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 551, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "c:\users\user\desktop\svn\pyftpdlib\pyftpdlib\servers.py", line 270, in
    poll(timeout=soonest_timeout)
  File "c:\users\user\desktop\svn\pyftpdlib\pyftpdlib\ioloop.py", line 438, in p
    r, w, e = select.select(self._r, self._w, [], timeout)
error: (10038, 'An operation was attempted on something that is not a socket')

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1126 18f94993-622a-0410-868e-e94f534f3744

7 months agosetup.py: get rid of old pyftpdlib/lib reference + make a better check to figure...
g.rodola [Fri, 16 Nov 2012 19:16:32 +0000 (19:16 +0000)]
setup.py: get rid of old pyftpdlib/lib reference + make a better check to figure out whether terminal actually support coloured output

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1125 18f94993-622a-0410-868e-e94f534f3744

7 months agofix cmdline parser
g.rodola [Fri, 16 Nov 2012 18:46:40 +0000 (18:46 +0000)]
fix cmdline parser

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1124 18f94993-622a-0410-868e-e94f534f3744

7 months agofix cmdline parser
g.rodola [Fri, 16 Nov 2012 18:44:36 +0000 (18:44 +0000)]
fix cmdline parser

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1123 18f94993-622a-0410-868e-e94f534f3744

7 months agofix issue 222: an unhandled exception in handle_error() or close() can cause server...
g.rodola [Sat, 10 Nov 2012 11:17:48 +0000 (11:17 +0000)]
fix issue 222: an unhandled exception in handle_error() or close() can cause server crash.

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1122 18f94993-622a-0410-868e-e94f534f3744

7 months agoremove log.py module and 'lib' directory
g.rodola [Mon, 5 Nov 2012 22:56:33 +0000 (22:56 +0000)]
remove log.py module and 'lib' directory

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1120 18f94993-622a-0410-868e-e94f534f3744

7 months agoFix issue 225: introduce logging module - deprecate log(), logline() and logerror...
g.rodola [Mon, 5 Nov 2012 22:52:38 +0000 (22:52 +0000)]
Fix issue 225: introduce logging module - deprecate log(), logline() and logerror() functions

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1119 18f94993-622a-0410-868e-e94f534f3744

7 months agodemo scripts: always reference FTPServer instance as a 'server' variable rather than...
g.rodola [Fri, 2 Nov 2012 19:53:21 +0000 (19:53 +0000)]
demo scripts: always reference FTPServer instance as a 'server' variable rather than 'ftpd'

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1118 18f94993-622a-0410-868e-e94f534f3744

7 months agofix issue 223: split ftpserver.py into different sub modules
g.rodola [Fri, 2 Nov 2012 19:45:33 +0000 (19:45 +0000)]
fix issue 223: split ftpserver.py into different sub modules

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1117 18f94993-622a-0410-868e-e94f534f3744

8 months agoavoid to override writable(): it is no longer needed after introducing the new dispat...
g.rodola [Mon, 15 Oct 2012 12:41:58 +0000 (12:41 +0000)]
avoid to override writable(): it is no longer needed after introducing the new dispatchers

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1116 18f94993-622a-0410-868e-e94f534f3744

8 months agore-establish compatibility with py < 2.6
g.rodola [Mon, 15 Oct 2012 12:12:11 +0000 (12:12 +0000)]
re-establish compatibility with py < 2.6

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1115 18f94993-622a-0410-868e-e94f534f3744

8 months agomove property() compatibility hack in lib/compat.py
g.rodola [Mon, 15 Oct 2012 11:50:02 +0000 (11:50 +0000)]
move property() compatibility hack in lib/compat.py

git-svn-id: http://pyftpdlib.googlecode.com/svn/trunk@1114 18f94993-622a-0410-868e-e94f534f3744