From 80b7e8975cacf1b4ef9b91765d52b6aef82761ca Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 2 Oct 2016 11:36:27 -0700 Subject: add deprecation warning in pcreate --- pyramid/scripts/pcreate.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py index f3121a915..73139732f 100644 --- a/pyramid/scripts/pcreate.py +++ b/pyramid/scripts/pcreate.py @@ -19,10 +19,15 @@ def main(argv=sys.argv, quiet=False): except KeyboardInterrupt: # pragma: no cover return 1 - class PCreateCommand(object): verbosity = 1 # required - description = "Render Pyramid scaffolding to an output directory" + description = """\ +Render Pyramid scaffolding to an output directory. + +Note: As of Pyramid 1.8, this command is deprecated. Use a specific +cookiecutter instead: +https://github.com/pylons/?query=cookiecutter +""" usage = "usage: %prog [options] -s output_directory" parser = optparse.OptionParser(usage, description=description) parser.add_option('-s', '--scaffold', @@ -77,6 +82,7 @@ class PCreateCommand(object): self.scaffolds = self.all_scaffolds() def run(self): + self._warn_pcreate_deprecated() if self.options.list: return self.show_scaffolds() if not self.options.scaffold_name and not self.args: @@ -212,5 +218,12 @@ class PCreateCommand(object): answer = input_('{0} [y|N]: '.format(prompt)) return answer.strip().lower() == 'y' + def _warn_pcreate_deprecated(self): + self.out('''\ +Note: As of Pyramid 1.8, this command is deprecated. Use a specific +cookiecutter instead: +https://github.com/pylons/?query=cookiecutter +''') + if __name__ == '__main__': # pragma: no cover sys.exit(main() or 0) -- cgit v1.2.3