Commit Graph

160 Commits

Author SHA1 Message Date
Jason R. Coombs
574613a892 Merge branch 'master' into 3399.mypy 2020-12-26 12:45:09 -05:00
Itamar Turner-Trauring
96fd1861d2 Port to Python 3. 2020-12-09 14:58:54 -05:00
Itamar Turner-Trauring
bb06067c33 Port to Python 3. 2020-12-09 14:48:33 -05:00
Itamar Turner-Trauring
59968d099c More passing tests. 2020-12-09 14:05:03 -05:00
Itamar Turner-Trauring
016240d6e6 More passing tests on Python 3. 2020-12-09 13:50:15 -05:00
Itamar Turner-Trauring
6b8fd2f29d Some progress towards passing tests on Python 3. 2020-12-09 13:45:31 -05:00
Itamar Turner-Trauring
48bef7db99 Some straightforward changes to support Python 3. 2020-12-09 13:42:35 -05:00
Jason R. Coombs
8b991d3516 Update DirectoryNode.set_uri to match interface spec. 2020-11-29 15:16:45 -05:00
Itamar Turner-Trauring
c3494f1356 Enough changes to make allmydata.test.test_storage run on Python 3.
Still lots of failures, of course.
2020-08-27 15:19:49 -04:00
Itamar Turner-Trauring
e13c0cf4d3 Reorganize imports to make Python 3 support easier. 2020-08-12 10:23:30 -04:00
meejah
238f604bf5 use decrypt aliases 2019-06-24 16:57:12 -06:00
meejah
310fb60247 move AES to a helper-function style 2019-06-17 15:54:46 -06:00
heartsucker
008825b0fd replaced referecnes to pycryptopp AES with own wrapper 2019-06-13 22:18:55 -06:00
tpltnt
c8f11dc2d3 ported old-style classes to new-style 2019-05-26 08:28:18 +02:00
heartsucker
a087a5be72
removed tuple unpacking in function definitons for python3 compatibility 2019-04-18 13:37:18 +02:00
heartsucker
0750dbac38
updated all python files to use pep-3110 exception syntax for python3 compatibility 2019-04-04 11:57:58 +02:00
Jean-Paul Calderone
bcfd2e8ea0 ADD_FILE Eliot action 2019-03-07 12:55:24 -05:00
meejah
05f48c3601 Various cleanups, fixes and improvements
Squashed all commits that were meejah's between
30d68fb499f300a393fa0ced5980229f4bb6efda
and
33c268ed3a8c63a809f4403e307ecc13d848b1ab
On the branch meejah:1382.markberger-rewrite-rebase.6 as
per review
2017-06-05 16:31:41 -06:00
Brian Warner
2ceea6df0d Merge PR406: use @implementer instead of implements
This also updates several classes to be new-style (inheriting from 'object').
2017-03-23 19:25:56 -07:00
meejah
49ae2c5eb7 use @implementer instead of implements
Also, derive some more things from 'object'
2017-02-27 11:01:30 -07:00
meejah
031a88c25f simplejson -> json 2017-02-23 15:21:36 -07:00
Vladimir Rusinov
0d47e12e40 Add some docstrings. 2016-12-23 22:50:48 -05:00
Vladimir Rusinov
7faec2e10a Adjust formatting to be pep8-compliant. 2016-12-23 22:50:48 -05:00
Vladimir Rusinov
672efa7d17 Add a docsrting to dirnode.py. 2016-12-23 22:50:48 -05:00
Vladimir Rusinov
73fabaec19 Move DeepStats to separate file as dirnode is a bit too large to work with comfortably. 2016-12-23 22:50:48 -05:00
meejah
db517e8edd Progress API
- IProgress interface + PercentProgress implementation
 - progress= args to many upload/download APIs
 - ultimately for magic-folder
