Commit graph

177 commits

Author SHA1 Message Date
9a8f6216f7
pylint (test suite) - f-strings 2023-10-11 12:58:52 +00:00
32593cd205
remove scripts/uninstall-mmgen.py 2023-10-11 12:58:52 +00:00
7b32c412d5
pylint (test suite) - imports 2023-10-11 12:58:51 +00:00
01430166e5
whitespace, comments, docstrings (test suite) 2023-10-11 12:58:51 +00:00
4f42233836
pylint throughout (excluding tests) - imports 2023-10-11 12:58:48 +00:00
ae533adb3a
test suite: exception handling fixes 2023-10-04 13:58:40 +00:00
f626fc2e05
missing import fixes throughout 2023-10-03 14:27:57 +00:00
11ee212fe8
helper scripts: import cleanups 2023-10-03 14:27:56 +00:00
31390cfa33
exec_wrapper.py: sys.path fixup for test scripts 2023-10-03 14:27:55 +00:00
6c249dec5b
load dev tools only when MMGEN_DEVTOOLS env var is set 2023-09-30 15:36:41 +00:00
f720b8e48e
test suite: prune sys.path, set PYTHONPATH to overlay root
- when running scripts under the exec wrapper, ensure that directories in
  `sys.path` contain no potentially importable names not present in the
  production environment
2023-09-29 12:24:22 +00:00
6a84ade2c7
exec_wrapper.py, test_init.py: minor cleanups 2023-09-29 12:24:22 +00:00
f9ee86a98a
test.py, exec_wrapper.py: improve error handling 2023-09-29 12:24:22 +00:00
a0ffe37a58
test.py: log, error filename cleanups 2023-09-29 12:24:21 +00:00
c0cfbdbb32
scripts/exec_wrapper.py: variable renames 2023-09-29 12:24:21 +00:00
31a6e62a24
test suite: sys.path, overlay, PYTHONPATH cleanups 2023-09-26 10:23:40 +00:00
19dc7eac26
minor fixes and cleanups 2023-05-23 12:12:32 +00:00
f1b427fd9c
scripts/exec_wrapper.py: sys -> exec_wrapper_sys 2023-04-04 16:04:12 +00:00
9e1935ad19
opts.init() -> Config() 2023-04-04 16:04:10 +00:00
93bcc92534
globalvars.py -> cfg.py 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
78e882143c
whitespace, cleanups, imports throughout [73 files changed] 2023-03-27 10:49:04 +00:00
1aeefd64ae
update copyright dates 2023-01-03 10:36:07 +00:00
20f4b12832
module docstring cleanups [134 files] 2022-11-14 09:54:07 +00:00
9a1ea34309
initialize developer tools via builtins; add test 2022-10-20 18:14:15 +00:00
c3dbd720c6
minor fixes and changes 2022-10-20 18:14:14 +00:00
1d8b908c7c
util.py: relocate user-prompting functions to ui.py 2022-10-17 18:37:22 +00:00
9888fe4c65
util.py: relocate lesser-used functions to util2.py 2022-10-17 18:37:22 +00:00
6653cff8b0
Python 3.7, 3.8 compatibility fix 2022-08-16 20:35:49 +00:00
3f2acde7a8
test suite: minor changes and cleanups 2022-08-04 13:44:31 +00:00
1db6076410
scripts/exec_wrapper.py: improve traceback handling
- new environment var: EXEC_WRAPPER_TRACEBACK
2022-07-29 16:45:31 +00:00
401744bf88
minor fixes and cleanups 2022-07-27 17:08:59 +00:00
2314247918
add msys2-sshd-setup.sh convenience script 2022-05-06 12:52:41 +00:00
830d07cde2
minor fixes 2022-04-23 14:36:08 +00:00
fc87dcf0ba
fixes and cleanups throughout 2022-02-07 21:08:08 +00:00
71d7986391
minor fixes and cleanups 2022-02-06 13:28:44 +00:00
41376eb515
new MMGenSystemExit exception; remove rdie(), ydie() 2022-02-05 13:32:56 +00:00
d30fbba837
environment var rename: MMGEN_TRACEBACK -> MMGEN_EXEC_WRAPPER 2022-02-05 13:32:55 +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
d6872ddb87
fixes and cleanups throughout 2022-02-03 20:40:42 +00:00
2305efc39d
scripts/exec_wrapper.py: add tracemalloc support
- support is activated by setting the MMGEN_TRACEMALLOC environment variable
2022-01-24 19:30:12 +00:00
0a4427bb89
scripts/gendiff.py: DOS CR fix 2022-01-22 14:26:12 +00:00
4819c97f8a
util.py: move file utilities to fileutil.py 2022-01-21 11:23:46 +00:00
3799411071
test.py, gendiff.py: minor fixes 2022-01-15 14:00:10 +00:00
0880229e94
use open() strictly as context manager 2022-01-06 20:24:21 +00:00
1a896d9af9
update copyright dates 2022-01-04 19:51:22 +00:00
acd9c1e13f
minor fixes and cleanups 2021-10-06 21:08:02 +00:00
76cf32f3b4
new convenience utility: scripts/gendiff.py 2021-10-06 13:22:34 +00:00
554670b713
overlay_setup(): use passed value of repo_root 2021-10-05 11:57:34 +00:00