Commit Graph

58 Commits

Author SHA1 Message Date
Scott Maxwell 7444a99993 Fix some deprecation and resource warnings 2013-11-02 20:19:04 -07:00
Scott Maxwell 45e65b6e1e Make sftp.open handle binary and text, more type conversion 2013-11-02 14:56:43 -07:00
Scott Maxwell 9662a7f779 Changes inspired by the nischu7 branch 2013-11-01 09:49:52 -07:00
Scott Maxwell 201a61d66d Have to use u'' format in test_sftp so this test won't run on Py3.2 unless we find a solution 2013-11-01 01:02:50 -07:00
Scott Maxwell fee18142a5 Fixes for Python 2.5 and Python 3.2 support 2013-11-01 00:51:00 -07:00
Scott Maxwell 0677ea76cd Fixes for test_sftp 2013-10-31 17:20:27 -07:00
Scott Maxwell 0b7d0cf0a2 Convert and detect types properly, use helper constants, use StringIO and range 2013-10-30 17:14:52 -07:00
Scott Maxwell 0e4ce3762a Fix message sending
Create constants for byte messages, implement asbytes so many methods can take Message and key objects directly and split get_string into get_text and get_binary. Also, change int handling to use mpint with a flag whenever the int is greater than 32 bits.
2013-10-30 17:09:34 -07:00
Scott Maxwell 644c52266c Use test_path to avoid relative path issues 2013-10-30 16:22:52 -07:00
Scott Maxwell 66cfa97cce Fix imports 2013-10-30 16:19:30 -07:00
Jeff Forcier e25c7c4bdf Merge branch '1.9' into 1.10 2013-09-27 21:29:51 -07:00
Jeff Forcier 83f44878ea Fixed a typo in the license header of most files
Conflicts:
	paramiko/proxy.py