2016-04-12 00:30:50 -07:00
Daira Hopwood
35f37cc5b8 Change web-API to support t=relink instead of t=move (+ docs and tests). fixes #1732
Signed-off-by: Daira Hopwood <david-sarah@jacaranda.org>
2013-04-05 19:38:43 +01:00
Brian Warner
3d771132a8 switch UploadResults to use get_uri(), hide internal ._uri
Complete the getter-based transformation, by hiding ".uri" and updating
callers to use get_uri(). Also don't set a dummy self._uri, leave it
undefined until someone calls set_uri().
2012-05-21 21:14:44 -07:00
Kevan Carstensen
cde17ec041 dirnode: teach dirnode to make MDMF directories 2011-08-06 17:42:24 -07:00
david-sarah
bbed522033 Remove all trailing whitespace from .py files. 2011-08-08 17:11:17 -07:00
Zooko O'Whielacronx
6e8477114e minor code clean-up in dirnode.py
Impose micro-POLA by passing only the writekey instead of the whole node object to {{{_encrypt_rw_uri()}}}. Remove DummyImmutableFileNode in nodemaker.py, which is obviated by this. Add micro-optimization by precomputing the netstring of the empty string and branching on whether the writekey is present or not outside of {{{_encrypt_rw_uri()}}}. Add doc about writekey to docstring.
fixes #967
2010-07-13 23:02:55 -07:00
david-sarah
11077ea74d Rename stringutils to encodingutil, and drop listdir_unicode and open_unicode (since the Python stdlib functions work fine with Unicode paths). Also move some utility functions to fileutil. 2010-07-11 17:30:15 -07:00
Zooko O'Whielacronx
ab80719198 trivial: tiny update to in-line comment
(I'm actually committing this patch as a test of the new eager-annotation-computation of trac-darcs.)
2010-06-13 21:57:15 -07:00
david-sarah
4712875193 dirnode.py: stop writing 'ctime' and 'mtime' fields. Includes documentation and test changes. 2010-06-18 16:01:19 -07:00
david-sarah
a9fe3792de dirnodes: fix normalization hole where childnames in directories created by nodemaker.create_mutable/immutable_directory would not be normalized. Add a test that we normalize names coming out of a directory. 2010-06-17 17:02:49 -07:00
david-sarah
718870a796 dirnode.py: comments about normalization changes. 2010-06-16 21:14:11 -07:00
david-sarah
c8d99b77a3 Provisional patch to NFC-normalize filenames going in and out of Tahoe directories. 2010-06-15 20:14:50 -07:00
david-sarah
29a06457d2 dirnode.py: fix a bug in the no-write change for Adder, and improve test coverage. Add a 'metadata' argument to create_subdirectory, with documentation. Also update some comments in test_dirnode.py made stale by the ctime/mtime change. 2010-06-01 20:26:41 -07:00
david-sarah
9214dbda50 Add must_exist, must_be_directory, and must_be_file arguments to DirectoryNode.delete. This will be used to fixes a minor condition in the SFTP frontend. 2010-05-27 12:45:29 -07:00
david-sarah
4f58355a0e dirnode.py: Fix bug that caused 'tahoe' fields, 'ctime' and 'mtime' not to be updated when new metadata is present. 2010-06-01 18:46:44 -07:00
david-sarah
53f7d2c7fe dirnode.py: Fix #1034 (MetadataSetter does not enforce restriction on setting 'tahoe' subkeys), and expose the metadata updater for use by SFTP. Also, support diminishing a child cap to read-only if 'no-write' is set in the metadata. 2010-05-31 21:54:28 -07:00
david-sarah
40edf8f419 Change code that gives a base32 SI or an empty string to be more straightforward. (#948) 2010-02-26 22:55:51 -08:00
david-sarah
d7b50a3b86 Additional fixes for DIR2-LIT More Info page and deep-check/manifest operations (#948) 2010-02-24 00:02:20 -08:00
david-sarah
973f0afdd3 Change direct accesses to an_uri.storage_index to calls to .get_storage_index() (fixes #948) 2010-02-21 18:45:04 -08:00
david-sarah
b9eda4de6a Address comments by Kevan on 833 and add test for stripping spaces 2010-01-27 15:06:42 -08:00
david-sarah
56c00cb381 Miscellaneous documentation, test, and code formatting tweaks. 2010-01-26 23:03:09 -08:00
david-sarah
6057bc02cc Prevent mutable objects from being retrieved from an immutable directory, and associated forward-compatibility improvements. 2010-01-26 22:44:30 -08:00
Brian Warner
731d15e56f hush pyflakes-0.4.0 warnings: remove trivial unused variables. For #900. 2010-01-14 14:15:29 -08:00
Brian Warner
96834da0a2 Simplify immutable download API: use just filenode.read(consumer, offset, size)
* remove Downloader.download_to_data/download_to_filename/download_to_filehandle
* remove download.Data/FileName/FileHandle targets
* remove filenode.download/download_to_data/download_to_filename methods
* leave Downloader.download (the whole Downloader will go away eventually)
* add util.consumer.MemoryConsumer/download_to_data, for convenience
  (this is mostly used by unit tests, but it gets used by enough non-test
   code to warrant putting it in allmydata.util)
* update tests
* removes about 180 lines of code. Yay negative code days!

Overall plan is to rewrite immutable/download.py and leave filenode.read() as
the sole read-side API.
2009-12-01 17:53:30 -05:00
Brian Warner
0cf320c2ab interface name cleanups: IFileNode, IImmutableFileNode, IMutableFileNode
The proper hierarchy is:
 IFilesystemNode
 +IFileNode
 ++IMutableFileNode
 ++IImmutableFileNode
 +IDirectoryNode

Also expand test_client.py (NodeMaker) to hit all IFilesystemNode types.
2009-11-19 23:52:55 -08:00