The Tahoe-LAFS decentralized secure filesystem.
Go to file
Ross Patterson 3f297bf0e3 feat(py3): Fix test runner exception
The exception this addresses was preventing the test runner from running to completion
under Python 3, thus preventing using the full test suite to evaluate the impact of
porting efforts.

This change causes no regressions in the test suite under python 2.7 and only affects
tests AFAICT.  I added debug logging to check all the strings that seem to make it to
that point and I didn't see anything that looked like it needed to be decoded in
particular, so I think this change is relatively safe.

The traceback for reference

```
Traceback (most recent call last):
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/bin/trial", line 8, in <module>
    sys.exit(run())
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/scripts/trial.py", line 621, in run
    test_result = trialRunner.run(suite)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 998, in run
    return self._runWithoutDecoration(test, self._forceGarbageCollection)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 1025, in _runWithoutDecoration
    run()
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 1020, in <lambda>
    run = lambda: suite.run(result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 253, in run
    TestSuite.run(self, result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/_asyncrunner.py", line 38, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 212, in run
    super(LoggedSuite, self).run(result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/_asyncrunner.py", line 38, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 185, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 185, in run
    test(result)
  File "/usr/lib/python3.6/unittest/suite.py", line 84, in __call__
    return self.run(*args, **kwds)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/runner.py", line 185, in run
    test(result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/_asyncrunner.py", line 59, in __call__
    return self.run(result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/twisted/trial/_asyncrunner.py", line 69, in run
    reporter._AdaptedReporter(result, self.__class__))
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 675, in run
    return run_test.run(result)
  File "/home/rpatterson/src/work/sfu/tahoe-lafs/src/allmydata/test/eliotutil.py", line 110, in run_and_republish
    with RUN_TEST(name=self.id().decode("utf-8")).context() as action:
AttributeError: 'str' object has no attribute 'decode'
```
2020-10-04 15:57:01 -07:00
.circleci Add comment 2020-09-14 07:38:54 -04:00
.github Remove references to the bare "coverage" tox environment 2020-08-27 10:37:50 -04:00
docs test(vcs): Reconcile devel docs from PR #798 2020-09-30 07:37:52 -07:00
integration Add note on Tor integration test failures on Windows 2020-07-21 14:59:04 -04:00
misc test(py3): Add diff tests convenience targets 2020-09-30 12:14:06 -07:00
newsfragments Merge branch '3448.convert-only-unicode-to-str' 2020-10-01 12:23:04 -07:00
nix Try to fix nix. 2020-07-28 13:00:44 -04:00
release-tools refactor more 2018-05-29 13:17:32 -06:00
src/allmydata feat(py3): Fix test runner exception 2020-10-04 15:57:01 -07:00
static Eliminate mock dependency. 2015-07-17 22:12:25 +01:00
.codecov.yml Mention known issue with non-determinism in coverage data 2020-09-08 16:07:46 -04:00
.coveragerc test(coverage): Include human-readable coverage report 2020-09-24 11:37:37 -07:00
.gitignore test(vcs): Reconcile devel docs from PR #798 2020-09-30 07:37:52 -07:00
.lgtm.yml Disable another lgtm query. 2018-04-26 15:41:38 -04:00
.pre-commit-config.yaml test(vcs): Add a VCS commit hook to run linters 2020-09-27 09:44:13 -07:00
COPYING.GPL Fix repeated 'the' in license text. 2011-08-19 13:48:36 -07:00
COPYING.TGPPL.rst magic first line tells emacs to use utf8+bom 2013-11-08 21:08:05 +00:00
CREDITS a couple additions to CREDITS 2018-05-18 14:41:48 -06:00
docker-compose.yml add dockerfile for hacking with docker compose file for local environment 2017-09-19 09:25:39 -07:00
Dockerfile Remove $HOME/.cache/ directory after building. 2016-09-26 15:19:04 -07:00
Dockerfile.dev add dockerfile for hacking with docker compose file for local environment 2017-09-19 09:25:39 -07:00
Makefile Merge branch 'master' into 3448.convert-only-unicode-to-str 2020-09-30 11:50:42 -07:00
MANIFEST.in setup.py/MANIFEST.in: include missing files 2017-01-18 16:28:23 -08:00
NEWS.rst update title 2020-03-11 18:41:32 -06:00
pyinstaller.spec Additional hidden imports due to use of Future. 2020-07-03 13:44:47 -04:00
README.rst add some alt text 2020-07-07 09:19:30 -04:00
relnotes.txt bump version to 1.14.0 and update release notes 2020-03-11 17:38:03 -06:00
setup.cfg Add a codecheck for tabs in indentation 2020-08-03 21:14:55 -04:00
setup.py Merge branch 'master' into 3394.py38-tests 2020-09-09 21:42:32 -04:00
Tahoe.home rename bin/allmydata-tahoe to bin/tahoe. Closes #155. 2007-10-11 03:38:24 -07:00
towncrier.pyproject.toml Fix the issue links 2020-02-07 09:27:02 -05:00
tox.ini fix(ci): Remove use of make for Windows CI runs 2020-09-30 10:14:32 -07:00
ws_client.py move to different url 2019-03-21 15:00:02 -04:00