2013-09-27 21:29:18 -07:00
Jason R. Coombs a3fe422198 Adding test capturing desired behavior and demonstrating issue #142. 2013-03-04 08:45:00 -05:00
Jason R. Coombs 3a9119d78a Delint test_sftp (remove unused imports and unused variables, remove excess whitespace, move imports to top, remove semicolon terminator)
--HG--
extra : source : 01df712a396de5fa7e1c0cc265411fdb2bbc5f41
2013-03-04 08:17:22 -05:00
Michael Williamson 08109136b4 Replace useless version check with import from __future__ 2013-01-05 00:15:26 +00:00
Michael Williamson 0b6aebb8a9 Verify Python version >= 2.6 before running context manager test 2013-01-05 00:05:58 +00:00
Michael Williamson 602250fdf9 Turn SFTPFile into a context manager 2013-01-04 23:43:15 +00:00
Robey Pointer f67cea44d0 code style and fix test. 2010-04-13 18:52:29 -07:00
Larry Wright b4ee844a3c added functionality to skip verifying the file, which works around sftp servers that remove the file immediately after it's been closed. 2009-12-18 17:02:55 -06:00
Robey Pointer 931f71e627 bug 411099: chdir() isn't saving the cwd in a normalized way. added test. 2009-10-31 16:06:53 -07:00
Robey Pointer 60c6e94e7d fix my email address to be the current one. 2009-07-19 19:45:02 -07:00
Robey Pointer fbfd8126c8 [project @ robey@lag.net-20080706230815-v2ybqxm237zw0wa0]
add a callback method that can be used to track get/put progress in
SFTPClient. suggested by Phil Schwartz.
2008-07-06 16:08:15 -07:00
Robey Pointer 83b335e10f [project @ robey@lag.net-20070213191706-v8djxd4jiunb3his]
bump copyright year to 2007
2007-02-13 11:17:06 -08:00
Robey Pointer df20443b29 [project @ robey@lag.net-20060901205930-021bcc34e3d5d8c8]
sadly, revert the append optimization -- it breaks for openssh
2006-09-01 13:59:30 -07:00
Robey Pointer 145ceab54c [project @ robey@lag.net-20060823025538-3f8a4d761d7d4118]
when a file is open for append, don't stat to get the file position unless the user asks for it explicitly
2006-08-22 19:55:38 -07:00
Robey Pointer 074dc36e6b [project @ robey@lag.net-20060801182143-088ff687e0945937]
use hexlify in tests
2006-08-01 11:21:43 -07:00
Robey Pointer 0ad8405d15 [project @ robey@lag.net-20060512172544-f1cab2a1959987bf]
fix new cygwin test failures reported by alexander
2006-05-12 10:25:44 -07:00
Robey Pointer aac434e9b0 [project @ robey@lag.net-20060503163531-2297cd257acc51e5]
make a slightly different exception for the expected mode on cygwin (why would they add support for some but not all of the unix mode bits? very odd)
2006-05-03 09:35:31 -07:00
Robey Pointer 9819087210 [project @ robey@lag.net-20060428172401-ad8da020daedd941]
2 more unit test bugs found by alexander (can't change atime on win32)
2006-04-28 10:24:01 -07:00
Robey Pointer abb7f1f1ba [project @ robey@lag.net-20060420072627-958cad5e36cb8ecc]
fix a bug where prefetch() at EOF would throw an exception, and add a unit test
2006-04-20 00:26:27 -07:00
Robey Pointer ccc1046a5c [project @ robey@lag.net-20060406181821-68f9bc13b3580d37]
some fixes for win32: potential fix for lockup during failed tests; don't try chmod/chown or symlinks; fix canonicalize to convert dos-style path separators to '/'; open local files in binary mode; close a file before erasing it
2006-04-06 11:18:21 -07:00
Robey Pointer 89e39a4559 [project @ robey@lag.net-20060309081455-84be2ae54f98e897]
move sftp big-file tests into a separate class and add one that does a prefetch, then seeks in random order
2006-03-09 00:14:55 -08:00
Robey Pointer 4be91d1c4d [project @ robey@lag.net-20060220031741-3227438ff1b03a29]
add SFTPClient.truncate.  add chmod, chown, utime, and truncate to SFTPFile.  and of course tests.
2006-02-19 19:17:41 -08:00
Robey Pointer a6b4875286 [project @ robey@ralph.lag.net-20051203043223-8ee54573dcda1386]
new unit test for doing a bunch of prefetches at once
2005-12-02 20:32:23 -08:00
Robey Pointer ee8a4e4b2b [project @ robey@lag.net-20051202120305-73accda404b89d27]
dumb test to verify utf8 encoding
2005-12-02 04:03:05 -08:00
Robey Pointer 6de6dc72c6 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-80]
add 'x' flag to open to allow O_EXCL behavior
2005-11-12 01:10:41 +00:00
Robey Pointer 66919286b6 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-72]
don't attempt to start a rekey negotiation from within send_message -- always do it from the feeder thread.  this prevents a situation where more than one thread may decide spontaneously to rekey, sending multiple kexinit messages, which confuses the hell out of the remote host :)  also, do some locking around the clear-to-send event, to avoid a race when we first go into rekeying.  add some tests for these things too
2005-10-29 20:47:04 +00:00
Robey Pointer f65edffbfb [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-70]
add SFTPFile.prefetch() to allow pre-fetching a file that will be downloaded in full -- quick testing showed this could speed up downloads 3x or more
2005-10-24 06:19:56 +00:00
Robey Pointer fb73c0ef7f [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-60]
add file pipelining for writes
2005-09-25 09:11:23 +00:00
Robey Pointer 7b4cd51b76 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-49]
dumb tiny tweaks
2005-08-03 06:57:51 +00:00
Robey Pointer d8ee5e2a4a [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-46]
add SFTPFile.check and server support (and test) -- it's an sftp extension that allows a client to retrieve the hash of part or all of a file without downloading it.  we're probably the only ones who implement it yet
2005-07-18 05:43:44 +00:00
Robey Pointer 93f3cae64f [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-33]
add SFTPClient.put and SFTPClient.get, and make sftp file objects auto-close on del
2005-07-13 08:35:15 +00:00
Robey Pointer 1f88224239 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-32]
add the concept of a cwd to SFTPClient, and add a unit test for it
2005-07-13 07:59:35 +00:00
Robey Pointer 727cab9672 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-17]
more unit tests
2005-06-28 06:02:44 +00:00
Robey Pointer 36055c5ac2 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-5]
split out Packetizer, fix banner detection bug, new unit test
split out a chunk of BaseTransport into a Packetizer class, which handles
the in/out packet data, ciphers, etc.  it didn't make the code any smaller
(transport.py is still close to 1500 lines, which is awful) but it did split
out a coherent chunk of functionality into a discrete unit.

in the process, fixed a bug that alain spineux pointed out: the banner
check was too forgiving and would block forever waiting for an SSH banner.
now it waits 5 seconds for the first line, and 2 seconds for each subsequent
line, before giving up.

added a unit test to test keepalive, since i wasn't sure that was still
working after pulling out Packetizer.
2005-05-01 08:04:59 +00:00
Robey Pointer 89ccac6bfa [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-163]
add SFTPClient.close()
add SFTPClient.close() and add a simple little unit test for it.
2005-04-18 00:30:52 +00:00
Robey Pointer fead211c5c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]
even better 1.2 lapras
re-bump the version # to 1.2 (with a new date since i added more stuff).
add 2005 to the copyright date in a bunch of files.
2005-02-28 08:06:08 +00:00
Robey Pointer 7490172401 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-153]
tweak sftp_file write behavior on large blocks of data
BufferedFile.write() wasn't correctly dealing with the possibility that the
underlying write might not write the entire data block at once (even though
the docs said it would).  now that it's working, make sftp_file take
advantage of it in order to chop up blocks larger than 32kB (the max allowed
on sftp) and add a unit test for it.
2005-02-28 07:49:56 +00:00
Robey Pointer 0d10322783 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-143]
fix an sftp unit test
fix one of the sftp unit tests to actually work.
2005-02-06 23:30:40 +00:00
Robey Pointer 811f2bf30f [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-136]
loopback sftp test
add ability to turn off more tests, and a secret (for now) -X option to do
the sftp tests via loopback socket.  added another symlink sftp test to see
what happens with absolute symlinks.
2004-12-19 19:56:48 +00:00