Skip to content

Commit

Permalink
Merge pull request #1114 from Fenn-CS/3781.remove-incomplete-cli-warn…
Browse files Browse the repository at this point in the history
…ing-python3

Python 3 support complete, so removed warning

Fixes: ticket:3781
  • Loading branch information
exarkun committed Sep 10, 2021
2 parents 30ec643 + 02ad7b9 commit 7ea9947
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ For more detailed instructions, read `Installing Tahoe-LAFS <docs/Installation/i

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

🐍 Python 3 Support
--------------------

Python 3 support has been introduced starting with Tahoe-LAFS 1.16.0, alongside Python 2.
System administrators are advised to start running Tahoe on Python 3 and should expect Python 2 support to be dropped in a future version.
Please, feel free to file issues if you run into bugs while running Tahoe on Python 3.


🤖 Issues
---------
Expand Down
Empty file added newsfragments/3781.minor
Empty file.
4 changes: 0 additions & 4 deletions src/allmydata/scripts/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ def _maybe_enable_eliot_logging(options, reactor):
# Pass on the options so we can dispatch the subcommand.
return options

PYTHON_3_WARNING = ("Support for Python 3 is an incomplete work-in-progress."
" Use at your own risk.")

def run(configFactory=Options, argv=sys.argv, stdout=sys.stdout, stderr=sys.stderr):
"""
Expand All @@ -253,8 +251,6 @@ def run(configFactory=Options, argv=sys.argv, stdout=sys.stdout, stderr=sys.stde
:raise SystemExit: Always raised after the run is complete.
"""
if six.PY3:
print(PYTHON_3_WARNING, file=stderr)
if sys.platform == "win32":
from allmydata.windows.fixups import initialize
initialize()
Expand Down
8 changes: 2 additions & 6 deletions src/allmydata/test/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from allmydata.mutable.common import NotWriteableError
from allmydata.mutable import layout as mutable_layout
from allmydata.mutable.publish import MutableData
from allmydata.scripts.runner import PYTHON_3_WARNING

from foolscap.api import DeadReferenceError, fireEventually, flushEventualQueue
from twisted.python.failure import Failure
Expand Down Expand Up @@ -2632,18 +2631,16 @@ def _run_in_subprocess(ignored, verb, *args, **kwargs):
newargs = ["--node-directory", self.getdir("client0"), verb] + list(args)
return self.run_bintahoe(newargs, stdin=stdin, env=env)

def _check_succeeded(res, check_stderr=True):
def _check_succeeded(res):
out, err, rc_or_sig = res
self.failUnlessEqual(rc_or_sig, 0, str(res))
if check_stderr:
self.assertIn(err.strip(), (b"", PYTHON_3_WARNING.encode("ascii")))

d.addCallback(_run_in_subprocess, "create-alias", "newalias")
d.addCallback(_check_succeeded)

STDIN_DATA = b"This is the file to upload from stdin."
d.addCallback(_run_in_subprocess, "put", "-", "newalias:tahoe-file", stdin=STDIN_DATA)
d.addCallback(_check_succeeded, check_stderr=False)
d.addCallback(_check_succeeded)

def _mv_with_http_proxy(ign):
env = os.environ
Expand All @@ -2656,7 +2653,6 @@ def _mv_with_http_proxy(ign):
def _check_ls(res):
out, err, rc_or_sig = res
self.failUnlessEqual(rc_or_sig, 0, str(res))
self.assertIn(err.strip(), (b"", PYTHON_3_WARNING.encode("ascii")))
self.failUnlessIn(b"tahoe-moved", out)
self.failIfIn(b"tahoe-file", out)
d.addCallback(_check_ls)
Expand Down

0 comments on commit 7ea9947

Please sign in to comment.