You need to sign in or sign up before continuing.
- Aug 05, 2018
-
-
Damian Johnson authored
As reported by teor, stem.descriptor's parse_file() function cannot accept stdin... https://trac.torproject.org/projects/tor/ticket/23859 The trouble is that not all file objects in python are seekable. I'd *like* to handle address this transparently by buffering the content... try: descriptor_file.tell() except IOError: # file's not seekable, wrapping in a buffer that is descriptor_file = io.BytesIO(descriptor_file.read()) This works great if our stream has content... % cat my_descriptors | python demo.py *But* hangs indefinitely if no EOF is present in the stream. % python demo.py <= hangs Turns out non-blocking, platform independent reading of streams like stdin is pretty tricky... http://eyalarubas.com/python-subproc-nonblock.html As such simply providing callers with a more descriptive exception. If they know their stream won't block *they* can add the above wrapper to provide us with a seekable file object.
-
- Aug 04, 2018
-
-
Damian Johnson authored
Irc discussion Dave partook in indicated that we should flush our cache when we receive a DNS_USELESS event, not just EXTERNAL_ADDRESS. https://trac.torproject.org/projects/tor/ticket/26129
-
Damian Johnson authored
When not configured to be a tor relay tor's 'GETINFO exit-policy/full' query won't function. Rather than attempt to guess the exit policy from other configuration options providing None for 552 responses... https://trac.torproject.org/projects/tor/ticket/25853 https://gitweb.torproject.org/torspec.git/commit/?id=c5453a0 The above spec addition makes it ambiguous if 552 means 'not a relay' or 'we had an error' so reached out for clarificaition on how these should be handled... https://trac.torproject.org/projects/tor/ticket/27034 In the process also had to fix get_info to raise OperationFailed rather than a ProtocolError so callers can get the underlying response codes.
-
- Aug 03, 2018
-
-
Damian Johnson authored
Couple regressions that mostly slipped in with the recent hashing changes. https://trac.torproject.org/projects/tor/ticket/27030
-
- Jul 31, 2018
-
-
Damian Johnson authored
Thanks to rl1987 tor now has a GETINFO method to retrieve microdescriptors (similar to 'GETINFO desc/all-recent', 'GETINFO ns/all', etc). https://gitweb.torproject.org/torspec.git/commit/?id=b5396d5 https://trac.torproject.org/projects/tor/ticket/26210
-
Damian Johnson authored
Good point from irl that our tests fail if the gitignore file isn't present... https://trac.torproject.org/projects/tor/ticket/26984 % ./run_tests.py --all Traceback (most recent call last): File "./run_tests.py", line 36, in <module> import test File "/home/atagar/Desktop/stem/test/__init__.py", line 71, in <module> with open(os.path.join(STEM_BASE, '.gitignore')) as ignore_file: IOError: [Errno 2] No such file or directory: '/home/atagar/Desktop/stem/.gitignore'
-
Damian Johnson authored
Link protocols are ints. I made a LinkProtocol class so we can bundle protocol characteristics (field size and such) but at the end of the day it's nice for LinkProtocol to still behave like an int. Dave made the good point that LinkProtocols should be comparable with ints... https://trac.torproject.org/projects/tor/ticket/26432 Taking that one step further and making them in int subclass instead. Experimenting, the __init__ and __new__ methods seem to work in practice for our purposes but the python docs advise __new__ so using that... https://jfine-python-classes.readthedocs.io/en/latest/subclass-int.html
-
- Jul 29, 2018
-
-
Damian Johnson authored
-
Damian Johnson authored
Python3 evidently no longer bundles distutils. We only used it in our utils for simplicity, prior to commit 943289db we manually crawled the path. Effectively reverting commit 943289db. https://trac.torproject.org/projects/tor/ticket/26967
-
- Jul 24, 2018
-
-
Dave Rolek authored
Running `tox` (or e.g. `tox -- -u`) will now be substantially more useful, by default. Fixes #26916 https://trac.torproject.org/projects/tor/ticket/26916
-
Dave Rolek authored
-
Dave Rolek authored
-
Dave Rolek authored
-
Dave Rolek authored
In practice, it appears to redundantly reference whatever py3 version is installed.
-
- Jul 23, 2018
-
-
Dave Rolek authored
-
Dave Rolek authored
Note that this applies only to the summary and exit status of tox. During operation, tox will still display an error for each missing interpreter. (This may be confusing.)
-
- Jul 22, 2018
-
-
Damian Johnson authored
The initial dir-spec definition of this field allowed blank values. Then it got revised to disallow them. Now they're allowed again. ;P https://gitweb.torproject.org/torspec.git/commit/?id=2cce07d No big whoop. Until we cut a release this is easy to twiddle.
-
- Jul 20, 2018
-
-
Damian Johnson authored
Skimmed over our history to fill in changelog gaps. We only include user facing adjustments to existing features so this didn't include most of our recent work (stem.client wasn't part of Stem 1.6, and we don't note testing or development changes).
-
- Jul 19, 2018
-
-
Damian Johnson authored
Matt's narrowed sbws issues he's been having to a buggy implementation of lru_cache in python 3.5. Using our bundled version instead for that particular series.
-
- Jul 18, 2018
-
-
Damian Johnson authored
Immutable classes have immutable cache values, and as frequntly used equality/dictionary values it's useful to cache these.
-
- Jul 17, 2018
-
-
Damian Johnson authored
Hashing classes (ie. "hash(type(my_obj))") sometimes provides inconsistant values between interpreter invocations. Common builtin types (int, str, etc) are consistant, but custom classes appear to vary. Generally speaking this is fine. Hash value consistancy is only highly important within an interpreter invocation. But full consistancy is nice and easy to achieve. Hashing the string representation of our module name instead.
-
- Jul 16, 2018
-
-
Damian Johnson authored
We parse quite a number of 'key=value' descriptor fields. Clear spot where we can deduplicate things a bit.
-
Dave Rolek authored
This flag, denoted as deprecated in pip 9, was causing pip 10 to error, preventing tox from being used for new virtualenvs. Fixes #26811 https://trac.torproject.org/projects/tor/ticket/26811
-
Damian Johnson authored
Router status entry 'a' lines previously only appeared in the standard consensus but now they appear in the microdescriptor consensus as well... https://trac.torproject.org/projects/tor/ticket/26405 https://trac.torproject.org/projects/tor/ticket/23826
-
- Jul 15, 2018
-
-
Damian Johnson authored
-
- Jul 12, 2018
-
-
Damian Johnson authored
Newish change in tor's dirauth configuration.
-
Damian Johnson authored
Resyncing our manual information from tor to pick up new torrc options.
-
Dave Rolek authored
Previously, unpacking would popular the 'unused' attribute with any remainder content, but it would never be used by anything. This also has various testing improvements to make the Cell tests more data-driven. https://trac.torproject.org/projects/tor/ticket/26766
-
Dave Rolek authored
Especially with the test case added just below the line this commit changes, it becomes easier to identify the bytes that specify the payload length and see it change line-to-line.
-
Dave Rolek authored
All implemented cell types that may have 'unused' content now have a test case that checks it.
-
Dave Rolek authored
This could've also been done inline in the earlier commit, but wasn't so that it would be easier to identify the moved content therein.
-
Dave Rolek authored
This could've been directly fixed in the previous commit, but it was such a minor change that doing so might've hidden it, so it's been separated out for clarity.
-
Dave Rolek authored
By refactoring this check into test data, and with the logic set up in previous commits, the commit also ensures more test coverage for this case. Also clean up the comments for context.
-
Dave Rolek authored
This is the other logical thing to do (the complement of the previous commit) with the test cases. Note that just because the logic is in the tests now doesn't necessarily mean that there's test cases that use it yet.
-
Dave Rolek authored
Don't try to test cell packing with non-blank,non-ZERO 'unused' content without specifying it in constructor The test for DestroyCell already did this, so apply this structure to tests of all other cell types that may have 'unused' content. And since this is now such a common pattern in the test file, having a comment for it is less necessary, so also removing that.
-
Dave Rolek authored
This was the only implemented cell type without any tests of 'unused' content, so now all have tests. However they don't necessarily test non-blank or non-ZERO data yet.
-
Dave Rolek authored
This is in preparation to make it much easier to manage data-driven test cases for 'unused' content.
-
Dave Rolek authored
This removes most - but not all - use of magic numbers for link_protocol values.
-
Dave Rolek authored
-
Dave Rolek authored
This fixes #26766, as well as makes the aforementioned failing DestroyCell test pass. Also change a few tests that used _pack() directly, since the parameter order changed with keyword arguments.
-