diff options
| author | Damian Johnson <atagar@torproject.org> | 2018-07-11 09:05:32 -0700 |
|---|---|---|
| committer | Damian Johnson <atagar@torproject.org> | 2018-07-11 09:11:19 -0700 |
| commit | 6c677b6a4080d14a56d2d88ab2ddd9766cc60b9a (patch) | |
| tree | 4bed276111be50f1af945e6e79d1152bc7a2dbda | |
| parent | 183b27df7ed1cf70bce847fe8db4cb85249f8eef (diff) | |
'async' SyntaxError with python 3.6 and above
Python 3.6 adds a couple new keywords to the language (async and await) so we
need to be careful not to use those. 99.9% of our users don't import our test
utils so this was mostly moot, but Juan ran into an issue packaging Stem for
Fedora...
BUILDSTDERR: File "/usr/lib/python3.7/site-packages/stem/util/test_tools.py", line 151
BUILDSTDERR: self.method.async = self
BUILDSTDERR: ^
BUILDSTDERR: SyntaxError: invalid syntax
https://trac.torproject.org/projects/tor/ticket/26739
This line aimed to provide a way for tests to reference its AsyncTest instance.
This doesn't look to actually be used in practice so think we can simply drop
it. Checked with grep and a 'run_tests.py --all --target ONLINE' run.
| -rw-r--r-- | docs/change_log.rst | 1 | ||||
| -rw-r--r-- | stem/util/test_tools.py | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/docs/change_log.rst b/docs/change_log.rst index eeaf0362..88558374 100644 --- a/docs/change_log.rst +++ b/docs/change_log.rst @@ -80,6 +80,7 @@ The following are only available within Stem's `git repository * **Utilities** * Fixed PyPy compatibility (:trac:`26207`) + * Python 3.6+ syntax error if test_tools.py imported (:trac:`26739`) * Connection information from proc limited to 10,000 results * Accouting for attribute types in most equality checks and hashes diff --git a/stem/util/test_tools.py b/stem/util/test_tools.py index 722398d0..c7573202 100644 --- a/stem/util/test_tools.py +++ b/stem/util/test_tools.py @@ -148,7 +148,6 @@ class AsyncTest(object): self._threaded = threaded self.method = lambda test: self.result(test) # method that can be mixed into TestCases - self.method.async = self self._process = None self._process_pipe = None |
