Commit graph

27 commits

Author SHA1 Message Date
ab41b78863
new platform global constant 2026-05-17 18:03:32 +00:00
4573e170ed
test suite: use match statement where practicable (21 files) 2025-09-23 09:20:53 +00:00
487678bce9
Use Ruff static code analyzer for Github workflows 2024-12-30 13:59:03 +00:00
f9e6d994f0
whitespace: test/misc 2024-10-18 10:32:13 +00:00
91991a13de
support macOS (BTC-only, no autosign)
Testing:

    $ test/test-release.sh -FCSTA

Tested on macOS 13.6.7 (Ventura) + Xcode 15.0.1
2024-07-27 10:01:05 +00:00
ed01582dff
rename repository: mmgen -> mmgen-wallet 2023-11-17 09:04:14 +00:00
0a1e3c3c98
pylint integration: gc.platform -> sys.platform 2023-10-13 09:51:12 +00:00
aff850d1c8
test suite: import cleanups 2023-10-03 14:27:57 +00:00
46dcb5cabe
minor fixes and cleanups 2023-05-19 16:16:52 +00:00
9e1935ad19
opts.init() -> Config() 2023-04-04 16:04:10 +00:00
c7adb56e38
Config API, Part I
This patch eliminates the global configuration variables `opt` and `g`, making
all functions and class instances locally configurable.  Configuration data is
passed to functions and constructors via the `cfg` parameter and made available
to methods in `self.cfg`.

Local configuration free from dependence on the command line will enable the
creation of multiple, independently configured instances of MMGen’s data
objects within a single process.

Potential applications include testing (tracking wallets configured to interact
with spawned processes, for example) and the use of MMGen as a library for
other projects.

This patch completes most of the work required to enable the API.  The full
implementation will appear in a forthcoming commit.
2023-03-28 18:14:37 +00:00
c3ce1ab8e3
globalvars.py: new GlobalConstants (gc), GlobalVars (gv) classes
- The attributes of GlobalConstants are non-configurable.  They’re constant
  for a given machine, user, executable and MMGen release.

- The attributes of GlobalVars, `stderr` and `stdout`, are used by the test
  suite to redirect msg() and friends to /dev/null.

- All the aforementioned attributes formerly belonged to GlobalConfig.
2023-03-28 18:14:36 +00:00
19f0730913
crypto.py: reimplement as class 2023-03-27 10:50:38 +00:00
5b08b3d5e5
MSWin: get_char_raw(): support function keys; minor fixes 2022-12-07 10:40:59 +00:00
0097e99850
test/misc/term.py: support individual commands 2022-12-07 10:40:58 +00:00
c73409ac27
term: new set(), register_cleanup() methods 2022-12-07 10:40:54 +00:00
5e0a39f4bb
get_char(): num_chars -> num_bytes 2022-10-29 20:10:23 +00:00
1d8b908c7c
util.py: relocate user-prompting functions to ui.py 2022-10-17 18:37:22 +00:00
4f260056e8
avoid use of time.sleep() in event loop 2022-05-26 16:07:19 +00:00
818488c559
modularize transaction classes
The monolithic tx.py module has been split into multiple modules, and a
clean separation of protocol-dependent and protocol-independent code has
been carried out.

- Protocol-independent base classes are located under `tx`.
- Protocol-dependent subclasses are under `base_proto/{name}/tx`.
- The code in `tx/__init__.py` loads the required module and returns an
  initialized instance of the requested class.
2022-02-03 20:41:28 +00:00
b9c96c5215
avoid use of globals() wherever practicable 2022-02-03 20:40:40 +00:00
a5890569a9
test suite: minor fix 2021-10-14 13:21:09 +00:00
1245dc1026
my_raw_input() -> line_input() 2021-10-07 13:12:09 +00:00
6692a43d59
f-strings, whitespace (test files) [44 files patched] 2021-09-29 21:17:57 +00:00
1ff7f3e5ba
various build and testing fixes 2020-06-27 10:22:01 +00:00
656bb69587
terminal-related fixes and cleanups 2020-03-15 19:45:32 +00:00
d8e1d5f88c
term.py: new MMGenTerm family of classes
Testing:

    $ test/misc/term.py
2020-03-15 19:43:23 +00:00