Jeff Forcier
c1434dbd24
Merge branch '1.13'
2014-04-24 11:06:02 -07:00
Jeff Forcier
c7c1a24e30
Fix some trailing whitespace
2014-04-24 10:26:33 -07:00
Jeff Forcier
6f4c159b05
Merge updated a01e449 from al-tonio
2014-04-24 10:25:37 -07:00
Jeff Forcier
1321bc41df
Merge branch '1.13'
2014-04-24 09:34:00 -07:00
Antoine Brenner
3fce8abf68
BufferedFile.read() now returns byte strings instead of text strings
...
It is the right thing to do since we have no idea what encoding the file
is in, or even if the file is text data. BufferedFile.readline() is
unchanged and returns text strings assuming the file is utf-8 encoded.
This should fix the following issue:
http://comments.gmane.org/gmane.comp.sysutils.backup.obnam/252
Antoine Brenner
Conflicts:
sites/www/changelog.rst
2014-04-17 17:52:34 -04:00
Jeff Forcier
1b796861aa
Merge branch '1.13'
2014-04-16 15:24:09 -04:00
Jeff Forcier
ba017e9e6c
Merge branch '1.12' into 1.13
...
Conflicts:
paramiko/sftp_client.py
sites/www/changelog.rst
tests/test_sftp.py
2014-04-16 15:24:04 -04:00
Jeff Forcier
a0b2ae293f
Merge branch '1.11' into 1.12
2014-04-16 15:09:30 -04:00
Jeff Forcier
6e9abc39cf
Fix logging error in sftp_client for filenames containing the character.
...
Bug reported here:
http://vlists.pepperfish.net/pipermail/obnam-flarn.net/2013-May/000767.html
Antoine Brenner
Backported to 1.11 by @bitprophet
Conflicts:
paramiko/sftp_client.py
sites/www/changelog.rst
tests/test_sftp.py
2014-04-16 15:07:56 -04:00
Alex Gaynor
191fd465f1
Merge branch 'master' into use-urandom
...
Conflicts:
paramiko/dsskey.py
paramiko/ecdsakey.py
paramiko/hostkeys.py
paramiko/kex_gex.py
paramiko/kex_group1.py
paramiko/pkey.py
paramiko/primes.py
paramiko/rsakey.py
tests/test_pkey.py
2014-04-14 10:56:05 -04:00
Alex Gaynor
6f211115f4
Switch from using PyCrypto's Random to using os.urandom.
...
There's several reasons for this change:
1) It's faster for reads up to 1024 bytes (nearly 10x faster for 16 byte reads)
2) It receives considerably more security review since it's in the kernel.
3) It's yet another step towards running on PyPy.
4) Using userspace CSPRNGs is considered something of an anti-pattern. See:
http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
http://webcache.googleusercontent.com/search?q=cache:2nTvpCgKZXIJ:www.2uo.de/myths-about-urandom/+&cd=3&hl=en&ct=clnk&gl=us
2014-03-29 19:22:36 -07:00
Alex Gaynor
4d3e0b711a
Switched hash functions from PyCrypto to hashlib.
...
There's a few advantages to this:
1) It's probably fast, OpenSSL, which typically backs hashlib, receives far
more attention for optimizaitons than PyCrypto.
2) It's the first step to supporting PyPy, where PyCrypto doesn't run.
2014-03-29 16:55:01 -07:00
Scott Maxwell
f0017b8330
Fix import * and a bunch of PEP8 formatting
2014-03-07 20:45:26 -08:00
Jeff Forcier
b4cd4bea1d
Start in on star import eradication
2014-03-07 16:17:19 -08:00
Jeff Forcier
1b5332ead1
Skip failing test on Py3
2014-03-07 14:31:52 -08:00
Scott Maxwell
ae078f51d6
Fix new test for Py3 and start server in tests instead of in setUp so we can skip starting server for test 5
2014-01-16 20:15:16 -08:00
Scott Maxwell
b9e62182e5
Merge remote-tracking branch 'master/master' into py3-support-without-py25
...
Conflicts:
paramiko/__init__.py
setup.py
tests/test_client.py
2014-01-16 19:50:53 -08:00
Scott Maxwell
aa8ea3c4d4
Add getcwd test
2014-01-16 19:36:04 -08:00
Jeff Forcier
96ca8d49c1
Merge branch '1.11' into 1.12
...
Conflicts:
NEWS
2014-01-08 13:43:42 -08:00
Jeff Forcier
6d326fcde2
Saner (to me) positive assertion
2014-01-08 12:44:12 -08:00
Jeff Forcier
74e06aff9e
Small refactor
2014-01-08 12:39:26 -08:00
Jeff Forcier
78d9e4834c
No need for 'self.tc' within a single test :)
2014-01-08 12:35:46 -08:00
Martin Blumenstingl
bfc3953be0
Add a testcase for client.save_host_keys.
2014-01-08 12:27:24 -08:00
Scott Maxwell
6d75c75e64
Remove byte conversions and unhexlify calls that we only needed for Py2.5 support and use the `b` byte string marker instead
2013-11-19 10:09:08 -08:00
Scott Maxwell
981f768a62
Remove `from __future__ import with_statement`
2013-11-19 09:38:05 -08:00
Scott Maxwell
dcc78768bf
Remove unnecessary vars for open
2013-11-19 09:38:05 -08:00
Scott Maxwell
2da5f1fb45
Use 'with' for opening most file and SFTPFIle objects
2013-11-19 08:56:53 -08:00
Scott Maxwell
7471515fff
Remove eval that was required for Py25 support
2013-11-19 08:07:46 -08:00
Scott Maxwell
25dd096da0
Change all exceptions to modern format (not Py2.5 compatible)
2013-11-19 08:06:35 -08:00
Scott Maxwell
3ce336c88b
Change conditional from PY3 to PY2 to be better prepared for a possible Py4.
2013-11-19 07:30:45 -08:00
Scott Maxwell
dc58b7bcb2
Fix message to handle long properly, even on Py3
2013-11-02 20:19:52 -07:00
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
8a7267beeb
Eliminate all uses of b'' syntax to allow for Python 2.5 support
2013-11-01 00:37:11 -07:00
Scott Maxwell
d5ce2b43d6
More type fixes
2013-10-31 18:52:55 -07:00
Scott Maxwell
0677ea76cd
Fixes for test_sftp
2013-10-31 17:20:27 -07:00
Scott Maxwell
7a45d3c70f
More type conversion
2013-10-31 15:25:45 -07:00
Scott Maxwell
85ade33ae3
More type fixups
2013-10-31 11:36:47 -07:00
Scott Maxwell
488d85f981
Setup so we can run test_sftp_big independently
2013-10-31 10:03:38 -07:00
Scott Maxwell
fcf56ff9f8
Fix bytes/str type in more places
2013-10-31 10:01:21 -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
2ea352b8ba
Fix dict iters, sorts, exceptions, bytes renames and tuple args
2013-10-30 16:46:33 -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
Scott Maxwell
e5822c9fa1
Add Py3.2 and Py3.3 to travis
2013-10-30 16:02:01 -07:00
Jeff Forcier
28d78e4e6a
Merge branch '1.11'
2013-09-27 21:29:59 -07:00