==========
Tahoe-LAFS
==========

Tahoe-LAFS is a Free and Open decentralized cloud storage system. It
distributes your data across multiple servers. Even if some of the servers
fail or are taken over by an attacker, the entire file store continues to
function correctly, preserving your privacy and security.

For full documentation, please see
http://tahoe-lafs.readthedocs.io/en/latest/ .

|Contributor Covenant|  |readthedocs|  |travis|  |circleci|  |codecov|


INSTALLING
==========

There are three ways to install Tahoe-LAFS.

using OS packages
^^^^^^^^^^^^^^^^^

Pre-packaged versions are available for several operating systems:

* Debian and Ubuntu users can ``apt-get install tahoe-lafs``
* NixOS, NetBSD (pkgsrc), ArchLinux, Slackware, and Gentoo have packages
  available, see `OSPackages`_ for details
* `Mac`_ and Windows installers are in development.

via pip
^^^^^^^

If you don't use an OS package, you'll need Python 2.7 and `pip`_. You may
also need a C compiler, and the development headers for python, libffi, and
OpenSSL. On a Debian-like system, use ``apt-get install build-essential
python-dev libffi-dev libssl-dev python-virtualenv``. On Windows, see
`<docs/windows.rst>`_.

Then, to install the most recent release, just run:

* ``pip install tahoe-lafs``

from source
^^^^^^^^^^^
To install from source (either so you can hack on it, or just to run
pre-release code), you should create a virtualenv and install into that:

* ``git clone https://github.com/tahoe-lafs/tahoe-lafs.git``
* ``cd tahoe-lafs``
* ``virtualenv --python=python2.7 venv``
* ``venv/bin/pip install --upgrade setuptools``
* ``venv/bin/pip install --editable .``
* ``venv/bin/tahoe --version``

To run the unit test suite:

* ``tox``

You can pass arguments to ``trial`` with an environment variable.  For
example, you can run the test suite on multiple cores to speed it up:

* ``TAHOE_LAFS_TRIAL_ARGS="-j4" tox``

For more detailed instructions, read `<docs/INSTALL.rst>`_ .

Once ``tahoe --version`` works, see `<docs/running.rst>`_ to learn how to set
up your first Tahoe-LAFS node.

LICENCE
=======

Copyright 2006-2018 The Tahoe-LAFS Software Foundation

You may use this package under the GNU General Public License, version 2 or,
at your option, any later version. You may use this package under the
Transitive Grace Period Public Licence, version 1.0, or at your option, any
later version. (You may choose to use this package under the terms of either
licence, at your option.) See the file `COPYING.GPL`_ for the terms of the
GNU General Public License, version 2. See the file `COPYING.TGPPL`_ for
the terms of the Transitive Grace Period Public Licence, version 1.0.

See `TGPPL.PDF`_ for why the TGPPL exists, graphically illustrated on three
slides.

.. _OSPackages: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/OSPackages
.. _Mac: docs/OS-X.rst
.. _pip: https://pip.pypa.io/en/stable/installing/
.. _COPYING.GPL: https://github.com/tahoe-lafs/tahoe-lafs/blob/master/COPYING.GPL
.. _COPYING.TGPPL: https://github.com/tahoe-lafs/tahoe-lafs/blob/master/COPYING.TGPPL.rst
.. _TGPPL.PDF: https://tahoe-lafs.org/~zooko/tgppl.pdf

----

.. |readthedocs| image:: http://readthedocs.org/projects/tahoe-lafs/badge/?version=latest
    :alt: documentation status
    :target: http://tahoe-lafs.readthedocs.io/en/latest/?badge=latest

.. |travis| image:: https://travis-ci.org/tahoe-lafs/tahoe-lafs.png?branch=master
    :alt: build status
    :target: https://travis-ci.org/tahoe-lafs/tahoe-lafs

.. |circleci| image:: https://circleci.com/gh/tahoe-lafs/tahoe-lafs.svg?style=svg
    :target: https://circleci.com/gh/tahoe-lafs/tahoe-lafs

.. |codecov| image:: https://codecov.io/github/tahoe-lafs/tahoe-lafs/coverage.svg?branch=master
    :alt: test coverage percentage
    :target: https://codecov.io/github/tahoe-lafs/tahoe-lafs?branch=master

.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
    :alt: code of conduct
    :target: docs/CODE_OF_CONDUCT.md