commit f1ff290453a564049ecf69fda2a819e4cc63d0e7 Author: Damian Johnson atagar@torproject.org Date: Fri Jan 31 15:46:18 2020 -0800
Drop method name aliases
Removing the backward compatibility alises for renamed methods. --- stem/descriptor/hidden_service.py | 5 ----- stem/descriptor/remote.py | 7 ------- stem/util/connection.py | 7 ------- stem/util/proc.py | 17 ----------------- stem/util/str_tools.py | 14 -------------- stem/util/system.py | 19 ------------------- stem/util/test_tools.py | 10 ---------- 7 files changed, 79 deletions(-)
diff --git a/stem/descriptor/hidden_service.py b/stem/descriptor/hidden_service.py index 7994bffb..6fa43521 100644 --- a/stem/descriptor/hidden_service.py +++ b/stem/descriptor/hidden_service.py @@ -1388,8 +1388,3 @@ def _blinded_sign(msg, identity_key, blinded_key, blinding_nonce): S = (r + ed25519.Hint(ed25519.encodepoint(R) + blinded_key + msg) * a) % ed25519.l
return ed25519.encodepoint(R) + ed25519.encodeint(S) - - -# TODO: drop this alias in stem 2.x - -HiddenServiceDescriptor = HiddenServiceDescriptorV2 diff --git a/stem/descriptor/remote.py b/stem/descriptor/remote.py index c7132a38..2632a036 100644 --- a/stem/descriptor/remote.py +++ b/stem/descriptor/remote.py @@ -1156,10 +1156,3 @@ def get_authorities(): """
return DirectoryAuthority.from_cache() - - -# TODO: drop aliases in stem 2.0 - -Directory = stem.directory.Directory -DirectoryAuthority = stem.directory.Authority -FallbackDirectory = stem.directory.Fallback diff --git a/stem/util/connection.py b/stem/util/connection.py index f88b3f85..5480f95a 100644 --- a/stem/util/connection.py +++ b/stem/util/connection.py @@ -783,10 +783,3 @@ def _address_to_binary(address): return ''.join([_get_binary(int(grouping, 16), 16) for grouping in address.split(':')]) else: raise ValueError("'%s' is neither an IPv4 or IPv6 address" % address) - - -# TODO: drop with stem 2.x -# We renamed our methods to drop a redundant 'get_*' prefix, so alias the old -# names for backward compatability. - -get_system_resolvers = system_resolvers diff --git a/stem/util/proc.py b/stem/util/proc.py index ecb7f3f7..0b4c0ab4 100644 --- a/stem/util/proc.py +++ b/stem/util/proc.py @@ -15,10 +15,6 @@ Dave Daeschler, Giampaolo Rodola' and is under the BSD license. **These functions are not being vended to stem users. They may change in the future, use them at your own risk.**
-.. versionchanged:: 1.3.0 - Dropped the get_* prefix from several function names. The old names still - work, but are deprecated aliases. - **Module Overview:**
:: @@ -579,16 +575,3 @@ def _log_failure(parameter, exc): """
log.debug('proc call failed (%s): %s' % (parameter, exc)) - - -# TODO: drop with stem 2.x -# We renamed our methods to drop a redundant 'get_*' prefix, so alias the old -# names for backward compatability. - -get_system_start_time = system_start_time -get_physical_memory = physical_memory -get_cwd = cwd -get_uid = uid -get_memory_usage = memory_usage -get_stats = stats -get_connections = connections diff --git a/stem/util/str_tools.py b/stem/util/str_tools.py index 6b852f3d..bf582bea 100644 --- a/stem/util/str_tools.py +++ b/stem/util/str_tools.py @@ -4,10 +4,6 @@ """ Toolkit for various string activity.
-.. versionchanged:: 1.3.0 - Dropped the get_* prefix from several function names. The old names still - work, but are deprecated aliases. - **Module Overview:**
:: @@ -589,13 +585,3 @@ def _get_label(units, count, decimal, is_long, round = False): return count_label + long_label + ('s' if is_plural else '') else: return count_label + short_label - - -# TODO: drop with stem 2.x -# We renamed our methods to drop a redundant 'get_*' prefix, so alias the old -# names for backward compatability. - -get_size_label = size_label -get_time_label = time_label -get_time_labels = time_labels -get_short_time_label = short_time_label diff --git a/stem/util/system.py b/stem/util/system.py index e514c3a4..b9a7ef8d 100644 --- a/stem/util/system.py +++ b/stem/util/system.py @@ -6,10 +6,6 @@ Helper functions for working with the underlying system. These are mostly os dependent, only working on linux, osx, and bsd. In almost all cases they're best-effort, providing **None** if the lookup fails.
-.. versionchanged:: 1.3.0 - Dropped the get_* prefix from several function names. The old names still - work, but are deprecated aliases. - .. versionchanged:: 1.5.0 Added the **SYSTEM_CALL_TIME** global, which tracks total time spent making system commands. @@ -1500,18 +1496,3 @@ def _set_proc_title(process_name): # AttributeError: dlsym(0x7fff6a41d1e0, setproctitle): symbol not found
pass - - -# TODO: drop with stem 2.x -# We renamed our methods to drop a redundant 'get_*' prefix, so alias the old -# names for backward compatability. - -get_name_by_pid = name_by_pid -get_pid_by_name = pid_by_name -get_pid_by_port = pid_by_port -get_pid_by_open_file = pid_by_open_file -get_cwd = cwd -get_user = user -get_start_time = start_time -get_bsd_jail_id = bsd_jail_id -get_bsd_jail_path = bsd_jail_path diff --git a/stem/util/test_tools.py b/stem/util/test_tools.py index d65b3ea4..117d273e 100644 --- a/stem/util/test_tools.py +++ b/stem/util/test_tools.py @@ -606,13 +606,3 @@ def _python_files(paths):
if not skip: yield file_path - - -# TODO: drop with stem 2.x -# We renamed our methods to drop a redundant 'get_*' prefix, so alias the old -# names for backward compatability, and account for pep8 being renamed to -# pycodestyle. - -get_stylistic_issues = stylistic_issues -get_pyflakes_issues = pyflakes_issues -is_pep8_available = is_pycodestyle_available
tor-commits@lists.torproject.org