Commit Graph

63 Commits

Author SHA1 Message Date
Dmitri Bogomolov bbdbca253b
Added warnings about changing port settings in api and network.tcp 2019-10-18 09:35:31 +03:00
Dmitri Bogomolov 7a89109fc9
New logging approach in order to reduce imports from submodules
and use logging without risk of circular import. Only subpackage
that imports from debug is bitmessageqt - because it also uses
debug.resetLogging().
Instead of from debug import logger is now recommended to use:

import logging

logger = logging.getLogger('default')

All subclasses of StoppableThread now have a logger attribute.
All threading related stuff except for set_thread_name()
was moved from helper_threading to network.threads.

Fixed two my mistakes from previous edit of debug in a1a8d3a:

 - logger.handlers is not dict but iterable
 - sys.excepthook should be set unconditionally
2019-10-18 09:35:24 +03:00
Dmitri Bogomolov b5df242141
Fixed badly formatted docstrings and some wrong text 2019-10-18 01:06:02 +03:00
Dmitri Bogomolov ad2a2b3fb4
Inherit helper_threading.StoppableThread from threading.Thread
and do random.seed() in its __init__
2019-08-06 18:07:19 +03:00
Dmitri Bogomolov 9992626438
Fix API command 'shutdown' 2019-08-01 12:04:13 +03:00
Marius Kjærstad e0efb7fd2f
Merge branch 'v0.6' into v0.6 2019-03-23 15:14:56 +01:00
Dmitri Bogomolov 7e1ee815b9
Rerender more widgets when deleting address by API 2019-03-05 18:47:37 +02:00
sandakersmann 8924d4be5c
Changed copyright year to 2019 2019-02-05 15:16:30 +01:00
Dmitri Bogomolov 58bc170bda
Fix #1383 - formatting artifact in 7ed459b 2018-11-01 16:53:53 +02:00
Dmitri Bogomolov 5b1d2e56a1
Changes into test mode:
run in background, stop after 30 sec since last API response
2018-10-22 17:18:22 +03:00
coffeedogs 7ed459b644
Changes based on style and lint checks. (final_code_quality_6) 2018-10-18 19:46:01 +01:00
Dmitri Bogomolov 533df80ce9
Resolving pylint warnings 2018-10-12 11:58:02 +03:00
Dmitri Bogomolov bd5bdda009
Moved class singleAPI to api module and `import api` below config check 2018-10-12 11:58:02 +03:00
Dmitri Bogomolov cb0996c6c8
flake8: api, debug 2018-05-21 12:20:57 +03:00
f97ada87 71d6fad242
pep8 fix
line length fixed by cleaning up an error message
2018-05-06 11:06:44 +00:00
f97ada87 bcaad3e0fb
fix issue 1236
fixes regression introduced in PR #1062 affecting default and minimum lengths of ackdata objects
2018-05-05 12:38:05 +00:00
Mahendra Garg 6bce912a81
Fix undefined streamNumber bug 2018-04-10 12:44:32 +05:30
f97ada87 be0e724b23
implement stealth ack objects 2017-09-30 19:45:40 +10:00
Peter Šurda 660997b8f4
Code Quality 2017-08-22 13:49:27 +02:00
Peter Šurda b7f808cde1
Add shutdown command to API
- calling "shutdown" now cleanly shuts down PyBitmessage, however the
call may not return so you need to add an error handler to the call.
With python for example, wrap the "shutdown()" in
"try:/except socket.error"
2017-08-21 10:39:03 +02:00
Peter Šurda 6c695c8ac7
Remove non-asyncore network code (partial) 2017-08-09 17:36:52 +02:00
Peter Šurda cc955cd69d
Try new ports of binding fails
- API and BM protocol will try random ports for binding if those
configured are occupied
2017-08-09 17:29:23 +02:00
Peter Šurda d34fdbb3f4
Fix network status in api 2017-06-10 10:08:40 +02:00
Peter Šurda 009a215224
Fix api connected hosts lists 2017-06-09 10:07:51 +02:00
Scott f78f1a718b
Change api.py 2017-06-02 18:53:13 -06:00
Peter Šurda 02a07e5119
Asyncore update
- default to true (original attempt didn't work correctly)
2017-05-29 03:16:14 +02:00
Peter Šurda 73c41bff9d
typo
-BMConfigParser. instead of BMConfigParser().
2017-05-29 02:30:18 +02:00
Peter Šurda c85d52b8e8
Asyncore updates
- asyncore is now on by default
- inv announcements implemented
- bandwidth limit implemented / fixed
- stats on download / upload speed now work
- make prints into logger
- limit knownNodes to 20k as it was before
- green light fixed
- other minor fixes
2017-05-29 00:24:07 +02:00
Peter Šurda b37a05fd0a
Allow encoding 3 in broadcast API 2017-05-27 07:48:29 +02:00
Peter Šurda 9f4a1fa0a4
Config file defaults and address unification
- bmconfigpaser.py now allows to put default values for a specific
option in the file
- addresses as sections are now detected by "BM-" rather than
just ignoring bitmessagesettings. There can now be other sections
with a cleaner config file
2017-05-15 12:18:07 +02:00
Peter Šurda bf76c7f6ec
Allow extended encoding in API 2017-04-30 10:39:48 +02:00
Peter Šurda 6062277d60
Rename configparser.py to bmconfigparser.py
- it was causing problems with py2app because the source of python's own
  CongigParser is also configparser.py
2017-02-22 09:34:54 +01:00
Peter Šurda 157881bc63
Cyclic import fix
- networkDefaultProofOfWorkNonceTrialsPerByte and
  networkDefaultPayloadLengthExtraBytes cyclic import fix
- PyBitmessage should launch now when there's no keys.dat
2017-02-08 20:37:42 +01:00
Peter Šurda 2cc4435cfc
Imports, typos, syntax errors
- remove obsolete imports
- add missing imports
- fix typos
- fix syntax errors
- thanks to landscape.io for report
2017-02-08 14:19:02 +01:00
Peter Šurda 59f3a2fbe7
Reduce cyclic dependencies
- rearranged code to reduce cyclic dependencies
- doCleanShutdown is separated in shutdown.py
- shared queues are separated in queues.py
- some default values were moved to defaults.py
- knownnodes partially moved to knownnodes.py
2017-02-08 13:41:56 +01:00
Peter Šurda 5ca8a52662
Typos, extra imports and similar
- pointed out by landscape.io
- also updated dev/ssltest.py to work the same way as the main program
2017-01-15 10:48:29 +01:00
Peter Šurda ad75552b5c
Move shutdown from shared.py to state.py 2017-01-14 23:20:15 +01:00
Peter Šurda fa0a3135e7
Fixes pointed out by landscape.io
- missing/wrong/obsolete imports
- logger formatting
2017-01-11 17:26:25 +01:00
Peter Šurda ac348e4e6b
Fixes and refactoring
- fixes errors introduced in the earlier refactoring
- more variables moved to state.py
- path finding functions moved to paths.py
- remembers IPv6 network unreachable (in the future can be used to skip
  IPv6 for a while)
2017-01-11 17:00:00 +01:00
Peter Šurda 8bcfe80ad0
Refactoring of config parser and shared.py
- got rid of shared config parser and made it into a singleton
- refactored safeConfigGetBoolean as a method of the config singleton
- refactored safeConfigGet as a method of the config singleton
- moved softwareVersion from shared.py into version.py
- moved some global variables from shared.py into state.py
- moved some protocol-specific functions from shared.py into protocol.py
2017-01-11 14:27:19 +01:00
Peter Šurda 9c214b4a24
Inventory refactoring #2
- forgot to add api.py
2017-01-10 21:17:25 +01:00
Peter Šurda 3d4869851e
Many changes on chan create/join dialog
- refactored to use the .ui file
- input logic change, address is always optional
- interactive input validation
- runs asynchronously to the main window
- address generator thread can now validate chans in addition to just
adding them
2016-10-28 22:07:16 +02:00
mailchuck b724d3ee4f Copyright year updates 2016-05-02 15:00:26 +02:00
mirrorwish a7ec4c0555 Some preparations for python 3 2016-05-02 15:00:25 +02:00
mirrorwish 554627dd92 Refactor Inventory 2016-05-02 15:00:25 +02:00
mailchuck f159133f14 TreeWidget and Addressbook editing propagation
If you change, add or remove an item in a treewidget or addressbook,
messagelists will now autoupdate labels, and sender comboboxes will also
update if applicable.
Fixes #69
2016-05-02 15:00:23 +02:00
mailchuck d69c2e097f Cleaner shutdown
Addresses Bitmessage#549
2016-05-02 15:00:21 +02:00
Peter Surda bde5bfc42e Add: re-merge API changes
API handler was rewritten in upstream, previous merge
overwrote the changse. This re-enables them.
2016-05-02 15:00:17 +02:00
Peter Surda d3345e051a Add: debugging for freezing api call 2016-05-02 15:00:17 +02:00
Peter Surda 69309b82fb Minor changes in cli, PoW, and a couple of new api calls. 2016-05-02 15:00:17 +02:00