From 3df1859df5ea51eac87ad56035538852fe185103 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 27 Aug 2020 23:12:01 +0000 Subject: [PATCH 1/3] Bump pdoc3 from 0.8.3 to 0.9.1 Bumps [pdoc3](https://github.com/pdoc3/pdoc) from 0.8.3 to 0.9.1. - [Release notes](https://github.com/pdoc3/pdoc/releases) - [Changelog](https://github.com/pdoc3/pdoc/blob/master/CHANGELOG) - [Commits](https://github.com/pdoc3/pdoc/compare/0.8.3...0.9.1) Signed-off-by: dependabot-preview[bot] --- requirements-dev.in | 2 +- requirements-dev.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-dev.in b/requirements-dev.in index d153a4e5..762c500a 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -1,3 +1,3 @@ -pdoc3==0.8.3 +pdoc3==0.9.1 pip-tools==5.2.1 helium==3.0.4 diff --git a/requirements-dev.txt b/requirements-dev.txt index d5a0142c..195b30fa 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -53,8 +53,8 @@ markupsafe==1.1.1 \ --hash=sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7 \ --hash=sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be \ # via mako -pdoc3==0.8.3 \ - --hash=sha256:19bd1a72e1c82875a6927b244aca826dedb635ea2a7a36ac62cbe063a8ddc30d \ +pdoc3==0.9.1 \ + --hash=sha256:e1848d5485b8dd4662272f83bb5f7df4a68e0a5d76c87be30327977777168894 \ # via -r requirements-dev.in pip-tools==5.2.1 \ --hash=sha256:1690bef5f0f714160c3aedacb03520e2359a78f7f9fa17e574cf8659cf2ef614 \ From b7091d2062a084c7da6114455a62883b47e6cd7b Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 7 Sep 2020 03:42:13 +0000 Subject: [PATCH 2/3] fix showlogo crash when not connected to terminal, bump version --- src/etc/onionrvalues.py | 2 +- src/onionrcommands/daemonlaunch/showlogo.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/etc/onionrvalues.py b/src/etc/onionrvalues.py index 47e55181..1215f493 100755 --- a/src/etc/onionrvalues.py +++ b/src/etc/onionrvalues.py @@ -23,7 +23,7 @@ import filepaths DENIABLE_PEER_ADDRESS = "OVPCZLOXD6DC5JHX4EQ3PSOGAZ3T24F75HQLIUZSDSMYPEOXCPFA" PASSWORD_LENGTH = 25 ONIONR_TAGLINE = 'Private P2P Communication - GPLv3 - https://Onionr.net' -ONIONR_VERSION = '5.0.0' +ONIONR_VERSION = '5.0.2' ONIONR_VERSION_CODENAME = 'Genesis' ONIONR_VERSION_TUPLE = tuple(ONIONR_VERSION.split('.')) # (MAJOR, MINOR, VERSION) API_VERSION = '1' # increments of 1; only change when something fundamental about how the API works changes. This way other nodes know how to communicate without learning too much information about you. diff --git a/src/onionrcommands/daemonlaunch/showlogo.py b/src/onionrcommands/daemonlaunch/showlogo.py index d301fbbf..35854aef 100644 --- a/src/onionrcommands/daemonlaunch/showlogo.py +++ b/src/onionrcommands/daemonlaunch/showlogo.py @@ -28,19 +28,25 @@ from utils import logoheader def show_logo(): logger.raw('', terminal=True) + try: + terminal_size = os.get_terminal_size().columns + except OSError: # Generally thrown if not in terminal + terminal_size = 120 # print nice header thing :) if config.get('general.display_header', True): logoheader.header("") - if os.get_terminal_size().columns >= 120: + if terminal_size >= 120: if QUOTE[1]: # If there is an author to show for the quote logger.info( "\u001b[33m\033[F" + bordered(QUOTE[0] + '\n -' + QUOTE[1]), terminal=True) else: - logger.info("\u001b[33m\033[F" + bordered(QUOTE[0]), terminal=True) + logger.info( + "\u001b[33m\033[F" + bordered(QUOTE[0]), terminal=True) else: if QUOTE[1]: logger.info("\u001b[33m\033[F" + QUOTE[0] + '\n -' + QUOTE[1], terminal=True) else: logger.info("\u001b[33m\033[F" + QUOTE[0], terminal=True) + From d40bd8536888c1a82be29c7d6456f16958cb865d Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 7 Sep 2020 05:13:36 +0000 Subject: [PATCH 3/3] added test for api version --- .gitignore | 2 +- tests/test_onionrvalues.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c4a4bc3f..edd07b43 100755 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ src/data/* src/data-backup/* run.sh src/.onionr-lock - +daemon-true.txt .vscode/tags .vscode/settings.json diff --git a/tests/test_onionrvalues.py b/tests/test_onionrvalues.py index c7de3848..e59e7ebb 100644 --- a/tests/test_onionrvalues.py +++ b/tests/test_onionrvalues.py @@ -12,6 +12,9 @@ from utils import identifyhome, createdirs from etc import onionrvalues class TestOnionrValues(unittest.TestCase): + def test_api_version(self): + self.assertEqual(onionrvalues.API_VERSION, '1') + def test_default_expire(self): self.assertEqual(onionrvalues.DEFAULT_EXPIRE, 2678400)