Change Log¶
The following is a log of all user-facing changes to Stem, both released and unreleased. For a monthly report on work being done see my development log.
Versioning¶
Stem uses semantic versioning, which means that versions consist of three numbers (such as ‘1.2.4’). These are used to convey the kind of backward compatibility you can expect…
The first value is the major version. This changes infrequently, and indicates that backward incompatible changes have been made (such as the removal of deprecated functions).
The second value is the minor version. This is the most common kind of release, and denotes that the improvements are backward compatible.
The third value is the patch version. When a Stem release has a major issue another release is made which fixes just that problem. These do not contain substantial improvements or new features. This value is sometimes left off to indicate all releases with a given major/minor version.
Unreleased¶
The following are only available within Stem’s git repository.
Controller
Socket based control connections often raised BrokenPipeError when closed
Descriptors
transport lines within extrainfo descriptors failed to validate
Version 1.8 (December 29th, 2019)¶
Stem 1.8 is the final release in Stem’s 1.x series and with it Python 2.x support. Over a year in the making, this introduces CollecTor, bandwidth metric, and HSv3 descriptor support.
Controller
Added
get_start_time()
method to theController
Added
get_uptime()
method to theController
Controller events could fail to be delivered in a timely fashion (ticket 27173)
Adjusted
get_microdescriptors()
fallback to also use ‘.new’ cache files (ticket 28508)ExitPolicies could raise TypeError when read concurrently (ticket 29899)
Moved the arrived_at attribute from
Event
toControlMessage
QUERY_RATE_LIMITED
HSDescReason
(spec)EXTOR and HTTPTUNNEL
Listener
Descriptors
Added the stem.descriptor.collector module (ticket 17979)
stem.descriptor.remote methods now raise
stem.DownloadFailed
Check Ed25519 validity though the cryptography module rather than PyNaCl (ticket 22022)
Download compressed descriptors by default (ticket 29186)
Added
Compression
classAdded
stem.descriptor.remote.get_microdescriptors()
Added
stem.descriptor.remote.get_bandwidth_file()
(ticket 26902)Added
DetachedSignature
parsing (ticket 28495)Added
from_str()
method (ticket 28450)Added
type_annotation()
method (ticket 28397)Added
digest()
method (ticket 28398)Added the hash_type and encoding arguments to ServerDescriptor and ExtraInfo’s digest methods (ticket 28398)
Added the network status vote’s new bandwidth_file_digest attribute (spec)
Added
is_valid()
andis_fresh()
methods (ticket 28448)Replaced
RouterStatusEntryMicroV3()
hex encoded digest attribute with a base64 encoded microdescriptor_digestReplaced the digest attribute of
Microdescriptor
with a method by the same name (ticket 28398)Default the version_flavor attribute of
NetworkStatusDocumentV3
to ‘ns’ (spec)DescriptorDownloader crashed if use_mirrors is set (ticket 28393)
Renamed stem.descriptor.hidden_service_descriptor to stem.descriptor.hidden_service
Don’t download from Serge, a bridge authority that frequently timeout
Updated dizum authority’s address (ticket 31406)
Client
Sockets with ORPorts errored if responses exceeded a hardcoded buffer size (ticket 28961)
Utilities
is_valid_hidden_service_address()
now provides true if a v3 hidden servie addressFixed ‘invalid escape sequence’ python 3.6 warnings (ticket 27270)
Website
Added NetBSD to our download page
Describe advanced listener usage
Exemplify manual SAFECOOKIE authentication
Interpreter
tor-prompt is now ~34% faster when used to non-interactively invoke commands
Version 1.7 (October 7th, 2018)¶
Stem 1.7 is a full year of improments. Most notably this adds the ability to download descriptors through ORPorts and the stem.directory module.
Controller
Listener exceptions and malformed events no longer break further event processing (ticket 27053)
Documented v3 hidden service support (ticket 25124, spec)
Added the stem.control.MALFORMED_EVENTS event listener constant
Added support for limiting the maximum number of streams for
create_ephemeral_hidden_service()
(spec)Added a timeout argument to
Controller
methods that could await a response (ticket 26056)Added a close_output argument to
launch_tor
stem.connection.connect()
crashed if its port argument was a stringMore reliable ExitPolicy resolution (ticket 25739)
Fixed cache invalidation when another contorller calls SETCONF (ticket 25821)
create_hidden_service()
failed when creating services with v2 options (ticket 27446)
get_info()
commonly raisedstem.ProtocolError
when it should provide astem.OperationFailed
get_microdescriptors()
now reads microdescriptors from the control port rather than disk when available (spec)Added the delivered_read, delivered_written, overhead_read, and overhead_written attributes to
CircuitBandwidthEvent
(spec)The config attribute of
ConfChangedEvent
couldn’t represent tor configuration options with multiple values. It has been replaced with new changed and unset attributes.Replaced socket’s
get_address()
,get_port()
, andget_socket_path()
with attributes
ControlMessage
is now comparable and hashableRemoved the ‘raw’ argument from
send()
Descriptors
stem.descriptor.remote can now download from relay ORPorts
Zstd and lzma compression support (spec)
Moved the Directory classes into their own stem.directory module
Added
from_cache()
andfrom_remote()
to theDirectoryAuthority
subclassTor rearranged its files, adjusted
stem.descriptor.remote.Directory.from_remote()
andstem.manual.Manual.from_remote()
to account for thisFallback directory v2 support, which adds nickname and extrainfo
Added the orport_v6 attribute to the
Authority
classAdded server descriptor’s new is_hidden_service_dir attribute
Added the network status vote’s new bandwidth_file_headers attribute (spec)
Added the microdescriptor router status entry’s new or_addresses attribute (ticket 26405, spec)
Don’t retry downloading descriptors when we’ve timed out
Don’t download from tor26, an authority that frequently timeout
Replaced Bifroest bridge authority with Serge (ticket 26771)
stem.descriptor.remote now consistently defaults fall_back_to_authority to false
Deprecated stem.descriptor.export. If you use it please let us know.
Added
their_server_descriptor()
Added the reply_headers attribute to
Query
Supplying a User-Agent when downloading descriptors
Reduced maximum descriptors fetched by the remote module to match tor’s new limit (ticket 24743)
Consensus shared_randomness_*_reveal_count attributes undocumented, and unavailable if retrieved before their corresponding shared_randomness_*_value attribute (ticket 25046)
Allow ‘proto’ line to have blank values (spec)
Utilities
Fixed PyPy compatibility (ticket 26207)
Python 3.6+ syntax error if test_tools.py imported (ticket 26739)
Connection information from proc limited to 10,000 results
Include attribute types in most equality checks and hashes
Cache hash values of immutable classes
More performant string concatenation via bytearrays
Functions using lru_cache could fail with a KeyError on Python 3.5 (ticket 26412)
Website
Added terminal styling to our utilities tutorial
Added multiprocessing to our utilities tutorial
Added a descriptor download example
Added a relay connection summary example
Version 1.7.1 (December 26th, 2018) -
launch_tor()
compatibility with an upcoming log format change (ticket 28731)
Version 1.6 (November 5th, 2017)¶
Year long accumulation of fixes and improvements in support of the Nyx 2.0 release.
Controller
launch_tor()
raised a ValueError if invoked when outside the main threadFailure to authenticate could raise an improper response or hang (ticket 22679)
Renamed
ConnectionBandwidthEvent
type attribute to conn_type to avoid conflict with parent class (ticket 21774)Added ‘force’ argument to
save_conf()
(spec)Added the QUERY_NO_HSDIR
HSDescReason
and recognizing unknown HSDir results (spec)Added the GUARD_WAIT
CircStatus
(spec)Unable to use cookie auth when path includes wide characters (chinese, japanese, etc)
Tor change caused
list_ephemeral_hidden_services()
to provide empty strings if unset (ticket 21329)Better error message when
set_conf()
fails due to an option being immutable
get_ports()
didn’t provide ports for many representations of localhost (ticket 24085)
is_geoip_unavailable()
now determines if database is available right awayAdded the time attribute to
StreamBwEvent
andCircuitBandwidthEvent
(spec)Added the consensus_content attribute to
NewConsensusEvent
and deprecated its ‘desc’Deprecated
is_geoip_unavailable()
, this is now available via getinfo instead (ticket 23237, spec)Deprecated
AuthDirNewDescEvent
(ticket 22377, spec)Caching manual information as sqlite rather than stem.util.conf, making
stem.manual.Manual.from_cache()
about ~8x fasterAdded
database()
to get a cursor for the manual cacheFailed to parse torrcs without a port on ipv6 exit policy entries
Resilient to ‘Tor’ prefix in ‘GETINFO version’ result (spec)
Added a all_extra parameter to
stem.version.Version
and support for multiple parenthetical entries (ticket 22110, spec)Setting ‘UseMicrodescriptors 1’ in your torrc caused
get_network_statuses()
to error (ticket 24110)Closing controller connection faster when under heavy event load
Better messaging when unable to connect to tor on FreeBSD
More succinct trace level logging
Descriptors
Supporting descriptor creation (ticket 10227)
Support and validation for ed25519 certificates (spec, ticket 21558)
Added
validate_signatures()
to check our key certificate signatures (ticket 11045)Moved from the deprecated pycrypto module to cryptography for validating signatures (ticket 21086)
Sped descriptor reading by ~25% by deferring defaulting when validating
Added server descriptor’s new extra_info_sha256_digest attribute (spec)
Added server descriptor’s new protocol attribute (spec)
Added server descriptor’s new bridge_distribution attribute (ticket 21177)
Added extrainfo descriptor’s new padding_counts attributes (spec)
Shared randomness properties weren’t being read in votes (ticket 21102)
Added bastet as a new authority (ticket 23912)
Updated longclaw authority’s address (ticket 23592)
Utilities
Support connection resolution on OpenBSD using fstat (ticket 13807)
Added
size_of()
Added
is_tracing()
Added timeout argument to
call()
Added cwd argument to
call()
Added round argument to
size_label()
Added
TimedTestRunner
andtest_runtimes()
Supporting pid arguments in
is_running()
Made connection resolution via proc about 5x faster
Normalized
format()
to return unicodeDon’t load vim swap files as configurations
Interpreter
Added a ‘–run [command or path]’ argument to invoke specific commands (ticket 21541)
Allowing interpreter to continue after tor shuts down (ticket 22374)
Interpreter buffered an unbounded number of events, leaking memory over time
Website
Source code served by ‘[source]’ links perpetually stale (ticket 19521)
Version 1.5 (November 20th, 2016)¶
Stem 1.5 is a long overdue accumulation of seventeen months of improvements including dramatically improved python 3.x performance, tor manual information, and much more.
Controller
Dramatic, 300x performance improvement for reading from the control port with python 3
Added stem.manual, which provides information available about Tor from its manual (ticket 8251)
connect()
andfrom_port()
now connect to both port 9051 (relay’s default) and 9151 (Tor Browser’s default) (ticket 16075)
ExitPolicy
support for accept6/reject6 and *4/6 wildcards (ticket 16053)Added support for basic authentication to
create_ephemeral_hidden_service()
(spec)Added support for non-anonymous services to
create_ephemeral_hidden_service()
(spec)Added
event_description()
for getting human-friendly descriptions of tor events (ticket 19061)Added
reconnect()
to theController
Added
is_set()
to theController
Added
is_user_traffic_allowed()
to theController
Added the replica attribute to
HSDescEvent
(spec)Recognize listeners with IPv6 addresses in
get_listeners()
launch_tor()
could leave a lingering process during an unexpected exception (ticket 17946)IPv6 addresses could trigger errors in
get_listeners()
,ORConnEvent
, and quite a few other things (ticket 16174)Don’t obscure stacktraces, most notably
Controller
getter methods with default valuesClasses with custom equality checks didn’t provide a corresponding inequality method
Descriptors
Support for ed25519 descriptor fields (spec)
Support downloading microdescriptor consensus with :func:~stem.descriptor.remote.DescriptorDownloader.get_consensus` (:spec`e788b8f`)
Added consensus and vote’s new shared randomness attributes (spec)
Added server descriptor’s new allow_tunneled_dir_requests attribute (spec)
Server descriptor validation fails with ‘extra-info-digest line had an invalid value’ from additions in proposal 228 (ticket 16227)
BridgeDescriptor
now has ‘ntor_onion_key’ like its unsanitized counterpartsReplaced the
Microdescriptor
identifier and identifier_type attributes with an identifiers hash since it can now appear multiple times (spec)Unable to read descriptors from data directories on Windows due to their CRLF newlines (ticket 17051)
TypeError under python3 when using ‘use_mirrors = True’ (ticket 17083)
Deprecated hidden service descriptor’s introduction_points_auth field, which was never implemented in tor (ticket 15190, spec)
Deprecated
get_microdescriptors()
as it was never implemented in tor (ticket 9271)
get_hidden_service_descriptor()
errored when provided a servers argument (ticket 18401)Fixed parsing of server descriptor’s allow-single-hop-exits and caches-extra-info lines
Bracketed IPv6 addresses were mistreated as being invalid content
Better validation for non-ascii descriptor content
Updated dannenberg’s v3ident (ticket 17906)
Removed urras as a directory authority (ticket 19271)
Utilities
IPv6 support in
get_connections()
when resolving with proc, netstat, lsof, or ss (ticket 18079)The ‘ss’ connection resolver didn’t work on Gentoo (ticket 18079)
Recognize IPv4-mapped IPv6 addresses in our utils (ticket 18079)
Allow
stem.util.conf.Config.set()
to remove values when provided with a None valueSupport prefix and suffix issue strings in
pyflakes_issues()
Additional information when
call()
fails through aCallError
Added stem.util.system.SYSTEM_CALL_TIME with the total time spent on system calls
Added an is_ipv6 value to
Connection
instancesAdded LINES attribute to
Attr
Added
pids_by_user()
Added
address_to_int()
Added
encoding()
Added
datetime_to_unix()
Interpreter
Added a ‘–tor [path]’ argument to specify the tor binary to run.
Website
Version 1.5.3 (December 5th, 2016) - including tests and site in the release tarball
Version 1.5.4 (January 4th, 2017) - drop validation of the order of fields in the tor consensus (ticket 21059)
Version 1.4 (May 13th, 2015)¶
Stem’s 1.4 release brings with it new hidden service capabilities. Most notably, ephemeral hidden services and the ability to read hidden service descriptors. This release also changes descriptor validation to now be opt-in rather than opt-out. When unvalidated content is lazy-loaded, greatly improving our performance.
And last, Stem also now runs directly under both python2 and python3 without a 2to3 conversion (ticket 14075)!
Controller
Added
Controller
methods for a new style of hidden services that don’t touch disk:list_ephemeral_hidden_services()
,create_ephemeral_hidden_service()
, andremove_ephemeral_hidden_service()
(spec)Added
get_hidden_service_descriptor()
and support for HS_DESC_CONTENT events (ticket 14847, spec)
launch_tor_with_config()
avoids writing a temporary torrc to disk if able (ticket 13865)
CircuitEvent
support for the new SOCKS_USERNAME and SOCKS_PASSWORD arguments (ticket 14555, spec)The ‘strict’ argument of
can_exit_to()
didn’t behave as documented (ticket 14314)Threads spawned for status change listeners were never joined on, potentially causing noise during interpreter shutdown
Added support for specifying the authentication type and client names in
create_hidden_service()
(ticket 14320)
Descriptors
Lazy-loading descriptors, improving performance by 25-70% depending on what type it is (ticket 14011)
When reading sanitised bridge descriptors (server or extrainfo),
parse_file()
treated the whole file as a single descriptorThe
DirectoryAuthority
‘fingerprint’ attribute was actually its ‘v3ident’Added consensus’ new package attribute (spec)
Added extra info’ new hs_stats_end, hs_rend_cells, hs_rend_cells_attr, hs_dir_onions_seen, and hs_dir_onions_seen_attr attributes (spec)
Updating Faravahar’s address (ticket 14487)
Utilities
Windows support for connection resolution (ticket 14844)
stem.util.connection.port_usage()
always returned None (ticket 14046)
stylistic_issues()
andpyflakes_issues()
now provide namedtuples that also includes the lineAdded
stem.util.system.tail()
Proc connection resolution could fail on especially busy systems (ticket 14048)
Website
Added support and instructions for tox (ticket 14091)
Added OSX to our download page (ticket 8588)
Updated our twitter example to work with the service’s 1.1 API (ticket 9003)
Version 1.4.1 (May 18th, 2015) - fixed issue where descriptors couldn’t be unpickled (ticket 16054) and a parsing issue for router status entry bandwidth lines (ticket 16048)
Version 1.3 (December 22nd, 2014)¶
With Stem’s 1.3 release it’s now much easier to work with hidden services, 40% faster to read decriptors, and includes a myriad of other improvements. For a nice description of the changes this brings see Nathan Willis’ LWN article.
Controller
Added
Controller
methods to more easily work with hidden service configurations:get_hidden_service_conf()
,set_hidden_service_conf()
,create_hidden_service()
, andremove_hidden_service()
(ticket 12533)Added
get_accounting_stats()
to theController
Added
get_effective_rate()
to theController
Added
connection_time()
to theBaseController
Changed
get_microdescriptor()
,get_server_descriptor()
, andget_network_status()
to get our own descriptor if no fingerprint or nickname is provided.Added
ExitPolicy
methods for more easily handling ‘private’ policies (the default prefix) and the defaultly appended suffix. This includeshas_private()
,strip_private()
,has_default()
, andstrip_default()
ExitPolicy
methods in addition tois_private()
andis_default()
for theExitPolicyRule
. (ticket 10107)Added the reason attribute to
HSDescEvent
(spec)
launch_tor_with_config()
could cause a “Too many open files” OSError if called too many times (ticket 13141)The
get_exit_policy()
method errored if tor couldn’t determine our external addressThe Controller’s methods for retrieving descriptors could raise unexpected ValueErrors if tor didn’t have any descriptors available
Throwing a new
DescriptorUnavailable
exception type when theController
can’t provide the descriptor for a relay (ticket 13879)
Descriptors
Improved speed for parsing consensus documents by around 40% (ticket 12859 and ticket 13821)
Don’t fail if consensus method 1 is not present, as it is no longer required (spec)
Include ‘*.new’ files when reading from a Tor data directory (ticket 13756)
Updated the authorities we list, replacing turtles with longclaw and updating gabelmoo’s address
Noting if authorities are also a bandwidth authority or not
Microdescriptor validation issues could result in an AttributeError (ticket 13904)
Utilities
Added support for directories to
stem.util.conf.Config.load()
Changed
stem.util.conf.uses_settings()
to only provide a ‘config’ keyword arument if the decorated function would accept itAdded
stem.util.str_tools.crop()
Added
stem.util.proc.file_descriptors_used()
Dropped the ‘get_*’ prefix from most function names. Old names will still work, but are a deprecated alias.
Interpreter
The /info command errored for relays without contact information
Website
Tutorial for hidden services
Example for writing descriptors to disk and reading them back (ticket 13774)
Added Gentoo to our download page and handful of testing revisions for that platform (ticket 13904)
Tests for our tutorial examples (ticket 11335)
Revised GitWeb urls to work after its upgrade
Version 1.2 (June 1st, 2014)¶
Stem release 1.2 added our interactive Tor interpreter among numerous other improvements and fixes.
Controller
New, better
connect()
function that deprecatesconnect_port()
andconnect_socket_file()
Added
is_newnym_available()
andget_newnym_wait()
methods to theController
Added
get_ports()
andget_listeners()
methods to theController
Added
drop_guards()
(ticket 10032, spec)Added the id attribute to
ORConnEvent
(spec)Added support for CONN_BW events (spec)
Added support for CIRC_BW events (spec)
Added support for CELL_STATS events (spec)
Added support for TB_EMPTY events (spec)
Added support for HS_DESC events (ticket 10807, spec)
Changed
get_network_status()
andget_network_statuses()
to provideRouterStatusEntryMicroV3
if Tor is using microdescriptors (ticket 7646)The
connect_port()
andconnect_socket_file()
didn’t properly mark the Controller it returned as being authenticated, causing event listening among other things to failThe
add_event_listener()
method couldn’t accept event types that Stem didn’t already recognizeThe
ExitPolicy
class couldn’t be pickledTor instances spawned with
launch_tor()
andlaunch_tor_with_config()
could hang due to unread stdout content, we now close stdout and stderr once tor finishes bootstrapping (ticket 9862)
Descriptors
Added tarfile support to
parse_file()
(ticket 10977)Added microdescriptor’s new identifier and identifier_type attributes (spec)
Utilities
Added the stem.util.test_tools module
Started vending the stem.util.tor_tools module
Added
stem.util.connection.port_usage()
Added
stem.util.system.files_with_suffix()
Interpreter
Initial release of our interactive Tor interpreter!
Website
Added a section with example scripts.
Made FAQ and other sections quite a bit more succinct.
Version 1.2.2 (June 7th, 2014) - fixed an issue where the stem.util.conf module would fail under Python 2.6 with an AttributeError (ticket 12223)
Version 1.2.1 (June 3rd, 2014) - fixed an issue where descriptor parsersing would fail under Python 3.x with a TypeError (ticket 12185)
Version 1.1 (October 14th, 2013)¶
Stem release 1.1 introduced remote descriptor fetching, connection resolution and a myriad of smaller improvements and fixes.
Controller
get_network_status()
andget_network_statuses()
now provide v3 rather than v2 directory information (ticket 7953, spec)
AddrMapEvent
support for the new CACHED argument (ticket 8596, spec)
attach_stream()
could encounter an undocumented 555 response (ticket 8701, spec)
RelayDescriptor
digest validation was broken when dealing with non-unicode content with Python 3 (ticket 8755)The
Controller
use of cached content wasn’t thread safe (ticket 8607)Added
get_user()
method to theController
Added
get_pid()
method to theController
StreamEvent
didn’t recognize IPv6 addresses (ticket 9181)
get_conf()
mistakenly cached hidden service related options (ticket 9792)
Descriptors
Added the stem.descriptor.remote module.
Added support for TorDNSEL exit lists (ticket 8255)
The
DescriptorReader
mishandled relative paths (ticket 8815)
Utilities
Connection resolution via the
get_connections()
function (ticket 7910)
set_process_name()
inserted spaces between characters (ticket 8631)
pid_by_name()
can now pull for all processes with a given name
call()
ignored the subprocess’ exit statusAdded
stem.util.system.name_by_pid()
Added
stem.util.system.user()
Added
stem.util.system.start_time()
Added
stem.util.system.bsd_jail_path()
Added
stem.util.system.is_tarfile()
Added
stem.util.connection.is_private_address()
Website
Overhaul of Stem’s download page. This included several improvements, most notably the addition of PyPI, Ubuntu, Fedora, Slackware, and FreeBSD.
Replaced default sphinx header with a navbar menu.
Added this change log.
Added the FAQ page.
Settled on a logo for Stem.
Expanded the client usage tutorial to cover SocksiPy and include an example for polling Twitter.
Version 1.1.1 (November 9th, 2013) - fixed an issue where imports of stem.util.system would fail with an ImportError for pwd under Windows (ticket 10072)
Version 1.0 (March 26th, 2013)¶
This was the initial release of Stem.
Version 1.0.1 (March 27th, 2013) - fixed an issue where installing with Python 3.x (python3 setup.py install) resulted in a stacktrace