Repository: certbot/certbot

Issue:
Remove or edit --dev-preview for Public Beta
What's the plan with these flags? From the help it looks like --agree-eula applies only to the "Developer Preview." Are we planning to remove that one once we have a cross-signature in place and change the default server URL to point at prod?



Discussion:
Yes, (at least my) plan was to delete `--agree-eula`, whenever "Developer Preview" disclaimer is not applicable any more, i.e. for launch.

Should we not do this for beta?

That's an interesting question. We will have two sets of users: staging and beta. They will both run stuff from PyPI, but they need different settings for `--server` and `--agree-eula`...

For now, we've decided to make this into `--agree-dev-preview`, and it can stick around until 1.0.


Resolving patch:
diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py
--- a/letsencrypt/cli.py
+++ b/letsencrypt/cli.py
@@ -6,7 +6,6 @@
 import logging
 import logging.handlers
 import os
-import pkg_resources
 import sys
 import time
 import traceback
@@ -771,6 +770,20 @@ def add(self, topic, *args, **kwargs):
             kwargs["help"] = argparse.SUPPRESS
             self.parser.add_argument(*args, **kwargs)
 
+    def add_deprecated_argument(self, argument_name, num_args):
+        """Adds a deprecated argument with the name argument_name.
+
+        Deprecated arguments are not shown in the help. If they are used
+        on the command line, a warning is shown stating that the
+        argument is deprecated and no other action is taken.
+
+        :param str argument_name: Name of deprecated argument.
+        :param int nargs: Number of arguments the option takes.
+
+        """
+        le_util.add_deprecated_argument(
+            self.parser.add_argument, argument_name, num_args)
+
     def add_group(self, topic, **kwargs):
         """
 
@@ -880,9 +893,6 @@ def prepare_and_parse_args(plugins, args):
         "automation", "--renew-by-default", action="store_true",
         help="Select renewal by default when domains are a superset of a "
              "a previously attained cert")
-    helpful.add(
-        "automation", "--agree-dev-preview", action="store_true",
-        help="Agree to the Let's Encrypt Developer Preview Disclaimer")
     helpful.add(
         "automation", "--agree-tos", dest="tos", action="store_true",
         help="Agree to the Let's Encrypt Subscriber Agreement")
@@ -947,6 +957,8 @@ def prepare_and_parse_args(plugins, args):
         help="Require that all configuration files are owned by the current "
              "user; only needed if your config is somewhere unsafe like /tmp/")
 
+    helpful.add_deprecated_argument("--agree-dev-preview", 0)
+
     _create_subparsers(helpful)
     _paths_parser(helpful)
     # _plugins_parsing should be the last thing to act upon the main
@@ -1204,13 +1216,6 @@ def main(cli_args=sys.argv[1:]):
     zope.component.provideUtility(report)
     atexit.register(report.atexit_print_messages)
 
-    # TODO: remove developer preview prompt for the launch
-    if not config.agree_dev_preview:
-        disclaimer = pkg_resources.resource_string("letsencrypt", "DISCLAIMER")
-        if not zope.component.getUtility(interfaces.IDisplay).yesno(
-                disclaimer, "Agree", "Cancel"):
-            raise errors.Error("Must agree to TOS")
-
     if not os.geteuid() == 0:
         logger.warning(
             "Root (sudo) is required to run most of letsencrypt functionality.")
diff --git a/letsencrypt/constants.py b/letsencrypt/constants.py
--- a/letsencrypt/constants.py
+++ b/letsencrypt/constants.py
@@ -16,7 +16,7 @@
                      "letsencrypt", "cli.ini"),
     ],
     verbose_count=-(logging.WARNING / 10),
-    server="https://acme-staging.api.letsencrypt.org/directory",
+    server="https://acme-v01.api.letsencrypt.org/directory",
     rsa_key_size=2048,
     rollback_checkpoints=1,
     config_dir="/etc/letsencrypt",


Test patch:
diff --git a/letsencrypt/tests/cli_test.py b/letsencrypt/tests/cli_test.py
--- a/letsencrypt/tests/cli_test.py
+++ b/letsencrypt/tests/cli_test.py
@@ -39,9 +39,9 @@ def setUp(self):
         self.config_dir = os.path.join(self.tmp_dir, 'config')
         self.work_dir = os.path.join(self.tmp_dir, 'work')
         self.logs_dir = os.path.join(self.tmp_dir, 'logs')
-        self.standard_args = ['--text', '--config-dir', self.config_dir,
-                              '--work-dir', self.work_dir, '--logs-dir',
-                              self.logs_dir, '--agree-dev-preview']
+        self.standard_args = ['--config-dir', self.config_dir,
+                              '--work-dir', self.work_dir,
+                              '--logs-dir', self.logs_dir, '--text']
 
     def tearDown(self):
         shutil.rmtree(self.tmp_dir)
@@ -180,8 +180,7 @@ def test_installer_selection(self, mock_display_ops, _rec):
     def test_configurator_selection(self, mock_exe_exists):
         mock_exe_exists.return_value = True
         real_plugins = disco.PluginsRegistry.find_all()
-        args = ['--agree-dev-preview', '--apache',
-                '--authenticator', 'standalone']
+        args = ['--apache', '--authenticator', 'standalone']
 
         # This needed two calls to find_all(), which we're avoiding for now
         # because of possible side effects:
diff --git a/tests/integration/_common.sh b/tests/integration/_common.sh
--- a/tests/integration/_common.sh
+++ b/tests/integration/_common.sh
@@ -21,7 +21,6 @@ letsencrypt_test () {
         $store_flags \
         --text \
         --no-redirect \
-        --agree-dev-preview \
         --agree-tos \
         --register-unsafely-without-email \
         --renew-by-default \