Commit graph

46 commits

Author SHA1 Message Date
hackrush
4165881d5f
Authenticated CLI works again 2018-08-24 11:40:43 -04:00
Lex Berezhny
da8e09846d
pylint fixed 2018-08-24 11:40:43 -04:00
hackrush
a7ef8889dd
Unified CLI, python 3(WIP) (#1330)
* Added new custom cli class using aiohttp
* Proper error handling in CLI based on RPC error codes(PoC)
* Auth API working
* UnitTests
2018-08-24 11:40:43 -04:00
Lex Berezhny
10b34d6b33
unnecessary list() added during py3 port
instead of recursive bytes2unicode use a proper JSONEncoder to conver bytes->unicode for json.dumps()
removing excessive isinstance(data, bytes) checks
py3: / -> // and list() around .items() that gets modified in loop
moved lbrynet.undecorated to where its actually used and hopefully we can delete it eventually
removed build/upload_assets.py, travis can do all this now
2018-08-24 11:40:43 -04:00
hackrush
3f7091cbf2
Make curl work in py3 again 2018-08-24 11:37:53 -04:00
hackrush
a95f791215
Make daemon work in py3 again 2018-08-24 11:37:53 -04:00
Lex Berezhny
5597d45aed
got integration tests to work again with rebased branch 2018-08-24 11:37:53 -04:00
hackrush
473d2eabfa
curl works with python3 now 2018-08-24 11:37:53 -04:00
Lex Berezhny
693a3346d2
pylint fixes 2018-08-24 11:37:53 -04:00
Lex Berezhny
4ece422f48
No longer inheriting from object and added proper use of super(). 2018-08-24 11:37:53 -04:00
Lex Berezhny
971252d5d1
undo simplejson commit 2018-08-24 11:37:53 -04:00
hackrush
c01716a6c0
Using simplejson and fixed some encodes and decodes 2018-08-24 11:37:53 -04:00
hackrush
4bd0806e58
Fix metaclass not registering objects 2018-08-24 11:37:53 -04:00
Lex Berezhny
69446491b8
pylint and unit test fixes 2018-08-24 11:37:50 -04:00
Lex Berezhny
cc970c499b
daemon/auth py3 conversion, this breaks the client for now 2018-08-24 11:37:25 -04:00
Jack Robison
a3de065c93
use txupnp instead of miniupnpc 2018-08-03 11:37:07 -04:00
hackrush
9ab256df30 fixed improper error handling when data is not valid JSON (#1326) 2018-07-30 09:38:36 -04:00
Jack Robison
5d9a187659
refactor required conditions and @requires decorator 2018-07-24 20:01:38 -04:00
Jack Robison
a9c94ca22d
move setup and _shutdown to AuthJSONRPCServer 2018-07-24 20:01:38 -04:00
Jack Robison
b06dcf0a0d
cancel starting components if the reactor is stopped before startup has finished
-don't block starting the dht component on having found enough peers, only on setting up the protocol
2018-07-24 20:01:38 -04:00
Jack Robison
a89306b6bf
reorganize daemon startup
-fix loggly not using the share usage setting

-delete more
2018-07-24 20:01:38 -04:00
Jack Robison
defe9506bb
set daemon attribute for each component as they start 2018-07-24 20:01:38 -04:00
hackrush
2d61ba629f
add requires decorator 2018-07-24 20:01:38 -04:00
Jack Robison
7e8ca842a2
change ComponentManager to use instance methods rather than class methods
-add get_component method to ComponentManager

-add override_components kwargs to ComponentManager

-add skip_components to ComponentManager

-change component_manager attribute to exist on the AuthJSONRPCServer instance instead of the class
2018-07-24 20:01:38 -04:00
Jack Robison
68b31a09b4
add daemon Component and ComponentManager classes 2018-07-24 20:01:38 -04:00
Lex Berezhny
6952c2c07e
Revert "refactor lbrynet-daemon into modular components" (#1286)
* Revert "fix reflector test"

This reverts commit 6a15b51ac3.

* Revert "refactor lbrynet-daemon into modular components (#1164)"

This reverts commit 75a6ff269e.
2018-07-05 19:05:48 -04:00
Jack Robison
75a6ff269e refactor lbrynet-daemon into modular components (#1164)
* add daemon Component and ComponentManager classes

* convert directory and SQLiteStorage setup to be a Component

* support callbacks to component setups

* Fixed typo in ComponentManager

* convert wallet to be Component

* Use storage from session.

* Remove create_session internal function and PEP8

* Starting to convert session to its own component. Removed ref to `self.storage` from Daemon.py

* Making DHT component(broken)

* Refactored classes to reduce redundancy in getting config setting

* DHT is now it's own component

* Fixed `test_streamify` test

* Fixed regression caused by removing `peer_manager` from session

* refactor ComponentManager and Component to use instance instead of class methods

* Hash announcer, file manager, stream identifier components

* Query Handler and server components

* Reflector Component

* Fixed test_streamify(well Jack did, but ¯\_(ツ)_/¯)

* All tests now passing

* Pylint fixes

* Oops(That's all you're gonna get :-P)

* Making decorators(WIP, commit so that I don't lose work)

* Decorator made and decorating of functions done(some other changes)

* import fixes and removed temporary test function

* Fixed new broken tests from daemon refactor

* Sanitization of modules

* Reworded errors

* wallet unlock condition checks, fixed breaking changes

* Rebased on amster and other crazy stuff

* Started writing tests

* Tests for component manager

* Fix Daemon Tests

* Fixed passing mutable args in init

* Using constants instead of strings. Added CHANGELOG.md

* Now components can be skipped by setting relevant config in file.

* P-Y-L-I-N-T #angry_emoji
2018-07-05 15:21:52 -04:00
Jack Robison
9b1e687b9b
pylint 2018-05-29 14:36:00 -04:00
Jack Robison
187f920961
disable Daemon headers check for now 2018-05-28 10:57:48 -04:00
Jack Robison
450bed6350
fix kwargs bug 2018-04-19 11:00:44 -04:00
Jack Robison
eae97a8133
off by one 2018-04-03 13:08:36 -04:00
Jack Robison
4e7bdafdcf
fix positional and keyword args 2018-04-03 12:27:49 -04:00
Jack Robison
743ae59d54
fix lbrynet-cli when using authentication
-add explanation of daemon authentication to AuthJSONRPCServer docstring
-remove auth_required decorator, use auth for all api methods if use_authentication is true
-fix issues with the command line --http-auth flag to lbrynet-daemon and the use_http_auth setting in the config file
2018-04-01 18:31:03 -04:00
Jack Robison
8c2b626f97
fix cli kwargs 2018-03-29 12:19:41 -04:00
hackrush
f7f6770120 Removed flags decorator as short flags are no longer used. 2018-03-18 16:11:19 +05:30
Jack Robison
b7503f8b61
log traceback info for failed api requests 2017-12-06 19:52:29 -05:00
Jack Robison
8fdd8d8c43
fix api error responses 2017-12-06 13:25:58 -05:00
Jack Robison
f87d6b08c8
remove queued decorator 2017-11-07 15:17:04 -05:00
Jack Robison
a79a00180d
rename variable 2017-11-04 20:37:52 -04:00
Jack Robison
36782e0878
use shared deferredSemaphore for daemon methods decorated with 'queued'
fixes race condition between publish and channel_new
2017-11-04 20:37:46 -04:00
Alex Grintsvayg
810089cd99 not sure why this is here 2017-09-12 13:47:08 -04:00
Jack Robison
46c5a98752
return results for new command for commands marked with the deprecated decorator 2017-08-15 11:31:35 -04:00
Jack Robison
18f5f850cd
show deprecated warning 2017-08-15 11:17:50 -04:00
Jack Robison
4e5ff49177
fix allowed_during_startup 2017-07-19 11:43:45 -04:00
Jack Robison
85cc843d36 initialize settings if necessary when configuring an api client 2017-06-25 21:25:49 -04:00
Jack Robison
967cc4c63c rename lbrynet.lbrynet_daemon to lbrynet.daemon 2017-06-25 21:25:41 -04:00